public class CatalogUpdateService extends atg.commerce.catalog.custom.TreeWalkUpdateService implements ImportListener
This service batch-computes the properties that are usually maintained
by CatalogCompletionService
. This can be used either as
a migration tool, or if you want to disable CatalogCompletionService
for performance reasons, and then batch-compute the properties with
this service. Properties computed by this service:
catalog.directAncestorCatalogsAndSelf
catalog.allRootCategories
catalog.indirectAncestorCatalogs
catalog.ancestorCategories
category.parentCategory
category.parentCatalog
If this component is to be used on a versioned repository, the publishingWorkflowAutomator property must be set
so that the CA workflow and projects will be used.
CatalogCompletionService
atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowBean, atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowMapKey, atg.commerce.catalog.custom.TreeWalkUpdateService.UpdateRange, atg.commerce.catalog.custom.TreeWalkUpdateService.UpdateRangeViaGSA
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
GENERIC_LOOP, mDynamicProductsByCategoryMap, PROCESS_NAME_PREFIX
mJobId
SERVICE_INFO_KEY
AGS_GENANCESTORS, AGS_GENANCESTORS_FOR_CATEGORY, AGS_GENANCESTORS_FOR_PRODUCT, AGS_GENCATALOGS, AGS_GENCATALOGS_FOR_CATEGORY, AGS_GENCATALOGS_FOR_PRODUCT, AGS_GENCATALOGS_FOR_SKU, AGS_GENPARENTCATS, AGS_GENPROPERTIES, AGS_GENPROPERTIES_FOR_CATEGORY, AGS_GENPROPERTIES_FOR_PRODUCT, ANCESTORS_GENERATED, CATALOGS_UPDATED, CATALOGS_VERIFIED, CATEGORIES_VERIFIED, CUS_INVALID_PARENT_BRANCH, CUS_NAME_ALREADY_IN_USE, CUS_UNABLE_TO_GET_WS, CUS_UPDATECATALOGS, CUS_USING_CHECKED_IN_WS, CUS_VM_NOT_SET, CUS_WS_NOT_CREATED, CUS_WS_NOT_CREATED_INVALID_PARENT_BRANCH, CUS_WS_REQUIRED, CVS_VERIFYCATALOGS, CVS_VERIFYCATEGORIES, CVS_VERIFYPRODUCTS, CVS_VERIFYSKUS, DEFAULT_CATALOG_FOLDER_ITEM_TYPE, DEFAULT_CATALOG_ITEM_TYPE, DEFAULT_MAP_SIZE, GENERATED_ANCESTORS_MAP, INFOS_GENERATED, IS_ANCESTORS_GENERATED_MAP, 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
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
CatalogUpdateService() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNameToLog() |
java.lang.String |
getProjectActivityID()
Deprecated.
@see #getPublishingWorkflowAutomator
|
atg.epub.PublishingWorkflowSession |
getPublishingWorkflowAutomator()
Gets the publishing workflow automator used to manage projects when service is run on publishing.
|
java.lang.String |
getServiceName() |
boolean |
getStartWorkflowSession()
Returns true if a new workflow session is created when this service is run.
|
java.lang.String |
getUpdateWorkspaceId() |
protected void |
goingDownUpdateItem(RepositoryItem pParentItem,
RepositoryItem pCurrentItem,
atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowBean pShadowBean)
This method sets all the properties calculated by this service
that are pulled down from the top of the tree.
|
protected void |
goingUpUpdateItem(RepositoryItem pParentItem,
RepositoryItem pCurrentItem,
atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowBean pShadowBean)
This method sets all the properties calculated by this service
the are pulled up from the bottom of the tree.
|
void |
importEnded(ImportManifest pManifest)
Called when import is about to end.
|
void |
importStarted(ImportManifest pManifest)
Called when import is about to commence.
|
void |
setProjectActivityID(java.lang.String pProjectActivityID)
Deprecated.
@see #setPublishingWorkflowAutomator
|
void |
setPublishingWorkflowAutomator(atg.epub.PublishingWorkflowSession pPublishingWorkflowAutomator)
Sets the publishing workflow automator used to manage projects when service is run on publishing.
|
void |
setStartWorkflowSession(boolean pStartWorkflowSession)
Sets if a new workflow session is created when this service is run.
|
void |
setUpdateWorkspaceId(java.lang.String pUpdateWorkspaceId) |
protected void |
updateCatalog()
The main method does some basic setup and logging, calls processTree and
then does some cleanup.
|
protected void |
updateCatalog(java.util.Collection<RepositoryItem> pItemsToProcess)
Just dropped the passed in items and run the entire catalog
|
buildParentCategoriesForCatalog, getCatalogIds, getCatalogProperties, getCatalogTools, getCategoryLeafNodeArray, getCompletedItems, getDatabaseProductName, getDynamicChildrenList, getDynamicProducts, getDynamicProductsByCategoryMap, getDynamicProductsMap, getMaxItemsPerTransaction, getProcessName, getProjectWorkflow, getRangeQueryRows, getRepository, getServiceFunctions, getSizeOfBatch, isCatalogFoundInTreeStep, isComputeSubCatalogs, isIncludeDynamicChildren, performService, processTree, processTreeItems, recurseTreeAndGetCategories, setCatalogFoundInTreeStep, setCatalogIds, setCatalogProperties, setCatalogTools, setCompletedItems, setComputeSubCatalogs, setDatabaseProductName, setDynamicProductsMap, setIncludeDynamicChildren, setMaxItemsPerTransaction, setProjectWorkflow, setPropertyValueAddAll, setRangeQueryRows, setRepository, setServiceFunctions, setSizeOfBatch, stringIt, stringIt, subProcessTree, treeStep, updateDynamicChildren, updateProducts, updateProductsViaBatch, updateRepository, updateRepositoryItem, updateSkus, updateSkusViaBatch
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
acquireLock, getClientLockManager, getLockName, getLockTimeOut, performScheduledTask, releaseLock, setClientLockManager, setLockName, setLockTimeOut
doStartService, doStopService, getJobDescription, getJobId, getJobName, getSchedule, getScheduler, getThreadMethod, getThreadMethodString, isTransactional, setJobDescription, setJobName, setSchedule, setScheduler, setThreadMethod, setThreadMethodString, setTransactional, startScheduledJob, stopScheduledJob
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logError, logError, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public java.lang.String getNameToLog()
getNameToLog
in class atg.commerce.catalog.custom.TreeWalkUpdateService
public java.lang.String getServiceName()
getServiceName
in class atg.commerce.catalog.CMSService
public java.lang.String getProjectActivityID()
public void setProjectActivityID(java.lang.String pProjectActivityID)
pProjectActivityID
- does nothingpublic atg.epub.PublishingWorkflowSession getPublishingWorkflowAutomator()
public void setPublishingWorkflowAutomator(atg.epub.PublishingWorkflowSession pPublishingWorkflowAutomator)
pPublishingWorkflowAutomator
- The PublishingWorkflowAutomator for this service.public boolean getStartWorkflowSession()
public void setStartWorkflowSession(boolean pStartWorkflowSession)
pStartWorkflowSession
- False if a workflow session should not be created. Default is true.public java.lang.String getUpdateWorkspaceId()
public void setUpdateWorkspaceId(java.lang.String pUpdateWorkspaceId)
protected void updateCatalog(java.util.Collection<RepositoryItem> pItemsToProcess)
protected void updateCatalog()
updateCatalog
in class atg.commerce.catalog.custom.TreeWalkUpdateService
protected void goingDownUpdateItem(RepositoryItem pParentItem, RepositoryItem pCurrentItem, atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowBean pShadowBean) throws RepositoryException
goingDownUpdateItem
in class atg.commerce.catalog.custom.TreeWalkUpdateService
pParentItem
- the parent item is the item that the data will be pulled frompCurrentItem
- the current item is the item that will be updated with
data from the pParentItem.RepositoryException
- the repository exceptionprotected void goingUpUpdateItem(RepositoryItem pParentItem, RepositoryItem pCurrentItem, atg.commerce.catalog.custom.TreeWalkUpdateService.ShadowBean pShadowBean) throws RepositoryException
goingUpUpdateItem
in class atg.commerce.catalog.custom.TreeWalkUpdateService
pParentItem
- the parent item that will be updated.pCurrentItem
- the current item is used to pull the data
from for the pParentItem update.RepositoryException
- the repository exceptionpublic void importStarted(ImportManifest pManifest)
ImportListener
importStarted
in interface ImportListener
pManifest
- Has meta information about the import which is about to start.ImportManifest
public void importEnded(ImportManifest pManifest)
ImportListener
importEnded
in interface ImportListener
pManifest
- Has meta information about the import which is about to end.ImportManifest