com.ibm.commerce.bi.events.xml

Class EventMapperHelper

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


  • public class EventMapperHelper
    extends java.lang.Object
    Utility class to get the details of CommonBaseEvent element which are required while converting the xmls from Websphere Commerce internal format to external non-WebSphere Commerce formats. For example the internal xmls will be having references to id which will be very specific to WebSphere Commerce. id make sense only in WebSphere Commerce System. In non-WebSphere Commerce system we will be sending name rather than id. The functions to get the name of an item given its id can be given in EventMapperHelper class
    • Field Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String echoValue(java.lang.String input)
      Echoes the input value to be used by the replace action
      java.lang.String getAccountHierarchy(java.lang.String accountId, java.lang.String storeId)
      Return the account name in a hierarchial way delimited by '|'
      java.lang.Long getAccountId(java.lang.String contractId, java.lang.String storeId)
      Returns the Account Id for a contract identified by contractId, if the store is a "B2B" Store.
      java.lang.String getCatEntryId(java.lang.String orderItemId)
      Returns the Category Entry Id of an order item identified by orderItemId
      java.lang.String getChannelName(java.lang.String channelId)
      Returns the channel name associated with the channel id
      java.lang.String getContractId(java.lang.String orderItemId, java.lang.String storeId)
      Returns the ContractId for an order Item identified by orderItemId, if the store is a "B2B" Store.
      java.lang.String getContractName(java.lang.String contractId, java.lang.String storeId)
      Returns the Contract Name for a contract identified by contractId, if the store is a "B2B" Store.
      java.lang.String getCSRId(java.lang.String userId)
      Gets the login id of the CSR identified by userId
      java.lang.String getCSRName(java.lang.String userId)
      Gets the name of the CSR identified by userId
      java.lang.String[] getCSRTeams(java.lang.String csrId)
      Returns an array of teams to which the CSR belongs
      java.lang.String getListPrice(java.lang.String catEntryId, java.lang.String currency)
      Returns the list price for a catalog entry identified by catEntryId in the specified currency.
      java.lang.String getMasterCategoryId(java.lang.String storeId, java.lang.String catEntryId)
      Return the master category id of the catalog entry based on the master catalog of the store A product could belong to a master catalog and different sales catalogs.
      org.w3c.dom.Node getOrderPromotions(java.lang.String orderId)
      Returns the document fragment consisting of all the promotions associated with the order as required by the external CBE.
      java.lang.String getOrderType(java.lang.String orderId)
      Return the type of this order (Whether order or quote)
      java.lang.String getPrice(java.lang.String orderItemId)
      Returns the price for an Order Item identified by orderItemId.
      java.lang.String getProductName(java.lang.String catEntryId)
      Return the Product Name of a Category Entry identified by catEntryId
      java.lang.String getProductPartNumber(java.lang.String catEntryId)
      Return the Product Part Number of a Category Entry identified by catEntryId
      java.lang.String getPromotionCode(java.lang.Integer promoId)
      Returns the promotion code associated with a promotion identified by promoId
      java.lang.String getQuantity(java.lang.String orderItemId)
      Returns the Quantity of an order item identified by orderItemId
      java.lang.String getStoreTye(java.lang.String storeId)
      Returns the storeType of the store identified by storeId.
      • 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 interface file.
    • Constructor Detail

      • EventMapperHelper

        public EventMapperHelper()
    • Method Detail

      • getStoreTye

        public java.lang.String getStoreTye(java.lang.String storeId)
        Returns the storeType of the store identified by storeId.
        Parameters:
        storeId -
        Returns:
        The store type
      • getCSRTeams

        public java.lang.String[] getCSRTeams(java.lang.String csrId)
        Returns an array of teams to which the CSR belongs
        Parameters:
        csrId - The Id of the Customer Service Representative (CSR)
        Returns:
        The array of teams to which the CSR belongs
      • getChannelName

        public java.lang.String getChannelName(java.lang.String channelId)
        Returns the channel name associated with the channel id
        Parameters:
        channelId - The channel Id
        Returns:
        The channel name
      • getMasterCategoryId

        public java.lang.String getMasterCategoryId(java.lang.String storeId,
                                                    java.lang.String catEntryId)
        Return the master category id of the catalog entry based on the master catalog of the store A product could belong to a master catalog and different sales catalogs. When the customer views the product from a sales catalog, the sales catalog id will be by default send by the tag. Along with that the category id from the master catalog also needs to be send. e.g., "Brewmaster Deluxe Coffeemaker" belongs to different categories in master and sales catalogs as given below.
        Catalog Type(Catalog ID) Category Name(Category ID)
        Master Catalog(10101) Coffee Makers(10125)
        Sales Catalog(10151) Coffee and Espresso Makers(10128)
        In this case this method will return a value of 10125 which is the value of the master category in the master catalog
        Parameters:
        storeId - store Id to which the catalog entry belongs
        catEntryId - catalog entry ID of the product
        Returns:
        master category id of the catalog entry
      • getAccountHierarchy

        public java.lang.String getAccountHierarchy(java.lang.String accountId,
                                                    java.lang.String storeId)
        Return the account name in a hierarchial way delimited by '|'
        Parameters:
        accountId -
        storeId -
        Returns:
        account name
      • getOrderType

        public java.lang.String getOrderType(java.lang.String orderId)
        Return the type of this order (Whether order or quote)
        Parameters:
        orderId -
        Returns:
        'order' for Orders and 'quote' for Quotes
      • getOrderPromotions

        public org.w3c.dom.Node getOrderPromotions(java.lang.String orderId)
        Returns the document fragment consisting of all the promotions associated with the order as required by the external CBE.
        Parameters:
        orderId - The order id for which promotions should be looked up
        Returns:
        The XML fragment consisting of the promotions
      • getPromotionCode

        public java.lang.String getPromotionCode(java.lang.Integer promoId)
        Returns the promotion code associated with a promotion identified by promoId
        Parameters:
        promoId - The Promotion Id
        Returns:
        The promotion code
      • echoValue

        public java.lang.String echoValue(java.lang.String input)
        Echoes the input value to be used by the replace action
        Parameters:
        input -
        Returns:
        The input value unchanged
      • getQuantity

        public java.lang.String getQuantity(java.lang.String orderItemId)
        Returns the Quantity of an order item identified by orderItemId
        Parameters:
        orderItemId -
        Returns:
        The quantity
      • getCatEntryId

        public java.lang.String getCatEntryId(java.lang.String orderItemId)
        Returns the Category Entry Id of an order item identified by orderItemId
        Parameters:
        orderItemId -
        Returns:
        The category entry id
      • getProductPartNumber

        public java.lang.String getProductPartNumber(java.lang.String catEntryId)
        Return the Product Part Number of a Category Entry identified by catEntryId
        Parameters:
        catEntryId -
        Returns:
        The productId
      • getProductName

        public java.lang.String getProductName(java.lang.String catEntryId)
        Return the Product Name of a Category Entry identified by catEntryId
        Parameters:
        catEntryId -
        Returns:
        The ProductName
      • getContractId

        public java.lang.String getContractId(java.lang.String orderItemId,
                                              java.lang.String storeId)
        Returns the ContractId for an order Item identified by orderItemId, if the store is a "B2B" Store. Otherwise returns null
        Parameters:
        orderItemId -
        storeId -
        Returns:
        The contractId
      • getContractName

        public java.lang.String getContractName(java.lang.String contractId,
                                                java.lang.String storeId)
        Returns the Contract Name for a contract identified by contractId, if the store is a "B2B" Store. Otherwise returns null
        Parameters:
        contractId -
        storeId -
        Returns:
        The contract name
      • getAccountId

        public java.lang.Long getAccountId(java.lang.String contractId,
                                           java.lang.String storeId)
        Returns the Account Id for a contract identified by contractId, if the store is a "B2B" Store. Otherwise returns null
        Parameters:
        contractId -
        storeId -
        Returns:
        The accountId
      • getPrice

        public java.lang.String getPrice(java.lang.String orderItemId)
        Returns the price for an Order Item identified by orderItemId.
        Parameters:
        orderItemId - The order item id
        Returns:
        price
      • getListPrice

        public java.lang.String getListPrice(java.lang.String catEntryId,
                                             java.lang.String currency)
        Returns the list price for a catalog entry identified by catEntryId in the specified currency.
        Parameters:
        catEntryId - The CatEntry Id
        currency -
        Returns:
        price
      • getCSRName

        public java.lang.String getCSRName(java.lang.String userId)
        Gets the name of the CSR identified by userId
        Parameters:
        userId -
        Returns:
        The CSR Name
      • getCSRId

        public java.lang.String getCSRId(java.lang.String userId)
        Gets the login id of the CSR identified by userId
        Parameters:
        userId -
        Returns:
        The CSR Login id