com.ibm.commerce.bi.events.xml

Class EventMapper

  • java.lang.Object
    • com.ibm.commerce.bi.events.xml.EventMapper


  • public class EventMapper
    extends java.lang.Object
    The class EventMapper defines operations for transforming the internal CBE XML format to an external format required by the analytics service provider. For example, internal formats mostly contain ID values of things like products and orders. Specific details can be found by a simple database query within WebSphere Commerce. The problem with external systems, is that they don’t have access to the database, so, this transformation process does the data lookup for the external format required by the analytics service provider. The transformation rules are defined in the mapping xml files located at <WC_installdir>\xml\config directory.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The full class name for this file.
      static java.lang.String COPYRIGHT
      Copyright statement.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EventMapper()
      Default constructor
      EventMapper(org.w3c.dom.Document mappingDoc)
      Constructor which takes a mapping document
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      org.w3c.dom.Document getCommonMappingDoc()
      The getter for the common mapping configuration XML document.
      java.util.HashMap getEvents()
      The getter for the internal CBE XML’s to be transformed The eventList will contain KEY as event ID and value as a string representing the CBE XML to be transformed
      java.util.HashMap getMappingDocs()
      The getter for the list of mapping configuration XML documents based on event type KEY as event extension name and value as mapping document.
      java.util.HashMap getTransformedEvents() 
      void setCommonMappingDoc(org.w3c.dom.Document mappingDoc)
      The setter for the common mapping configuration XML document.
      void setEvents(java.util.HashMap eventList)
      The setter for the internal CBE XML’s to be transformed The eventList will contain an Long KEY as event ID and value as a Document representing the CBE XML to be transformed
      void setMappingDocs(java.util.HashMap mappingList)
      The setter for the list of mapping configuration XML documents based on event type KEY as event extension name and value as mapping document.
      void transformEvents()
      Transforms the events from the BUSEVENT table into an external format required by the analytics service provider.
      • 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
        Copyright statement.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The full class name for this file.
    • Constructor Detail

      • EventMapper

        public EventMapper()
        Default constructor
      • EventMapper

        public EventMapper(org.w3c.dom.Document mappingDoc)
        Constructor which takes a mapping document
        Parameters:
        mappingDoc - XML Document for mapping
    • Method Detail

      • transformEvents

        public void transformEvents()
        Transforms the events from the BUSEVENT table into an external format required by the analytics service provider. For example, internal formats mostly contain ID values of things like products and orders which is converted to names or some other values required by the analytics service provider
      • getTransformedEvents

        public java.util.HashMap getTransformedEvents()
        Returns:
        The transformed events containing Document objects
      • setCommonMappingDoc

        public void setCommonMappingDoc(org.w3c.dom.Document mappingDoc)
        The setter for the common mapping configuration XML document. The actions that the EventMapper will perform will be defined within this XML. The common mapping document will be applied to all the events XMLs irrespective of event type.
        Parameters:
        mappingDoc - event mapping XML document
      • getCommonMappingDoc

        public org.w3c.dom.Document getCommonMappingDoc()
        The getter for the common mapping configuration XML document. The actions that the EventMapper will perform will be defined within this XML. The common mapping document will be applied to all the events XMLs irrespective of event type.
        Returns:
        common event mapper xml document
      • setMappingDocs

        public void setMappingDocs(java.util.HashMap mappingList)
        The setter for the list of mapping configuration XML documents based on event type KEY as event extension name and value as mapping document.
        Parameters:
        mappingList - HashMap of event mapping XML documents
      • getMappingDocs

        public java.util.HashMap getMappingDocs()
        The getter for the list of mapping configuration XML documents based on event type KEY as event extension name and value as mapping document.
        Returns:
        HashMap of event mapper xml documents
      • setEvents

        public void setEvents(java.util.HashMap eventList)
        The setter for the internal CBE XML’s to be transformed The eventList will contain an Long KEY as event ID and value as a Document representing the CBE XML to be transformed
        Parameters:
        eventList - HashMap of internal CBE XML's
      • getEvents

        public java.util.HashMap getEvents()
        The getter for the internal CBE XML’s to be transformed The eventList will contain KEY as event ID and value as a string representing the CBE XML to be transformed
        Returns:
        HashMap of internal CBE XML's