atg.commerce.catalog.custom
Class CatalogVerificationService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.scheduler.SchedulableService
              extended by atg.service.scheduler.SingletonSchedulableService
                  extended by atg.commerce.catalog.CMSService
                      extended by atg.commerce.catalog.custom.CatalogVerificationService
All Implemented Interfaces:
atg.commerce.catalog.CMSConstants, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, Schedulable, java.util.EventListener

public class CatalogVerificationService
extends atg.commerce.catalog.CMSService

This CMSService performs the following service functions

Available service functions:
CVS_VERIFYCATALOGS - verify catalogs
CVS_VERIFYPRODUCTS - verify products
CVS_VERIFYCATEGORIES - verify categories
CVS_VERIFYSKUS - verify skus

See Also:
StandardCatalogMaintenance.getAvailableFunctions(),

This service will verify the following custom catalog objects

Catalogs: ancestorCategories, allRootCategories, directAncestorCatalogsAndSelf, indirectAncestorCatalogs, subCatalogs(only if configured)
Categories: fixedRelatedCategories, categoryInfos, parentCategoriesForCatalog
Products: fixedRelatedProducts, catalogsRelatedProducts, productInfos, parentCategoriesForCatalog
Skus: fixedReplacementProducts, catalogsReplacementProducts, skuInfos

Important: AncestorGeneratorService must run before this service., TreeWalkUpdateService.isComputeSubCatalogs()


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_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
 
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
CatalogVerificationService()
           
 
Method Summary
 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 isComputeSubCatalogs()
          Deprecated.  
 boolean isPruneInvalidInfoReferences()
          If true, references inside an info object (category-info, product-info, or sku-info) that refer to catalog elements that are not contained in the catalog relevant to the given info, will be removed Default value is true
 boolean isVerifyCategoryInfos()
          Deprecated. verifyCategoryInfo is always executed as part of verifying categories.
 boolean isWarnOnInvalidRelatedItems()
          If this is true, then a warning will be printed when ever a category has a related category that is not in the same catalog, a product has a related product that is not in the same catalog or a sku has a replacement product that is not in the same catalog.
 boolean isWarnOnInvalidReplacementItems()
          If this is true, then the system will display warnings about wrong replacement items.
 boolean performService(Repository pRepository, java.util.Collection pCatalogIds, java.util.List pServiceFunctions)
          Performs this services functions
protected  void resetCategorysCatalog(RepositoryItem pCategory, RepositoryItem pCatalog)
          This method will be called if pCategory.catalog refers to a catalog that is not pCatalog.
protected  void resetProductsParent(RepositoryItem pProductInfo, RepositoryItem pProduct, RepositoryItem pCatalog)
          This method is not implemented.
 void setCatalogProperties(CatalogProperties pCatalogProperties)
           
 void setCatalogRepositories(java.lang.String[] pCatalogRepositories)
          Sets property catalogRepositories
 void setCatalogTools(CustomCatalogTools pCatalogTools)
          Sets property catalogTools
 void setComputeSubCatalogs(boolean pComputeSubCatalogs)
          Deprecated.  
 void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
          Sets property maxItemsPerTransaction
 void setPruneInvalidInfoReferences(boolean pPruneInvalidInfoReferences)
           
 void setVerifyCategoryInfos(boolean pVerifyCategoryInfos)
           
 void setWarnOnInvalidRelatedItems(boolean pWarnOnInvalidRelatedItems)
           
 void setWarnOnInvalidReplacementItems(boolean pWarnOnInvalidReplacementItems)
           
protected  java.lang.String stringIt(java.util.Collection pObject)
           
protected  java.lang.String stringIt(java.lang.Object[] pObject)
           
 void verifyCatalog(RepositoryItem pCatalog, Repository pCatalogRepository)
          Verify a catalog object Things verified/validated 1.
 void verifyCatalogObjects()
          verfies catalog items in the catalog repository Things verified/validated 1.
 void verifyCatalogObjects(java.util.Collection pCatalogIds)
          verfies catalog items in the catalog repository Things verified/validated 1.
 void verifyCatalogObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          verfies catalog items in the catalog repository Things verified/validated 1.
 void verifyCatalogs()
          Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.
 void verifyCatalogs(java.util.Collection pCatalogIds)
          Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.
 void verifyCatalogs(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.
 boolean verifyCatalogsAllRootCategories(RepositoryItem pCatalog, Repository pCatalogRepository)
          method that verifies the catalog's allRootCategories property allRootCategories is all of this catalog's rootCategories plus the "allRootCategories" of each catalog in "rootSubCatalogs".
 boolean verifyCatalogsAncestorCategories(RepositoryItem pCatalog, Repository pCatalogRepository)
          Verifies a catalogs ancestorCategories property ancestorCategoriesancestorCategories has already been generated for all categories
 boolean verifyCatalogsDirectAncestorCatalogsAndSelf(RepositoryItem pCatalog, Repository pCatalogRepository)
          method that verifies the catalog's directAncestorCatalogsAndSelf property this method assumes that allRootCategories have already been successfully verified directAncestorCatalogsAndSelf reflects all the catalogs who treat this catalog's "allRootCategories" as their root categories.
 boolean verifyCatalogsIndirectAncestorCatalogs(RepositoryItem pCatalog, Repository pCatalogRepository)
          method that verifies the catalog's inDirectAncestorCatalogs property this method assumes that catalogs have been successfully generated by the AncestorGeneratorService inDirectAncestorCatalogs are all the ancestor catalogs who do not use "allRootCategories" as their root categories.
 boolean verifyCatalogsSubCatalogs(RepositoryItem pCatalog, Repository pCatalogRepository)
          verifies/validates a catalogs subCatalogs property
 void verifyCategories()
          Verify each of the category objects in all catalogs in each catalog repository listed in catalogRepositories
 void verifyCategories(boolean pVerifyCatalogOnly)
          Verify each of the category objects in all catalogs in each catalog repository listed in catalogRepositories
 void verifyCategories(boolean pVerifyCatalogOnly, java.util.Collection pCatalogIds)
          Verify each of the category objects the given catalogs in each catalog repository listed in catalogRepositories
 void verifyCategories(boolean pVerifyCatalogOnly, Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the category objects in the given catalogs in the given catalog repository
 void verifyCategory(boolean pVerifyCatalogOnly, RepositoryItem pCategory, RepositoryItem pCatalog, Repository pCatalogRepository)
          Verify the category.
 void verifyCategory(RepositoryItem pCategory, RepositoryItem pCatalog, Repository pCatalogRepository)
          Verify that category.catalog is pCatalog
 void verifyCategoryCatalogs()
          Verify each of the category objects' catalog property
 void verifyCategoryInfo(RepositoryItem pCategoryInfo, RepositoryItem pCategory, RepositoryItem pCatalog, Repository pCatalogRepository)
          This doesn't actually do anything.
 void verifyCategoryInfoObjects()
          Deprecated. - see verifyCategoryObjects
 void verifyCategoryInfoObjects(java.util.Collection pCatalogIds)
          Deprecated. - see verifyCategoryObjects
 void verifyCategoryInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Deprecated. - see verifyCategoryObjects
 boolean verifyCategoryInOneCatalog(RepositoryItem pCategory, Repository pCatalogRepository)
          Deprecated. Should not be used as this restriction is discontinued in the ATG platform. This method may be removed in a future release.
 void verifyCategoryObjects()
          Verify each of the category objects in all catalogs
 void verifyCategoryObjects(boolean pVerifyCatalogOnly, java.util.Collection pCatalogIds)
          Verify each of the category objects in each of the given catalogs
 void verifyCategoryObjects(boolean pVerifyCatalogOnly, Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the category objects in each of the given catalogs within the given repository The following things are verified for each category: Verifies the category is only in one catalog.
 void verifyCategoryObjects(java.util.Collection pCatalogIds)
          Verify each of the category objects in each of the given catalogs
 void verifyCategoryObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the category objects in each of the given catalogs within the given repository
 boolean verifyCategorysParentCategories(RepositoryItem pCategory, Repository pCatalogRepository)
          Validates the values of the catalog to parent category mappings for the given category item.
 boolean verifyCategorysParentCategory(RepositoryItem pCategory, Repository pCatalogRepository)
          Deprecated. The parent category property is now only valid in the context of a catalog. Outside the context, this validation will always return false. The category's parentCategoriesForCatalog property is the correct property to validate now.
 boolean verifyCategorysRelatedCategories(RepositoryItem pCategory, Repository pCatalogRepository)
          given a category, check that each fixedRelatedCategories contains the category's catalogs in its own catalogs
 void verifyInfoObjects()
          Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects
 void verifyInfoObjects(java.util.Collection pCatalogIds)
          Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects
 void verifyInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects
 boolean verifyInfosForCategory(RepositoryItem pCategory, Repository pCatalogRepository)
          method that checks for valid category info objects an info object is considered invalid if it maps to a catalog that the category is not in.
 boolean verifyInfosForProduct(RepositoryItem pProduct, Repository pCatalogRepository)
          method that checks for valid product info objects an info object is considered invalid if it maps to a catalog that the product is not in.
 boolean verifyInfosForSku(RepositoryItem pSku, Repository pCatalogRepository)
          method that checks for valid sku info objects an info object is considered invalid if it maps to a catalog that the sku is not in.
 void verifyProduct(RepositoryItem pProduct, Repository pCatalogRepository)
          Verify a product object Verifies info objects.
 void verifyProductInfo(RepositoryItem pProductInfo, RepositoryItem pProduct, RepositoryItem pCatalog, Repository pCatalogRepository)
          This is a placeholder for extending the product info verification logic.
 void verifyProductInfoObjects()
          Deprecated. - used verifyProductObjects which also verifies product infos
 void verifyProductInfoObjects(java.util.Collection pCatalogIds)
          Deprecated. - used verifyProductObjects which also verifies product infos
 void verifyProductInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Deprecated. - used verifyProductObjects which also verifies product infos
 boolean verifyProductInfosRelatedProducts(RepositoryItem pProduct, Repository pCatalogRepository)
          validates the related products for each productinfo by verifying each related product's catalogs property contains the productinfo's catalog if PruneInvalidInfoReferences is set to true, the invalid related products are removed
 void verifyProductObjects()
          Verify each of the product objects in all catalogs
 void verifyProductObjects(java.util.Collection pCatalogIds)
          Verify each of the product objects in each of the given catalogs
 void verifyProductObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the product objects in each of the given catalogs within the given repository Verifies info objects.
 boolean verifyProductParentCategories(RepositoryItem pProduct, Repository pCatalogRepository)
          method that checks for valid parent category mappings and parent categories mappings are invalid if they map to a catalog not contained in the products ancestor catalogs a parent category is considered invalid if it does not contain the product as a child or does not contain the catalog in it's ancestor catalogs("catalogs" property)
 boolean verifyProductRelatedProducts(RepositoryItem pProduct, Repository pCatalogRepository)
          given a product, check that each fixedRelatedProduct contains the product's catalogs in its own catalogs
 void verifyProducts()
          Verify each of the product objects in all catalogs in each catalog repository listed in catalogRepositories
 void verifyProducts(java.util.Collection pCatalogIds)
          Verify each of the product objects the given catalogs in each catalog repository listed in catalogRepositories
 void verifyProducts(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the product objects in the given catalogs in the given catalog repository
 void verifySku(RepositoryItem pSku, Repository pCatalogRepository)
          Verify a sku object.
 void verifySkuInfo(RepositoryItem pSkuInfo, RepositoryItem pSku, RepositoryItem pCatalog, Repository pCatalogRepository)
          this method is called as part of the verify sku processing when info objects are verified.
 void verifySkuInfoObjects()
          Deprecated. - use verifySkuObjects which includes sku info verification
 void verifySkuInfoObjects(java.util.Collection pCatalogIds)
          Deprecated. - use verifySkuObjects which includes sku info verification
 void verifySkuInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Deprecated. - use verifySkuObjects which includes sku info verification
 boolean verifySkuInfosReplacementProducts(RepositoryItem pSku, Repository pCatalogRepository)
          validates the replacement products for each skuinfo by verifying each replacement product's catalogs contains the skuinfo's catalog if PruneInvalidInfoReferences is set to true, the invalid replacement products are removed
 void verifySkuObjects()
          Verify each of the sku objects in all catalogs Verifies the info objects.
 void verifySkuObjects(java.util.Collection pCatalogIds)
          Verify each of the sku objects in each of the given catalogs Verifies the info objects.
 void verifySkuObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the sku objects in each of the given catalogs within the given repository Verifies the info objects.
 boolean verifySkuReplacementProducts(RepositoryItem pSku, Repository pCatalogRepository)
          given a sku, check that each fixReplacementProduct's catalogs contains the sku's catalogs
 void verifySkus()
          Verify each of the sku objects in all catalogs in each catalog repository listed in catalogRepositories
 void verifySkus(java.util.Collection pCatalogIds)
          Verify each of the sku objects the given catalogs in each catalog repository listed in catalogRepositories
 void verifySkus(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Verify each of the sku objects in the given catalogs in the given catalog repository
 
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, getJobId, getJobName, getSchedule, getScheduler, getThreadMethod, isTransactional, setJobDescription, setJobName, setSchedule, setScheduler, setThreadMethod, setTransactional, startScheduledJob, stopScheduledJob
 
Methods inherited from class atg.nucleus.GenericService
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
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CatalogVerificationService

public CatalogVerificationService()
Method Detail

setCatalogRepositories

public void setCatalogRepositories(java.lang.String[] pCatalogRepositories)
Sets property catalogRepositories


getCatalogRepositories

public java.lang.String[] getCatalogRepositories()
Returns property catalogRepositories


getServiceName

public java.lang.String getServiceName()
Specified by:
getServiceName in class atg.commerce.catalog.CMSService

setComputeSubCatalogs

public void setComputeSubCatalogs(boolean pComputeSubCatalogs)
Deprecated. 

Sets property computeSubCatalogs


isComputeSubCatalogs

public boolean isComputeSubCatalogs()
Deprecated. 

Returns property computeSubCatalogs


setCatalogProperties

public void setCatalogProperties(CatalogProperties pCatalogProperties)

getCatalogProperties

public CatalogProperties getCatalogProperties()
A helper class that holds commonly accessed reposority property and item names


setCatalogTools

public void setCatalogTools(CustomCatalogTools pCatalogTools)
Sets property catalogTools


getCatalogTools

public CustomCatalogTools getCatalogTools()
Returns property catalogTools


setMaxItemsPerTransaction

public void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
Sets property maxItemsPerTransaction


getMaxItemsPerTransaction

public int getMaxItemsPerTransaction()
Returns property maxItemsPerTransaction


setPruneInvalidInfoReferences

public void setPruneInvalidInfoReferences(boolean pPruneInvalidInfoReferences)

isPruneInvalidInfoReferences

public boolean isPruneInvalidInfoReferences()
If true, references inside an info object (category-info, product-info, or sku-info) that refer to catalog elements that are not contained in the catalog relevant to the given info, will be removed Default value is true


setVerifyCategoryInfos

public void setVerifyCategoryInfos(boolean pVerifyCategoryInfos)

isVerifyCategoryInfos

public boolean isVerifyCategoryInfos()
Deprecated. verifyCategoryInfo is always executed as part of verifying categories.

Categories do not have any verifiable properties out of the box. Therefore this is set to false. Should any be added, set this to true, and extend verifyCategoryInfo


setWarnOnInvalidRelatedItems

public void setWarnOnInvalidRelatedItems(boolean pWarnOnInvalidRelatedItems)

isWarnOnInvalidRelatedItems

public boolean isWarnOnInvalidRelatedItems()
If this is true, then a warning will be printed when ever a category has a related category that is not in the same catalog, a product has a related product that is not in the same catalog or a sku has a replacement product that is not in the same catalog. If this is false, then these warnings will not be printed. This does not effect the list of related products in the productInfo. True by default.


isWarnOnInvalidReplacementItems

public boolean isWarnOnInvalidReplacementItems()
If this is true, then the system will display warnings about wrong replacement items. I.e. about replacement items defined through sku-info item and located in a different catalog. If this is false, then this warning will not be displayed. True by default.

Returns:
warnOnInvalidReplacementItems property value

setWarnOnInvalidReplacementItems

public void setWarnOnInvalidReplacementItems(boolean pWarnOnInvalidReplacementItems)

verifyCatalogs

public void verifyCatalogs()
Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.

See Also:
verifyCatalogObjects(), verifyCategoryObjects(), verifyProductObjects(), verifySkuObjects()

verifyCatalogs

public void verifyCatalogs(java.util.Collection pCatalogIds)
Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.

See Also:
verifyCatalogObjects(), verifyCategoryObjects(), verifyProductObjects(), verifySkuObjects()

verifyCatalogs

public void verifyCatalogs(Repository pCatalogRepository,
                           java.util.Collection pCatalogIds)
Verify the catalogs, categories, products, and skus repository items for each of the catalogs specified.

See Also:
verifyCatalogObjects(), verifyCategoryObjects(), verifyProductObjects(), verifySkuObjects()

verifyCategories

public void verifyCategories()
Verify each of the category objects in all catalogs in each catalog repository listed in catalogRepositories


verifyCategoryCatalogs

public void verifyCategoryCatalogs()
Verify each of the category objects' catalog property


verifyCategories

public void verifyCategories(boolean pVerifyCatalogOnly)
Verify each of the category objects in all catalogs in each catalog repository listed in catalogRepositories

Parameters:
pVerifyCatalogOnly - If this is true, then only the "catalogs" property is verified

verifyCategories

public void verifyCategories(boolean pVerifyCatalogOnly,
                             java.util.Collection pCatalogIds)
Verify each of the category objects the given catalogs in each catalog repository listed in catalogRepositories

Parameters:
pVerifyCatalogOnly - If this is true, then only the "catalogs" property is verified
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategories

public void verifyCategories(boolean pVerifyCatalogOnly,
                             Repository pCatalogRepository,
                             java.util.Collection pCatalogIds)
Verify each of the category objects in the given catalogs in the given catalog repository

Parameters:
pVerifyCatalogOnly - If this is true, then only the "catalogs" property is verified
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyProducts

public void verifyProducts()
Verify each of the product objects in all catalogs in each catalog repository listed in catalogRepositories


verifyProducts

public void verifyProducts(java.util.Collection pCatalogIds)
Verify each of the product objects the given catalogs in each catalog repository listed in catalogRepositories

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyProducts

public void verifyProducts(Repository pCatalogRepository,
                           java.util.Collection pCatalogIds)
Verify each of the product objects in the given catalogs in the given catalog repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkus

public void verifySkus()
Verify each of the sku objects in all catalogs in each catalog repository listed in catalogRepositories


verifySkus

public void verifySkus(java.util.Collection pCatalogIds)
Verify each of the sku objects the given catalogs in each catalog repository listed in catalogRepositories

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkus

public void verifySkus(Repository pCatalogRepository,
                       java.util.Collection pCatalogIds)
Verify each of the sku objects in the given catalogs in the given catalog repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyInfoObjects

public void verifyInfoObjects()
Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects

Verify each of the category-info, product-info, and sku-info objects in all catalogs in each catalog repository listed in catalogRepositories


verifyInfoObjects

public void verifyInfoObjects(java.util.Collection pCatalogIds)
Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects

Verify each of the category-info, product-info, and sku-info objects in each given catalog

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyInfoObjects

public void verifyInfoObjects(Repository pCatalogRepository,
                              java.util.Collection pCatalogIds)
Deprecated. - see verifyCategoryObjects, verifyProductObjects, verifySkuObjects

Verify each of the category-info, product-info, and sku-info objects in each given catalog within the given repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryObjects

public void verifyCategoryObjects()
Verify each of the category objects in all catalogs


verifyCategoryObjects

public void verifyCategoryObjects(java.util.Collection pCatalogIds)
Verify each of the category objects in each of the given catalogs

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryObjects

public void verifyCategoryObjects(boolean pVerifyCatalogOnly,
                                  java.util.Collection pCatalogIds)
Verify each of the category objects in each of the given catalogs

Parameters:
pVerifyCatalogOnly - If this is true, then only the "catalogs" property is verified
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryObjects

public void verifyCategoryObjects(Repository pCatalogRepository,
                                  java.util.Collection pCatalogIds)
Verify each of the category objects in each of the given catalogs within the given repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryObjects

public void verifyCategoryObjects(boolean pVerifyCatalogOnly,
                                  Repository pCatalogRepository,
                                  java.util.Collection pCatalogIds)
Verify each of the category objects in each of the given catalogs within the given repository The following things are verified for each category: Verifies the category is only in one catalog. A category is considered to be in more than one catalog if two or more of it's immediate parent categories are in different catalogs, or if more than one catalog has the category as a rootCategory. Verifies the parentCategory property. A parent category is considered invalid if does not contain the category as a childCategory, or is not in the same catalog as the child category. Verifies fixedRelatedCategories. A warning is issued for each category ancestor catalog that is not included in the related category's set of ancestor catalogs. An error is issued if the related category's set of ancestor catalogs does not contain any of the category's ancestor catalogs. Verifies info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that in not one of the category's ancestor catalogs.

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCatalogObjects

public void verifyCatalogObjects()
verfies catalog items in the catalog repository Things verified/validated 1. Verifies the correctness of the ancestorCategories 2. Verifies the correctness of allRootCategories 3. Verifies the correctness of directAncestorCatalogsAndSelf 4. Verifies the correctness of indirectAncestorCatalogs 5. Verifies the correctness of subCatalogs


verifyCatalogObjects

public void verifyCatalogObjects(java.util.Collection pCatalogIds)
verfies catalog items in the catalog repository Things verified/validated 1. Verifies the correctness of the ancestorCategories 2. Verifies the correctness of allRootCategories 3. Verifies the correctness of directAncestorCatalogsAndSelf 4. Verifies the correctness of indirectAncestorCatalogs 5. Verifies the correctness of subCatalogs

Parameters:
pCatalogIds - - all collection of catalog item repository ids to verify

verifyCatalogObjects

public void verifyCatalogObjects(Repository pCatalogRepository,
                                 java.util.Collection pCatalogIds)
verfies catalog items in the catalog repository Things verified/validated 1. Verifies the correctness of the ancestorCategories 2. Verifies the correctness of allRootCategories 3. Verifies the correctness of directAncestorCatalogsAndSelf 4. Verifies the correctness of indirectAncestorCatalogs 5. Verifies the correctness of subCatalogs

Parameters:
pCatalogRepository - - catalog repository where catalog items reside
pCatalogIds - - all collection of catalog item repository ids to verify

verifyProductObjects

public void verifyProductObjects()
Verify each of the product objects in all catalogs


verifyProductObjects

public void verifyProductObjects(java.util.Collection pCatalogIds)
Verify each of the product objects in each of the given catalogs

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyProductObjects

public void verifyProductObjects(Repository pCatalogRepository,
                                 java.util.Collection pCatalogIds)
Verify each of the product objects in each of the given catalogs within the given repository Verifies info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the product's set of ancestor catalogs. Verifies the parentCategoriesForCatalog map. This property is meant to define a parent category for every ancestor catalog of the product. If two of more categories in the same catalog define the product as a child, this property will map one of them as the parent category. A warning is issued when there's a mapping for a catalog that is not one of the product's ancestor catalogs. An error is issued when the mapped category does not contain the product as a childProduct or does not contain the mapped catalog as an ancestor catalog. Verifies the fixRelatedProducts. A warning is issued for each product ancestor catalog that is not included in the related product's set of ancestor catalogs. An error is issued if the related product's set of ancestor catalogs does not contain any of the product's ancestor catalogs. Verifies the catalogsRelatedProducts. Each product can map by catalog a set of related products. A warning is issued if a related product's set of ancestor catalogs does not contain the mapped catalog. If the pruneInvalidInfoReferences is set to true, the related product is removed from the mapping.

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkuObjects

public void verifySkuObjects()
Verify each of the sku objects in all catalogs Verifies the info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the sku's set of ancestor catalogs. Verifies the fixReplacementProducts. A warning is issued for each sku ancestor catalog that is not included in the replacement product's set of ancestor catalogs. An error is issued if the replacement product's set of ancestor catalogs does not contain any of the sku's ancestor catalogs. Verifies the catalogsReplacementProducts. Each sku can map by catalog a set of replacement products. A warning is issued if a replacement product's set of ancestor catalogs does not include the mapped catalog. If the pruneInvalidInfoReferences is set to true, the replacement product is removed from the mapping.


verifySkuObjects

public void verifySkuObjects(java.util.Collection pCatalogIds)
Verify each of the sku objects in each of the given catalogs Verifies the info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the sku's set of ancestor catalogs. Verifies the fixReplacementProducts. A warning is issued for each sku ancestor catalog that is not included in the replacement product's set of ancestor catalogs. An error is issued if the replacement product's set of ancestor catalogs does not contain any of the sku's ancestor catalogs. Verifies the catalogsReplacementProducts. Each sku can map by catalog a set of replacement products. A warning is issued if a replacement product's set of ancestor catalogs does not include the mapped catalog. If the pruneInvalidInfoReferences is set to true, the replacement product is removed from the mapping.

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkuObjects

public void verifySkuObjects(Repository pCatalogRepository,
                             java.util.Collection pCatalogIds)
Verify each of the sku objects in each of the given catalogs within the given repository Verifies the info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the sku's set of ancestor catalogs. Verifies the fixReplacementProducts. A warning is issued for each sku ancestor catalog that is not included in the replacement product's set of ancestor catalogs. An error is issued if the replacement product's set of ancestor catalogs does not contain any of the sku's ancestor catalogs. Verifies the catalogsReplacementProducts. Each sku can map by catalog a set of replacement products. A warning is issued if a replacement product's set of ancestor catalogs does not include the mapped catalog. If the pruneInvalidInfoReferences is set to true, the replacement product is removed from the mapping.

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryInfoObjects

public void verifyCategoryInfoObjects()
Deprecated. - see verifyCategoryObjects

Verify each of the category-info objects in all catalogs


verifyCategoryInfoObjects

public void verifyCategoryInfoObjects(java.util.Collection pCatalogIds)
Deprecated. - see verifyCategoryObjects

Verify each of the category-info objects in each of the given catalogs

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategoryInfoObjects

public void verifyCategoryInfoObjects(Repository pCatalogRepository,
                                      java.util.Collection pCatalogIds)
Deprecated. - see verifyCategoryObjects

Verify each of the category-info objects in each of the given catalogs within the given repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyProductInfoObjects

public void verifyProductInfoObjects()
Deprecated. - used verifyProductObjects which also verifies product infos

Verify each of the product-info objects in all catalogs


verifyProductInfoObjects

public void verifyProductInfoObjects(java.util.Collection pCatalogIds)
Deprecated. - used verifyProductObjects which also verifies product infos

Verify each of the product-info objects in each of the given catalogs

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyProductInfoObjects

public void verifyProductInfoObjects(Repository pCatalogRepository,
                                     java.util.Collection pCatalogIds)
Deprecated. - used verifyProductObjects which also verifies product infos

Verify each of the product-info objects in each of the given catalogs within the given repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkuInfoObjects

public void verifySkuInfoObjects()
Deprecated. - use verifySkuObjects which includes sku info verification

Verify each of the sku-info objects in all catalogs


verifySkuInfoObjects

public void verifySkuInfoObjects(java.util.Collection pCatalogIds)
Deprecated. - use verifySkuObjects which includes sku info verification

Verify each of the sku-info objects in each of the given catalogs

Parameters:
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifySkuInfoObjects

public void verifySkuInfoObjects(Repository pCatalogRepository,
                                 java.util.Collection pCatalogIds)
Deprecated. - use verifySkuObjects which includes sku info verification

Verify each of the sku-info objects in each of the given catalogs within the given repository

Parameters:
pCatalogRepository - The repository to update
pCatalogIds - a collection of catalog ids. The type of each id is String If this param is null, all catalogs are assumed

verifyCategory

public void verifyCategory(RepositoryItem pCategory,
                           RepositoryItem pCatalog,
                           Repository pCatalogRepository)
                    throws RepositoryException
Verify that category.catalog is pCatalog

Parameters:
pCategory - The category being verified
pCatalog - The catalog that maps to pCategory
pCatalogRepository - The category containing pCategory
Throws:
RepositoryException

verifyCategory

public void verifyCategory(boolean pVerifyCatalogOnly,
                           RepositoryItem pCategory,
                           RepositoryItem pCatalog,
                           Repository pCatalogRepository)
                    throws RepositoryException
Verify the category. Verifies the category is only in one catalog. A category is considered to be in more than one catalog if two or more of it's immediate parent categories are in different catalogs, or if more than one catalog has the category as a rootCategory. Verifies the parentCategory property. A parent category is considered invalid if does not contain the category as a childCategory, or is not in the same catalog as the child category. Verifies fixedRelatedCategories. A warning is issued for each category ancestor catalog that is not included in the related category's set of ancestor catalogs. An error is issued if the related category's set of ancestor catalogs does not contain any of the category's ancestor catalogs. Verifies info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that in not one of the category's ancestor catalogs.

Parameters:
pVerifyCatalogOnly - If this is true, then only the "catalogs" property is verified. No longer used. Ancestor Generator Service generates this property and it is not verified in this service.
pCategory - The category being verified
pCatalog - The catalog that maps to pCategory. No longer used. A category's catalog is generated by the AncestorGeneratorService and we assume that service has been run before the verify. Therefore, verifying it's value is redundant.
pCatalogRepository - The category containing pCategory
Throws:
RepositoryException

verifyProduct

public void verifyProduct(RepositoryItem pProduct,
                          Repository pCatalogRepository)
                   throws RepositoryException
Verify a product object Verifies info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the product's set of ancestor catalogs. Verifies the parentCategoriesForCatalog map. This property is meant to define a parent category for every ancestor catalog of the product. If two of more categories in the same catalog define the product as a child, this property will map one of them as the parent category. A warning is issued when there's a mapping for a catalog that is not one of the product's ancestor catalogs. An error is issued when the mapped category does not contain the product as a childProduct or does not contain the mapped catalog as an ancestor catalog. Verifies the fixRelatedProducts. A warning is issued for each product ancestor catalog that is not included in the related product's set of ancestor catalogs. An error is issued if the related product's set of ancestor catalogs does not contain any of the product's ancestor catalogs. Verifies the catalogsRelatedProducts. Each product can map by catalog a set of related products. A warning is issued if a related product's set of ancestor catalogs does not contain the mapped catalog. If the pruneInvalidInfoReferences is set to true, the related product is removed from the mapping.

Parameters:
pProduct - a product repository item to be verified.
pCatalogRepository - The repository to update
Throws:
RepositoryException

verifyCatalog

public void verifyCatalog(RepositoryItem pCatalog,
                          Repository pCatalogRepository)
                   throws RepositoryException
Verify a catalog object Things verified/validated 1. Verifies the correctness of the ancestorCategories 2. Verifies the correctness of allRootCategories 3. Verifies the correctness of directAncestorCatalogsAndSelf 4. Verifies the correctness of indirectAncestorCatalogs 5. Verifies the correctness of subCatalogs

Parameters:
pCatalog - A catalog repository item.
pCatalogRepository - The repository to update
Throws:
RepositoryException

verifyCatalogsAncestorCategories

public boolean verifyCatalogsAncestorCategories(RepositoryItem pCatalog,
                                                Repository pCatalogRepository)
                                         throws RepositoryException
Verifies a catalogs ancestorCategories property ancestorCategoriesancestorCategories has already been generated for all categories

Parameters:
pCatalog - A catalog repository item.
pCatalogRepository - The repository to update
Throws:
RepositoryException

verifySku

public void verifySku(RepositoryItem pSku,
                      Repository pCatalogRepository)
               throws RepositoryException
Verify a sku object. Verifies the info objects. Each info object is mapped to a catalog id. A warning is issued for each info object that is mapped to a catalog that is not included in the sku's set of ancestor catalogs. Verifies the fixReplacementProducts. A warning is issued for each sku ancestor catalog that is not included in the replacement product's set of ancestor catalogs. An error is issued if the replacement product's set of ancestor catalogs does not contain any of the sku's ancestor catalogs. Verifies the catalogsReplacementProducts. Each sku can map by catalog a set of replacement products. A warning is issued if a replacement product's set of ancestor catalogs does not include the mapped catalog. If the pruneInvalidInfoReferences is set to true, the replacement product is removed from the mapping.

Parameters:
pSku - The sku being verified
pCatalogRepository - The catalog that maps to pProduct
Throws:
RepositoryException

verifyCategoryInfo

public void verifyCategoryInfo(RepositoryItem pCategoryInfo,
                               RepositoryItem pCategory,
                               RepositoryItem pCatalog,
                               Repository pCatalogRepository)
                        throws RepositoryException
This doesn't actually do anything. Extend and override this method to perform custom category info objec verification

Parameters:
pCategoryInfo - The info item being verified
pCategory - The category containing pCategoryInfo
pCatalog - The catalog that maps to pCategoryInfo
Throws:
RepositoryException

verifyProductInfo

public void verifyProductInfo(RepositoryItem pProductInfo,
                              RepositoryItem pProduct,
                              RepositoryItem pCatalog,
                              Repository pCatalogRepository)
                       throws RepositoryException
This is a placeholder for extending the product info verification logic. It is called as part of the verfiyProductObject logic.

Parameters:
pProductInfo - The info item being verified
pProduct - The product containing pProductInfo
pCatalog - The catalog that maps to pProductInfo
Throws:
RepositoryException

verifySkuInfo

public void verifySkuInfo(RepositoryItem pSkuInfo,
                          RepositoryItem pSku,
                          RepositoryItem pCatalog,
                          Repository pCatalogRepository)
                   throws RepositoryException
this method is called as part of the verify sku processing when info objects are verified. ATG's implementation does nothing, but this method remains as an entry point for an application to extend the verifySkuInfo processing.

Parameters:
pSkuInfo - The info item being verified
pSku - The sku containing pSkuInfo
pCatalog - The catalog that maps to pSkuInfo
pCatalogRepository - The catalog repository that contains the sku info
Throws:
RepositoryException

resetCategorysCatalog

protected void resetCategorysCatalog(RepositoryItem pCategory,
                                     RepositoryItem pCatalog)
                              throws RepositoryException
This method will be called if pCategory.catalog refers to a catalog that is not pCatalog. (ie. it is contained in a catalog different than what it thinks it is contained in.)

Parameters:
pCategory - The category with an invalid catalog
pCatalog - The catalog that actually contains to pCategory
Throws:
RepositoryException

resetProductsParent

protected void resetProductsParent(RepositoryItem pProductInfo,
                                   RepositoryItem pProduct,
                                   RepositoryItem pCatalog)
                            throws RepositoryException
This method is not implemented. It will be called if pPorductInfo.parentCategory refers to a category that is not in pCatalog.

Parameters:
pProductInfo - The ProductInfo with an invalid parent
pProduct - The Product containing pCategoryInfo
pCatalog - The catalog that maps to pCategoryInfo, and that does not contain the parent.
Throws:
RepositoryException

verifySkuReplacementProducts

public boolean verifySkuReplacementProducts(RepositoryItem pSku,
                                            Repository pCatalogRepository)
                                     throws RepositoryException
given a sku, check that each fixReplacementProduct's catalogs contains the sku's catalogs

Parameters:
pSku - - the sku to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if all of the sku's replacement products are valid. They are considered invalid if they are invalid for all of the sku's catalogs. If one of them is considered invalid, this method returns false
Throws:
RepositoryException

verifyProductRelatedProducts

public boolean verifyProductRelatedProducts(RepositoryItem pProduct,
                                            Repository pCatalogRepository)
                                     throws RepositoryException
given a product, check that each fixedRelatedProduct contains the product's catalogs in its own catalogs

Parameters:
pProduct - - the product to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if all of the products's related products are valid . They are considered invalid if they are invalid for all of the products's catalogs. If one of them is considered invalid, this method returns false
Throws:
RepositoryException

verifyCategorysRelatedCategories

public boolean verifyCategorysRelatedCategories(RepositoryItem pCategory,
                                                Repository pCatalogRepository)
                                         throws RepositoryException
given a category, check that each fixedRelatedCategories contains the category's catalogs in its own catalogs

Parameters:
pCategory - - the category to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if all of the the category's related categories are valid. They are considered invalid if they are invalid for all of the category's catalogs. If one of them is considered invalid, this method returns false
Throws:
RepositoryException

verifyInfosForSku

public boolean verifyInfosForSku(RepositoryItem pSku,
                                 Repository pCatalogRepository)
                          throws RepositoryException
method that checks for valid sku info objects an info object is considered invalid if it maps to a catalog that the sku is not in.

Parameters:
pSku - - the sku to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if the sku's infos are valid
Throws:
RepositoryException

verifySkuInfosReplacementProducts

public boolean verifySkuInfosReplacementProducts(RepositoryItem pSku,
                                                 Repository pCatalogRepository)
                                          throws TransactionDemarcationException
validates the replacement products for each skuinfo by verifying each replacement product's catalogs contains the skuinfo's catalog if PruneInvalidInfoReferences is set to true, the invalid replacement products are removed

Parameters:
pSku - - the sku to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if the sku infos replacesment products are valid
Throws:
TransactionDemarcationException

verifyInfosForProduct

public boolean verifyInfosForProduct(RepositoryItem pProduct,
                                     Repository pCatalogRepository)
                              throws RepositoryException
method that checks for valid product info objects an info object is considered invalid if it maps to a catalog that the product is not in.

Parameters:
pProduct - - the product to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if the products's infos are valid
Throws:
RepositoryException

verifyInfosForCategory

public boolean verifyInfosForCategory(RepositoryItem pCategory,
                                      Repository pCatalogRepository)
                               throws RepositoryException
method that checks for valid category info objects an info object is considered invalid if it maps to a catalog that the category is not in.

Parameters:
pCategory - - the category to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if the category's infos are valid
Throws:
RepositoryException

verifyProductParentCategories

public boolean verifyProductParentCategories(RepositoryItem pProduct,
                                             Repository pCatalogRepository)
                                      throws RepositoryException
method that checks for valid parent category mappings and parent categories mappings are invalid if they map to a catalog not contained in the products ancestor catalogs a parent category is considered invalid if it does not contain the product as a child or does not contain the catalog in it's ancestor catalogs("catalogs" property)

Parameters:
pProduct - - the product to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if the product parent categories/mappings are valid
Throws:
RepositoryException

verifyCategorysParentCategories

public boolean verifyCategorysParentCategories(RepositoryItem pCategory,
                                               Repository pCatalogRepository)
                                        throws RepositoryException
Validates the values of the catalog to parent category mappings for the given category item. A value is invalid if: 1) it maps a catalog not contained in the category's ancestor catalogs 2) the parent category of the category does not have the category as a child 3) a catalog in the category's ancestor catalogs is not in the parent category's ancestor catalogs

Parameters:
pCategory - The category to be verified
pCatalogRepository - Tcatalog repository
Returns:
true if the category's values are valid.
Throws:
RepositoryException

verifyCategorysParentCategory

@Deprecated
public boolean verifyCategorysParentCategory(RepositoryItem pCategory,
                                                        Repository pCatalogRepository)
                                      throws RepositoryException
Deprecated. The parent category property is now only valid in the context of a catalog. Outside the context, this validation will always return false. The category's parentCategoriesForCatalog property is the correct property to validate now.

method that verifies a category's parent category Verifies the following : 1. verifies the parentCategory property is one of the categories that defines the category as a child. 2. verified the parentCategory is in the same catalog as the category a parent category is considered invalid if does not contain the category as a childCategory or is not in the same catalog as the child category This method assumes that the catalog property has already been generated by the AncestorGeneratorService

Parameters:
pCategory - - the category to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if parent categories are valid
Throws:
RepositoryException

verifyCategoryInOneCatalog

@Deprecated
public boolean verifyCategoryInOneCatalog(RepositoryItem pCategory,
                                                     Repository pCatalogRepository)
                                   throws RepositoryException
Deprecated. Should not be used as this restriction is discontinued in the ATG platform. This method may be removed in a future release.

Verify a category is only in one catalog To perform this validation the immediate parent categories are checked for different catalogs. Then all catalog's rootCategories are queried for the given category. If more than one catalog is returned, the category is considered to be in more than one catalog.

Parameters:
pCategory - - the category to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if category is in only one catalog
Throws:
RepositoryException

verifyProductInfosRelatedProducts

public boolean verifyProductInfosRelatedProducts(RepositoryItem pProduct,
                                                 Repository pCatalogRepository)
                                          throws TransactionDemarcationException
validates the related products for each productinfo by verifying each related product's catalogs property contains the productinfo's catalog if PruneInvalidInfoReferences is set to true, the invalid related products are removed

Parameters:
pProduct - - the product to be verified
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if productinfo's related products are valid
Throws:
TransactionDemarcationException

performService

public boolean performService(Repository pRepository,
                              java.util.Collection pCatalogIds,
                              java.util.List pServiceFunctions)
Performs this services functions

Specified by:
performService in class atg.commerce.catalog.CMSService
Parameters:
pRepository - - Catalog repository to operate against
pCatalogIds - - a collection of catalogs to process
pServiceFunctions - - a list of strings that identify service functions. used to conditionally executed specific functions of a service
Returns:
boolean - service success or failure
See Also:
verifyCatalogObjects(), verifyCategoryObjects(), verifyProductObjects(), verifySkuObjects(), CMSConstants

stringIt

protected java.lang.String stringIt(java.util.Collection pObject)
Overrides:
stringIt in class atg.commerce.catalog.CMSService

stringIt

protected java.lang.String stringIt(java.lang.Object[] pObject)
Overrides:
stringIt in class atg.commerce.catalog.CMSService

verifyCatalogsIndirectAncestorCatalogs

public boolean verifyCatalogsIndirectAncestorCatalogs(RepositoryItem pCatalog,
                                                      Repository pCatalogRepository)
                                               throws RepositoryException
method that verifies the catalog's inDirectAncestorCatalogs property this method assumes that catalogs have been successfully generated by the AncestorGeneratorService inDirectAncestorCatalogs are all the ancestor catalogs who do not use "allRootCategories" as their root categories. In other words navigation to this catalog is through a childCategory's subCatalogs

Returns:
boolean - true if indirectAncestorCatalogs is verified successfully
Throws:
RepositoryException

verifyCatalogsDirectAncestorCatalogsAndSelf

public boolean verifyCatalogsDirectAncestorCatalogsAndSelf(RepositoryItem pCatalog,
                                                           Repository pCatalogRepository)
                                                    throws RepositoryException
method that verifies the catalog's directAncestorCatalogsAndSelf property this method assumes that allRootCategories have already been successfully verified directAncestorCatalogsAndSelf reflects all the catalogs who treat this catalog's "allRootCategories" as their root categories.

Returns:
boolean - true if directAncestorsAndSelf is verified successfully
Throws:
RepositoryException

verifyCatalogsSubCatalogs

public boolean verifyCatalogsSubCatalogs(RepositoryItem pCatalog,
                                         Repository pCatalogRepository)
                                  throws RepositoryException
verifies/validates a catalogs subCatalogs property

Parameters:
pCatalog - - the catalog to verify
pCatalogRepository - - the catalog's repository
Returns:
boolean - true if subCatalogs verify
Throws:
RepositoryException

verifyCatalogsAllRootCategories

public boolean verifyCatalogsAllRootCategories(RepositoryItem pCatalog,
                                               Repository pCatalogRepository)
method that verifies the catalog's allRootCategories property allRootCategories is all of this catalog's rootCategories plus the "allRootCategories" of each catalog in "rootSubCatalogs".

Returns:
boolean - true if catalog's allRootCategories verified successfully