Class Action

java.lang.Object
org.apache.unomi.api.actions.Action
All Implemented Interfaces:
Serializable

public class Action extends Object implements Serializable
An action that can be executed as a consequence of a Rule being triggered. An action is characterized by its associated ActionType and parameter values.
See Also:
  • Constructor Details

    • Action

      public Action()
      Instantiates a new Action.
    • Action

      public Action(ActionType actionType)
      Instantiates a new Action with the specified ActionType
      Parameters:
      actionType - the action's type
  • Method Details

    • getActionType

      public ActionType getActionType()
      Retrieves the action's type.
      Returns:
      the action's type
    • setActionType

      public void setActionType(ActionType actionType)
      Sets the action's type.
      Parameters:
      actionType - the action's type
    • getActionTypeId

      public String getActionTypeId()
      Retrieves the identifier of the associated action type.
      Returns:
      the identifier of the associated action type
    • setActionTypeId

      public void setActionTypeId(String actionTypeId)
      Sets the identifier of the associated action type.
      Parameters:
      actionTypeId - the identifier of the associated action type
    • getParameterValues

      public Map<String,Object> getParameterValues()
      Retrieves the parameter values as a Map of parameter name - associated value pairs.
      Returns:
      a Map of parameter name - associated value pairs
    • setParameterValues

      public void setParameterValues(Map<String,Object> parameterValues)
      Sets the parameter values as a Map of parameter name - associated value pairs.
      Parameters:
      parameterValues - the parameter values as a Map of parameter name - associated value pairs
    • setParameter

      public void setParameter(String name, Object value)
      Sets the parameter identified by the specified name to the specified value. If a parameter with that name already exists, replaces its value, otherwise adds the new parameter with the specified name and value.
      Parameters:
      name - the name of the parameter to set
      value - the value of the parameter