Class XOrganizationalExtension

  • All Implemented Interfaces:
    java.io.Serializable

    public class XOrganizationalExtension
    extends XExtension
    This extension adds the organizational perspective to event logs. It defines for events three attributes, referring to:
    • The resource which has executed the event
    • The role of this resource
    • The group of this resource
      Author:
      Christian W. Guenther (christian@deckfour.org)
      See Also:
      Serialized Form
      • Field Detail

        • EXTENSION_URI

          public static final java.net.URI EXTENSION_URI
          Unique URI of this extension.
        • KEY_RESOURCE

          public static final java.lang.String KEY_RESOURCE
          Key for the resource attribute.
          See Also:
          Constant Field Values
        • KEY_ROLE

          public static final java.lang.String KEY_ROLE
          Key for the role attribute.
          See Also:
          Constant Field Values
        • KEY_GROUP

          public static final java.lang.String KEY_GROUP
          Key for the group attribute.
          See Also:
          Constant Field Values
        • ATTR_RESOURCE

          public static XAttributeLiteral ATTR_RESOURCE
          Resource attribute prototype.
      • Method Detail

        • instance

          public static XOrganizationalExtension instance()
          Provides access to the singleton instance.
          Returns:
          Singleton extension.
        • extractResource

          public java.lang.String extractResource​(XEvent event)
          Extracts the resource attribute string from an event.
          Parameters:
          event - Event to be queried.
          Returns:
          Resource string for the given event (may be null if not defined)
        • assignResource

          public void assignResource​(XEvent event,
                                     java.lang.String resource)
          Assigns the resource attribute value for a given event.
          Parameters:
          event - Event to be modified.
          resource - Resource string to be assigned.
        • extractRole

          public java.lang.String extractRole​(XEvent event)
          Extracts the role attribute string from an event.
          Parameters:
          event - Event to be queried.
          Returns:
          Role string for the given event (may be null if not defined)
        • assignRole

          public void assignRole​(XEvent event,
                                 java.lang.String role)
          Assigns the role attribute value for a given event.
          Parameters:
          event - Event to be modified.
          resource - Role string to be assigned.
        • extractGroup

          public java.lang.String extractGroup​(XEvent event)
          Extracts the group attribute string from an event.
          Parameters:
          event - Event to be queried.
          Returns:
          Group string for the given event (may be null if not defined)
        • assignGroup

          public void assignGroup​(XEvent event,
                                  java.lang.String group)
          Assigns the group attribute value for a given event.
          Parameters:
          event - Event to be modified.
          resource - Group string to be assigned.