Class EventInformation

java.lang.Object
org.chenile.stm.model.EventInformation
Direct Known Subclasses:
Transition

public class EventInformation extends Object
An abstraction to extract actions and their meta data and share them across transitions. An event and a transition are two different things. Different transitions can potentially generate the same event. This captures all the event information in one place. In this way, the same event information does not have to be repeated for every transition.
Author:
Raja Shankar Kolluru
  • Field Details

    • GENERIC_EVENT_ID

      public static final String GENERIC_EVENT_ID
      See Also:
    • tagDefinition

      public boolean tagDefinition
      Specifies if this information belongs to tag definition or in from event-information
    • tag

      protected String tag
    • eventId

      protected String eventId
    • eventIdTag

      public String eventIdTag
    • componentNameTag

      public String componentNameTag
    • newStateIdTag

      public String newStateIdTag
    • newFlowIdTag

      public String newFlowIdTag
    • transitionAction

      protected STMTransitionAction<?> transitionAction
    • newFlowId

      public String newFlowId
    • newStateId

      public String newStateId
    • metadata

      protected Map<String,String> metadata
  • Constructor Details

    • EventInformation

      public EventInformation()
  • Method Details

    • getTag

      public String getTag()
    • setTag

      public void setTag(String tag)
    • getEventId

      public String getEventId()
    • setEventId

      public void setEventId(String eventId)
    • id

      public EventInformation id(String eventId)
    • getTransitionAction

      public STMTransitionAction<?> getTransitionAction()
    • setTransitionAction

      public void setTransitionAction(STMTransitionAction<?> transitionAction)
    • transitionAction

      public EventInformation transitionAction(STMTransitionAction<?> transitionAction)
    • addMetaData

      public EventInformation addMetaData(String name, String value)
    • getMetadata

      public Map<String,String> getMetadata()
    • mergeTagDefinitionWithEventInformation

      public EventInformation mergeTagDefinitionWithEventInformation(EventInformation other)
      Merges tag definition as defined in the add-transition-tag
      (which is contained in this event information) with the event information defined in the "event-information" tag.
      Tag information can be overridden by event-information
      Parameters:
      other - the event information to merge with this is from <event-information> tag
      Returns:
      the merged information as a copy