Package org.wicketstuff.security.actions
Interface ActionFactory
public interface ActionFactory
The actionFactory translates between string based actions, and class based actions.
- Author:
- marrink
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Clean up any resources this factory holds.getAction(Class<? extends WaspAction> waspActionClass) Returns the registered action of this class.Creates or reuses a WaspAction based on string values.Returns a list of all the registered actions at the time of the invocation.register(Class<? extends WaspAction> waspActionClass, String name) Register a new action.
-
Method Details
-
getAction
Creates or reuses a WaspAction based on string values.- Parameters:
actions-- Returns:
- a WaspAction
-
register
WaspAction register(Class<? extends WaspAction> waspActionClass, String name) throws RegistrationException - Parameters:
waspActionClass- the class of the action to register (must be subclass ofWaspActionname- the name to register the action with- Returns:
- an instance of the registered action
- Throws:
RegistrationException- if the action cannot be registered
-
getAction
Returns the registered action of this class.- Parameters:
waspActionClass- a subclass ofWaspAction- Returns:
- a new or reused instance of this class
- Throws:
IllegalArgumentException- if the class is not registered.
-
getRegisteredActions
List<WaspAction> getRegisteredActions()Returns a list of all the registered actions at the time of the invocation. This list is not kept in sync with the factory.- Returns:
- a list of actions (instances, not classes)
-
destroy
void destroy()Clean up any resources this factory holds.
-