Class Actions

java.lang.Object
org.wicketstuff.security.actions.Actions

public class Actions extends Object
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 Details

    • getActionFactory

      public static ActionFactory getActionFactory(Object key)
      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

      public static void registerActionFactory(Object key, ActionFactory factory)
      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

      public static ActionFactory unregisterActionFactory(Object key)
      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.