public class CatalogGroupLinkHelper
extends java.lang.Object
Constructor and Description |
---|
CatalogGroupLinkHelper()
Default constructor for CatalogGroupLinkHelper.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildCatalogEntry(java.lang.Long catGroupId,
java.lang.Long parentCatEntryId,
java.lang.Long childId,
java.lang.Long catalogId,
double sequence)
Link synchronization when a catalog entry is added as a child to a catalog group.
|
void |
addChildCatalogGroup(java.lang.Long catGroupId,
java.lang.Long childId,
java.lang.Long catalogId,
double sequence)
Link synchronization when a child catalog group is added to a catalog group.
|
void |
copyCatalogGroup(java.lang.Long srcCatGroupId,
java.lang.Long catGroupId,
java.lang.Long srcCatalogId,
java.lang.Long catalogId,
double sequence)
Performs a deep copy of a catalog group including the hierarchy underneaths it and adds it to a sales catalog.
|
void |
copyCatalogGroup(java.lang.Long srcCatGroupId,
java.lang.Long catGroupId,
java.lang.Long srcCatalogId,
java.lang.Long catalogId,
double sequence,
boolean preserveCatEntryRelationship)
Performs a deep copy of a catalog group including the hierarchy underneaths it and adds it to a sales catalog.
|
void |
createCatalogEntry(java.lang.Long catEntryId,
java.lang.Long catGroupId,
java.lang.Long parentCatEntryId,
java.lang.Long catalogId,
double sequence)
Link synchronization processing when creating a catalog entry.
|
void |
createCatalogGroup(java.lang.Long catgroupId,
java.lang.Long parentId,
java.lang.Long catalogId,
double sequence)
Link synchronization processing when creating a new catalog group.
|
void |
deleteCatalogEntry(java.lang.Long catEntryId,
java.lang.Long catalogId)
Link synchronization processing when a catalog entry is deleted.
|
void |
deleteCatalogGroup(java.lang.Long catGroupId,
java.lang.Long catalogId)
Link synchronization processing when a catalog group is deleted.
|
void |
deleteNonProductCatalogEntry(java.lang.Long catEntryId,
java.lang.Long catalogId)
Link synchronization processing when a catalog entry
of type other than a product is deleted.
|
static CatalogGroup |
fetchCatGroupParent(java.lang.Long catGroupId,
java.lang.Long catalogId)
Gets a physical catalog group object with its parents.
|
static boolean |
isAncestor(java.lang.Long catGroupId,
java.lang.Long catalogId,
long testCatGroupId)
Check to see if the test catalog group is an ancestor of a catalog group in
a catalog.
|
void |
linkCatalogGroup(java.lang.Long toCatGroupId,
java.lang.Long fromCatGroupId,
java.lang.Long toCatalogId,
java.lang.Long fromCatalogId,
double sequence)
Disconnect the link between a source catalog group and a target catalog group or a catalog root.
|
void |
linkCatalogGroup(java.lang.Long toCatGroupId,
java.lang.Long fromCatGroupId,
java.lang.Long toCatalogId,
java.lang.Long fromCatalogId,
double sequence,
boolean restrictLink)
Create a link from a catalog group in a sales catalog to another catalog group in
another catalog with an option to restrict only 1 link to a catalog group from the
same target catalog.
|
void |
linkCatalogGroupSynchronized(java.lang.Long toCatGroupId,
java.lang.Long fromCatGroupId,
java.lang.Long toCatalogId,
java.lang.Long fromCatalogId,
double sequence)
Create a link from a catalog group in a sales catalog to another catalog group in
the same or another catalog.
|
void |
removeChildCatalogEntry(java.lang.Long catGroupId,
java.lang.Long parentCatEntryId,
java.lang.Long childId,
java.lang.Long catalogId)
Link synchronization when a child catalog entry is removed from a catalog group or parent catalog entry.
|
void |
removeChildCatalogGroup(java.lang.Long catGroupId,
java.lang.Long childId,
java.lang.Long catalogId)
Link synchronization when a navigation relationship for a child catalog group is removed.
|
void |
unlinkCatalogGroup(java.lang.Long toCatGroupId,
java.lang.Long fromCatGroupId,
java.lang.Long toCatalogId,
java.lang.Long fromCatalogId)
Disconnect the link between a source catalog group and a target catalog group or a catalog root.
|
void |
unlinkCatalogGroupSynchronized(java.lang.Long toCatGroupId,
java.lang.Long fromCatGroupId,
java.lang.Long toCatalogId,
java.lang.Long fromCatalogId)
Disconnect the link between a source catalog group and a target catalog group or a catalog root.
|
void |
updateCatalogEntry(java.lang.Long catEntryId,
java.lang.Long catGroupId,
java.lang.Long parentCatEntryId,
java.lang.Long catalogId,
double sequence)
Link synchronization processing when updating parent of a catalog entry.
|
void |
updateCatalogEntryToCatalogGroupRelationship(java.lang.Long catGroupId,
java.lang.Long catEntryId,
java.lang.Long catalogId,
double sequence)
Link synchronization when the display sequence of a child catalog entry is changed.
|
void |
updateCatalogGroup(java.lang.Long catGroupId,
java.lang.Long parentCatGroupId,
java.lang.Long catalogId,
double sequence)
Link synchronization processing when updating parent of a catalog group.
|
void |
updateCatalogGroupToCatalogGroupRelationship(java.lang.Long catGroupId,
java.lang.Long childId,
java.lang.Long catalogId,
double sequence)
Link synchronization when the display sequence of a child catalog group is changed.
|
public CatalogGroupLinkHelper()
public static CatalogGroup fetchCatGroupParent(java.lang.Long catGroupId, java.lang.Long catalogId) throws DataMediatorException
catGroupId
- Catalog group ID.catalogId
- Catalog ID.DataMediatorException
- Exception thrown by data service during the read operationpublic static boolean isAncestor(java.lang.Long catGroupId, java.lang.Long catalogId, long testCatGroupId) throws DataMediatorException
catGroupId
- ID of a catalog group.catalogId
- ID of a catalog.testCatGroupId
- ID of catalog group ID to be checked.DataMediatorException
- Error detected during database read operations.public void linkCatalogGroupSynchronized(java.lang.Long toCatGroupId, java.lang.Long fromCatGroupId, java.lang.Long toCatalogId, java.lang.Long fromCatalogId, double sequence) throws BusinessObjectMediatorException, CatalogApplicationException
toCatGroupId
- The source catalog group ID to link to.fromCatGroupId
- The target catalog group ID. Will link as a top category if this is NULL.toCatalogId
- The source catalog ID.fromCatalogId
- The target catalog ID.sequence
- Display sequence of catalog group in parent catalog group.BusinessObjectMediatorException
- Error detected by data service during processing.CatalogApplicationException
- Application error detected during link operation.public void unlinkCatalogGroupSynchronized(java.lang.Long toCatGroupId, java.lang.Long fromCatGroupId, java.lang.Long toCatalogId, java.lang.Long fromCatalogId) throws BusinessObjectMediatorException, CatalogApplicationException
This method is synchronized and is called by ScheduledCatalogGroupUnLinkCmd.
toCatGroupId
- The source catalog group ID.fromCatGroupId
- The target catalog group ID. The link is a top category link if this is NULL.toCatalogId
- The source catalog ID.fromCatalogId
- The target catalog ID.BusinessObjectMediatorException
- Error detected by data service during unlink operation.CatalogApplicationException
- Application error detected during unlink operation.public void linkCatalogGroup(java.lang.Long toCatGroupId, java.lang.Long fromCatGroupId, java.lang.Long toCatalogId, java.lang.Long fromCatalogId, double sequence) throws BusinessObjectMediatorException, CatalogApplicationException
toCatGroupId
- The source catalog group ID.fromCatGroupId
- The target catalog group ID. The link is a top category link if this is NULL.toCatalogId
- The source catalog ID.fromCatalogId
- The target catalog ID.sequence
- Display sequence of catalog group in parent catalog group.BusinessObjectMediatorException
- Error detected by data service during unlink operation.CatalogApplicationException
- Application error detected during unlink operation.public void linkCatalogGroup(java.lang.Long toCatGroupId, java.lang.Long fromCatGroupId, java.lang.Long toCatalogId, java.lang.Long fromCatalogId, double sequence, boolean restrictLink) throws BusinessObjectMediatorException, CatalogApplicationException
toCatGroupId
- The source catalog group ID.fromCatGroupId
- The target catalog group ID. Will link as a top category if this is NULL.toCatalogId
- The source catalog ID.fromCatalogId
- The target catalog ID.sequence
- Display sequence of catalog group in parent catalog group.restrictLink
- If true,indicates that link restriction is to be enforced.BusinessObjectMediatorException
- Error detected during link operation.CatalogApplicationException
- Application error detected during link operation.public void unlinkCatalogGroup(java.lang.Long toCatGroupId, java.lang.Long fromCatGroupId, java.lang.Long toCatalogId, java.lang.Long fromCatalogId) throws BusinessObjectMediatorException, CatalogApplicationException
toCatGroupId
- The source catalog group ID.fromCatGroupId
- The target catalog group ID. The link is a top category link if this is NULL.toCatalogId
- The source catalog ID.fromCatalogId
- The target catalog ID.BusinessObjectMediatorException
- Error detected by data service during unlink operation.CatalogApplicationException
- Application error detected during unlink operation.public void createCatalogEntry(java.lang.Long catEntryId, java.lang.Long catGroupId, java.lang.Long parentCatEntryId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catEntryId
- ID of Catalog entry.catGroupId
- ID of parent catalog group.parentCatEntryId
- ID of parent catalog entry.catalogId
- ID of catalog where the catalog entry is created in.sequence
- Display sequence of catalog entry.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void createCatalogGroup(java.lang.Long catgroupId, java.lang.Long parentId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catgroupId
- ID of the catalog group created.parentId
- Parent catalog group ID, null is this is a top category.catalogId
- ID of catalog where catalog group is created in.sequence
- Display sequence of catalog group in parent catalog group.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void deleteCatalogEntry(java.lang.Long catEntryId, java.lang.Long catalogId) throws BusinessObjectMediatorException
catEntryId
- ID of catalog entry to be deleted.catalogId
- ID of catalog where the catalog group is being updated.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void deleteNonProductCatalogEntry(java.lang.Long catEntryId, java.lang.Long catalogId) throws BusinessObjectMediatorException
catEntryId
- ID of catalog entry to be deleted.catalogId
- ID of catalog where the catalog group is being updated.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void deleteCatalogGroup(java.lang.Long catGroupId, java.lang.Long catalogId) throws BusinessObjectMediatorException
catGroupId
- Catalog group ID.catalogId
- ID of catalog where the catalog group is being updated.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void addChildCatalogEntry(java.lang.Long catGroupId, java.lang.Long parentCatEntryId, java.lang.Long childId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catGroupId
- The parent catalog group ID.parentCatEntryId
- The parent catalog entry ID.childId
- The child catalog entry ID.catalogId
- The catalog ID.sequence
- Display sequence.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void addChildCatalogGroup(java.lang.Long catGroupId, java.lang.Long childId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catGroupId
- The parent catalog group ID.childId
- The child catalog group.catalogId
- The catalog ID.sequence
- Display sequence.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void removeChildCatalogEntry(java.lang.Long catGroupId, java.lang.Long parentCatEntryId, java.lang.Long childId, java.lang.Long catalogId) throws BusinessObjectMediatorException
catGroupId
- The parent catalog group ID.parentCatEntryId
- Parent catalog entry ID.childId
- The ID of the catalog entry to be removed.catalogId
- The catalog ID.BusinessObjectMediatorException
- Error detected by the data service during the link synchronization operation.public void updateCatalogGroupToCatalogGroupRelationship(java.lang.Long catGroupId, java.lang.Long childId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catGroupId
- The parent catalog group ID.childId
- The child catalog group ID.catalogId
- The catalog ID.sequence
- Display sequence.BusinessObjectMediatorException
- Error detected by data service during processing.public void updateCatalogEntryToCatalogGroupRelationship(java.lang.Long catGroupId, java.lang.Long catEntryId, java.lang.Long catalogId, double sequence) throws java.lang.Exception
catGroupId
- The parent catalog group ID.catEntryId
- The child catalog entry ID.catalogId
- The catalog ID.sequence
- Display sequence.java.lang.Exception
public void removeChildCatalogGroup(java.lang.Long catGroupId, java.lang.Long childId, java.lang.Long catalogId) throws BusinessObjectMediatorException
catGroupId
- The parent catalog group ID.childId
- The child catalog group.catalogId
- The catalog ID.BusinessObjectMediatorException
- Error detected by data service during processing.public void updateCatalogEntry(java.lang.Long catEntryId, java.lang.Long catGroupId, java.lang.Long parentCatEntryId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catEntryId
- ID of catalog entry.catGroupId
- ID of catalog group.parentCatEntryId
- ID of catalog entry.catalogId
- ID of catalog where the catalog entry is created in.sequence
- Display sequence of catalog entry in parent catalog group.BusinessObjectMediatorException
- Error detected by data service during processing.public void updateCatalogGroup(java.lang.Long catGroupId, java.lang.Long parentCatGroupId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException
catGroupId
- Catalog group ID.parentCatGroupId
- Parent catalog group ID, null if this is a top category.catalogId
- ID of catalog where the catalog group is being updated.sequence
- Display sequence of catalog group in parent catalog group.BusinessObjectMediatorException
- Error detected by data service during processing.public void copyCatalogGroup(java.lang.Long srcCatGroupId, java.lang.Long catGroupId, java.lang.Long srcCatalogId, java.lang.Long catalogId, double sequence, boolean preserveCatEntryRelationship) throws BusinessObjectMediatorException, CatalogApplicationException
srcCatGroupId
- source catalog group ID of the catalog group to copy.catGroupId
- Catalog group ID of the target catalog group. Null for top category.srcCatalogId
- Source catalog ID.catalogId
- Target catalog ID.sequence
- Display sequence of the copied catalog group.preserveCatEntryRelationship
- Preserve relationship to catalog entry if set to true.BusinessObjectMediatorException
- Error detected by the data service during the copy operationCatalogApplicationException
- Application error detected during the copy operationpublic void copyCatalogGroup(java.lang.Long srcCatGroupId, java.lang.Long catGroupId, java.lang.Long srcCatalogId, java.lang.Long catalogId, double sequence) throws BusinessObjectMediatorException, CatalogApplicationException
srcCatGroupId
- source catalog group ID of the catalog group to copy.catGroupId
- Catalog group ID of the target catalog group. Null for top category.srcCatalogId
- Source catalog ID.catalogId
- Target catalog ID.sequence
- Display sequence of the copied catalog group.BusinessObjectMediatorException
- Error detected by the data service during the copy operation.CatalogApplicationException
- Application error detected during copy operation.