|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.service.scheduler.SchedulableService atg.service.scheduler.SingletonSchedulableService atg.commerce.catalog.CMSService atg.commerce.catalog.custom.AncestorGeneratorService
public class AncestorGeneratorService
This CMSService performs the following service functions Available service functions: AGS_GENCATALOGS - generate catalog and catalogs (for catalogs, products and skus) AGS_GENPARENTCATS - generate parent categories (for products) AGS_GENANCESTORS - generate ancestors (for products and skus)
getAvailableFunctions
,
generateAncestors, generates the set of ancestor categories for each
category and product in each catalog
in the catalog repository, and updates the ancestorCategories property.
Methods generateCategoryAncestors and generateProductAncestors
can be called to update the ancestors for only categories or products, respectively.
generateCatalogAndCatalogs, generates the catalog and catalogs properties
for all categories, products and skus in each catalog
generateCatalogParentCategoriesForProducts, generates the parent category
at the catalog level. This is necessary when more than one category in a catalog
has the same product as a childProduct.
Methods generateCatalogsForProducts , generateCatalogsForSkus
and generateCatalogAndCatalogsForCategories
can be called to update the catalogs and catalogs properties
for only categories, products or skus, respectively.
This set is used in hierarchical search.
You may limit this to specific catalogs by provide a Collection of catalog ids.
,
Nested Class Summary |
---|
Nested classes/interfaces inherited from class atg.commerce.catalog.CMSService |
---|
atg.commerce.catalog.CMSService.BookkeepingForThread |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.service.scheduler.SchedulableService |
---|
mJobId |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.commerce.catalog.CMSConstants |
---|
AGS_GENANCESTORS, AGS_GENCATALOGS, AGS_GENPARENTCATS, ANCESTORS_GENERATED, CATALOGS_UPDATED, CATALOGS_VERIFIED, CATEGORIES_VERIFIED, CUS_UPDATECATALOGS, CVS_VERIFYCATALOGS, CVS_VERIFYCATEGORIES, CVS_VERIFYPRODUCTS, CVS_VERIFYSKUS, DEFAULT_CATALOG_ITEM_TYPE, DEFAULT_MAP_SIZE, GENERATED_ANCESTORS, INFOS_GENERATED, IS_ANCESTORS_GENERATED, LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO, LEVEL_WARNING, MY_RESOURCE_NAME, NO_PATH, NOT_GENERATOR, sResourceBundle, TYPE_ANCESTOR, TYPE_CATALOGMAINTENANCE, TYPE_CUSTOM_MIGRATION, TYPE_MIGRATION, TYPE_UPDATE, TYPE_VERIFY, VALID_PATH |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
AncestorGeneratorService()
|
Method Summary | |
---|---|
void |
generateAncestors()
Generate and update the values of the ancestorCategories property for all categories and products in all specified product catalogs. |
void |
generateAncestors(java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all categories and products in all specified product catalogs. |
void |
generateAncestors(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all categories and products in all specified product catalogs in the specified repository. |
void |
generateCatalogAndCatalogs()
Generate and update the catalog and catalogs property for all categories, products and skus in all product catalog repositories and all catalogs. |
void |
generateCatalogAndCatalogs(Repository pRepository,
java.util.Collection pCatalogIds)
Generate and update the catalog and catalogs property for all categories, products and skus in all product catalog repositories and all catalogs. |
void |
generateCatalogAndCatalogsForCategories()
Generate and update the values of the catalog and catalogs property for all categories in the specified repository and catalogs. |
void |
generateCatalogAndCatalogsForCategories(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the catalog and catalogs property for all categories in the specified repository and catalogs. |
void |
generateCatalogParentCategoriesForProducts()
Generate and update the values of the parent category for catalogs. |
void |
generateCatalogParentCategoriesForProducts(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the parent category for catalogs. |
void |
generateCatalogsForProducts()
Generate and update the values of the catalogs property for all products in the specified repository and catalogs. |
void |
generateCatalogsForProducts(Repository pCatalogRepository)
Generate and update the values of the catalogs property for all products in the specified repository and catalogs. |
void |
generateCatalogsForSkus()
Generate and update the values of the catalogs property for all skus in the specified repository and catalogs. |
void |
generateCatalogsForSkus(Repository pCatalogRepository)
Generate and update the values of the catalogs property for all skus in the specified repository and catalogs. |
void |
generateCategoryAncestors()
Generate and update the values of the ancestorCategories property for all categories in all product catalogs. |
void |
generateCategoryAncestors(java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all categories in all specified product catalogs. |
void |
generateCategoryAncestors(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all categories in all specified product catalogs in the specified repository. |
protected java.util.Map |
generateEmptyMap()
Helper method to return an empty map. |
void |
generateProductAncestors()
Generate and update the values of the ancestorCategories property for all products in all product catalogs. |
void |
generateProductAncestors(java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all products in all specified product catalogs. |
void |
generateProductAncestors(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the ancestorCategories property for all products in all specified product catalogs in the specified repository. |
CatalogProperties |
getCatalogProperties()
A helper class that holds commonly accessed reposority property and item names |
java.lang.String[] |
getCatalogRepositories()
Returns property catalogRepositories |
CustomCatalogTools |
getCatalogTools()
Returns property catalogTools |
int |
getMaxItemsPerTransaction()
Returns property maxItemsPerTransaction |
java.lang.String |
getServiceName()
|
boolean |
performService(Repository pRepository,
java.util.Collection pCatalogIds,
java.util.List pServiceFunctions)
Performs this services functions |
protected java.util.Collection |
removeSelfFromAncestors(RepositoryItem pCategory,
java.util.Collection pAncestors)
Remove pCategory from each of the lists mapped to in pAncestors |
void |
setCatalogProperties(CatalogProperties pCatalogProperties)
|
void |
setCatalogRepositories(java.lang.String[] pCatalogRepositories)
Sets property catalogRepositories |
void |
setCatalogTools(CustomCatalogTools pCatalogTools)
Sets property catalogTools |
void |
setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
Sets property maxItemsPerTransaction |
void |
showMessages()
|
protected java.lang.String |
stringIt(java.util.Collection pObject)
|
protected java.lang.String |
stringIt(java.lang.Object[] pObject)
|
Methods inherited from class atg.commerce.catalog.CMSService |
---|
addErrorMessage, addInfoMessage, addWarningMessage, clearBookkeepingForThread, clearMessages, createCMSMessage, doScheduledTask, doService, getAvailableFunctions, getBookkeepingForThread, getCurrentMessages, getErrorMessages, getFunctionsToPerformByDefault, getInfoMessages, getServiceLock, getTotalNumberOfErrorMessages, getTotalNumberOfInfoMessages, getTotalNumberOfMessages, getTotalNumberOfWarningMessages, getTransactionManager, getWarningMessages, hasFunction, isSaveMessages, logDebug, logError, logInfo, logWarning, performService, postService, preService, removeServiceLock, setAvailableFunctions, setFunctionsToPerformByDefault, setSaveMessages, setTransactionManager |
Methods inherited from class atg.service.scheduler.SingletonSchedulableService |
---|
acquireLock, getClientLockManager, getLockName, getLockTimeOut, performScheduledTask, releaseLock, setClientLockManager, setLockName, setLockTimeOut |
Methods inherited from class atg.service.scheduler.SchedulableService |
---|
doStartService, doStopService, getJobDescription, getJobName, getSchedule, getScheduler, getThreadMethod, isTransactional, setJobDescription, setJobName, setSchedule, setScheduler, setThreadMethod, setTransactional, startScheduledJob, stopScheduledJob |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public AncestorGeneratorService()
Method Detail |
---|
public void setCatalogRepositories(java.lang.String[] pCatalogRepositories)
public java.lang.String[] getCatalogRepositories()
public void setCatalogProperties(CatalogProperties pCatalogProperties)
public CatalogProperties getCatalogProperties()
public void setCatalogTools(CustomCatalogTools pCatalogTools)
public CustomCatalogTools getCatalogTools()
public void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
public int getMaxItemsPerTransaction()
public java.lang.String getServiceName()
getServiceName
in class atg.commerce.catalog.CMSService
public void generateCatalogAndCatalogs()
public void generateCatalogAndCatalogs(Repository pRepository, java.util.Collection pCatalogIds)
pRepository
- - the repository where the items reside.
if null the repositories returned
by getCatalogRepositories() are processed. otherwise
the repository returned catalogTools.getCatalog()
is used.pCatalogIds
- - a collection of catalog item repository ids. this
collection is used to constrain the selection of categories,
products and skus. if null all catalog items are processedpublic void generateCatalogAndCatalogsForCategories()
public void generateCatalogAndCatalogsForCategories(Repository pCatalogRepository, java.util.Collection pCatalogIds)
pCatalogRepository
- - the repository where the items reside.
if null the repositories returned
by getCatalogRepositories() are processed. otherwise
the repository returned catalogTools.getCatalog()
is used.pCatalogIds
- - a collection of catalog item repository ids. this
collection is used to constrain the selection of categories.
if null all catalog items are processedpublic void generateCatalogParentCategoriesForProducts()
public void generateCatalogParentCategoriesForProducts(Repository pCatalogRepository, java.util.Collection pCatalogIds)
pRepository
- - the repository where the items reside.
if null the repositories returned
by getCatalogRepositories() are processed. otherwise
the repository returned catalogTools.getCatalog()
is used.pCatalogIds
- - a collection of catalog item repository ids. this
collection is used to constrain the selection of products
if null all catalog items are processedpublic void generateCatalogsForProducts()
public void generateCatalogsForProducts(Repository pCatalogRepository)
pRepository
- - the repository where the items reside.
if null the repositories returned
by getCatalogRepositories() are processed. otherwise
the repository returned catalogTools.getCatalog()
is used.public void generateCatalogsForSkus()
public void generateCatalogsForSkus(Repository pCatalogRepository)
pRepository
- - the repository where the items reside.
if null the repositories returned
by getCatalogRepositories() are processed. otherwise
the repository returned catalogTools.getCatalog()
is used.protected java.lang.String stringIt(java.util.Collection pObject)
stringIt
in class atg.commerce.catalog.CMSService
protected java.lang.String stringIt(java.lang.Object[] pObject)
stringIt
in class atg.commerce.catalog.CMSService
public void generateAncestors()
public void generateAncestors(java.util.Collection pCatalogIds)
pCatalogIds
- a collection of catalog ids. The type of each id is String
If this param is null, all catalogs are assumedpublic void generateAncestors(Repository pCatalogRepository, java.util.Collection pCatalogIds)
pCatalogRepository
- - The repository to updatepCatalogIds
- - a collection of catalog ids. The type of each id is String
If this param is null, all catalogs are assumedpublic void generateCategoryAncestors()
public void generateCategoryAncestors(java.util.Collection pCatalogIds)
pCatalogIds
- a collection of catalog ids. The type of each id is String
If this param is null, all catalogs are assumedpublic void generateCategoryAncestors(Repository pCatalogRepository, java.util.Collection pCatalogIds)
pCatalogRepository
- The repository to updatepCatalogIds
- a collection of catalog ids. The type of each id is String
If this param is null, all catalogs are assumedpublic void generateProductAncestors()
public void generateProductAncestors(java.util.Collection pCatalogIds)
public void generateProductAncestors(Repository pCatalogRepository, java.util.Collection pCatalogIds)
pCatalogRepository
- The repository to updatepCatalogIds
- a collection of catalog ids. The type of each id is String
If this param is null, all catalogs are assumedprotected java.util.Map generateEmptyMap()
protected java.util.Collection removeSelfFromAncestors(RepositoryItem pCategory, java.util.Collection pAncestors)
pCategory
- The category to remove from each list of ancestorspAncestors
- The mapping of catalogIds to ancestors to update.public void showMessages()
public boolean performService(Repository pRepository, java.util.Collection pCatalogIds, java.util.List pServiceFunctions)
performService
in class atg.commerce.catalog.CMSService
pRepository
- - Catalog repository to operate againstpCatalogIds
- - a collection of catalogs to processpServiceFunctions
- - a list of strings that identify service functions. used to
conditionally executed specific functions of a service
generateCatalogAndCatalogs()
,
generateCatalogParentCategoriesForProducts()
,
generateCatalogParentCategoriesForProducts()
,
generateAncestors()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |