com.ibm.commerce.catalog.facade.server.helpers

Class SyncProductSetHelper

  • java.lang.Object
    • com.ibm.commerce.catalog.facade.server.helpers.SyncProductSetHelper
  • Direct Known Subclasses:
    SyncProductSetForCategoryHelper, SyncProductSetForCatEntryHelper


    public abstract class SyncProductSetHelper
    extends java.lang.Object
    This abstract utility class contains some utility methods which can be used to synchronize the affected product sets when a catalog entry to catalog group relationship, or a category to category relationship is changed. This utility can only be used for a master catalog. This utility will try to cache the following information for a given category in the master catalog:
    • The direct parent category of the given category
    • All the ancestor parent categories of the given category
    • The product set ids of all the ancestor parent categories
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List getAffectedProductSets(java.util.Enumeration aCatGroupIds, java.lang.Long anCatalogId)
      Gets the ids of the product sets which correponds to the given catalog group ids in the given catalog.
      java.util.List getAffectedProductSets(java.lang.Long anCatalogId, java.lang.Long anCatGroupId)
      Gets the list of the product sets of all the ancestor categories for the given category and the catalog.
      java.util.Vector getAncestorParentCategories(java.lang.Long anCatalogId, java.lang.Long anCatGroupId)
      Gets all the ancestor parent groups of the given catalog group.
      java.lang.Long getParentCatalogGroupId(java.lang.Long anCatalogId, java.lang.Long anCatGroupId)
      Get the id of the parent category of the given category in the catalog.
      java.lang.Integer getProductSetId(java.lang.Long anCatalogId, java.lang.Long anCatgroupId)
      Gets the id of the product set which corresponds to the given catalog id and catalog group id.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ACCESS_PROFILE_ADD_NEW_PRODUCTSET_CATALOG_ENTRY_REL

        public static final java.lang.String ACCESS_PROFILE_ADD_NEW_PRODUCTSET_CATALOG_ENTRY_REL
        Access profile for adding a new entry to the product set catalog entry relationship table
        See Also:
        Constant Field Values
      • ACCESS_PROFILE_DELETE_EXISTING_PRODUCTSET_CATALOG_ENTRY_REL

        public static final java.lang.String ACCESS_PROFILE_DELETE_EXISTING_PRODUCTSET_CATALOG_ENTRY_REL
        Access profile for deleting an existing entry from the product set catalog entry relationship table
        See Also:
        Constant Field Values
    • Constructor Detail

      • SyncProductSetHelper

        public SyncProductSetHelper()
    • Method Detail

      • getParentCatalogGroupId

        public java.lang.Long getParentCatalogGroupId(java.lang.Long anCatalogId,
                                                      java.lang.Long anCatGroupId)
                                               throws DataMediatorException
        Get the id of the parent category of the given category in the catalog.
        Parameters:
        anCatalogId - The id of the catalog.
        anCatGroupId - The id of the category whose parent category is required.
        Returns:
        The id of the parent category.
        Throws:
        DataMediatorException - If an exception occurs while retrieving the required data.
      • getAncestorParentCategories

        public java.util.Vector getAncestorParentCategories(java.lang.Long anCatalogId,
                                                            java.lang.Long anCatGroupId)
                                                     throws DataMediatorException
        Gets all the ancestor parent groups of the given catalog group.
        Parameters:
        anCatalogId - The Catalog reference number.
        anCatGroupId - The catalog group reference number.
        Returns:
        The list of all the parent groups of the given catalog group.
        Throws:
        DataMediatorException - If an exception occurs while retrieving the required data.
      • getProductSetId

        public java.lang.Integer getProductSetId(java.lang.Long anCatalogId,
                                                 java.lang.Long anCatgroupId)
                                          throws DataMediatorException
        Gets the id of the product set which corresponds to the given catalog id and catalog group id.
        Parameters:
        anCatalogId - The catalog id.
        anCatgroupId - The category id.
        Returns:
        The product set id.
        Throws:
        DataMediatorException - If an exception occurs while retrieving the required data.
      • getAffectedProductSets

        public java.util.List getAffectedProductSets(java.util.Enumeration aCatGroupIds,
                                                     java.lang.Long anCatalogId)
                                              throws DataMediatorException
        Gets the ids of the product sets which correponds to the given catalog group ids in the given catalog.
        Parameters:
        aCatGroupIds - The list of the catalog group ids.
        anCatalogId - The id of the catalog.
        Returns:
        The ids of the product sets which correponds to the given catalog group ids in the given catalog
        Throws:
        DataMediatorException - If an exception occurs while retrieving the required data.
      • getAffectedProductSets

        public java.util.List getAffectedProductSets(java.lang.Long anCatalogId,
                                                     java.lang.Long anCatGroupId)
                                              throws DataMediatorException
        Gets the list of the product sets of all the ancestor categories for the given category and the catalog.
        Parameters:
        anCatalogId - The id of the catalog.
        anCatGroupId - The id of the category.
        Returns:
        The list of the product sets of all the ancestor categories for the given category and the catalog.
        Throws:
        DataMediatorException - If an exception occurs while retrieving the required data.