com.ibm.commerce.event.impl

Class ECEventUtilities

  • java.lang.Object
    • com.ibm.commerce.event.impl.ECEventUtilities


  • public class ECEventUtilities
    extends java.lang.Object
    This class provides common utilities for extracting information from CommonBaseEvent objects.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static CommandContext createCommandContext(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method creates a version of the command context based on the context information found in the common base event.
      static java.lang.String getCallerId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method returns the caller identifier associated with the command base event.
      static java.lang.String getChannelId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method returns the channel identifier associated with the command base event.
      static java.lang.String getContextData(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent, java.lang.String contextName)
      This method returns the context data associated with the specified identifier.
      static boolean getExtendedDataElementBooleanAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified boolean attribute name.
      static java.sql.Timestamp getExtendedDataElementDateAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified Timestamp attribute name.
      static java.lang.Integer getExtendedDataElementIntegerAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified Integer attribute name.
      static java.lang.Long getExtendedDataElementLongAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified Long attribute name.
      static java.lang.String[] getExtendedDataElementStringArrayAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified String attribute name.
      static java.lang.String getExtendedDataElementStringAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement, java.lang.String name)
      This method returns the first value of the extended data element that matches the specified String attribute name.
      static java.lang.String getRunAsId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method returns the "run as" identifier associated with the command base event.
      static java.lang.String getStoreId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method returns the store identifier associated with the command base event.
      static java.lang.String maskCommonBaseEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
      This method is used for tracing common base event.
      static java.lang.String maskExtendedDataElement(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement ede)
      This method is used for tracing extended data element in a common base event.
      static void raiseCommonBaseEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
      This method creates an ECEvent with the event data being the common base event.
      static void storeCommonBaseEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
      This method publishes the common base event by persisting it into a local table.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getContextData

        public static java.lang.String getContextData(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent,
                                                      java.lang.String contextName)
        This method returns the context data associated with the specified identifier. If the context data does not exist, null is returned.
        Parameters:
        commonBaseEvent - This is the CommonBaseEvent object.
        contextName - This is the identifier representing the context data. This is a String object that usually represents the context name and attribute.
        Returns:
        This method returns the context data found in the event.
      • getCallerId

        public static java.lang.String getCallerId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method returns the caller identifier associated with the command base event. If one is not found then null is returned.
        Parameters:
        commonBaseEvent - This is the common base event.
        Returns:
        This method returns the caller identifier found in the event.
      • getRunAsId

        public static java.lang.String getRunAsId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method returns the "run as" identifier associated with the command base event. If one is not found then null is returned.
        Parameters:
        commonBaseEvent - This is the common base event.
        Returns:
        This method returns the "run as" identifier found in the event.
      • getStoreId

        public static java.lang.String getStoreId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method returns the store identifier associated with the command base event. If one is not found then null is returned.
        Parameters:
        commonBaseEvent - This is the common base event.
        Returns:
        This method returns the store identifier found in the event.
      • getChannelId

        public static java.lang.String getChannelId(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method returns the channel identifier associated with the command base event. If one is not found then null is returned.
        Parameters:
        commonBaseEvent - This is the common base event.
        Returns:
        This method returns the channel identifier found in the event.
      • getExtendedDataElementBooleanAttribute

        public static boolean getExtendedDataElementBooleanAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                     java.lang.String name)
        This method returns the first value of the extended data element that matches the specified boolean attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns a boolean value that represents the first value that matches the attribute name.
      • getExtendedDataElementIntegerAttribute

        public static java.lang.Integer getExtendedDataElementIntegerAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                               java.lang.String name)
        This method returns the first value of the extended data element that matches the specified Integer attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns an Integer object that represents the first value that matches the attribute name.
      • getExtendedDataElementStringAttribute

        public static java.lang.String getExtendedDataElementStringAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                             java.lang.String name)
        This method returns the first value of the extended data element that matches the specified String attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns an String object that represents the first value that matches the attribute name.
      • getExtendedDataElementStringArrayAttribute

        public static java.lang.String[] getExtendedDataElementStringArrayAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                                    java.lang.String name)
        This method returns the first value of the extended data element that matches the specified String attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns an String[] object that represents the first value that matches the attribute name.
      • getExtendedDataElementDateAttribute

        public static java.sql.Timestamp getExtendedDataElementDateAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                             java.lang.String name)
        This method returns the first value of the extended data element that matches the specified Timestamp attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns an Timestamp object that represents the first value that matches the attribute name.
      • getExtendedDataElementLongAttribute

        public static java.lang.Long getExtendedDataElementLongAttribute(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement,
                                                                         java.lang.String name)
        This method returns the first value of the extended data element that matches the specified Long attribute name.
        Parameters:
        extendedDataElement - This is the extended data element.
        name - This is the attribute name.
        Returns:
        This method returns an Long object that represents the first value that matches the attribute name.
      • createCommandContext

        public static CommandContext createCommandContext(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method creates a version of the command context based on the context information found in the common base event.
        Parameters:
        commonBaseEvent - This is the common base event.
        Returns:
        This method returns the a command context based on the information found in the common base event.
      • raiseCommonBaseEvent

        public static void raiseCommonBaseEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
                                         throws ECException
        This method creates an ECEvent with the event data being the common base event.
        Parameters:
        cbe - This is the common base event.
        Throws:
        ECException - This is thrown when a problem occurs while one of the listeners is processing the event.
      • maskCommonBaseEvent

        public static java.lang.String maskCommonBaseEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
        This method is used for tracing common base event. It will pass the values stored in ContextDataElements and ExtendedDataElements through the MaskingFactory to mask out sensitive data.
        Parameters:
        cbe - This is the common base event.
        Returns:
        A string representation of the common base event object.
      • maskExtendedDataElement

        public static java.lang.String maskExtendedDataElement(org.eclipse.hyades.logging.events.cbe.ExtendedDataElement ede)
        This method is used for tracing extended data element in a common base event. It will pass the values stored in the elements through the MaskingFactory to mask out sensitive data. It will also loop through the children of the extended data elements to mask out sensitve data in there too.
        Parameters:
        ede - This is the extended data element.
        Returns:
        A string representation of the extended data element object.