public class SyncProductSetForCategoryHelper extends SyncProductSetHelper
addParentCategory
to add the pair of source/target parent
category of the category being reparented.
When the caller is ready to synchronize the product sets, method
syncProductSet
can be called to synchronize the product sets.
deleteProductSetPolicy
can be called
the delete the product set business policies defined for this given category.
ACCESS_PROFILE_ADD_NEW_PRODUCTSET_CATALOG_ENTRY_REL, ACCESS_PROFILE_DELETE_EXISTING_PRODUCTSET_CATALOG_ENTRY_REL
Constructor and Description |
---|
SyncProductSetForCategoryHelper()
The default constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
void |
addParentCategory(java.lang.Long anCatalogId,
java.lang.Long anCategoryId,
java.lang.Long anTargetParentCategoryId)
This adds the pair of source/target parent category of the category being
reparented.
|
void |
deleteProductSetPolicy(java.lang.Long anCatalogId,
java.lang.Long anCatGroupId)
Delete the product set policy related to the given catalog and catalog
group.
|
static java.util.Vector |
getUncommonParentCatGroups(java.util.Vector vecSourceParentGroup,
java.util.Vector vecTargetParentGroup)
Finds the parent groups in
vecSourceParentGroup which is
not common in the target parent groups vecTargetParentGroup . |
void |
syncProductSet(java.lang.Long anCatalogId)
Synchronize the product sets of those parent categories recorded by
addParentCategory . |
getAffectedProductSets, getAffectedProductSets, getAncestorParentCategories, getParentCatalogGroupId, getProductSetId
public SyncProductSetForCategoryHelper()
public void addParentCategory(java.lang.Long anCatalogId, java.lang.Long anCategoryId, java.lang.Long anTargetParentCategoryId) throws DataMediatorException, CatalogApplicationException
anCatalogId
- The catalog id of the category being reparent.anCategoryId
- The category id of the category being reparent.anTargetParentCategoryId
- The new or target parent category of the category being
reparent.DataMediatorException
- If an exception occurs while updating the
data.CatalogApplicationException
public static final java.util.Vector getUncommonParentCatGroups(java.util.Vector vecSourceParentGroup, java.util.Vector vecTargetParentGroup)
vecSourceParentGroup
which is
not common in the target parent groups vecTargetParentGroup
.
This will be sourceParentGroup - (intersection of sourceParentGroup and
targetParentGroup). e.g(p1,p2,p4,p5) and (p1,p2,p3,p6) => (p4, p5)vecSourceParentGroup
- the source parent groups.vecTargetParentGroup
- the target parent groups.vecSourceParentGroup
which is not common in the target parent groups.public void syncProductSet(java.lang.Long anCatalogId) throws CatalogApplicationException, DataMediatorException
addParentCategory
.anCatalogId
- The catalog id of the product sets being synchronized.CatalogApplicationException
DataMediatorException
- If an exception occurs while updating the
data.public void deleteProductSetPolicy(java.lang.Long anCatalogId, java.lang.Long anCatGroupId) throws DataMediatorException
anCatalogId
- The catalog id.anCatGroupId
- The catalog group id.DataMediatorException
- If an exception occurs while deleting the
data.