|
||||||||||
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.commerce.csr.search.SearchFormHandler
atg.commerce.csr.search.OrderSearchFormHandler
public class OrderSearchFormHandler
This OrderSearchFormHandler class is a subclass of SearchFormhandler and is used to search order on order repository and other order related repositories( Profile, Catalog). The class builds a Query object and generates search resultset
Example jhtml usage (as a FormHandler):
<FORM method="POST" action="searchresults.jhtml"> Profile ID: <input type=hidden bean="RepositorySearchForm.SearchAttributes[1].Name" value="profileId"> <input type=hidden bean="RepositorySearchForm.SearchAttributes[1].Method" value="0"> <input type=hidden bean="RepositorySearchForm.SearchAttributes[1].CaseSensitive" value="0"> <select bean="RepositorySearchForm.SearchAttributes[1].Relation"> <option value="=="> == <option value="!="> != <option value="<"> < <option value=">"> > <option value="<="> <= <option value=">="> >= </select> <input type="text" bean="RepositorySearchForm.SearchAttributes[1].Values" value=""> </td> <input type="submit" bean="RepositorySearchForm.Search" value="Search"> </FORM>
Field Summary | |
---|---|
protected static int |
CATALOG_SEARCH_METHOD
|
protected static java.lang.String |
CATALOG_SEARCH_RELATION
|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static int |
PROFILE_SEARCH_METHOD
|
Fields inherited from class atg.commerce.csr.search.SearchFormHandler |
---|
DIR_ASCENDING_STRING, DIR_DESCENDING_STRING, OUTPUT, SEARCHFORMRESOURCES, sResourceBundle |
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 | |
---|---|
OrderSearchFormHandler()
|
Method Summary | |
---|---|
void |
clearSearchResults()
Clears the window-scoped search results form handler in preparation for a new call by clearing search criteria, results and any related data specific to the previous search. |
protected atg.repository.Repository |
findLocaleCatalogRepository(atg.servlet.DynamoHttpServletRequest request)
------------------------------------- findLocaleRepository Use user's current locale to find the right catalog repository to search |
protected atg.repository.Query |
generateRepositorySearchQuery(atg.servlet.DynamoHttpServletRequest request,
atg.servlet.DynamoHttpServletResponse response,
SearchAttribute[] pSearchAttributes,
SearchAttribute pOrderSearchAttribute,
atg.repository.Repository pRepository,
java.lang.String pViewName)
generate the order search Query on order related repository (profile or catalog) |
protected atg.repository.Query |
generateSearchQuery(atg.servlet.DynamoHttpServletRequest request,
atg.servlet.DynamoHttpServletResponse response)
generate the search Query |
atg.repository.Repository |
getCatalogRepository()
Returns Catalog Repository which is being queried |
SearchAttribute |
getCatalogSearchAttribute(int pIndex)
Returns Catalog SearchAttribute by which the search is done |
SearchAttribute[] |
getCatalogSearchAttributes()
Returns Catalog SearchAttributes by which the search is done |
java.lang.String |
getCatalogSearchProperty()
|
java.lang.String |
getCatalogSearchViewName()
|
atg.commerce.catalog.CatalogTools |
getCatalogTools()
Returns property catalogTools. |
int |
getMaxProfileResults()
|
java.lang.String |
getProfileIdProperty()
|
java.lang.String |
getProfileProperty()
|
atg.repository.Repository |
getProfileRepository()
Returns profile Repository which is being queried |
SearchAttribute |
getProfileSearchAttribute(int pIndex)
Returns SearchAttribute by which the search is done |
SearchAttribute[] |
getProfileSearchAttributes()
Returns SearchAttributes by which the search is done |
java.lang.String |
getProfileSearchViewName()
|
boolean |
getSearchOnCatalog()
Returns mSearchOnCatalog |
boolean |
getSearchOnProfile()
Returns mSearchOnProfile |
boolean |
isAssumeSingleDataSource()
If true, an order query that contains profile constraints will be executed as a single compound query. |
void |
setAssumeSingleDataSource(boolean pAssumeSingleDataSource)
If true, an order query that contains profile constraints will be executed as a single compound query. |
void |
setCatalogRepository(atg.repository.Repository pRepository)
Sets Catalog Repository which is being queried |
void |
setCatalogSearchableAttributeNum(int pCatalogSearchableAttributeNum)
Sets property mCatalogSearchableAttributeNum |
void |
setCatalogSearchAttribute(int pIndex,
SearchAttribute pSearchAttribute)
Sets Catalog SearchAttribute by which the search is done |
void |
setCatalogSearchAttributes(SearchAttribute[] pSearchAttributes)
Sets SearchAttributes by which the search is done |
void |
setCatalogSearchProperty(java.lang.String catalogSearchProperty)
|
void |
setCatalogSearchViewName(java.lang.String catalogSearchViewName)
|
void |
setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
Sets property catalogTools. |
void |
setMaxProfileResults(int maxProfileResults)
|
void |
setProfileIdProperty(java.lang.String profileIdProperty)
|
void |
setProfileProperty(java.lang.String profileProperty)
|
void |
setProfileRepository(atg.repository.Repository pRepository)
Sets profile Repository which is being queried |
void |
setProfileSearchableAttributeNum(int pProfileSearchableAttributeNum)
Sets property mProfileSearchableAttributeNum |
void |
setProfileSearchAttribute(int pIndex,
SearchAttribute pSearchAttribute)
Sets ProfileSearchAttribute by which the search is done |
void |
setProfileSearchAttributes(SearchAttribute[] pSearchAttributes)
Sets SearchAttributes by which the search is done |
void |
setProfileSearchViewName(java.lang.String profileSearchViewName)
|
void |
setSearchOnCatalog(boolean pSearchOnCatalog)
Sets mSearchOnCatalog |
void |
setSearchOnProfile(boolean pSearchOnProfile)
Sets mSearchOnProfile |
protected boolean |
validateSearchCriteria(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
validateSearchCriteria |
Methods inherited from class atg.droplet.GenericFormHandler |
---|
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
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 |
Methods inherited from interface javax.servlet.Servlet |
---|
destroy, getServletConfig, getServletInfo, init, service |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final int PROFILE_SEARCH_METHOD
protected static final int CATALOG_SEARCH_METHOD
protected static final java.lang.String CATALOG_SEARCH_RELATION
Constructor Detail |
---|
public OrderSearchFormHandler()
Method Detail |
---|
public void setProfileRepository(atg.repository.Repository pRepository)
pRepository
- the order Repository which is being queriedpublic atg.repository.Repository getProfileRepository()
public void setSearchOnProfile(boolean pSearchOnProfile)
pSearchOnProfile
- boolean determining whether to search on a profilepublic boolean getSearchOnProfile()
public void setCatalogRepository(atg.repository.Repository pRepository)
pRepository
- the Catalog Repository which is being queriedpublic atg.repository.Repository getCatalogRepository()
public void setSearchOnCatalog(boolean pSearchOnCatalog)
pSearchOnCatalog
- a boolean determining whether to search the catalog repositorypublic boolean getSearchOnCatalog()
public void setProfileSearchAttributes(SearchAttribute[] pSearchAttributes)
pSearchAttributes
- the SearchAttributes by which the search is donepublic SearchAttribute[] getProfileSearchAttributes()
public void setProfileSearchAttribute(int pIndex, SearchAttribute pSearchAttribute)
public SearchAttribute getProfileSearchAttribute(int pIndex)
public boolean isAssumeSingleDataSource()
public void setAssumeSingleDataSource(boolean pAssumeSingleDataSource)
pAssumeSingleDataSource
- The boolean value.public void setCatalogSearchAttributes(SearchAttribute[] pSearchAttributes)
pSearchAttributes
- the SearchAttributes by which the search is donepublic SearchAttribute[] getCatalogSearchAttributes()
public void setCatalogSearchAttribute(int pIndex, SearchAttribute pSearchAttribute)
public SearchAttribute getCatalogSearchAttribute(int pIndex)
public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
pCatalogTools
- the property to store the global service catalog tools factory to
obtain the catalog to search in.public atg.commerce.catalog.CatalogTools getCatalogTools()
public void setCatalogSearchableAttributeNum(int pCatalogSearchableAttributeNum)
pCatalogSearchableAttributeNum
- the property to storepublic void setProfileSearchableAttributeNum(int pProfileSearchableAttributeNum)
pProfileSearchableAttributeNum
- the property to storeprotected atg.repository.Repository findLocaleCatalogRepository(atg.servlet.DynamoHttpServletRequest request)
request
-
protected atg.repository.Query generateSearchQuery(atg.servlet.DynamoHttpServletRequest request, atg.servlet.DynamoHttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
generateSearchQuery
in class SearchFormHandler
request
- response
-
javax.servlet.ServletException
java.io.IOException
protected atg.repository.Query generateRepositorySearchQuery(atg.servlet.DynamoHttpServletRequest request, atg.servlet.DynamoHttpServletResponse response, SearchAttribute[] pSearchAttributes, SearchAttribute pOrderSearchAttribute, atg.repository.Repository pRepository, java.lang.String pViewName) throws javax.servlet.ServletException, java.io.IOException
request
- response
- pSearchAttributes
- pOrderSearchAttribute
- pRepository
- pViewName
-
javax.servlet.ServletException
java.io.IOException
protected boolean validateSearchCriteria(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
validateSearchCriteria
in class SearchFormHandler
pRequest
- pResponse
-
javax.servlet.ServletException
java.io.IOException
public int getMaxProfileResults()
public void setMaxProfileResults(int maxProfileResults)
public java.lang.String getProfileIdProperty()
public void setProfileIdProperty(java.lang.String profileIdProperty)
public java.lang.String getProfileProperty()
public void setProfileProperty(java.lang.String profileProperty)
public java.lang.String getProfileSearchViewName()
public void setProfileSearchViewName(java.lang.String profileSearchViewName)
public java.lang.String getCatalogSearchProperty()
public void setCatalogSearchProperty(java.lang.String catalogSearchProperty)
public java.lang.String getCatalogSearchViewName()
public void setCatalogSearchViewName(java.lang.String catalogSearchViewName)
public void clearSearchResults()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |