java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.policy.event.Event
All Implemented Interfaces:
ParameterListProvider

public class Event extends MyDataEntity implements ParameterListProvider
An event that occured in the system under observation, intercepted or monitored by a PolicyEnforcementPoint.
Author:
Fraunhofer IESE
  • Constructor Details

    • Event

      public Event(ActionId actionId, Instant instant, Parameter<?>... params)
      Instantiates a new event.
      Parameters:
      actionId - the action component_id
      instant - the instant, will set the timestamp
      params - the params
    • Event

      public Event(ActionId actionId, Instant instant, ParameterList params)
      Instantiates a new event.
      Parameters:
      actionId - the action component_id
      instant - the instant, will set the timestamp
      params - the params
    • Event

      public Event(ActionId actionId, boolean isTry, Parameter<?>... params)
      Instantiates a new event.
      Parameters:
      actionId - the action component_id
      isTry - the is try
      params - the params
    • Event

      public Event(ActionId actionId, Parameter<?>... params)
      Instantiates a new event.
      Parameters:
      actionId - the action component_id
      params - the params
  • Method Details

    • addParameter

      public void addParameter(Parameter<?> param)
      Description copied from interface: ParameterListProvider
      Adds a parameter.
      Specified by:
      addParameter in interface ParameterListProvider
      Parameters:
      param - the parameter to add
    • addParameter

      public <T> void addParameter(String name, T value)
      Description copied from interface: ParameterListProvider
      Adds a parameter.
      Specified by:
      addParameter in interface ParameterListProvider
      Type Parameters:
      T - the generic type
      Parameters:
      name - the name of the parameter
      value - the value of the parameter
    • clearParameters

      public void clearParameters()
      Clear parameters.
      Specified by:
      clearParameters in interface ParameterListProvider
    • getMillisecondSinceEpoch

      public Long getMillisecondSinceEpoch()
      Gets the time at which the action occurred / was intercepted by the PEP.
      Returns:
      the milliseconds since epoch
    • getParameterForName

      public Parameter<?> getParameterForName(String name)
      Description copied from interface: ParameterListProvider
      Gets a parameter.
      Specified by:
      getParameterForName in interface ParameterListProvider
      Parameters:
      name - the name of the parameter
      Returns:
      the parameter with the given name, or null if it does not exist
    • getParameterValue

      public <T> T getParameterValue(String name, Class<T> clazz)
      Description copied from interface: ParameterListProvider
      Gets a parameter value.
      Specified by:
      getParameterValue in interface ParameterListProvider
      Type Parameters:
      T - the generic type
      Parameters:
      name - the name of the parameter
      clazz - the value of the parameter
      Returns:
      the value of the parameter, or null if it does not exist
    • getValueForName

      public Object getValueForName(String name)
      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

      public void removeParameter(String name)
      Description copied from interface: ParameterListProvider
      Adds a parameter.
      Specified by:
      removeParameter in interface ParameterListProvider
      Parameters:
      name - the name of the parameter to be deleted
    • setParameters

      public void setParameters(ParameterList params)
      Description copied from interface: ParameterListProvider
      Replaces all parameters with the parameters of the provided list.
      Specified by:
      setParameters in interface ParameterListProvider
      Parameters:
      params - list of parameters
    • setTimestamp

      public void setTimestamp(Instant instant)
      Sets the time at which the action occurred / was intercepted by the PEP.
      Parameters:
      instant - the instant to set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object