com.ibm.commerce.catalog.facade.client

Class CatalogGroupFacadeClient



  • public class CatalogGroupFacadeClient
    extends AbstractCatalogFacadeClient
    This class also provides a set of convenient Java API to represent particular CatalogGroup 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

      • CHANGE_VERB_ACTION_CHANGE

        public static final java.lang.String CHANGE_VERB_ACTION_CHANGE
        The change verb constant to represents the action of Update.
        See Also:
        Constant Field Values
      • CHANGE_VERB_ACTION_CREATE

        public static final java.lang.String CHANGE_VERB_ACTION_CREATE
        The change verb constant to represents the action of Create.
        See Also:
        Constant Field Values
      • CHANGE_VERB_ACTION_DELETE

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

      • CatalogGroupFacadeClient

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

        public CatalogGroupFacadeClient(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

      • fetchCatalogGroup

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

        public java.util.Hashtable fetchCatalogGroupWithPaging(java.lang.String xPath,
                                                               java.lang.String maxNumber,
                                                               java.lang.String refId,
                                                               java.lang.String startIndex)
                                                        throws CatalogGroupException
        This method is used to pass the get catalog group BOD, and return the SHOW catalog group BOD with paging.
        Parameters:
        xPath - The XPath for the get.
        maxNumber - the max page size.
        refId - the reference Id not supported now.
        startIndex - the starting index for paging.
        Returns:
        A list of Catalog groups , with the information peartaining to each catalog group .
        Throws:
        CatalogGroupException
      • 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
      • changeCatalogGroup

        public RespondCatalogGroupDataAreaType changeCatalogGroup(java.lang.String[] action,
                                                                  CatalogGroupType[] catGroups,
                                                                  java.lang.String[] expression)
                                                           throws CatalogGroupException
        This method changes the catalog Group.
        Parameters:
        action - the action to be applied to the catalog Group.
        catGroups - the catalog Group to be changed.
        expression - the expression corresponding to each action in the list.
        Returns:
        The RespondCatalogDataAreaType that contains the catalog Group Id.
        Throws:
        CatalogGroupException
      • updateCatalogGroupDescription

        public RespondCatalogGroupDataAreaType updateCatalogGroupDescription(CatalogGroupIdentifierType[] catGroupIds,
                                                                             CatalogDescriptionType[] catGroupDescs)
                                                                      throws CatalogGroupException
        This method updates the catalog Group descriptions. The value of catGroupIds[i] is the catalog Group identifier of the catalog Group description represnted by catGroupDescs[i]. If there is only one element in catGroupIds, all catalog Group descriptions to be updated belong to the same catalog Group.
        Parameters:
        catGroupIds - The ids of the catalog Group to be updated.
        catGroupDescs - The catalog Group description to be updated.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog Group id and the updated catalog Group.
        Throws:
        CatalogGroupException
      • updateCatalogGroupDescription

        public java.util.Map updateCatalogGroupDescription(java.util.Map parameters)
                                                    throws CatalogGroupException
        This method updates the description(s) of the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.updateCatalogGroupDescription(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be updated for the given catalog Group descriptions.
          
                    catGroupId : The internal reference ids of the catalog groups to be updated.
                                  identifier: The external reference ids of the catalog groups to be updated.
                                  languageId: The langeuage ids to be used to update the descriptions.
                    name: The name to be updated for the given catalog Group description.
                    sDesc: The short description to be updated for the given catalog Group description.
                    lDesc : The long description to be updated for the given catalog Group description.
                    tImage: The thumbnail image to be updated for the given catalog Group description.
                                  fImage: The full image to be updated for the given catalog Group description.
                                  keyword: The keyword value can be used for search.
          
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being updated.
        Throws:
        CatalogGroupException
      • createCatalogGroupDescription

        public java.util.Map createCatalogGroupDescription(java.util.Map parameters)
                                                    throws AbstractBusinessObjectDocumentException
        This method creates the description(s) of the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.createCatalogGroupDescription(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be created for the given catalog Group descriptions.
          
                    identifier: The external reference ids of the catalog groups to be updated.
                                  languageId: The langeuage ids to be used to update the descriptions.
                    name: The name to be updated for the given catalog Group description.
                    sDesc: The short description to be updated for the given catalog Group description.
                    lDesc : The long description to be updated for the given catalog Group description.
                    tImage: The thumbnail image to be updated for the given catalog Group description.
                                  fImage: The full image to be updated for the given catalog Group description.
                                  keyword: The keyword value can be used for search.
          
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being created.
        Throws:
        AbstractBusinessObjectDocumentException
      • createCatalogGroupDescription

        public RespondCatalogGroupDataAreaType createCatalogGroupDescription(CatalogGroupIdentifierType[] catGroupIds,
                                                                             CatalogDescriptionType[] catGroupDescs,
                                                                             CatalogGroupIdentifierType[] parentCatGroupIdentifiers)
                                                                      throws CatalogGroupException
        This method creates the catalog Group descriptions. The value of catGroupIds[i] is the catalog Group identifier of the catalog Group description represnted by catGroupDescs[i]. If there is only one element in catGroupIds, all catalog Group descriptions to be created belong to the same catalog Group.
        Parameters:
        catGroupIds - The ids of the catalog Group for which cataloggroupdescription is created
        catGroupDescs - The catalog Group description to be created.
        parentCatGroupIdentifiers - The ids of the parent of the catalog Group
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog Group id and the updated catalog Group.
        Throws:
        CatalogGroupException
      • createCatalogGroup

        public java.util.Map createCatalogGroup(java.util.Map parameters)
                                         throws AbstractBusinessObjectDocumentException
        This method creates the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.createCatalogGroup(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be created for the given catalog Group.
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being created.
        Throws:
        AbstractBusinessObjectDocumentException
      • updateCatalogGroup

        public java.util.Map updateCatalogGroup(java.util.Map parameters)
                                         throws AbstractBusinessObjectDocumentException
        This method updates the the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.updateCatalogGroup(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be updated for the given catalog Group
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being updated.
        Throws:
        AbstractBusinessObjectDocumentException
      • updateTopCatalogGroupSequence

        public java.util.Map updateTopCatalogGroupSequence(java.util.Map parameters)
                                                    throws AbstractBusinessObjectDocumentException
        This method updates the sequence of top catalog groups with respect to its catalog
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.updateTopCatalogGroupSequence(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be updated for the given catalog Group
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being updated.
        Throws:
        AbstractBusinessObjectDocumentException
      • updateCatalogGroup

        public RespondCatalogGroupDataAreaType updateCatalogGroup(CatalogGroupIdentifierType[] catGroupIds,
                                                                  java.lang.String[] isTopCategory)
                                                           throws CatalogGroupException
        This method updates the catalog Group.
        Parameters:
        catGroupIds - The ids of the catalog Group to be updated.
        isTopCategory - The boolean values whether the catalog group is a top category or not
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog Group id and the updated catalog Group.
        Throws:
        CatalogGroupException
      • updateCatalogGroup

        public RespondCatalogGroupDataAreaType updateCatalogGroup(CatalogGroupIdentifierType[] catGroupIds,
                                                                  java.lang.String[] isTopCategory,
                                                                  java.lang.String[] sequence)
                                                           throws CatalogGroupException
        This method updates the catalog Group.
        Parameters:
        catGroupIds - The ids of the catalog Group to be updated.
        isTopCategory - The boolean values whether the catalog group is a top category or not
        sequence - The sequence value the top category should be updated with.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog Group id and the updated catalog Group.
        Throws:
        CatalogGroupException
      • processCatalogGroup

        public AcknowledgeCatalogGroupDataAreaType processCatalogGroup(java.lang.String[] actionArray,
                                                                       CatalogGroupType[] catgroups,
                                                                       java.lang.String[] strXPaths)
                                                                throws CatalogGroupException
        This method processes the catalog Group.
        Parameters:
        actionArray - the array actions to be applied to the catalog Group.
        catgroups - the catalog Group to be processes.
        strXPaths - the expression corresponding to each action in the list.
        Returns:
        AcknowledgeCatalogGroupDataAreaType that contains the catalog Group Id.
        Throws:
        CatalogGroupException
      • updateCatalogGroupNavigationRelationship

        public java.util.Map updateCatalogGroupNavigationRelationship(java.util.Map parameters,
                                                                      boolean isChildProduct,
                                                                      boolean isChildCatalogGroup)
                                                               throws CatalogGroupException
        This method updates the navigation relationship(s) of the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.updateCatalogGroupNavigationRelationship(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the value(s) to be updated for the given catalog Group descriptions.
        isChildProduct - True if the children are catalog entries; false otherwise.
        isChildCatalogGroup - True if the children are catalog groups; false otherwise.
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups being updated.
        Throws:
        CatalogGroupException
      • updateCatalogGroupNavRel

        public RespondCatalogGroupDataAreaType updateCatalogGroupNavRel(CatalogGroupIdentifierType[] catGroupIds,
                                                                        NavigationRelationshipType[] catGroupNavRel)
                                                                 throws CatalogGroupException
        This method updates the display sequence of the following relationship:
        • parent catalog group to child catalog entry relationship.
        • parent catalog group to child catalog group relationship.

        The method will resolve the Catalog Group to be updated using the CatalogGroupIdentifier passed in the BOD. The NavigationRelationship in BOD contains the child object of the navigational relationship. Depending on the object passed in the NavigationRelationship, the command will update the display sequence of the relationships mentioned above.

        Parameters:
        catGroupIds - The ids of the catalog group to be updated.
        catGroupNavRel - The catalog group description to be updated.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog group id and the updated catalog group.
        Throws:
        CatalogGroupException
      • updateCatalogGroupNavRel

        public RespondCatalogGroupDataAreaType updateCatalogGroupNavRel(java.util.List catGroupList)
                                                                 throws CatalogGroupException
        This method updates the display sequence of multiple child catalog groups belonging to multiple parent catalog groups for the following relationship:
        • parent catalog group to child catalog entry relationship.
        • parent catalog group to child catalog group relationship.

        The method will resolve the Catalog Group to be updated using the CatalogGroupIdentifier passed in the BOD . The NavigationRelationship in BOD contains the child object of the navigational relationship. Depending on the object passed in the NavigationRelationship, the command will update the display sequence of the relationships mentioned above.

        Parameters:
        catGroupList - List containing catalog group BODs for updating sequence.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog group id and the updated catalog group.
        Throws:
        CatalogGroupException
      • deleteCatalogGroup

        public java.util.Map deleteCatalogGroup(java.util.Map parameters)
                                         throws AbstractBusinessObjectDocumentException
        This method deletes the catalog groups.
        Sample code to use the API:
        
                        CatalogGroupFacadeClient client = new CatalogGroupFacadeClient(businessContext,null);
                        Map response = client.deleteCatalogGroup(parameters);
                        String[] outCatGroupIds = (String[]) response.get("catGroupId");
         
        Parameters:
        parameters - This contains the details for the given catalog Group to be deleted
        Returns:
        Here is what is returned in the Map:
        catGroupId : The ids of the catalog groups deleted.
        Throws:
        AbstractBusinessObjectDocumentException
      • updateCatalogGroupParent

        public RespondCatalogGroupDataAreaType updateCatalogGroupParent(CatalogGroupIdentifierType[] catGroupIdentifiers,
                                                                        CatalogGroupIdentifierType[] parentCatGrpIdentfiers,
                                                                        java.lang.String[] actions)
                                                                 throws CatalogGroupException
        This method builds and sends the request for updating the parent of a catalog group. The id of catalog group whose parent catalog group has to be changed is passed to this method along with the new parent catalog group identifier.
        Parameters:
        catGroupIdentifiers -
        parentCatGrpIdentfiers -
        actions -
        Returns:
        A RespondCatalogGroupDataAreaType type.
        Throws:
        CatalogGroupException
      • updateCatalogGroupParent

        public java.util.Map updateCatalogGroupParent(java.util.Map parameters)
                                               throws AbstractBusinessObjectDocumentException
        This method builds and sends the request for updating the parent of a catalog group. The id of catalog group whose parent catalog group has to be changed is passed to this method along with the new parent catalog group identifier.
        Parameters:
        parameters - This contains the above value(s)
        Returns:
        Here is what is returned in the Map:
        catgroupId : The ids of the catalog groups being updated.
        Throws:
        AbstractBusinessObjectDocumentException
      • addCatalogGroupParent

        public java.util.Map addCatalogGroupParent(java.util.Map parameters)
                                            throws AbstractBusinessObjectDocumentException
        This method builds and sends the request for adding the parent of a catalog group. The id of catalog group whose parent catalog group has to be added is passed to this method along with the new parent catalog group identifier.
        Parameters:
        parameters - This contains the above value(s)
        Returns:
        Here is what is returned in the Map:
        catgroupId : The ids of the catalog groups being updated.
        Throws:
        AbstractBusinessObjectDocumentException
      • deleteCatalogGroupParent

        public java.util.Map deleteCatalogGroupParent(java.util.Map parameters)
                                               throws AbstractBusinessObjectDocumentException
        This method builds and sends the request for deleting the parent of a catalog group. The id of catalog group whose parent catalog group has to be deleted is passed to this method along with the parent catalog group identifier.
        Parameters:
        parameters - This contains the above value(s)
        Returns:
        Here is what is returned in the Map:
        catgroupId : The ids of the catalog groups being updated.
        Throws:
        AbstractBusinessObjectDocumentException
      • updateCatalogGroupAttributes

        public RespondCatalogGroupDataAreaType updateCatalogGroupAttributes(CatalogGroupType[] catGrpArray,
                                                                            java.lang.String[] actions)
                                                                     throws CatalogGroupException
        This method builds the xpath and calls the service to update the catalog group attributes.
        Parameters:
        catGrpArray - An array of catalog groups. Each catgroup should contain the unique id or the identifier of the catgroup. It should also contain the attributes to be updated.
        actions - An array of actions to be performed on each attribute. Change action is supported.
        Returns:
        Throws:
        CatalogGroupException
      • updateCatalogGroupIdentifier

        public RespondCatalogGroupDataAreaType updateCatalogGroupIdentifier(CatalogGroupType[] catGrpArray,
                                                                            java.lang.String[] actions)
                                                                     throws CatalogGroupException
        This method builds the xpath and calls the service to update the catalog group identifier.
        Parameters:
        catGrpArray - The array of catalog groups to be updated. Each catgroup should contain the unique id and new identifier.
        actions - to be performed on the noun part. Change action is allowed.
        Returns:
        The RespondCatalogDataAreaType that contains the catalog Group Identifier.
        Throws:
        CatalogGroupException
      • updateCatalogGroupDescription

        public RespondCatalogGroupDataAreaType updateCatalogGroupDescription(CatalogGroupType[] catGroups)
                                                                      throws CatalogGroupException
        This method updates multiple catalog group descriptions of a single catalog group.
        Parameters:
        catGroups - The catalog groups for which the description is to be updated.
        Returns:
        The RespondCatalogGroupDataAreaType that contains the catalog group id and the updated catalog group.
        Throws:
        CatalogGroupException
      • 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