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 toid
which will be very specific to WebSphere Commerce.id
make sense only in WebSphere Commerce System. In non-WebSphere Commerce system we will be sendingname
rather than id. The functions to get thename
of an item given itsid
can be given inEventMapperHelper
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.
-
Constructor Summary
Constructors Constructor and Description EventMapperHelper()
-
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 actionjava.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 bycontractId
, 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 byorderItemId
java.lang.String
getChannelName(java.lang.String channelId)
Returns the channel name associated with the channel idjava.lang.String
getContractId(java.lang.String orderItemId, java.lang.String storeId)
Returns the ContractId for an order Item identified byorderItemId
, 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 bycontractId
, if the store is a "B2B" Store.java.lang.String
getCSRId(java.lang.String userId)
Gets the login id of the CSR identified byuserId
java.lang.String
getCSRName(java.lang.String userId)
Gets the name of the CSR identified byuserId
java.lang.String[]
getCSRTeams(java.lang.String csrId)
Returns an array of teams to which the CSR belongsjava.lang.String
getListPrice(java.lang.String catEntryId, java.lang.String currency)
Returns the list price for a catalog entry identified bycatEntryId
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 byorderItemId
.java.lang.String
getProductName(java.lang.String catEntryId)
Return the Product Name of a Category Entry identified bycatEntryId
java.lang.String
getProductPartNumber(java.lang.String catEntryId)
Return the Product Part Number of a Category Entry identified bycatEntryId
java.lang.String
getPromotionCode(java.lang.Integer promoId)
Returns the promotion code associated with a promotion identified bypromoId
java.lang.String
getQuantity(java.lang.String orderItemId)
Returns the Quantity of an order item identified byorderItemId
java.lang.String
getStoreTye(java.lang.String storeId)
Returns the storeType of the store identified bystoreId
.
-
-
-
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.
-
-
Method Detail
-
getStoreTye
public java.lang.String getStoreTye(java.lang.String storeId)
Returns the storeType of the store identified bystoreId
.- 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) - Parameters:
storeId
- store Id to which the catalog entry belongscatEntryId
- 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 bypromoId
- 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 byorderItemId
- 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 byorderItemId
- 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 bycatEntryId
- Parameters:
catEntryId
-- Returns:
- The productId
-
getProductName
public java.lang.String getProductName(java.lang.String catEntryId)
Return the Product Name of a Category Entry identified bycatEntryId
- 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 byorderItemId
, if the store is a "B2B" Store. Otherwise returnsnull
- 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 bycontractId
, if the store is a "B2B" Store. Otherwise returnsnull
- 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 bycontractId
, if the store is a "B2B" Store. Otherwise returnsnull
- Parameters:
contractId
-storeId
-- Returns:
- The accountId
-
getPrice
public java.lang.String getPrice(java.lang.String orderItemId)
Returns the price for an Order Item identified byorderItemId
.- 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 bycatEntryId
in the specified currency.- Parameters:
catEntryId
- The CatEntry Idcurrency
-- Returns:
- price
-
getCSRName
public java.lang.String getCSRName(java.lang.String userId)
Gets the name of the CSR identified byuserId
- Parameters:
userId
-- Returns:
- The CSR Name
-
getCSRId
public java.lang.String getCSRId(java.lang.String userId)
Gets the login id of the CSR identified byuserId
- Parameters:
userId
-- Returns:
- The CSR Login id
-
-