public class CatalogServices extends GenericService
 Properties that are returned in the XML data can be controlled via mapping
 files used to generate the XML data from the items.
 getProductMappingFileName() determines the Product XML data.
 
 getSKUMappingFileName() determines the SKU XML data.
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | CATALOG_NOT_FOUND_IN_USER | 
| static java.lang.String | CATALOGID_FOR_NON_CUSTOM_CATALOGS | 
| static java.lang.String | CATALOGID_NOT_EXIST | 
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | DESCRIPTION_SEARCH_STRING_IS_NULL | 
| static java.lang.String | INVALID_PRODUCTID | 
| static java.lang.String | INVALID_PRODUCTID_OR_CATALOGID | 
| static java.lang.String | NULL_PRODUCTID | 
| static java.lang.String | NULL_RQL | 
| static java.lang.String | SEARCH_PROPERTY_NAMES_NOT_CONFIGURED | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
| CatalogServices() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | catalogItemViewed(java.lang.String pProfileId,
                 java.lang.String pItemId,
                 java.lang.String pItemType)This method can be used to announce that a particular item was viewed by the
 current user. | 
| protected void | filterProducts(RepositoryItem[] pProducts,
              java.lang.String pCatalogId,
              java.lang.String pCatalogKey)Verifies the  pProductsrepository items checking whether
 they belong to the catalog specified bypCatalogId. | 
| protected Query | generateQuery(java.lang.String[] pSearchPropertyNames,
             java.lang.String pSearchString,
             java.lang.String pCatalogKey,
             QueryBuilder pProductQueryBuilder)Generates  Queryto execute. | 
| protected RepositoryItem | getCatalogItemFromProfile()Retrieves the catalog item from the user repository item  in the current session. | 
| CatalogTools | getCatalogTools()Returns Catalog Tools to access Product Catalog | 
| atg.userprofiling.dms.DPSMessageSource | getDPSMessageSource()This component is used to send  ViewItemevents | 
| GetService | getGetService()Returns GetService component to render XML data from Repository Items. | 
| java.lang.String | getProductMappingFileName()Returns Name of the mapping file to be used to generate Product XML | 
| java.lang.String | getProductSKUPropertyName()Returns property name of the SKU items in product item-descriptor | 
| java.lang.String[] | getProductSkusXML(java.lang.String pProductId,
                 java.lang.String pCatalogId)Retrieves product repository item as specified by  pProductIdand returns the SKU items in the product in XML format. | 
| java.lang.String[] | getProductSkusXML(java.lang.String pProductId,
                 java.lang.String pCatalogId,
                 java.lang.String pCatalogKey)Retrieves product repository item as specified by  pProductIdand returns the SKU items in the product in XML format. | 
| java.lang.String[] | getProductXMLByDescription(java.lang.String pSearchString,
                          java.lang.String[] pSearchPropertyNames,
                          java.lang.String pCatalogId)Retrieves the product whose properties as specified by
  pSearchPropertyNamesorgetSearchPropertyNames()containspSearchString. | 
| java.lang.String[] | getProductXMLByDescription(java.lang.String pSearchString,
                          java.lang.String[] pSearchPropertyNames,
                          java.lang.String pCatalogId,
                          java.lang.String pCatalogKey)Retrieves the product whose properties as specified by
  pSearchPropertyNamesorgetSearchPropertyNames()containspSearchString. | 
| java.lang.String | getProductXMLById(java.lang.String pProductId,
                 java.lang.String pCatalogId)Retrieves the Product item in XML form as speicfied by
 the  pProductId. | 
| java.lang.String | getProductXMLById(java.lang.String pProductId,
                 java.lang.String pCatalogId,
                 java.lang.String pCatalogKey)Retrieves the Product item in XML form as speicfied by
 the  pProductId. | 
| java.lang.String[] | getProductXMLByRQL(java.lang.String pRQLQuery,
                  java.lang.String pCatalogId)Parses the  pRQLQueryand executes the RqlStatement
 to retrieve the product items. | 
| java.lang.String[] | getProductXMLByRQL(java.lang.String pRQLQuery,
                  java.lang.String pCatalogId,
                  java.lang.String pCatalogKey)Parses the  pRQLQueryand executes the RqlStatement
 to retrieve the product items. | 
| CommerceProfileTools | getProfileTools()Convenience methods for managing profiles | 
| java.lang.String[] | getSearchPropertyNames()Returns Names of the properties to search for  getProductXMLByDescription | 
| java.lang.String | getSKUMappingFileName()Returns Name of the mapping file to be used to generate SKU XML | 
| java.lang.String | getUserCatalogPropertyName()Returns Name of catalog property name in Profile repository item | 
| void | setCatalogTools(CatalogTools pCatalogTools)Sets Catalog Tools to access Product Catalog | 
| void | setDPSMessageSource(atg.userprofiling.dms.DPSMessageSource pDPSMessageSource) | 
| void | setGetService(GetService pGetService)Sets GetService component to render XML data from Repository Items. | 
| void | setProductMappingFileName(java.lang.String pProductMappingFileName)Sets Name of the mapping file to be used to generate Product XML | 
| void | setProductSKUPropertyName(java.lang.String pProductSKUPropertyName)Sets property name of the SKU items in product item-descriptor | 
| void | setProfileTools(CommerceProfileTools pProfileTools) | 
| void | setSearchPropertyNames(java.lang.String[] pSearchPropertyNames)Sets Names of the properties to search for  getProductXMLByDescription | 
| void | setSKUMappingFileName(java.lang.String pSKUMappingFileName)Sets Name of the mapping file to be used to generate SKU XML | 
| void | setUserCatalogPropertyName(java.lang.String pUserCatalogPropertyName)Sets Name of catalog property name in Profile repository item | 
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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static java.lang.String NULL_PRODUCTID
public static java.lang.String NULL_RQL
public static java.lang.String SEARCH_PROPERTY_NAMES_NOT_CONFIGURED
public static java.lang.String CATALOGID_FOR_NON_CUSTOM_CATALOGS
public static java.lang.String CATALOGID_NOT_EXIST
public static java.lang.String CATALOG_NOT_FOUND_IN_USER
public static java.lang.String INVALID_PRODUCTID
public static java.lang.String INVALID_PRODUCTID_OR_CATALOGID
public static java.lang.String DESCRIPTION_SEARCH_STRING_IS_NULL
public CatalogTools getCatalogTools()
public void setCatalogTools(CatalogTools pCatalogTools)
CatalogTools - public java.lang.String getProductMappingFileName()
public void setProductMappingFileName(java.lang.String pProductMappingFileName)
ProductMappingFileName - public java.lang.String getSKUMappingFileName()
public void setSKUMappingFileName(java.lang.String pSKUMappingFileName)
SKUMappingFileName - public GetService getGetService()
public void setGetService(GetService pGetService)
GetService - public void setDPSMessageSource(atg.userprofiling.dms.DPSMessageSource pDPSMessageSource)
public atg.userprofiling.dms.DPSMessageSource getDPSMessageSource()
ViewItem eventspublic void setProfileTools(CommerceProfileTools pProfileTools)
public CommerceProfileTools getProfileTools()
public java.lang.String[] getSearchPropertyNames()
getProductXMLByDescriptionpublic void setSearchPropertyNames(java.lang.String[] pSearchPropertyNames)
getProductXMLByDescriptionSearchPropertyNames - public java.lang.String getProductSKUPropertyName()
public void setProductSKUPropertyName(java.lang.String pProductSKUPropertyName)
ProductSKUPropertyName - public java.lang.String getUserCatalogPropertyName()
public void setUserCatalogPropertyName(java.lang.String pUserCatalogPropertyName)
UserCatalogPropertyName - public java.lang.String getProductXMLById(java.lang.String pProductId,
                                 java.lang.String pCatalogId,
                                 java.lang.String pCatalogKey)
                                   throws RepositoryException,
                                          GetException
pProductId. if custom catalogs are used then
 catalog item is retrieved as specified by pCatalogId.
 If no catalog item is found then the user in the current session
 is accessed and catalog item is retrieved from the user.pProductId - specifies the product to retrievepCatalogId - specifies the catalogItem to check for the productpCatalogKey - specifies the catalog to useRepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductSkusXML(java.lang.String pProductId,
                                   java.lang.String pCatalogId,
                                   java.lang.String pCatalogKey)
                                     throws RepositoryException,
                                            GetException
pProductId
 and returns the SKU items in the product in XML format.
 getProductSKUPropertyName() specifies the propery name of
 SKU repository items in product repository item.pProductId - Id of the product to retreive SKU items frompCatalogId - catalog Item to use.pCatalogKey - specifies the catalog to useRepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductXMLByDescription(java.lang.String pSearchString,
                                            java.lang.String[] pSearchPropertyNames,
                                            java.lang.String pCatalogId,
                                            java.lang.String pCatalogKey)
                                              throws RepositoryException,
                                                     GetException
pSearchPropertyNames or getSearchPropertyNames()
 contains pSearchString.pSearchString - search string to search for in the properties of ProductpSearchPropertyNames - array of property names to search forpCatalogId - catalog item to verify the productpCatalogKey - catalog to useRepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductXMLByRQL(java.lang.String pRQLQuery,
                                    java.lang.String pCatalogId,
                                    java.lang.String pCatalogKey)
                                      throws RepositoryException,
                                             GetException
pRQLQuery and executes the RqlStatement
 to retrieve the product items. product repository items are
 checked against specified catalog to include only items present
 in catalog.pRQLQuery - RQL query string to execute against product RepositoryViewpCatalogId - Id of the catalog to retrievepCatalogKey - key to the catalog to useRepositoryException - if an error occursGetException - if an error occursprotected void filterProducts(RepositoryItem[] pProducts, java.lang.String pCatalogId, java.lang.String pCatalogKey) throws RepositoryException
pProducts repository items checking whether
 they belong to the catalog specified by pCatalogId.
 Returns only the items that belong to the specified catalogpProducts - product repository items to verifypCatalogId - Id of the catalog item to verify inpCatalogKey - key to the catalog to useRepositoryException - if an error occursprotected Query generateQuery(java.lang.String[] pSearchPropertyNames, java.lang.String pSearchString, java.lang.String pCatalogKey, QueryBuilder pProductQueryBuilder) throws RepositoryException
Query to execute. Iterates through
 the pSearchPropertyNames array constructing
 the querypSearchPropertyNames - a String[] valuepSearchString - a String valuepCatalogKey - a String valuepProductQueryBuilder - a QueryBuilder valueQuery valueRepositoryException - if an error occursprotected RepositoryItem getCatalogItemFromProfile()
public java.lang.String getProductXMLById(java.lang.String pProductId,
                                 java.lang.String pCatalogId)
                                   throws RepositoryException,
                                          GetException
pProductId. if custom catalogs are used then
 catalog item is retrieved as specified by pCatalogId.
 If no catalog item is found then the user in the current session
 is accessed and catalog item is retrieved from the user.pProductId - specifies the product to retrievepCatalogId - specifies the catalogItem to check for the productRepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductSkusXML(java.lang.String pProductId,
                                   java.lang.String pCatalogId)
                                     throws RepositoryException,
                                            GetException
pProductId
 and returns the SKU items in the product in XML format.
 getProductSKUPropertyName() specifies the propery name of
 SKU repository items in product repository item.pProductId - Id of the product to retreive SKU items frompCatalogId - catalog Item to use.RepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductXMLByDescription(java.lang.String pSearchString,
                                            java.lang.String[] pSearchPropertyNames,
                                            java.lang.String pCatalogId)
                                              throws RepositoryException,
                                                     GetException
pSearchPropertyNames or getSearchPropertyNames()
 contains pSearchString.pSearchString - search string to search for in the properties of ProductpSearchPropertyNames - array of property names to search forpCatalogId - catalog item to verify the productRepositoryException - if an error occursGetException - if an error occurspublic java.lang.String[] getProductXMLByRQL(java.lang.String pRQLQuery,
                                    java.lang.String pCatalogId)
                                      throws RepositoryException,
                                             GetException
pRQLQuery and executes the RqlStatement
 to retrieve the product items. product repository items are
 checked against specified catalog to include only items present
 in catalog.pRQLQuery - RQL query string to execute against product RepositoryViewpCatalogId - Id of the catalog to retrieveRepositoryException - if an error occursGetException - if an error occurspublic void catalogItemViewed(java.lang.String pProfileId,
                     java.lang.String pItemId,
                     java.lang.String pItemType)
                       throws RepositoryException
ViewItemMessage will be created and sent.pProfileId - The id of the user who viewed the item.  If null, current user is assumedpItemId - The item of the itempItemType - The type of the item viewed: (eg category, product)RepositoryException - Thrown if the item is not validViewItemMessage