Class Event
java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.policy.event.Event
- All Implemented Interfaces:
ParameterListProvider
An event that occured in the system under observation, intercepted or monitored by a
PolicyEnforcementPoint.
- Author:
- Fraunhofer IESE
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new event.Instantiates a new event.Instantiates a new event.Event(ActionId actionId, Instant instant, ParameterList params) Instantiates a new event. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(Parameter<?> param) Adds a parameter.<T> voidaddParameter(String name, T value) Adds a parameter.voidClear parameters.booleanGets the time at which the action occurred / was intercepted by the PEP.Parameter<?>getParameterForName(String name) Gets a parameter.<T> TgetParameterValue(String name, Class<T> clazz) Gets a parameter value.getValueForName(String name) Gets the object which is added as parameter for given name.inthashCode()voidremoveParameter(String name) Adds a parameter.voidsetParameters(ParameterList params) Replaces all parameters with the parameters of the provided list.voidsetTimestamp(Instant instant) Sets the time at which the action occurred / was intercepted by the PEP.Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheckMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.fraunhofer.iese.mydata.policy.parameter.ParameterListProvider
getParameters
-
Constructor Details
-
Event
Instantiates a new event.- Parameters:
actionId- the action component_idinstant- the instant, will set the timestampparams- the params
-
Event
Instantiates a new event.- Parameters:
actionId- the action component_idinstant- the instant, will set the timestampparams- the params
-
Event
Instantiates a new event.- Parameters:
actionId- the action component_idisTry- the is tryparams- the params
-
Event
Instantiates a new event.- Parameters:
actionId- the action component_idparams- the params
-
-
Method Details
-
addParameter
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
addParameterin interfaceParameterListProvider- Parameters:
param- the parameter to add
-
addParameter
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
addParameterin interfaceParameterListProvider- Type Parameters:
T- the generic type- Parameters:
name- the name of the parametervalue- the value of the parameter
-
clearParameters
public void clearParameters()Clear parameters.- Specified by:
clearParametersin interfaceParameterListProvider
-
getMillisecondSinceEpoch
Gets the time at which the action occurred / was intercepted by the PEP.- Returns:
- the milliseconds since epoch
-
getParameterForName
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
-
getParameterValue
Description copied from interface:ParameterListProviderGets a parameter value.- Specified by:
getParameterValuein 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
-
getValueForName
Gets the object which is added as parameter for given name.- Parameters:
name- the name- Returns:
- the object, null in case the parameter with the given name does not exist
-
removeParameter
Description copied from interface:ParameterListProviderAdds a parameter.- Specified by:
removeParameterin interfaceParameterListProvider- Parameters:
name- the name of the parameter to be deleted
-
setParameters
Description copied from interface:ParameterListProviderReplaces all parameters with the parameters of the provided list.- Specified by:
setParametersin interfaceParameterListProvider- Parameters:
params- list of parameters
-
setTimestamp
Sets the time at which the action occurred / was intercepted by the PEP.- Parameters:
instant- the instant to set
-
hashCode
public int hashCode() -
equals
-