com.ibm.commerce.marketingcenter.events.runtime

Class ExperimentEvaluationECEventListenerImpl

  • java.lang.Object
    • com.ibm.commerce.event.EventComponentConfiguration
      • com.ibm.commerce.event.impl.AbstractECEventListener
        • com.ibm.commerce.marketingcenter.events.runtime.ExperimentEvaluationECEventListenerImpl
  • All Implemented Interfaces:
    com.ibm.commerce.event.WCSEventListener, com.ibm.commerce.server.ComponentConfiguration, java.util.EventListener


    public class ExperimentEvaluationECEventListenerImpl
    extends com.ibm.commerce.event.impl.AbstractECEventListener
    The Experiment Evaluation Event Listener listens for Common Base Events (CBE) and only processes order submission events. For each submitted order, it attempts to correlate the order with the experiment test elements displayed to the user. If the order can be correlated with an experiment test element, then the experiment statistics table is updated with the order information.

    When customizing the experiment statistics, extend this class to correlate a customer's order to a customer's action in their session by doing the following:

    1. Extend ExperimentEvaluationECEventListenerImpl and override the following methods:
      1. StringBuffer addCustomDataToLogQuery(StringBuffer)
        Loads the customer action data from the EXPLOG table.
      2. boolean processOtherResultType(ResultSet, int, String, List, Integer, Integer, String, String, Integer, CommonBaseEvent)
        Attempt to correlate the customer's order to what the customer has seen in their session.
      3. StringBuffer addCustomDataToStatisticsUpdate(StringBuffer)
        Update the EXPSTATS statistics table custom columns.
      4. int addCustomDataToStatisticsUpdate(PreparedStatement ps, int)
        Update the EXPSTATS statistics table custom columns.
    2. Change your WebSphere Commerce configuration file, for example instance_name.xml, to load the extended listener class instead of ExperimentEvaluationECEventListenerImpl
    • Field Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Class getECEventContainer()
      This method returns the class OrderSubmissionEventContainer as the event container.
      java.util.Set getEvents()
      This method returns a set containing the extension name for the order submission event.
      void processEvent(CommonBaseEvent commonBaseEvent)
      This method processes order submission common base events.
      void setTestData(java.lang.Long orderId, java.lang.String sessionId)
      Reserved for IBM internal use.
      • Methods inherited from class com.ibm.commerce.event.impl.AbstractECEventListener

        destroy, enable, getEventContainers, isTransactionRequired, processActivityEvent, registerEventContainer
      • Methods inherited from class com.ibm.commerce.event.EventComponentConfiguration

        init
      • 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
    • Constructor Detail

      • ExperimentEvaluationECEventListenerImpl

        public ExperimentEvaluationECEventListenerImpl()
        This method creates an instance of the experiment evaluation event listener. This constructor calls the superclass then sets values if the database type is DB2 and if tracing is enabled for the marketing component.
    • Method Detail

      • getECEventContainer

        public java.lang.Class getECEventContainer()
        This method returns the class OrderSubmissionEventContainer as the event container.
        Specified by:
        getECEventContainer in class com.ibm.commerce.event.impl.AbstractECEventListener
        Returns:
        The OrderSubmissionEventContainer class.
        See Also:
        AbstractECEventListener.getECEventContainer()
      • getEvents

        public java.util.Set getEvents()
        This method returns a set containing the extension name for the order submission event.
        Specified by:
        getEvents in class com.ibm.commerce.event.impl.AbstractECEventListener
        Returns:
        A Set with only the OrderSubmission event extension name.
        See Also:
        AbstractECEventListener.getEvents()
      • processEvent

        public void processEvent(CommonBaseEvent commonBaseEvent)
        This method processes order submission common base events.
        Specified by:
        processEvent in class com.ibm.commerce.event.impl.AbstractECEventListener
        Parameters:
        commonBaseEvent - The common base event to process.
        See Also:
        processOrderSubmissionEvent(CommonBaseEvent), AbstractECEventListener.processEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent)
      • setTestData

        public void setTestData(java.lang.Long orderId,
                                java.lang.String sessionId)
        Reserved for IBM internal use.
        Parameters:
        orderId - Reserved for IBM internal use.
        sessionId - Reserved for IBM internal use.