public class SubCatalogsGeneratorService extends GenericService
catalog.allRootCategories
catalog.allRootCategoryIds
catalog.subCatalogs
catalog.subCatalogsIds
category.subCatalogsChildCategories
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SubCatalogsGeneratorService() |
Modifier and Type | Method and Description |
---|---|
void |
generateCategorysSubCategories()
Update each categorys list of categories from sub catalogs
The following properties will be updated:
category.subCatalogsChildCategories
|
void |
generateCategorysSubCategories(Repository pCatalogRepository)
Update each categories
subCatalogsChildCategories property
for all categories in the given repository. |
protected java.util.Collection |
generateEmptySet(java.lang.String pPropertyName)
This method generates an empty set.
|
void |
generateSubCatalogs()
Generate and update the values of the subCatalogs property for all
catalogs in all specified product catalogs.
|
void |
generateSubCatalogs(Repository pCatalogRepository)
Generate and update the values of the subCatalogs property for
all catalogs in the specified product catalog repository.
|
java.util.Collection |
generateSubCatalogs(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
Generate and update the values of the subCatalogs property for
all catalogs in the specified product catalog 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
|
javax.transaction.TransactionManager |
getTransactionManager()
Returns property transactionManager
|
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 |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager
|
void |
updateSubCatalogInformation()
This is the main method of this class.
|
java.util.Collection |
updateSubCatalogInformation(java.util.Collection pCatalogIds)
This is the main method of this class.
|
void |
updateSubCatalogInformation(Repository pCatalogRepository)
This method will call
generateSubCatalogs and
generateCategorysSubCategories with the given repository. |
java.util.Collection |
updateSubCatalogInformation(Repository pCatalogRepository,
java.util.Collection pCatalogIds)
This method will call
generateSubCatalogs and
generateCategorysSubCategories with the given
repository. |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, 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 void setCatalogProperties(CatalogProperties pCatalogProperties)
public CatalogProperties getCatalogProperties()
public void setCatalogTools(CustomCatalogTools pCatalogTools)
public CustomCatalogTools getCatalogTools()
public void setCatalogRepositories(java.lang.String[] pCatalogRepositories)
public java.lang.String[] getCatalogRepositories()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
public int getMaxItemsPerTransaction()
public void updateSubCatalogInformation()
generateSubCatalogs
and
generateCategorysSubCategories
public void updateSubCatalogInformation(Repository pCatalogRepository)
generateSubCatalogs
and
generateCategorysSubCategories
with the given repository.pCatalogRepository
- The repository that will be updatedpublic java.util.Collection updateSubCatalogInformation(java.util.Collection pCatalogIds)
generateSubCatalogs
and
generateCategorysSubCategories
This method will also
remember if there are any new sub catalogs for the given list.
If the list is null, then null is returned. This list can tell
you which catalogs needs to have the InfoGeneratorService run on
them.pCatalogIds
- Return the list of new sub catalogs for thesepublic java.util.Collection updateSubCatalogInformation(Repository pCatalogRepository, java.util.Collection pCatalogIds)
generateSubCatalogs
and
generateCategorysSubCategories
with the given
repository. This method will also remember if there are any new
sub catalogs for the given list. If the list is null, then null
is returned. This list can tell you which catalogs needs to have
the InfoGeneratorService run on them.pCatalogRepository
- The repository that will be updatedpCatalogIds
- Return the list of new sub catalogs for thesepublic void generateSubCatalogs()
catalog.allRootCategories
catalog.allRootCategoryIds
catalog.subCatalogs
catalog.subCatalogsIds
public void generateCategorysSubCategories()
category.subCatalogsChildCategories
public void generateSubCatalogs(Repository pCatalogRepository)
catalogRepositories
is
used. If that list is empty, then the default catalog repository
is used.pCatalogRepository
- The repository that will be updatedCustomCatalogTools
public java.util.Collection generateSubCatalogs(Repository pCatalogRepository, java.util.Collection pCatalogIds)
catalogRepositories
is
used. If that list is empty, then the default catalog repository
is used. This method will also remember if there are any new sub
catalogs for the given list. If the list is null, then null is
returned. This list can tell you which catalogs needs to have
the InfoGeneratorService run on them.pCatalogRepository
- The repository that will be updatedpCatalogIds
- Return the list of new sub catalogs for theseCustomCatalogTools
public void generateCategorysSubCategories(Repository pCatalogRepository)
subCatalogsChildCategories
property
for all categories in the given repository. If the given repository is
null then catalogRepositories
is used. If that list is
empty, then the default catalog repository is used.pCatalogRepository
- The repository that will be updatedCustomCatalogTools
protected java.util.Collection generateEmptySet(java.lang.String pPropertyName)