| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.repository.servlet.SearchFormHandler
atg.commerce.catalog.SearchFormHandler
atg.commerce.catalog.custom.CatalogSearchFormHandler
public class CatalogSearchFormHandler
Does the same thing as atg.commerce.catalog.SearchFormHandler but it limits all searches to within the current catalog. (Current catalog as stored in the Profile.)
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | DEFAULT_CATALOG_ITEMS_CATALOG_PROPERTY | 
| static java.lang.String | DEFAULT_CATALOG_PROPERTY | 
| protected  java.lang.String[] | mCatalogsArray of catalog IDs | 
| Fields inherited from class atg.commerce.catalog.SearchFormHandler | 
|---|
| INVALID_PRICE, mLastCatalogKey, PRICE_PROPERTY_NOT_SET | 
| Fields inherited from class atg.droplet.GenericFormHandler | 
|---|
| PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS | 
| 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 | |
|---|---|
| CatalogSearchFormHandler() | |
| Method Summary | |
|---|---|
| protected  Query | generateCatalogQueryClause(QueryBuilder pQueryBuilder,
                           Query pQuery,
                           java.lang.Object pCatalog)Adds clause to filter out items by single catalog. | 
| protected  Query | generateCatalogsQueryClause(QueryBuilder pQueryBuilder,
                            Query pQuery,
                            java.lang.String[] pCatalogIds)Adds clause to filter out items by catalogs. | 
| protected  Query | generateSearchQuery(Repository pRepository,
                    java.lang.String pItemType,
                    QueryBuilder pQueryBuilder)Return the query that should be executed on the Repository View. | 
|  java.lang.String | getCatalogItemsCatalogProperty()The name of the property for each catalog item that contains the list of catalogs containing that item | 
|  java.lang.String | getCatalogPropertyName()The name of the profile property pointing to the catalog | 
|  java.lang.String[] | getCatalogs()Gets an array of catalog IDs to filter the search by | 
| protected  java.lang.Object | getCurrentCatalog()Get the current catalog from current user profile. | 
|  boolean | isNullCatalogMeansNoResults()If this is true, and the profile's catalog is null, no results will be returned. | 
|  boolean | isQueryByCatalog()If this is true, search queries will be constrained by catalog. | 
|  void | setCatalogItemsCatalogProperty(java.lang.String pCatalogItemsCatalogProperty) | 
|  void | setCatalogPropertyName(java.lang.String pCatalogPropertyName) | 
|  void | setCatalogs(java.lang.String[] pCatalogs)Sets an array of catalog IDs to filter the search by | 
|  void | setNullCatalogMeansNoResults(boolean pNullCatalogMeansNoResults) | 
|  void | setQueryByCatalog(boolean pQueryByCatalog) | 
| Methods inherited from class atg.droplet.EmptyFormHandler | 
|---|
| afterGet | 
| 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 | 
|---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String DEFAULT_CATALOG_PROPERTY
public static final java.lang.String DEFAULT_CATALOG_ITEMS_CATALOG_PROPERTY
protected java.lang.String[] mCatalogs
| Constructor Detail | 
|---|
public CatalogSearchFormHandler()
| Method Detail | 
|---|
public void setCatalogItemsCatalogProperty(java.lang.String pCatalogItemsCatalogProperty)
public java.lang.String getCatalogItemsCatalogProperty()
public void setCatalogPropertyName(java.lang.String pCatalogPropertyName)
public java.lang.String getCatalogPropertyName()
public void setNullCatalogMeansNoResults(boolean pNullCatalogMeansNoResults)
public boolean isNullCatalogMeansNoResults()
public void setQueryByCatalog(boolean pQueryByCatalog)
public boolean isQueryByCatalog()
public java.lang.String[] getCatalogs()
public void setCatalogs(java.lang.String[] pCatalogs)
pCatalogs - the array of catalog IDs
protected Query generateSearchQuery(Repository pRepository,
                                    java.lang.String pItemType,
                                    QueryBuilder pQueryBuilder)
                             throws DropletFormException,
                                    RepositoryException
generateSearchQuery in class SearchFormHandlerpRepository - The repository being searchpItemType - the type of item to search for. Typically corresponds to an
 item descriptor name in the catalog repositorypQueryBuilder - the builder that should be used to construct the query
RepositoryException - if an error occured while forming the query
DropletFormException
protected Query generateCatalogQueryClause(QueryBuilder pQueryBuilder,
                                           Query pQuery,
                                           java.lang.Object pCatalog)
                                    throws RepositoryException
pQueryBuilder - query builderpQuery - querypCatalog - catalog object
RepositoryException
protected Query generateCatalogsQueryClause(QueryBuilder pQueryBuilder,
                                            Query pQuery,
                                            java.lang.String[] pCatalogIds)
                                     throws RepositoryException
pQueryBuilder - query builderpQuery - querypCatalogIds - array of catalog IDs to filter by
RepositoryExceptionprotected java.lang.Object getCurrentCatalog()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||