Interface ActionRegistry

All Known Implementing Classes:
ActionRegistryImpl

public interface ActionRegistry
Maintains the registry of Workflow Actions. Actions are (currently) identified by a one-letter action code and map to a Class which should extend the org.kuali.rice.kew.actions.ActionTakenEvent class.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Summary

    Modifier and Type
    Method
    Description
    createAction(String actionCode, List<org.kuali.rice.core.api.reflect.DataDefinition> parameters)
    Constructs and returns the ActionTakenEvent implementation which can be used to invoke the Action with the given parameters.
    Returns an immutable map of the Action Code to Action Class mappings in this registry.
    org.kuali.rice.kew.api.action.ValidActions
    getValidActions(org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, DocumentRouteHeaderValue document)
    Returns a List of valid action codes for the given user on the document.
    boolean
    isValidAction(String actionTypeCode, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, DocumentRouteHeaderValue document)
    Determines whether the given action type is valid for the given user and document instance.
    void
    registerAction(String actionCode, String actionClass)
    Registers the given Action.
    void
    Unregisters the Action with the given code.
  • Method Details

    • registerAction

      void registerAction(String actionCode, String actionClass)
      Registers the given Action.
      Parameters:
      actionCode - Should be a one-letter unique code
      actionClass - the fully-qualified Java classname of the ActionTakenEvent implementation
      Throws:
      IllegalArgumentException - if the actionCode is not one character or already in use, also throws this exception if the actionClass is null
    • unregisterAction

      void unregisterAction(String actionCode)
      Unregisters the Action with the given code.
    • getActionMap

      Map getActionMap()
      Returns an immutable map of the Action Code to Action Class mappings in this registry.
    • createAction

      ActionTakenEvent createAction(String actionCode, List<org.kuali.rice.core.api.reflect.DataDefinition> parameters) throws org.kuali.rice.kew.api.exception.ResourceUnavailableException
      Constructs and returns the ActionTakenEvent implementation which can be used to invoke the Action with the given parameters.
      Throws:
      org.kuali.rice.kew.api.exception.ResourceUnavailableException - if the action class cannot be constructed
      IllegalArgumentException - if the given actionCode has not been registered
    • getValidActions

      org.kuali.rice.kew.api.action.ValidActions getValidActions(org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, DocumentRouteHeaderValue document)
      Returns a List of valid action codes for the given user on the document.
      Throws:
      org.kuali.rice.kew.api.exception.ResourceUnavailableException - if an action class cannot be constructed
    • isValidAction

      boolean isValidAction(String actionTypeCode, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, DocumentRouteHeaderValue document)
      Determines whether the given action type is valid for the given user and document instance.
      Throws:
      org.kuali.rice.kew.api.exception.ResourceUnavailableException - if an action class cannot be constructed