Package org.wicketstuff.security.actions
Class Actions
java.lang.Object
org.wicketstuff.security.actions.Actions
Actions maintains the collection of
ActionFactorys. There can only be one Actions in each
virtual machine. Having a separate instance where all the ActionFactories are registered makes it
easier to use them outside wicket because there now is a single (non wicket) point of entry.
ActionFactorys should not be shared.- Author:
- marrink
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActionFactorygetActionFactory(Object key) Returns the ActionFactory stored with the key.static voidregisterActionFactory(Object key, ActionFactory factory) Registers a new ActionFactory for anybody knowing the right key to be retrieved.static ActionFactoryRemoves the registration of a single ActionFactory.
-
Method Details
-
getActionFactory
Returns the ActionFactory stored with the key.- Parameters:
key- the key- Returns:
- the factory or null if no factory is registered with that key
-
registerActionFactory
Registers a new ActionFactory for anybody knowing the right key to be retrieved. It is not possible to overwrite a registration without first unregistering the previous factory.- Parameters:
key- the key to store the factory with.factory- the ActionFactory.- Throws:
IllegalArgumentException- if the factory is null if an attempt is made to overwrite the registration.- See Also:
-
unregisterActionFactory
Removes the registration of a single ActionFactory.- Parameters:
key- the key the factory is registered with- Returns:
- the registered factory or null if none was registered with the key.
-