public class CatalogItemLookupDroplet extends ItemLookupDroplet
output is 
 rendered.  If the item is not found, empty is rendered.  If
 it is not found on the current site then wrongSite is rendered. 
 If it does not belong to the user's catalog, wrongCatalog is 
 rendered.
 It checks this by looking at the item's "catalogs"
 property and "sites" property.  If the item has no "catalogs" and no "sites" 
 property then this class behaves the same as the superclass.
 
 The repository and item descriptor type can be configured through
 properties. If the useParams property is true, then
 the repository and item descriptor can be resolved through input
 parameters.
 
One can configure this droplet to define a mapping from a key to an alternate set of
 repositories.  
 For example: ProductLookup.properties
 
 $class=atg.commerce.catalog.custom.CatalogItemLookupDroplet
 
 repository=/atg/commerce/catalog/ProductCatalog
 itemDescriptor=product
 
 alternateRepositories=\
      fr_FR=/atg/commerce/catalog/FrenchProductCatalog
      ja_JP=/atg/commerce/catalog/JapaneseProductCatalog
      de_DE=/atg/commerce/catalog/GermanProductCatalog
 
 The invocation of the droplet can then be invoked with the following parameters:
 
 <DROPLET bean="ProductLookup">
 <PARAM NAME="id" VALUE="param:productId">
 <PARAM NAME="repositoryKey" value="bean:/OriginatingRequest.requestLocale.localeString">
 <PARAM name="elementName" value="product">
 <OPARAM NAME="output">
   <a href="param:product.template.url">
     <param name="prod_id" value="param:product.repositoryId">
     <valueof param="product.displayName"></valueof>
   </a>
 </OPARAM>
 </DROPLET>
 
 If the mapping for the provided key is found that repository will be used, otherwise the system 
 will fall back to the default repository and search for the item.
 If the item cannot be found in the repository searched (e.g. the french product catalog), then the droplet will once again fall back to the default repository and attempt to find the item using the same id. Obviously this is only useful if the items have the exact same id in each repository.
In this example if you are french and attempt to look at product 1234, and product 1234 is defined in the french product catalog you will see that item. However if 1234 is not defined then you will see the default english version of 1234.
 This behavior can be modified with use of the useDefaultRepository and 
 getDefaultItem properties. If useDefaultRepository is false
 and an alternate repository cannot be found, then no repository is searched and empty
 is serviced. Like wise, if an alternative repository is selected, but the item cannot be
 found, and if getDefaultItem is false, then the default repository will not be searched
 and empty will be serviced.
 
 The required input paramters for this servlet are:
 
The output parameters for this servlet are:
catalog input parameter was not specified.
 | Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CATALOG  | 
static java.lang.String | 
CATALOGS  | 
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
static java.lang.String | 
ELEMENT  | 
static java.lang.String | 
ELEMENT_NAME_STR  | 
static java.lang.String | 
EMPTY_OPARAM  | 
static java.lang.String | 
ERROR  | 
static java.lang.String | 
FILTER_BY_CATALOG  | 
static java.lang.String | 
ID  | 
static java.lang.String | 
ITEM_DESC  | 
static java.lang.String | 
NO_CATALOG_OPARAM  | 
static java.lang.String | 
OUTPUT_OPARAM  | 
static java.lang.String | 
REPOSITORY  | 
static java.lang.String | 
REPOSITORY_KEY  | 
static java.lang.String | 
WRONG_OPARAM  | 
FILTER_BY_SITE, FILTER_BY_SITE_PARAM, SITE_IDS_PARAM, SITEIDS, SITES, SITES_PARAM, WRONG_SITE_OPARAMmAllowCleanupRequest, mParametersSERVLET_INFO_KEYSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
CatalogItemLookupDroplet()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected RepositoryItem | 
findItem(java.lang.String pId,
        java.lang.String pItemDescriptorName,
        Repository pRepository)
Attempts to find an item in the given repository based on Id and Item descriptor. 
 | 
protected java.util.Collection<RepositoryItem> | 
getCatalogs(DynamoHttpServletRequest pRequest)
Returns catalogs from request parameters. 
 | 
RepositoryItem | 
getProfile()
Returns property Profile 
 | 
protected Repository | 
getRepository(DynamoHttpServletRequest pRequest)
Returns repository. 
 | 
protected Repository | 
getRepositoryForCatalogItemLookup(java.lang.String pRepositoryKey)
Gets the specified alternate repository if available,
 otherwise returns the defaults repository. 
 | 
boolean | 
isFilterByCatalog()
Returns property FilterByCatalog 
 | 
protected boolean | 
isFilterByCatalog(DynamoHttpServletRequest pRequest)
Returns true if item should filter by catalog. 
 | 
protected boolean | 
isItemInCatalogs(RepositoryItem pItem,
                java.util.Collection<RepositoryItem> pCatalogs)
Determines if a given item is part of any catalog in the given collection. 
 | 
void | 
service(DynamoHttpServletRequest pRequest,
       DynamoHttpServletResponse pResponse)
Look for the RepositoryItem and if found render the output oparam by
 binding the item as a parameter. 
 | 
void | 
setFilterByCatalog(boolean pFilterByCatalogs)
Sets property FilterByCatalog 
 | 
commitTransaction, ensureTransaction, getAlternateRepositories, getItemDescriptor, getRepository, getSiteIds, getSites, getSitesPropertyName, getTransactionManager, isEnsureTransaction, isFilterBySite, isFilterBySite, isGetDefaultItem, isItemInSites, isItemInSites, isItemInSites, isUseDefaultRepository, isUseParams, retrieveItemSites, setAlternateRepositories, setEnsureTransaction, setFilterBySite, setGetDefaultItem, setItemDescriptor, setRepository, setSitesPropertyName, setTransactionManager, setUseDefaultRepository, setUseParamsdoDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameterdestroy, getServletConfig, getServletInfo, setServletInfogetAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatisticsaddLogListener, 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, toStringvlogDebug, 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 final java.lang.String ELEMENT_NAME_STR
public static final java.lang.String REPOSITORY
public static final java.lang.String ID
public static final java.lang.String ITEM_DESC
public static final java.lang.String CATALOG
public static final java.lang.String CATALOGS
public static final java.lang.String FILTER_BY_CATALOG
public static final java.lang.String REPOSITORY_KEY
public static final java.lang.String ELEMENT
public static final java.lang.String ERROR
public static final java.lang.String OUTPUT_OPARAM
public static final java.lang.String WRONG_OPARAM
public static final java.lang.String EMPTY_OPARAM
public static final java.lang.String NO_CATALOG_OPARAM
public RepositoryItem getProfile()
public void setFilterByCatalog(boolean pFilterByCatalogs)
public boolean isFilterByCatalog()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service in class ItemLookupDropletpRequest - the request to be processedpResponse - the response object for this requestjavax.servlet.ServletException - an application specific error occurred
 processing this requestjava.io.IOException - an error occurred reading data from the request
 or writing data to the response.protected RepositoryItem findItem(java.lang.String pId, java.lang.String pItemDescriptorName, Repository pRepository) throws RepositoryException
pId - - Id of the item to findpItemDescriptorName - ItemDescriptor for the itempRepository - Repository to look for the item before using the default repository.RepositoryExceptionprotected Repository getRepositoryForCatalogItemLookup(java.lang.String pRepositoryKey)
pRepositoryKey - Alternate repository to getprotected boolean isItemInCatalogs(RepositoryItem pItem, java.util.Collection<RepositoryItem> pCatalogs)
pItem - Repository Item to check for membership in a catalogpCatalogs - Catalogs to check membership forprotected boolean isFilterByCatalog(DynamoHttpServletRequest pRequest)
pRequest - Dynamo http requestprotected Repository getRepository(DynamoHttpServletRequest pRequest)
useParams is true,
 retrieves repository from request parameters, otherwise
 calls getRepositoryForCatalogItemLookup methodpRequest - Dynamo http requestprotected java.util.Collection<RepositoryItem> getCatalogs(DynamoHttpServletRequest pRequest)
null.pRequest - Dynamo http requestnull