atg.commerce.catalog.custom
Class ForEachItemInCatalog

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.droplet.ForEach
                              extended by atg.commerce.catalog.custom.ForEachItemInCatalog
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, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class ForEachItemInCatalog
extends ForEach

This is exactly the same as the ForEach droplet except only items that are in the current users catalog. One extra parameter is allowed, although it is optional. That parameter is "profile". If a profile is not provided, then it the current session scoped profile is used. If the element In the array is not of type RepositoryItem, it is not considered part of the users catalog.

This droplet should be used to iterate through lists of items that may not necessarily be in the current catalog. Examples of these are product.relatedProducts, category.relatedCategories, and sku.replacementSkus. Lists like childProducts can use ForEach instead.

See Also:
Created: Thu Jun 21 11:58:51 2001

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.droplet.ForEach
ARRAY, COUNT, DEBUG, ELEMENT, ELEMENT_NAME, EMPTY, INDEX, INDEX_NAME, KEY, OUTPUT, OUTPUT_END, OUTPUT_START, REVERSE_ORDER, SIZE, SORT_PROPERTIES
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
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
ForEachItemInCatalog()
           
 
Method Summary
 java.lang.Object getArray(DynamoHttpServletRequest pReq)
          Gets the array-like value (e.g., array, List, Enumeration) to be used by this droplet from the request.
 java.lang.String getCatalogsPropertyName()
          The name of the property in categories, products, and skus that holds the list of catalogs that the item appears in.
 RepositoryItem getProfile()
          Returns property Profile
 java.lang.String getProfilesCatalogPropertyName()
          The name of the property in the Profile that stores the user's catalog.
protected  java.lang.Object[] getValidArray(java.lang.Object pArray, DynamoHttpServletRequest pRequest)
          Takes a collection of repository items and returns a list of those items in the current catalog.
 java.util.Dictionary getValidDictionary(java.util.Dictionary pArray, DynamoHttpServletRequest pRequest)
           
 java.util.Enumeration getValidEnumartion(java.util.Enumeration pArray, DynamoHttpServletRequest pRequest)
          Deprecated. this method is replaced by getValidEnumeration(Enumeration,DynamoHttpServletRequest).
 java.util.Enumeration getValidEnumeration(java.util.Enumeration pArray, DynamoHttpServletRequest pRequest)
           
 java.util.Iterator getValidIterator(java.util.Iterator pArray, DynamoHttpServletRequest pRequest)
          Creates a new Iterator that references only the items in the user's catalog.
protected  java.util.List getValidList(java.util.Collection pArray, DynamoHttpServletRequest pRequest)
          Takes a collection of repository items and returns a list of those items in the current catalog.
 java.util.Map getValidMap(java.util.Map pArray, DynamoHttpServletRequest pRequest)
           
protected  java.util.Map.Entry[] getValidMapEntries(java.util.Map.Entry[] pArray, DynamoHttpServletRequest pRequest)
          Takes a collection of repository items and returns a list of those items in the current catalog.
 void setCatalogsPropertyName(java.lang.String pCatalogsPropertyName)
           
 void setProfilesCatalogPropertyName(java.lang.String pProfilesCatalogPropertyName)
           
 
Methods inherited from class atg.droplet.ForEach
getSortedArray, service, serviceArray, serviceCollection, serviceDictionary, serviceEnumeration, serviceIndexedList, serviceIterator, serviceMap, serviceMapArray, servicePrimitiveArray, setElementParameter
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
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

ForEachItemInCatalog

public ForEachItemInCatalog()
Method Detail

setCatalogsPropertyName

public void setCatalogsPropertyName(java.lang.String pCatalogsPropertyName)

getCatalogsPropertyName

public java.lang.String getCatalogsPropertyName()
The name of the property in categories, products, and skus that holds the list of catalogs that the item appears in. The default is "catalogs"


setProfilesCatalogPropertyName

public void setProfilesCatalogPropertyName(java.lang.String pProfilesCatalogPropertyName)

getProfilesCatalogPropertyName

public java.lang.String getProfilesCatalogPropertyName()
The name of the property in the Profile that stores the user's catalog. The default is "catalog"


getProfile

public RepositoryItem getProfile()
Returns property Profile


getArray

public java.lang.Object getArray(DynamoHttpServletRequest pReq)
Gets the array-like value (e.g., array, List, Enumeration) to be used by this droplet from the request. Subclasses may override this method to extract the array by some means other than simply looking up its parameter value in the request.

Overrides:
getArray in class ForEach

getValidList

protected java.util.List getValidList(java.util.Collection pArray,
                                      DynamoHttpServletRequest pRequest)
Takes a collection of repository items and returns a list of those items in the current catalog.


getValidArray

protected java.lang.Object[] getValidArray(java.lang.Object pArray,
                                           DynamoHttpServletRequest pRequest)
Takes a collection of repository items and returns a list of those items in the current catalog.


getValidMapEntries

protected java.util.Map.Entry[] getValidMapEntries(java.util.Map.Entry[] pArray,
                                                   DynamoHttpServletRequest pRequest)
Takes a collection of repository items and returns a list of those items in the current catalog.


getValidEnumartion

public java.util.Enumeration getValidEnumartion(java.util.Enumeration pArray,
                                                DynamoHttpServletRequest pRequest)
Deprecated. this method is replaced by getValidEnumeration(Enumeration,DynamoHttpServletRequest).


getValidEnumeration

public java.util.Enumeration getValidEnumeration(java.util.Enumeration pArray,
                                                 DynamoHttpServletRequest pRequest)
Returns:
an enumeration that contains only the valid catalog items from the input enumeration

getValidIterator

public java.util.Iterator getValidIterator(java.util.Iterator pArray,
                                           DynamoHttpServletRequest pRequest)
Creates a new Iterator that references only the items in the user's catalog.


getValidMap

public java.util.Map getValidMap(java.util.Map pArray,
                                 DynamoHttpServletRequest pRequest)

getValidDictionary

public java.util.Dictionary getValidDictionary(java.util.Dictionary pArray,
                                               DynamoHttpServletRequest pRequest)