com.ibm.commerce.catalog.facade.client

Class CatalogFacadeClient



  • public class CatalogFacadeClient
    extends AbstractCatalogFacadeClient

    This class provides common methods that this and other utility class to the Catalog facade can use. This class also provides a set of convenient Java API to represent particular Catalog operations. This set of Java API also include APIs for Web based requests to transform the name value pair request into the appropriate request documents.

    • Field Detail

      • PROCESS_VERB_ACTION_ADD

        public static final java.lang.String PROCESS_VERB_ACTION_ADD
        The process verb constant to represents the action of Add.
        See Also:
        Constant Field Values
      • PROCESS_VERB_ACTION_CREATE

        public static final java.lang.String PROCESS_VERB_ACTION_CREATE
        The process verb constant to represents the action of Create.
        See Also:
        Constant Field Values
      • PROCESS_VERB_ACTION_DELETE

        public static final java.lang.String PROCESS_VERB_ACTION_DELETE
        The process verb constant to represents the action of Add.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CatalogFacadeClient

        public CatalogFacadeClient()
        Creates an instance of the client to communicate with the Catalog facade.
      • CatalogFacadeClient

        public CatalogFacadeClient(BusinessContextType businessContext,
                                   javax.security.auth.callback.CallbackHandler callbackHandler)
        Creates an instance of the client to communicate with the Catalog facade.
        Parameters:
        businessContext - The default business context to associate with the messages when making requests.
        callbackHandler - Used for authentication purposes so the controller can give the authentication information to the transport when required.
    • Method Detail

      • fetchCatalog

        public java.util.List fetchCatalog(java.lang.String xPath)
                                    throws CatalogException
        This method is used to pass the get catalog BOD, and return the SHOW catalog BOD.
        Parameters:
        xPath - The XPath for the get.
        Returns:
        A list of Catalogs , with the information peartaining to each catalog.
        Throws:
        CatalogException
      • createSalesCatalog

        public java.util.Map createSalesCatalog(java.util.Map parameters)
                                         throws CatalogException

        This method transforms the specified parameter input into the request document to represent the sales catalog create operation. This method expects the following parameter keys and associates them them as the following.

        • -- insert keys and how it is transformed here --
        Parameters:
        parameters - : list of parameters.
        Returns:
        Map of result parameters such as catalogId
        Throws:
        CatalogException
      • changeSalesCatalog

        public java.util.Map changeSalesCatalog(java.util.Map parameters)
                                         throws CatalogException

        This method transforms the specified parameter input into the request document to represent the sales catalog create operation. This method expects the following parameter keys and associates them them as the following.

        • -- insert keys and how it is transformed here --
        Parameters:
        parameters - : Map of input parameters.
        Returns:
        Map of result parameters such as catalogId
        Throws:
        CatalogException
      • changeSalesCatalogDescription

        public java.util.Map changeSalesCatalogDescription(java.util.Map parameters)
                                                    throws CatalogException
        Change the sales catalog description in a specified langauge.
        Parameters:
        parameters - : A map of input parameters.
        Returns:
        Map of result parameters such as the catalogId of the description that was updated.
        Throws:
        CatalogException
      • createSalesCatalogDescription

        public java.util.Map createSalesCatalogDescription(java.util.Map parameters)
                                                    throws CatalogException

        This method transforms the specified parameter input into the request document to represent the sales catalog create operation. This method expects the following parameter keys and associates them them as the following.

        • -- insert keys and how it is transformed here --
        Parameters:
        parameters - : Map of input parameters.
        Returns:
        Map of result parameters such as catalogId
        Throws:
        CatalogException
      • deleteSalesCatalog

        public java.util.Map deleteSalesCatalog(java.util.Map parameters)
                                         throws CatalogException

        This method transforms the specified parameter input into the request document to represent the sales catalog delete operation. This method expects the following parameter keys and associates them them as the following.

        • -- insert keys and how it is transformed here --
        Parameters:
        parameters - : Map of input parameters.
        Returns:
        Map of result parameters such as catalogId
        Throws:
        CatalogException
      • createCatalog

        public AcknowledgeCatalogDataAreaType createCatalog(java.util.List catalogEntryList)
                                                     throws CatalogException
        This method builds and sends the request to create catalog entries. The catalog entries that need to be created are passed as a list of CatalogType objects containg the all teh information related to the catentry.
        Parameters:
        catalogEntryList - a list of CatalogType objects to be created.
        Returns:
        the AcknowledgeCatalogDataAreaType
        Throws:
        CatalogException
      • processCatalog

        public AcknowledgeCatalogDataAreaType processCatalog(java.lang.String[] actionArray,
                                                             CatalogType[] catentries,
                                                             java.lang.String[] strXPaths)
                                                      throws CatalogException
        This method process the catalog entry.
        Parameters:
        actionArray - the action to be applied to the catalog entry.
        catentries - the catalog entry to be changed.
        strXPaths - the expression corresponding to each action in the list.
        Returns:
        The AcknowledgeCatalogDataAreaType that contains the catalog entry .
        Throws:
        CatalogException
      • createCatalogDataObject

        public CatalogType createCatalogDataObject(CatalogIdentifierType catEntryId)
        This method creates an instance of CatalogType object with the given catalog entry id.
        Parameters:
        catEntryId - The catalog entry identifier assoicated with the data object.
        Returns:
        A new instance of the CatalogType object
      • changeCatalog

        public RespondCatalogDataAreaType changeCatalog(java.lang.String[] action,
                                                        CatalogType[] catEntries,
                                                        java.lang.String[] expression)
                                                 throws CatalogException
        This method changes the catalog entry.
        Parameters:
        action - the action to be applied to the catalog entry.
        catEntries - the catalog entry to be changed.
        expression - the expression corresponding to each action in the list.
        Returns:
        The RespondCatalogDataAreaType that contains the catalog entry Id.
        Throws:
        CatalogException
      • updateCatalogDescription

        public RespondCatalogDataAreaType updateCatalogDescription(CatalogType[] catalogs)
                                                            throws CatalogException
        This method updates multiple catalog descriptions of a single catalog .
        Parameters:
        catalogs - The catalogs for which the description is to be updated.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog id and the updated catalog .
        Throws:
        CatalogException
      • getCatalogEntryWithPaging

        public java.util.Hashtable getCatalogEntryWithPaging(java.lang.String expressionLanguage,
                                                             java.lang.String expression,
                                                             java.lang.String maxItems,
                                                             java.lang.String refId,
                                                             java.lang.String startNum)
                                                      throws CatalogEntryException
        This method provides support for paging. Look at the returned hashtable description to see how paging values are passed back. Look at the parameters to be supplied for details on what paging parameters are to be passed in. It returns a list of base catalog entries based on the expression specified along with following paging parameters:
        Parameters:
        expressionLanguage - The expression language.
        expression - The expression to return a list of base catalog entries.
        maxItems - Specifies max no of records to be retrieved.
        refId - The internal identifier for the result set, so that it can be resolved on a subsequent request.
        startNum - The starting index from which to retrieve results from the result set
        Returns:
        Returns a Hashtable containing the list of catalog entries that matches the expression specified and paging parameters. Following keys are used in the Hashtable:
        • 'response' - Used to store List containing Catalog Entries.
        • 'recordCount' - The number of records from the result set that are being returned in this message.
        • 'refId' - The internal identifier for the result set, so that it can be resolved on a subsequent request.
        • 'startNumber' - The starting index for the results that are being returned in this message.
        • 'totalRecords' - The total number of results in the result set.
        Throws:
        CatalogEntryException
      • getCatalogGroupWithPaging

        public java.util.Hashtable getCatalogGroupWithPaging(java.lang.String expressionLanguage,
                                                             java.lang.String expression,
                                                             java.lang.String maxItems,
                                                             java.lang.String refId,
                                                             java.lang.String startNum)
                                                      throws CatalogGroupException
        This method provides support for paging. Look at the returned hashtable description to see how paging values are passed back. Look at the parameters to be supplied for details on what paging parameters are to be passed in. It returns a list of base catalog groups based on the expression specified along with following paging parameters:
        Parameters:
        expressionLanguage - The expression language.
        expression - The expression to return a list of base catalog groups.
        maxItems - Specifies max no of records to be retrieved.
        refId - The internal identifier for the result set, so that it can be resolved on a subsequent request.
        startNum - The starting index from which to retrieve results from the result set
        Returns:
        Returns a Hashtable containing the list of catalog groups that matches the expression specified and paging parameters. Following keys are used in the Hashtable:
        • 'response' - Used to store List containing Catalog Groups.
        • 'recordCount' - The number of records from the result set that are being returned in this message.
        • 'refId' - The internal identifier for the result set, so that it can be resolved on a subsequent request.
        • 'startNumber' - The starting index for the results that are being returned in this message.
        • 'totalRecords' - The total number of results in the result set.
        Throws:
        CatalogGroupException