| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.catalog.custom.CatalogCompletionService
public class CatalogCompletionService
 This service performs incremental maintenance on the catalog system
 after changes have been made to the catalog structure in the UI.  
 
 Methods are called from CatalogChangesListener when:
 a catalog is created
 a catalogFolder or catalog is added/removed as a child from another
 catalogFolder 
 a catalog or category is added/removed as a child from another category 
 or catalog. 
 
 Methods are also called from  CatalogChangesListener when 
 sites are added or removed to/from a catalogFolder or catalog.
 
 Properties computed by this service:
 catalogFolder.siteIds
 catalog.directAncestorCatalogsAndSelf
 catalog.allRootCategories
 catalog.indirectAncestorCatalogs
 catalog.ancestorCategories
 catalog.siteIds
 category.parentCatalog
 category.catalogs
 category.siteIds
CatalogChangesListener| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| 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 | |
|---|---|
| CatalogCompletionService() | |
| Method Summary | |
|---|---|
|  void | addCatalogFolderToCatalogFolder(MutableRepositoryItem pParentFolder,
                                MutableRepositoryItem pChildFolder)This method will update site property details for the new child catalog folder. | 
|  void | addCatalogToCatalog(MutableRepositoryItem pParentCatalog,
                    MutableRepositoryItem pChildCatalog)This method performs the operations related to adding a catalog to another catalog's rootSubCatalogs. | 
|  void | addCatalogToCatalogFolder(MutableRepositoryItem pCatalogFolder,
                          MutableRepositoryItem pCatalog)This method will update site property details for the new child catalog. | 
|  void | addCatalogToCategory(MutableRepositoryItem pCategory,
                     MutableRepositoryItem pCatalog)This method performs the operations related to adding a catalog to a category's subCatalogs. | 
|  void | addCategoryToCatalog(MutableRepositoryItem pCatalog,
                     MutableRepositoryItem pCategory)This method performs the operations related to adding a category to a catalog's rootCategories. | 
|  void | addCategoryToCategory(MutableRepositoryItem pParentCategory,
                      MutableRepositoryItem pChildCategory)This method performs the operations related to adding a category to another category's fixedChildCategories. | 
|  void | addItemProperties(MutableRepositoryItem pItem,
                  java.util.Collection<java.lang.String> pSiteIds,
                  java.util.Collection<RepositoryItem> pDirectCatalogs,
                  java.util.Collection<RepositoryItem> pIndirectCatalogs)Walks down the catalog tree, adding sites and catalogs to each catalog folder/catalog/ category, where applicable. | 
|  void | createCatalog(MutableRepositoryItem pCatalog)This method performs the operations related to the creation of a catalog. | 
|  CatalogProperties | getCatalogProperties()A helper class that holds commonly accessed reposority property and item names | 
|  MutableRepository | getCatalogRepository()Returns property catalogRepository | 
|  CustomCatalogTools | getCatalogTools()Returns property catalogTools | 
|  javax.transaction.TransactionManager | getTransactionManager()The beginning and ending of transactions are handled by the transaction manager. | 
|  boolean | isComputeSubCatalogs()Deprecated. catalog.subCatalogs is never computed by this service | 
|  boolean | isEnabled()Returns property enabled, which indicates if this service should compute any properties. | 
|  void | removeCatalogFolderFromCatalogFolder(MutableRepositoryItem pParentFolder,
                                     MutableRepositoryItem pChildFolder)This method will update site property details for the child catalog folder being removed. | 
|  void | removeCatalogFromCatalog(MutableRepositoryItem pParentCatalog,
                         MutableRepositoryItem pChildCatalog)This method performs the operations related to removing a catalog from another catalog's rootSubCatalogs. | 
|  void | removeCatalogFromCatalogFolder(MutableRepositoryItem pCatalogFolder,
                               MutableRepositoryItem pCatalog)This method will update site property details for the catalog being removed. | 
|  void | removeCatalogFromCategory(MutableRepositoryItem pCategory,
                          MutableRepositoryItem pCatalog)This method performs the operations related to removing a catalog from a category's subCatalogs. | 
|  void | removeCategoryFromCatalog(MutableRepositoryItem pCatalog,
                          MutableRepositoryItem pCategory)This method performs the operations related to removing a category from a catalog's rootCategories. | 
|  void | removeCategoryFromCategory(MutableRepositoryItem pParentCategory,
                           MutableRepositoryItem pChildCategory)This method performs the operations related to removing a category from another category's fixedChildCategories. | 
|  void | removeItemProperties(RepositoryItem pItem,
                     java.util.Collection<java.lang.String> pSiteIds,
                     java.util.Collection<RepositoryItem> pCatalogs)Walks down the catalog, attempting to remove sites and catalogs from each catalog folder/catalog/category encountered. | 
|  void | setCatalogProperties(CatalogProperties pCatalogProperties) | 
|  void | setCatalogRepository(MutableRepository pCatalogRepository)Sets the GSA repository instance to modify. | 
|  void | setCatalogTools(CustomCatalogTools pCatalogTools)Sets the instance of CatalogTools to be used | 
|  void | setComputeSubCatalogs(boolean pComputeSubCatalogs)Deprecated. catalog.subCatalogs is never computed by this service | 
|  void | setEnabled(boolean pEnabled)Sets boolean indicating if this service should compute any properties | 
|  void | setTransactionManager(javax.transaction.TransactionManager pTransactionManager) | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 CatalogCompletionService()
| Method Detail | 
|---|
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public void setCatalogProperties(CatalogProperties pCatalogProperties)
public CatalogProperties getCatalogProperties()
public void setCatalogTools(CustomCatalogTools pCatalogTools)
public CustomCatalogTools getCatalogTools()
public void setCatalogRepository(MutableRepository pCatalogRepository)
public MutableRepository getCatalogRepository()
public void setComputeSubCatalogs(boolean pComputeSubCatalogs)
public boolean isComputeSubCatalogs()
public void setEnabled(boolean pEnabled)
public boolean isEnabled()
public void addCatalogFolderToCatalogFolder(MutableRepositoryItem pParentFolder,
                                            MutableRepositoryItem pChildFolder)
                                     throws RepositoryException
pParentFolder - repository item representing a parent catalog folderpChildFolder - repository item representing a child catalog folder
RepositoryException - if there was an error updating the sites property
public void addCatalogToCatalogFolder(MutableRepositoryItem pCatalogFolder,
                                      MutableRepositoryItem pCatalog)
                               throws RepositoryException
pCatalogFolder - repository item representing a catalog folderpCatalog - repository item representing a catalog folder
RepositoryException - if there was an error updating the sites property
public void addCategoryToCatalog(MutableRepositoryItem pCatalog,
                                 MutableRepositoryItem pCategory)
                          throws RepositoryException,
                                 CatalogLoopException
pCatalog - - The repository item representing the parent catalogpCategory - - The repository item representing the child category
RepositoryException - if there is an error in any of the property 
                                 changes
CatalogLoopException - if the new category causes the catalog to become a descendant of itself
public void addCatalogToCatalog(MutableRepositoryItem pParentCatalog,
                                MutableRepositoryItem pChildCatalog)
                         throws RepositoryException,
                                CatalogLoopException
pParentCatalog - - The repository item representing the parent catalogpChildCatalog - - The repository item representing the child catalog
RepositoryException - if there is an error in any of the property 
                                 changes
CatalogLoopException - if the operation creates a situation where a 
                                 catalog is an ancestor of itself
public void addCatalogToCategory(MutableRepositoryItem pCategory,
                                 MutableRepositoryItem pCatalog)
                          throws RepositoryException,
                                 CatalogLoopException
pCategory - - The repository item representing the parent category.pCatalog - - The repository item representing the child catalog.
RepositoryException - if there is an error in any of the property 
                                 changes
CatalogLoopException - if the operation creates a situation where a 
                                 catalog is an ancestor of itself
public void addCategoryToCategory(MutableRepositoryItem pParentCategory,
                                  MutableRepositoryItem pChildCategory)
                           throws RepositoryException,
                                  CatalogLoopException
pParentCategory - - The repository item representing the parent category.pChildCategory - - The repository item representing the child category.
RepositoryException - if there is an error in any of the property 
                                 changes
CatalogLoopException - if the added child category is an ancestor of the parent category
public void removeCatalogFolderFromCatalogFolder(MutableRepositoryItem pParentFolder,
                                                 MutableRepositoryItem pChildFolder)
                                          throws RepositoryException
pParentFolder - repository item representing a parent catalog folderpChildFolder - repository item representing a child catalog folder
RepositoryException - if there was an error updating the sites property
public void removeCatalogFromCatalogFolder(MutableRepositoryItem pCatalogFolder,
                                           MutableRepositoryItem pCatalog)
                                    throws RepositoryException
pCatalogFolder - repository item representing a catalog folderpCatalog - repository item representing a catalog folder
RepositoryException - if there was an error updating the sites property
public void removeCategoryFromCatalog(MutableRepositoryItem pCatalog,
                                      MutableRepositoryItem pCategory)
                               throws RepositoryException
pCatalog - - The repository item representing the former parent catalogpCategory - - The repository item representing the former child category
RepositoryException - if there is an error in any of the property 
                                 changes
public void removeCatalogFromCatalog(MutableRepositoryItem pParentCatalog,
                                     MutableRepositoryItem pChildCatalog)
                              throws RepositoryException
pParentCatalog - - The repository item representing the former parent 
                         catalog.pChildCatalog - - The repository item representing the former child catalog.
RepositoryException - if there is an error in any of the property changes
public void removeCatalogFromCategory(MutableRepositoryItem pCategory,
                                      MutableRepositoryItem pCatalog)
                               throws RepositoryException
pCategory - - The repository item representing the former parent categorypCatalog - - The repository item representing the former child catalog
RepositoryException - if there is an error in any of the property changes
public void removeCategoryFromCategory(MutableRepositoryItem pParentCategory,
                                       MutableRepositoryItem pChildCategory)
                                throws RepositoryException
pParentCategory - - The repository item representing the former parent 
                          categorypChildCategory - - The repository item representing the former child 
                          category
RepositoryException - if there is an error in any of the property changes
public void createCatalog(MutableRepositoryItem pCatalog)
                   throws RepositoryException
pCatalog - - The repository item representing the newly created catalog
RepositoryException
public void addItemProperties(MutableRepositoryItem pItem,
                              java.util.Collection<java.lang.String> pSiteIds,
                              java.util.Collection<RepositoryItem> pDirectCatalogs,
                              java.util.Collection<RepositoryItem> pIndirectCatalogs)
                       throws RepositoryException
pItem - the item that is going to be updatedpSiteIds - a collection of new sites to add to the itempDirectCatalogs - a collection of potential new direct catalogspIndirectCatalogs - a collection of potential new indirect catalogs
RepositoryException - if there was an error when checking descendants
public void removeItemProperties(RepositoryItem pItem,
                                 java.util.Collection<java.lang.String> pSiteIds,
                                 java.util.Collection<RepositoryItem> pCatalogs)
                          throws RepositoryException
pItem - the item that is going to be updatedpSiteIds - a collection of site for removalpCatalogs - a collection of catalogs to remove
RepositoryException - if there was an error when checking ancestors or descendants| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||