com.ibm.commerce.catalog.facade.server.commands

Class ChangeCatalogGroupCmdImpl

  • All Implemented Interfaces:
    ChangeCatalogGroupCmd, BusinessObjectDocumentCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ChangeCatalogGroupCmdImpl
    extends AbstractChangeNounUsingBusinessObjectMediatorCmdImpl
    implements ChangeCatalogGroupCmd
    This class provides a default implementation for the change commands used to change segments of a Catalog Group. This class provide methods to read and save persistant objects. It also provide method to compose the Respond BOD after a change is applied to a Catalog Group.
    See Also:
    Serialized Form
    • Constructor Detail

      • ChangeCatalogGroupCmdImpl

        public ChangeCatalogGroupCmdImpl()
    • Method Detail

      • getCatalogId

        public java.lang.String getCatalogId()
                                      throws BusinessObjectMediatorException

        This method returns the catalog id in the current business context.

        This catalog id can be used to invalidate related pages when a catalog group is updated. For example, when the name of a category is renamed (categoryId=50400000003), the CategoryDisplay page for this category needs to invalidate:

         CategoryDisplay?catalogId=504&categoryId=50400000003
         
        Since the CategoryDisplay pages for its parent category (categoryId=50400000013) and sibling categories (categoryId=50400000014) also display the name of the category, they also need to invalidate.
         CategoryDisplay?catalogId=504&categoryId=50400000013 
         CategoryDisplay?catalogId=504&categoryId=50400000014
         
        Since the getUniqueID method only returns the category id of the category being changed, this method can be used to invalidate all related pages under current catalog by using the following invalidation configuration in cachespec.xml:

         
         
                command
                com.ibm.commerce.catalog.facade.server.commands.ChangeCatalogGroupCmdImpl
                com.ibm.commerce.catalog.facade.server.commands.ProcessCatalogGroupCmdImpl
                true
                categoryId
                        
                                true               
                        
                
                catalogId
                                
                                        true
                                
                
         
         
        Returns:
        The catalog id in the current business context.
        Throws:
        BusinessObjectMediatorException