@Singleton public class LazyActionHandlerValidatorRegistryImpl extends Object implements LazyActionHandlerValidatorRegistry
ActionHandler
and
ActionValidator
implementations must have a public, default constructor.Modifier and Type | Method and Description |
---|---|
<A extends Action<R>,R extends Result> |
addActionHandlerValidatorClass(Class<A> actionClass,
ActionHandlerValidatorClass<A,R> actionHandlerValidatorClass)
Registers the specified
ActionValidator
class with the registry. |
void |
clearActionHandlerValidators()
Clears all registered
ActionValidator from the registry. |
<A extends Action<R>,R extends Result> |
findActionHandlerValidator(A action)
Searches the registry and returns the
ActionValidator which supports the specified Action ,
or null if none is available. |
ActionValidator |
findActionValidator(Class<? extends ActionValidator> actionValidatorClass)
Searches the registry for already bound
ActionValidator class and return the instance or
null if none is available. |
<A extends Action<R>,R extends Result> |
removeActionHandlerValidatorClass(Class<A> actionClass,
ActionHandlerValidatorClass<A,R> actionHandlerValidatorClass)
Removes any registration of specified class, as well as any instances which have been created.
|
public <A extends Action<R>,R extends Result> void addActionHandlerValidatorClass(Class<A> actionClass, ActionHandlerValidatorClass<A,R> actionHandlerValidatorClass)
LazyActionHandlerValidatorRegistry
ActionValidator
class with the registry.addActionHandlerValidatorClass
in interface LazyActionHandlerValidatorRegistry
A
- Type of associated Action
R
- Type of associated Result
actionClass
- The Action
classactionHandlerValidatorClass
- The ActionHandlerValidatorClass
public void clearActionHandlerValidators()
ActionHandlerValidatorRegistry
ActionValidator
from the registry.clearActionHandlerValidators
in interface ActionHandlerValidatorRegistry
public <A extends Action<R>,R extends Result> ActionHandlerValidatorInstance findActionHandlerValidator(A action)
ActionHandlerValidatorRegistry
ActionValidator
which supports the specified Action
,
or null
if none is available.findActionHandlerValidator
in interface ActionHandlerValidatorRegistry
A
- Type of associated Action
R
- Type of associated Result
action
- The Action
ActionValidator
public ActionValidator findActionValidator(Class<? extends ActionValidator> actionValidatorClass)
ActionHandlerValidatorRegistry
ActionValidator
class and return the instance or
null
if none is available.findActionValidator
in interface ActionHandlerValidatorRegistry
actionValidatorClass
- The Action
public <A extends Action<R>,R extends Result> void removeActionHandlerValidatorClass(Class<A> actionClass, ActionHandlerValidatorClass<A,R> actionHandlerValidatorClass)
LazyActionHandlerValidatorRegistry
removeActionHandlerValidatorClass
in interface LazyActionHandlerValidatorRegistry
A
- Type of associated Action
R
- Type of associated Result
actionClass
- The Action
classactionHandlerValidatorClass
- The ActionHandlerValidatorClass
classCopyright © 2010-2014 ArcBees. All Rights Reserved.