Class XLifecycleExtension

  • All Implemented Interfaces:
    java.io.Serializable

    public class XLifecycleExtension
    extends XExtension
    Extension defining additional attributes for the event lifecycle. Lifecycles define a set of states for activities, with an accompanying set of transitions between those states. Any event which is referring to by a lifecycle represents a certain transition of an activity within that lifecycle.
    Author:
    Christian W. Guenther (christian@deckfour.org)
    See Also:
    Serialized Form
    • Field Detail

      • EXTENSION_URI

        public static final java.net.URI EXTENSION_URI
        The unique URI of this extension.
      • KEY_MODEL

        public static final java.lang.String KEY_MODEL
        Key for the lifecycle model attribute.
        See Also:
        Constant Field Values
      • KEY_TRANSITION

        public static final java.lang.String KEY_TRANSITION
        Key for the transition attribute.
        See Also:
        Constant Field Values
      • VALUE_MODEL_STANDARD

        public static final java.lang.String VALUE_MODEL_STANDARD
        Value for the lifecycle model attribute referring to the standard model.
        See Also:
        Constant Field Values
      • ATTR_MODEL

        public static XAttributeLiteral ATTR_MODEL
        Lifecycle model attribute prototype
      • ATTR_TRANSITION

        public static XAttributeLiteral ATTR_TRANSITION
        Transition attribute prototype
    • Method Detail

      • instance

        public static XLifecycleExtension instance()
        Provides static access to the singleton instance of this extension.
        Returns:
        Singleton instance.
      • extractModel

        public java.lang.String extractModel​(XLog log)
        Extracts the lifecycle model identifier from a given log.
        Parameters:
        log - Event log.
        Returns:
        Lifecycle model identifier string.
      • assignModel

        public void assignModel​(XLog log,
                                java.lang.String model)
        Assigns a value for the lifecycle model identifier to a given log.
        Parameters:
        log - Log to be tagged.
        model - Lifecycle model identifier string to be used.
      • usesStandardModel

        public boolean usesStandardModel​(XLog log)
        Checks, whether a given log uses the standard model for lifecycle transitions.
        Parameters:
        log - Log to be checked.
        Returns:
        Returns true, if the log indeed uses the standard lifecycle model.
      • extractTransition

        public java.lang.String extractTransition​(XEvent event)
        Extracts the lifecycle transition string from a given event.
        Parameters:
        event - An event.
        Returns:
        The lifecycle transition string of this event. Can be null, if not defined.
      • extractStandardTransition

        public XLifecycleExtension.StandardModel extractStandardTransition​(XEvent event)
        Extracts the standard lifecycle transition object from a given event.
        Parameters:
        event - An event.
        Returns:
        The standard lifecycle transition instance of this event. Can be null, if not defined.
      • assignTransition

        public void assignTransition​(XEvent event,
                                     java.lang.String transition)
        Assigns a lifecycle transition string to the given event.
        Parameters:
        event - Event to be tagged.
        transition - Lifecycle transition string to be assigned.
      • assignStandardTransition

        public void assignStandardTransition​(XEvent event,
                                             XLifecycleExtension.StandardModel transition)
        Assigns a standard lifecycle transition to the given event.
        Parameters:
        event - Event to be tagged.
        transition - Standard lifecycle transition to be assigned.