Class ExecuteAction
java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.policy.decision.ExecuteAction
- All Implemented Interfaces:
ParameterListProvider
An action to be performed. Actions have a name and a set of name-value parameters.
-
Constructor Summary
ConstructorDescriptionExecuteAction
(ActionId actionId, ParameterList params) Instantiates a new execute action.ExecuteAction
(String actionId) Instantiates a new execute action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(Parameter<?> param) Adds a parameter.<T> void
addParameter
(String name, T value) Adds a parameter.void
Removes all parameters.boolean
Parameter<?>
getParameterForName
(String name) Gets a parameter.<T> T
getParameterValue
(String name, Class<T> clazz) Gets a parameter value.int
hashCode()
void
removeParameter
(String name) Adds a parameter.void
setParameters
(ParameterList params) Replaces all parameters with the parameters of the provided list.Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.fraunhofer.iese.mydata.policy.parameter.ParameterListProvider
getParameters
-
Constructor Details
-
ExecuteAction
Instantiates a new execute action.- Parameters:
actionId
- the action component_idparams
- the params
-
ExecuteAction
Instantiates a new execute action.- Parameters:
actionId
- the action component_id
-
-
Method Details
-
addParameter
Description copied from interface:ParameterListProvider
Adds a parameter.- Specified by:
addParameter
in interfaceParameterListProvider
- Parameters:
param
- the parameter to add
-
addParameter
Description copied from interface:ParameterListProvider
Adds a parameter.- Specified by:
addParameter
in interfaceParameterListProvider
- Type Parameters:
T
- the generic type- Parameters:
name
- the name of the parametervalue
- the value of the parameter
-
clearParameters
public void clearParameters()Description copied from interface:ParameterListProvider
Removes all parameters.- Specified by:
clearParameters
in interfaceParameterListProvider
-
equals
-
getParameterForName
Description copied from interface:ParameterListProvider
Gets a parameter.- Specified by:
getParameterForName
in interfaceParameterListProvider
- Parameters:
name
- the name of the parameter- Returns:
- the parameter with the given name, or null if it does not exist
-
hashCode
public int hashCode() -
setParameters
Description copied from interface:ParameterListProvider
Replaces all parameters with the parameters of the provided list.- Specified by:
setParameters
in interfaceParameterListProvider
- Parameters:
params
- list of parameters
-
getParameterValue
Description copied from interface:ParameterListProvider
Gets a parameter value.- Specified by:
getParameterValue
in interfaceParameterListProvider
- Type Parameters:
T
- the generic type- Parameters:
name
- the name of the parameterclazz
- the value of the parameter- Returns:
- the value of the parameter, or null if it does not exist
-
removeParameter
Description copied from interface:ParameterListProvider
Adds a parameter.- Specified by:
removeParameter
in interfaceParameterListProvider
- Parameters:
name
- the name of the parameter to be deleted
-