atg.commerce.catalog.custom
Class InfoGeneratorService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.catalog.custom.InfoGeneratorService
All Implemented Interfaces:
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, java.util.EventListener

public class InfoGeneratorService
extends GenericService

This service examines the product catalog and ensures that every category has a category-info object for each catalog it is contained in, that every product has a product-info for each catalog it is contained in, and that every sku has a sku-info for each catalog it is contained in.

This service will also ensure that the catalogs properties for categories, products, and skus are up to date.

You may limit this to specific catalogs by provide a Collection of catalog ids.


Field Summary
static java.lang.String CLASS_VERSION
          Class 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
InfoGeneratorService()
           
 
Method Summary
protected  RepositoryItem addCategoryInfo(RepositoryItem pCategory, RepositoryItem pCatalog, java.util.Map pCategoryInfos, Repository pCatalogRepository)
          Create a new category info object and add it to the map.
protected  RepositoryItem addProductInfo(RepositoryItem pProduct, RepositoryItem pCatalog, RepositoryItem pParentCategory, java.util.Map pProductInfos, Repository pCatalogRepository)
          Create a new product info object and add it to the map.
protected  RepositoryItem addSkuInfo(RepositoryItem pSku, RepositoryItem pCatalog, RepositoryItem pParentProduct, java.util.Map pSkuInfos, Repository pCatalogRepository)
          Create a new sku info object and add it to the map.
protected  RepositoryItem createCategoryInfoItem(RepositoryItem pCategory, RepositoryItem pCatalog, Repository pCatalogRepository)
          This method will create a new categoryInfo repository item.
protected  RepositoryItem createProductInfoItem(RepositoryItem pProduct, RepositoryItem pCatalog, Repository pCatalogRepository)
          This method will create a new productInfo repository item.
protected  RepositoryItem createSkuInfoItem(RepositoryItem pSku, RepositoryItem pCatalog, Repository pCatalogRepository)
          This method will create a new skuInfo repository item.
 void generateCategoryInfoObjects()
          Iterate through all catalog and create the category-info objects
 void generateCategoryInfoObjects(java.util.Collection pCatalogIds)
          Iterate through the catalog and create the category-info objects, for the given catalogs.
 void generateCategoryInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Iterate through the catalog and create the category-info objects, for the given catalogs in the given repository.
 void generateInfoObjects()
          This method generates info objects for all categories, products, and skus, for all catalogs.
 void generateInfoObjects(java.util.Collection pCatalogIds)
          This method generates info objects for all categories, products, and skus, for the given catalogs.
 void generateInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          This method generates info objects for all categories, products, and skus, for the given catalogs within the given repository.
 void generateProductInfoObjects()
          Iterate through the catalog and create the product-info objects
 void generateProductInfoObjects(java.util.Collection pCatalogIds)
          Iterate through the catalog and create the product-info objects, for the given catalogs.
 void generateProductInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Iterate through the catalog and create the product-info objects, for the given catalogs.
 void generateSkuInfoObjects()
          Iterate through the catalog and create the sku-info objects
 void generateSkuInfoObjects(java.util.Collection pCatalogIds)
          Iterate through the catalog and create the sku-info objects, for the given catalogs.
 void generateSkuInfoObjects(Repository pCatalogRepository, java.util.Collection pCatalogIds)
          Iterate through the catalog and create the sku-info objects, for the given catalogs.
protected  RepositoryItem getBaseCategoryInfo(RepositoryItem pCategoryInfo, RepositoryItem pCategory, RepositoryItem pCatalog)
          This method is used to provide a source of information when populating a category info.
protected  RepositoryItem getBaseProductInfo(RepositoryItem pProductInfo, RepositoryItem pProduct, RepositoryItem pCatalog)
          This method is used to provide a source of information when populating a product info.
protected  RepositoryItem getBaseSkuInfo(RepositoryItem pSkuInfo, RepositoryItem pSku, RepositoryItem pCatalog)
          This method is used to provide a source of information when populating a sku info.
 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
 java.lang.String[] getCategoryInfoPropertiesToCopy()
          The list of properties that are copied inside populateCategoryInfo from the info returned by getBaseCategoryInfo
 int getMaxItemsPerTransaction()
          Returns property maxItemsPerTransaction
 java.lang.String[] getProductInfoPropertiesToCopy()
          The list of properties that are copied inside populateProductInfo from the info returned by getBaseProductInfo
 java.lang.String[] getSkuInfoPropertiesToCopy()
          The list of properties that are copied inside populateSkuInfo from the info returned by getBaseSkuInfo
 javax.transaction.TransactionManager getTransactionManager()
          Returns property transactionManager
 boolean isAttemptToPopulateNewInfoItems()
          If this is true, this class will attempt to populate any new info items with the information from another info.
 boolean isCheckForUnreferencedCategories()
          If true, an extra check is made for each category.
 boolean isDeleteUnreferencedInfoItems()
          If this is true, then an info that is no longer in an items map of catalog specific information will be removed from the repository The default is true.
protected  RepositoryItem populateCategoryInfoItem(RepositoryItem pCategoryInfo, RepositoryItem pCategory, RepositoryItem pCatalog)
          Populate the given category info object.
protected  RepositoryItem populateProductInfoItem(RepositoryItem pProductInfo, RepositoryItem pProduct, RepositoryItem pParentCategory, RepositoryItem pCatalog)
          Populate the given product info object.
protected  RepositoryItem populateSkuInfoItem(RepositoryItem pSkuInfo, RepositoryItem pSku, RepositoryItem pParentProduct, RepositoryItem pCatalog)
          Populate the given sku info object.
protected  boolean removeInfoMapEntry(java.util.Map pInfoMap, java.lang.String pCatalogId, Repository pCatalogRepository)
          Remove the given key from the map.
 void setAttemptToPopulateNewInfoItems(boolean pAttemptToPopulateNewInfoItems)
           
 void setCatalogProperties(CatalogProperties pCatalogProperties)
           
 void setCatalogRepositories(java.lang.String[] pCatalogRepositories)
          Sets property catalogRepositories
 void setCatalogTools(CustomCatalogTools pCatalogTools)
          Sets property catalogTools
 void setCategoryInfoPropertiesToCopy(java.lang.String[] pCategoryInfoPropertiesToCopy)
           
 void setCheckForUnreferencedCategories(boolean pCheckForUnreferencedCategories)
           
 void setDeleteUnreferencedInfoItems(boolean pDeleteUnreferencedInfoItems)
           
 void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
          Sets property maxItemsPerTransaction
 void setProductInfoPropertiesToCopy(java.lang.String[] pProductInfoPropertiesToCopy)
           
 void setSkuInfoPropertiesToCopy(java.lang.String[] pSkuInfoPropertiesToCopy)
           
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets property transactionManager
 
Methods inherited from class atg.nucleus.GenericService
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
 
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

InfoGeneratorService

public InfoGeneratorService()
Method Detail

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


setCatalogRepositories

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


getCatalogRepositories

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


setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager


getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Returns property transactionManager


setMaxItemsPerTransaction

public void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
Sets property maxItemsPerTransaction


getMaxItemsPerTransaction

public int getMaxItemsPerTransaction()
Returns property maxItemsPerTransaction


setCategoryInfoPropertiesToCopy

public void setCategoryInfoPropertiesToCopy(java.lang.String[] pCategoryInfoPropertiesToCopy)

getCategoryInfoPropertiesToCopy

public java.lang.String[] getCategoryInfoPropertiesToCopy()
The list of properties that are copied inside populateCategoryInfo from the info returned by getBaseCategoryInfo


setProductInfoPropertiesToCopy

public void setProductInfoPropertiesToCopy(java.lang.String[] pProductInfoPropertiesToCopy)

getProductInfoPropertiesToCopy

public java.lang.String[] getProductInfoPropertiesToCopy()
The list of properties that are copied inside populateProductInfo from the info returned by getBaseProductInfo


setSkuInfoPropertiesToCopy

public void setSkuInfoPropertiesToCopy(java.lang.String[] pSkuInfoPropertiesToCopy)

getSkuInfoPropertiesToCopy

public java.lang.String[] getSkuInfoPropertiesToCopy()
The list of properties that are copied inside populateSkuInfo from the info returned by getBaseSkuInfo


setAttemptToPopulateNewInfoItems

public void setAttemptToPopulateNewInfoItems(boolean pAttemptToPopulateNewInfoItems)

isAttemptToPopulateNewInfoItems

public boolean isAttemptToPopulateNewInfoItems()
If this is true, this class will attempt to populate any new info items with the information from another info. If this is true, it is important to run CatalogVerificationService The default is true.


setDeleteUnreferencedInfoItems

public void setDeleteUnreferencedInfoItems(boolean pDeleteUnreferencedInfoItems)

isDeleteUnreferencedInfoItems

public boolean isDeleteUnreferencedInfoItems()
If this is true, then an info that is no longer in an items map of catalog specific information will be removed from the repository The default is true.


setCheckForUnreferencedCategories

public void setCheckForUnreferencedCategories(boolean pCheckForUnreferencedCategories)

isCheckForUnreferencedCategories

public boolean isCheckForUnreferencedCategories()
If true, an extra check is made for each category. If the category is not actually referenced anywhere, it's 'catalog' property is set to null and the categoryInfos map is cleared. Setting this to true will slow things down. It should only be set to false if you are confident that all categories have an accurate 'catalog' property. The default is true.


generateInfoObjects

public void generateInfoObjects()
This method generates info objects for all categories, products, and skus, for all catalogs.


generateInfoObjects

public void generateInfoObjects(java.util.Collection pCatalogIds)
This method generates info objects for all categories, products, and skus, for 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

generateInfoObjects

public void generateInfoObjects(Repository pCatalogRepository,
                                java.util.Collection pCatalogIds)
This method generates info objects for all categories, products, and skus, for 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

generateCategoryInfoObjects

public void generateCategoryInfoObjects()
Iterate through all catalog and create the category-info objects


generateCategoryInfoObjects

public void generateCategoryInfoObjects(java.util.Collection pCatalogIds)
Iterate through the catalog and create the category-info objects, for 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

generateCategoryInfoObjects

public void generateCategoryInfoObjects(Repository pCatalogRepository,
                                        java.util.Collection pCatalogIds)
Iterate through the catalog and create the category-info objects, for the given catalogs in 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

generateProductInfoObjects

public void generateProductInfoObjects()
Iterate through the catalog and create the product-info objects


generateProductInfoObjects

public void generateProductInfoObjects(java.util.Collection pCatalogIds)
Iterate through the catalog and create the product-info objects, for 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

generateProductInfoObjects

public void generateProductInfoObjects(Repository pCatalogRepository,
                                       java.util.Collection pCatalogIds)
Iterate through the catalog and create the product-info objects, for the given 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

generateSkuInfoObjects

public void generateSkuInfoObjects()
Iterate through the catalog and create the sku-info objects


generateSkuInfoObjects

public void generateSkuInfoObjects(java.util.Collection pCatalogIds)
Iterate through the catalog and create the sku-info objects, for 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

generateSkuInfoObjects

public void generateSkuInfoObjects(Repository pCatalogRepository,
                                   java.util.Collection pCatalogIds)
Iterate through the catalog and create the sku-info objects, for the given 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

addCategoryInfo

protected RepositoryItem addCategoryInfo(RepositoryItem pCategory,
                                         RepositoryItem pCatalog,
                                         java.util.Map pCategoryInfos,
                                         Repository pCatalogRepository)
                                  throws RepositoryException
Create a new category info object and add it to the map. The new category info object will be populated using populateCategoryInfoItem

Parameters:
pCategory - The category that will contain the new info item
pCatalog - The catalog that will map to the new info item
pCategoryInfos - The map of category info items, that the new info item will be added to
pCatalogRepository - The repository that will store the new info item
Returns:
the newly created category-info
Throws:
RepositoryException
See Also:
createCategoryInfoItem(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.Repository), #populatedCategoryInfoItem

createCategoryInfoItem

protected RepositoryItem createCategoryInfoItem(RepositoryItem pCategory,
                                                RepositoryItem pCatalog,
                                                Repository pCatalogRepository)
                                         throws RepositoryException
This method will create a new categoryInfo repository item. It assumes that the info item for the given catalog and category pair does not yet exist.

Parameters:
pCategory - The category that will contain the new info
pCatalog - The catalog that maps to the new info
pCatalogRepository - The repository that will contain the new info
Throws:
RepositoryException

populateCategoryInfoItem

protected RepositoryItem populateCategoryInfoItem(RepositoryItem pCategoryInfo,
                                                  RepositoryItem pCategory,
                                                  RepositoryItem pCatalog)
                                           throws RepositoryException
Populate the given category info object. This method attempts to be intelligent about what information is used to populate the info item. It will call getBaseCategoryInfo and use the returned item as the source of any information other than parentCategory. If getBaseCategoryInfo returns null, then copyInfoProperites is called. If attemptToPopulateNewInfoItems is false, then nothing is populated and the category info object passed in is returned. If attemptToPopulateNewInfoItems is true, it is important to run the CatalogVerificationService to ensure that the new info does not reference items outside of the correct catalog.

Parameters:
pCategoryInfo - The categoryInfo that will be updated
pCategory - The category that contains this info
pCatalog - The catalog that maps to the info item
Returns:
the newly created category-info
Throws:
RepositoryException
See Also:
getBaseCategoryInfo(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.RepositoryItem)

getBaseCategoryInfo

protected RepositoryItem getBaseCategoryInfo(RepositoryItem pCategoryInfo,
                                             RepositoryItem pCategory,
                                             RepositoryItem pCatalog)
                                      throws RepositoryException
This method is used to provide a source of information when populating a category info. This implementation of the method just returns the first info that is not the same as pCategoryInfo. It assumes that this info is already populated.

Parameters:
pCategoryInfo - The info that will be populate based on what is returned by this method
pCategory - The category containing both info items
pCatalog - The catalog that maps to pCategoryInfo
Returns:
Some categoryInfo that is not pCategoryInfo, or null if there isn't one
Throws:
RepositoryException

addProductInfo

protected RepositoryItem addProductInfo(RepositoryItem pProduct,
                                        RepositoryItem pCatalog,
                                        RepositoryItem pParentCategory,
                                        java.util.Map pProductInfos,
                                        Repository pCatalogRepository)
                                 throws RepositoryException
Create a new product info object and add it to the map. The new product info object will be populated using populateProductInfoItem

Parameters:
pProduct - The product that will contain the new info item
pCatalog - The catalog that will map to the new info item
pParentCategory - The new value for productInfo.parentCategory
pProductInfos - The map of product info items, that the new info item will be added to
pCatalogRepository - The repository that will store the new info item
Returns:
the newly created product-info
Throws:
RepositoryException
See Also:
createProductInfoItem(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.Repository), #populatedProductInfoItem

createProductInfoItem

protected RepositoryItem createProductInfoItem(RepositoryItem pProduct,
                                               RepositoryItem pCatalog,
                                               Repository pCatalogRepository)
                                        throws RepositoryException
This method will create a new productInfo repository item. It assumes that the info item for the given catalog and product pair does not yet exist.

Parameters:
pProduct - The product that will contain the new info
pCatalog - The catalog that maps to the new info
pCatalogRepository - The repository that will contain the new info
Throws:
RepositoryException

populateProductInfoItem

protected RepositoryItem populateProductInfoItem(RepositoryItem pProductInfo,
                                                 RepositoryItem pProduct,
                                                 RepositoryItem pParentCategory,
                                                 RepositoryItem pCatalog)
                                          throws RepositoryException
Populate the given product info object. This method attempts to be intelligent about what information is used to populate the info item. It will call getBaseProductInfo and use the returned item as the source of any information other than parentCategory. If getBaseProductInfo returns null, then the only property that gets populated is parentCategory. If attemptToPopulateNewInfoItems is false, then the only property that gets populated is parentCategory. If attemptToPopulateNewInfoItems is true, it is important to run the CatalogVerificationService to ensure that the new info does not reference items outside of the correct catalog.

Parameters:
pProductInfo - The productInfo that will be updated
pProduct - The product that contains this info
pParentCategory - The new value for pProductInfo.parentCategory
pCatalog - The catalog that maps to the info item
Returns:
the newly created product-info
Throws:
RepositoryException
See Also:
getBaseProductInfo(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.RepositoryItem)

getBaseProductInfo

protected RepositoryItem getBaseProductInfo(RepositoryItem pProductInfo,
                                            RepositoryItem pProduct,
                                            RepositoryItem pCatalog)
                                     throws RepositoryException
This method is used to provide a source of information when populating a product info. This implementation of the method just returns the first info that is not the same as pProductInfo. It assumes that this info is already populated.

Parameters:
pProductInfo - The info that will be populate based on what is returned by this method
pProduct - The product containing both info items
pCatalog - The catalog that maps to pProductInfo
Returns:
Some productInfo that is not pProductInfo, or null if there isn't one
Throws:
RepositoryException

addSkuInfo

protected RepositoryItem addSkuInfo(RepositoryItem pSku,
                                    RepositoryItem pCatalog,
                                    RepositoryItem pParentProduct,
                                    java.util.Map pSkuInfos,
                                    Repository pCatalogRepository)
                             throws RepositoryException
Create a new sku info object and add it to the map. The new sku info object will be populated using populateSkuInfoItem

Parameters:
pSku - The sku that will contain the new info item
pCatalog - The catalog that will map to the new info item
pParentCategory - The new value for skuInfo.parentCategory
pSkuInfos - The map of sku info items, that the new info item will be added to
pCatalogRepository - The repository that will store the new info item
Returns:
the newly created sku-info
Throws:
RepositoryException
See Also:
createSkuInfoItem(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.Repository), #populatedSkuInfoItem

createSkuInfoItem

protected RepositoryItem createSkuInfoItem(RepositoryItem pSku,
                                           RepositoryItem pCatalog,
                                           Repository pCatalogRepository)
                                    throws RepositoryException
This method will create a new skuInfo repository item. It assumes that the info item for the given catalog and sku pair does not yet exist.

Parameters:
pSku - The sku that will contain the new info
pCatalog - The catalog that maps to the new info
pCatalogRepository - The repository that will contain the new info
Throws:
RepositoryException

populateSkuInfoItem

protected RepositoryItem populateSkuInfoItem(RepositoryItem pSkuInfo,
                                             RepositoryItem pSku,
                                             RepositoryItem pParentProduct,
                                             RepositoryItem pCatalog)
                                      throws RepositoryException
Populate the given sku info object. This method attempts to be intelligent about what information is used to populate the info item. It will call getBaseSkuInfo and use the returned item as the source of any information other than parentCategory. If getBaseSkuInfo returns null or if attemptToPopulateNewInfoItems is false, nothing gets populated. If attemptToPopulateNewInfoItems is true, it is important to run the CatalogVerificationService to ensure that the new info does not reference items outside of the correct catalog.

Parameters:
pSkuInfo - The skuInfo that will be updated
pSku - The sku that contains this info
pParentCategory - The new value for pSkuInfo.parentCategory
pCatalog - The catalog that maps to the info item
Returns:
the newly created sku-info
Throws:
RepositoryException
See Also:
getBaseSkuInfo(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.repository.RepositoryItem)

getBaseSkuInfo

protected RepositoryItem getBaseSkuInfo(RepositoryItem pSkuInfo,
                                        RepositoryItem pSku,
                                        RepositoryItem pCatalog)
                                 throws RepositoryException
This method is used to provide a source of information when populating a sku info. This implementation of the method just returns the first info that is not the same as pSkuInfo. It assumes that this info is already populated.

Parameters:
pSkuInfo - The info that will be populate based on what is returned by this method
pSku - The sku containing both info items
pCatalog - The catalog that maps to pSkuInfo
Returns:
Some skuInfo that is not pSkuInfo, or null if there isn't one
Throws:
RepositoryException

removeInfoMapEntry

protected boolean removeInfoMapEntry(java.util.Map pInfoMap,
                                     java.lang.String pCatalogId,
                                     Repository pCatalogRepository)
Remove the given key from the map. Optionally (according to deleteUnreferencedInfoItems remove the item from the repository. Return true if something was removed from the repository.