atg.commerce.catalog.custom
Class CatalogPossibleValues

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.repository.servlet.PossibleValues
                              extended by atg.commerce.catalog.custom.CatalogPossibleValues
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 CatalogPossibleValues
extends PossibleValues

This subclass of atg.repository.servlet.PossibleValues will only include items that are contained in the current users catalog, in the list of possible values. It does this by using a different query than PossibleValues does. It uses the catalog in the profile, or (if one is provided) the one in the parameter "catalog" Created: Mon Jul 16 15:11:40 2001


Nested Class Summary
 
Nested classes/interfaces inherited from class atg.repository.servlet.PossibleValues
PossibleValues.EnumeratedOptionPossibleValue, PossibleValues.PossibleValue, PossibleValues.RepositoryItemPossibleValue
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_CATALOG_ITEMS_CATALOG_PROPERTY
           
static java.lang.String DEFAULT_CATALOG_PROPERTY
           
 
Fields inherited from class atg.repository.servlet.PossibleValues
DISPLAY_VALUES, ENUMERATED, ITEM_NAME, MAX_REPOSITORY_ITEMS, OUTPUT, PROPERTY_NAME, REPOSITORY, REPOSITORY_ITEM, RESOURCE_BUNDLE, RETURN_VALUE_OBJECTS, smResourceBundle, SORT_PROPERTIES, USE_CODE_FOR_VALUE, VALUES
 
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
CatalogPossibleValues()
           
 
Method Summary
 java.lang.String getCatalogItemsCatalogProperty()
          The name of the property for each catalog item that contains the list of catalogs containing that item This defaults to "catalogs"
 java.lang.String getCatalogPropertyName()
          The name of the profile property pointing to the catalog This defaults to "catalog"
 CustomCatalogTools getCatalogTools()
          Returns property catalogTools.
protected  java.lang.Object getCurrentCatalog()
          Get the current catalog from the profile
 java.lang.String[] getExcludedItemDescriptors()
          The list of item descriptors that we do not want to check...
protected  Query getRepositoryItemQuery(RepositoryItemDescriptor pItemDescriptor, QueryBuilder pQueryBuilder)
          Get the query that is used by getRepositoryItems By default, this gets the items whose catalogItemsCatalogProperty includes the current catalog.
protected  java.lang.Object getRepositoryValues(java.lang.String pItemDescriptorName, java.lang.String pPropertyName, java.lang.String pUseCodeForValue, SortDirectives pSortDirectives)
          Get repository values for either enumerated types or for linked property values Override of getRepositoryValues that calls the super methods.
 boolean isNullCatalogMeansNoResults()
          If this is true, and the profile's catalog is null, no results will be returned.
 boolean isQueryByCatalog()
          If this is true, queries will be constrained by catalog.
 void setCatalogItemsCatalogProperty(java.lang.String pCatalogItemsCatalogProperty)
           
 void setCatalogPropertyName(java.lang.String pCatalogPropertyName)
           
 void setCatalogTools(CustomCatalogTools pCatalogTools)
          Sets property catalogTools.
 void setExcludedItemDescriptors(java.lang.String[] pExcludedItemDescriptors)
           
 void setNullCatalogMeansNoResults(boolean pNullCatalogMeansNoResults)
           
 void setQueryByCatalog(boolean pQueryByCatalog)
           
 
Methods inherited from class atg.repository.servlet.PossibleValues
buildSortDirectives, getCurrentMaxRepositoryItemsValue, getCurrentReturnValueObjectsValue, getDisplayValues, getEnumeratedPossibleObjectValues, getMaxRepositoryItems, getRepository, getRepositoryItems, getRepositoryValues, service, setMaxRepositoryItems, setRepository
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, 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


DEFAULT_CATALOG_PROPERTY

public static final java.lang.String DEFAULT_CATALOG_PROPERTY
See Also:
Constant Field Values

DEFAULT_CATALOG_ITEMS_CATALOG_PROPERTY

public static final java.lang.String DEFAULT_CATALOG_ITEMS_CATALOG_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CatalogPossibleValues

public CatalogPossibleValues()
Method Detail

setCatalogItemsCatalogProperty

public void setCatalogItemsCatalogProperty(java.lang.String pCatalogItemsCatalogProperty)

getCatalogItemsCatalogProperty

public java.lang.String getCatalogItemsCatalogProperty()
The name of the property for each catalog item that contains the list of catalogs containing that item This defaults to "catalogs"


setCatalogPropertyName

public void setCatalogPropertyName(java.lang.String pCatalogPropertyName)

getCatalogPropertyName

public java.lang.String getCatalogPropertyName()
The name of the profile property pointing to the catalog This defaults to "catalog"


setNullCatalogMeansNoResults

public void setNullCatalogMeansNoResults(boolean pNullCatalogMeansNoResults)

isNullCatalogMeansNoResults

public boolean isNullCatalogMeansNoResults()
If this is true, and the profile's catalog is null, no results will be returned. Otherwise, the search is not limited by catalog. The default is true.


setExcludedItemDescriptors

public void setExcludedItemDescriptors(java.lang.String[] pExcludedItemDescriptors)

getExcludedItemDescriptors

public java.lang.String[] getExcludedItemDescriptors()
The list of item descriptors that we do not want to check... even if they have a "catalogs" property. Any item without a "catalogs" property will not be checked and does not need to be listed here.


setCatalogTools

public void setCatalogTools(CustomCatalogTools pCatalogTools)
Sets property catalogTools.

Parameters:
pCatalogTools - the property to store the global service catalog tools factory to obtain the catalog to search in.

getCatalogTools

public CustomCatalogTools getCatalogTools()
Returns property catalogTools.

Returns:
The value of the property catalogTools

setQueryByCatalog

public void setQueryByCatalog(boolean pQueryByCatalog)

isQueryByCatalog

public boolean isQueryByCatalog()
If this is true, queries will be constrained by catalog. Otherwise, query is not constrained by catalog, rather query results are filtered by catalog post-query. The default is true.


getRepositoryItemQuery

protected Query getRepositoryItemQuery(RepositoryItemDescriptor pItemDescriptor,
                                       QueryBuilder pQueryBuilder)
                                throws RepositoryException
Get the query that is used by getRepositoryItems By default, this gets the items whose catalogItemsCatalogProperty includes the current catalog. If the item we are interested in does not have this property, then no extra contraints are added.

Overrides:
getRepositoryItemQuery in class PossibleValues
Parameters:
pItemDescriptor - The type of item that is return by this query
pQueryBuilder - The query builder used to build the query
Returns:
A query object
Throws:
RepositoryException

getRepositoryValues

protected java.lang.Object getRepositoryValues(java.lang.String pItemDescriptorName,
                                               java.lang.String pPropertyName,
                                               java.lang.String pUseCodeForValue,
                                               SortDirectives pSortDirectives)
Get repository values for either enumerated types or for linked property values Override of getRepositoryValues that calls the super methods. If configured to Query By Catalog, returns the result returned by the super methods. Otherwise, filters the items based on catalog.

Overrides:
getRepositoryValues in class PossibleValues
Parameters:
pItemDescriptorName - item descriptor name
pPropertyName - the property name
pSortProperties - sort directives
Returns:
result or null

getCurrentCatalog

protected java.lang.Object getCurrentCatalog()
                                      throws RepositoryException
Get the current catalog from the profile

Throws:
RepositoryException