Package org.apache.unomi.api.actions
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 aRulebeing triggered. An action is characterized by its associatedActionTypeand parameter values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Action()Instantiates a new Action.Action(ActionType actionType)Instantiates a new Action with the specifiedActionType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionTypegetActionType()Retrieves the action's type.StringgetActionTypeId()Retrieves the identifier of the associated action type.Map<String,Object>getParameterValues()Retrieves the parameter values as a Map of parameter name - associated value pairs.voidsetActionType(ActionType actionType)Sets the action's type.voidsetActionTypeId(String actionTypeId)Sets the identifier of the associated action type.voidsetParameter(String name, Object value)Sets the parameter identified by the specified name to the specified value.voidsetParameterValues(Map<String,Object> parameterValues)Sets the parameter values as a Map of parameter name - associated value pairs.
-
-
-
Constructor Detail
-
Action
public Action()
Instantiates a new Action.
-
Action
public Action(ActionType actionType)
Instantiates a new Action with the specifiedActionType- Parameters:
actionType- the action's type
-
-
Method Detail
-
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 setvalue- the value of the parameter
-
-