Package de.fraunhofer.iese.mydata.policy
Class PipRequest
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.policy.PipRequest
-
- All Implemented Interfaces:
ParameterListProvider
public class PipRequest extends MyDataEntity implements ParameterListProvider
A request that instructs the PIP.- Author:
- Fraunhofer IESE
-
-
Constructor Summary
Constructors Constructor Description PipRequest(InfoId infoId, Parameter<?>... params)Instantiates a new pip request.PipRequest(InfoId infoId, ParameterList params)Instantiates a new pip request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(Parameter<?> param)Adds a parameter.<R> voidaddParameter(String name, R value)Adds a parameter.voidclearParameters()Removes all parameters.booleanequals(Object obj)Parameter<?>getParameterForName(String name)Gets a parameter.ParameterListgetParameters()Gets the list of all parameters.<R> RgetParameterValue(String name, Class<R> clazz)Gets a parameter value.inthashCode()voidremoveParameter(String name)Adds a parameter.voidsetParameters(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
-
-
-
-
Constructor Detail
-
PipRequest
public PipRequest(InfoId infoId, Parameter<?>... params)
Instantiates a new pip request.- Parameters:
infoId- the id of the method to be executedparams- parameters used for evaluation
-
PipRequest
public PipRequest(InfoId infoId, ParameterList params)
Instantiates a new pip request.- Parameters:
infoId- the id of the method to be executedparams- parameters used for evaluation
-
-
Method Detail
-
addParameter
public void addParameter(Parameter<?> param)
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
addParameterin interfaceParameterListProvider- Parameters:
param- the parameter to add
-
addParameter
public <R> void addParameter(String name, R value)
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
addParameterin interfaceParameterListProvider- Type Parameters:
R- the generic type- Parameters:
name- the name of the parametervalue- the value of the parameter
-
clearParameters
public void clearParameters()
Description copied from interface:ParameterListProviderRemoves all parameters.- Specified by:
clearParametersin interfaceParameterListProvider
-
getParameterForName
public Parameter<?> getParameterForName(String name)
Description copied from interface:ParameterListProviderGets a parameter.- Specified by:
getParameterForNamein interfaceParameterListProvider- Parameters:
name- the name of the parameter- Returns:
- the parameter with the given name, or null if it does not exist
-
getParameters
public ParameterList getParameters()
Description copied from interface:ParameterListProviderGets the list of all parameters.- Specified by:
getParametersin interfaceParameterListProvider- Returns:
- the list of all parameters
-
setParameters
public void setParameters(ParameterList params)
Description copied from interface:ParameterListProviderReplaces all parameters with the parameters of the provided list.- Specified by:
setParametersin interfaceParameterListProvider- Parameters:
params- list of parameters
-
getParameterValue
public <R> R getParameterValue(String name, Class<R> clazz)
Description copied from interface:ParameterListProviderGets a parameter value.- Specified by:
getParameterValuein interfaceParameterListProvider- Type Parameters:
R- 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
public void removeParameter(String name)
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
removeParameterin interfaceParameterListProvider- Parameters:
name- the name of the parameter to be deleted
-
-