com.ibm.commerce.me.datatype
Class StoreHelper

java.lang.Object
  |
  +--com.ibm.commerce.me.datatype.StoreHelper

public class StoreHelper
extends java.lang.Object

contains utility methods related to the store and the catalog. Creation date: (5/2/01 8:04:59 PM)


Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright field
 
Constructor Summary
StoreHelper()
           
 
Method Summary
static java.lang.Long findCatalogId(long buyerId, long supplierId, java.lang.Integer protocolId)
          Finds the catalog in a store that belongs to a supplier and a buyer and a protocol has access to using the B2BMapping table.
static java.lang.Long findMemberGroupId(long buyerId, long supplierId, java.lang.Integer protocolId)
          Finds the memberGroup given the supplier id and the buyer id and protocol id
static java.lang.Integer findStoreId(java.lang.Long supplierId, java.lang.Long catalogId, java.lang.Long contractId)
          Find the store to which the given catalog belongs to.
static java.lang.String getResponseErrorView(java.lang.String protocolId, java.lang.String buyerId, java.lang.String message)
          Gets the response error view based on a protocol, buyer, and message
static java.lang.String getResponseViewName(java.lang.String protocolId, java.lang.String buyerId, java.lang.String message)
          Gets the response view namebased on a protocol, buyer, and message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright field
See Also:
Constant Field Values
Constructor Detail

StoreHelper

public StoreHelper()
Method Detail

findCatalogId

public static java.lang.Long findCatalogId(long buyerId,
                                           long supplierId,
                                           java.lang.Integer protocolId)
Finds the catalog in a store that belongs to a supplier and a buyer and a protocol has access to using the B2BMapping table.
Parameters:
buyerId - the buyer Id used to find the catalog
supplierId - the supplier Id used to find the catalog
protocolId - the protocol ID used to find the catalog
Returns:
The catalog ID based on the buyer ID, supplier ID, and protocol ID

findMemberGroupId

public static java.lang.Long findMemberGroupId(long buyerId,
                                               long supplierId,
                                               java.lang.Integer protocolId)
Finds the memberGroup given the supplier id and the buyer id and protocol id
Parameters:
buyerId - the buyer Id used to find the member group
supplierId - the supplier Id used to find the member group
protocolId - the protocol Id used to find the member group
Returns:
The Member Group ID based on the buyer ID, supplier Id, and protocol ID

findStoreId

public static java.lang.Integer findStoreId(java.lang.Long supplierId,
                                            java.lang.Long catalogId,
                                            java.lang.Long contractId)
Find the store to which the given catalog belongs to. The logic of getting the store id is : get the member id from the catalog table and get the store entity id from the storeentity table. TBD : will this work if the same supplier has multiple stores ?
Parameters:
supplierId - the member ID for the Supplier.
catalogId - the id used to identify a catalog.
contractId - the id used to identify a specify contract.
Returns:
The store Id of the store based on the input parameters.

getResponseErrorView

public static java.lang.String getResponseErrorView(java.lang.String protocolId,
                                                    java.lang.String buyerId,
                                                    java.lang.String message)
Gets the response error view based on a protocol, buyer, and message
Parameters:
protocolId - a code used to identify a specific protocol.
buyerId - the orgnaization ID for the buyer organization.
message - a name used to identify a view.

getResponseViewName

public static java.lang.String getResponseViewName(java.lang.String protocolId,
                                                   java.lang.String buyerId,
                                                   java.lang.String message)
Gets the response view namebased on a protocol, buyer, and message
Parameters:
protocolId - a code used to identify a specific protocol.
buyerId - the orgnaization ID for the buyer organization.
message - a name used to identify a view.