public class RuleBasedCategoryHelper extends CatalogGroupLinkHelper
This class will provide helpers to save the child catalog entries for a rule based category.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright field.
|
static java.lang.String |
EVALDATE_TIMESTAMP_FORMAT
The date format to use for EVALTIME.
|
static java.lang.String |
SYNC_TYPE_DELTA
A flag indicating that the rule based category evaluation should perform a
delta replacement when determining category children.
|
static java.lang.String |
SYNC_TYPE_REFRESH
A flag indicating that the rule based category evaluation should perform a
full replacement when determining category children.
|
Constructor and Description |
---|
RuleBasedCategoryHelper() |
Modifier and Type | Method and Description |
---|---|
void |
createCGCERelationships(java.lang.String storeId,
java.lang.String catGroupId,
java.lang.String catEntryId,
java.lang.String catalogId,
java.lang.String sequence)
Create catalog group to catalog entry relationship (catgpenrel) for a catalog entry.
|
void |
createCGCERelationships(java.lang.String storeId,
java.lang.String catGroupId,
java.lang.String catEntryId,
java.lang.String catalogId,
java.lang.String sequence,
boolean includeSKUs)
Create catalog group to catalog entry relationship (catgpenrel) for a catalog entry.
|
static void |
determineRuleBasedCategoryChildren(java.lang.String workspaceId,
java.lang.String taskGroupId,
java.lang.String taskId,
java.util.List<java.lang.String> categoryIdList,
java.lang.String catalogId,
java.lang.String storeId)
This method will determine and populate the child catalog entries for a rule based
category.
|
void |
finishEvaluating(java.lang.String categoryId)
This method will set evaluating to 0 and the evaltime column
in the catgrprule table for this category.
|
boolean |
isEvaluating(java.lang.String categoryId)
This method will return true if the category is currently being evaluated, or
false otherwise.
|
void |
raiseSOLREvent(java.lang.String storeId,
java.lang.String catEntryId)
Create CGCE relationship objects to a catalog entry and child SKUs for a product.
|
void |
removeCGCEForProductAndSKUs(java.lang.String storeId,
java.lang.String catGroupId,
java.lang.String catEntryId,
java.lang.String catalogId)
Removes Catalog group to catalog entry relations for a list of links.
|
void |
removeCGCEForProductAndSKUsList(java.lang.String storeId,
java.lang.String catGroupId,
java.util.List<java.lang.String> catEntryIdList,
java.lang.String catalogId)
Removes Catalog group to catalog entry relations for a list of links.
|
void |
setEvaluateAllAndIgnoreTimeInterval()
This method will set the evaluating column to '2' for all rule based sales categories.
|
void |
setEvaluating(int evaluating,
java.lang.String categoryId)
This method will set the evaluating column in the catgrprule table for this category.
|
void |
updateCGCERelationships(java.lang.String storeId,
java.lang.String catGroupId,
java.lang.String catEntryId,
java.lang.String catalogId,
java.lang.String sequence)
Link synchronization when the display sequence of a child catalog entry is changed.
|
addChildCatalogEntry, addChildCatalogGroup, copyCatalogGroup, copyCatalogGroup, createCatalogEntry, createCatalogGroup, deleteCatalogEntry, deleteCatalogGroup, deleteNonProductCatalogEntry, fetchCatGroupParent, isAncestor, linkCatalogGroup, linkCatalogGroup, linkCatalogGroupSynchronized, removeChildCatalogEntry, removeChildCatalogGroup, unlinkCatalogGroup, unlinkCatalogGroupSynchronized, updateCatalogEntry, updateCatalogEntryToCatalogGroupRelationship, updateCatalogGroup, updateCatalogGroupToCatalogGroupRelationship
public static final java.lang.String COPYRIGHT
public static final java.lang.String SYNC_TYPE_DELTA
public static final java.lang.String SYNC_TYPE_REFRESH
public static final java.lang.String EVALDATE_TIMESTAMP_FORMAT
public static void determineRuleBasedCategoryChildren(java.lang.String workspaceId, java.lang.String taskGroupId, java.lang.String taskId, java.util.List<java.lang.String> categoryIdList, java.lang.String catalogId, java.lang.String storeId) throws java.lang.Exception
This method will determine and populate the child catalog entries for a rule based category.
workspaceId
- The workspace internal identifier.taskGroupId
- The task group internal identifier.taskId
- The task internal identifier.categoryIdList
- The list of category internal identifiers to process. If NULL, all
rule based categories will be processed.catalogId
- The catalog internal identifier.storeId
- The store internal identifier.java.lang.Exception
- Error thrown during processing.public void createCGCERelationships(java.lang.String storeId, java.lang.String catGroupId, java.lang.String catEntryId, java.lang.String catalogId, java.lang.String sequence) throws java.lang.Exception
storeId
- Store IDcatGroupId
- Catalog group ID.catEntryId
- Catalog Entry ID.catalogId
- Source catalog ID.sequence
- Display sequence of catalog entry in parent catalog group.java.lang.Exception
- Error thrown during processing by data services.public void createCGCERelationships(java.lang.String storeId, java.lang.String catGroupId, java.lang.String catEntryId, java.lang.String catalogId, java.lang.String sequence, boolean includeSKUs) throws java.lang.Exception
storeId
- Store IDcatGroupId
- Catalog group ID.catEntryId
- Catalog Entry ID.catalogId
- Source catalog ID.sequence
- Display sequence of catalog entry in parent catalog group.includeSKUs
- If true, then the SKUS for products are included into the sales category.java.lang.Exception
- Error thrown during processing by data services.public void removeCGCEForProductAndSKUs(java.lang.String storeId, java.lang.String catGroupId, java.lang.String catEntryId, java.lang.String catalogId) throws java.lang.Exception
storeId
- The store for the sales catalog/category.catGroupId
- The parent catalog group ID.catEntryId
- A catalog entry ID.catalogId
- The catalog ID to add relationship within.java.lang.Exception
- Error detected by data service during processingpublic void removeCGCEForProductAndSKUsList(java.lang.String storeId, java.lang.String catGroupId, java.util.List<java.lang.String> catEntryIdList, java.lang.String catalogId) throws java.lang.Exception
storeId
- The store for the sales catalog/category.catGroupId
- The parent catalog group ID.catEntryIdList
- A list of catalog entry IDs.catalogId
- The catalog ID to add relationship within.java.lang.Exception
- Error detected by data service during processingpublic void updateCGCERelationships(java.lang.String storeId, java.lang.String catGroupId, java.lang.String catEntryId, java.lang.String catalogId, java.lang.String sequence) throws java.lang.Exception
storeId
- The store for the sales catalog/category.catGroupId
- The parent catalog group ID.catEntryId
- The child catalog entry ID.catalogId
- The catalog ID.sequence
- Display sequence.java.lang.Exception
public void raiseSOLREvent(java.lang.String storeId, java.lang.String catEntryId) throws java.lang.Exception
storeId
- The store for the sales catalog/category.catEntryId
- The child catalog entry ID.java.lang.Exception
- Exception thrown during processing.public boolean isEvaluating(java.lang.String categoryId) throws java.lang.Exception
This method will return true if the category is currently being evaluated, or false otherwise.
categoryId
- The category ID.java.lang.Exception
- An error will be thrown if there was a problem selecting the column.public void setEvaluating(int evaluating, java.lang.String categoryId) throws java.lang.Exception
This method will set the evaluating column in the catgrprule table for this category.
evaluating
- The value to set for the column 'EVALUATING' in the table CATGRPRULE.categoryId
- The category ID.java.lang.Exception
- An error will be thrown if there was a problem updating the column.public void finishEvaluating(java.lang.String categoryId) throws java.lang.Exception
This method will set evaluating to 0 and the evaltime column in the catgrprule table for this category.
categoryId
- The category ID.java.lang.Exception
- An error will be thrown if there was a problem updating the column.public void setEvaluateAllAndIgnoreTimeInterval() throws java.lang.Exception
This method will set the evaluating column to '2' for all rule based sales categories.
java.lang.Exception
- An error will be thrown if there was a problem updating the column.