|
||||||||||
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.adc.pipeline.ADCPipelineProcessor
atg.adc.pipeline.PatternMappingProcessor
atg.projects.store.recommendations.processor.SetSearchTermProcessor
public class SetSearchTermProcessor
This processor knows where to look up for the search term in the search
results page request and stores corresponding search keyword into
ADCRequestData
object for the use in the remaining pipeline processors.
The processor extends the atg.adc.pipeline.PatternMappingProcessor
that gives the possibility to lookup URL parameter value for the configured
set of pages. If the URL of the requested page matches an entry in the
configured searchResultsPages
property, the product ID is taken from a query
parameter named in the categoryIdQueryArgs
property.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
PERFORM_OPERATION_NAME
|
Fields inherited from class atg.adc.pipeline.ADCPipelineProcessor |
---|
MADE_CHANGE, NO_CHANGE |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.service.pipeline.PipelineProcessor |
---|
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK |
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 | |
---|---|
SetSearchTermProcessor()
|
Method Summary | |
---|---|
void |
doStartService()
Initializes searchResultsPagePatterns property with
compiled page patterns corresponding to searchResultsPages
list. |
protected java.lang.String |
findQueryArgument(atg.servlet.DynamoHttpServletRequest pRequest,
java.lang.String[] pQueryArgs)
Looks for query arguments in request. |
protected java.lang.String |
findSearchKeyword(atg.adc.pipeline.ADCPipelineArgs pArgs)
Finds the search keyword in the query arguments in the request. |
atg.core.util.PagePattern[] |
getSearchResultsPagePatterns()
Gets compiled search results page patterns |
java.lang.String[] |
getSearchResultsPages()
Gets search results pages |
atg.service.cache.Cache |
getSearchResultsPagesCache()
Gets the search results pages cache |
java.lang.String[] |
getSearchTermQueryArgs()
Gets search term query arguments |
boolean |
pathMatchesPattern(java.lang.String pPath,
atg.core.util.PagePattern[] pPatterns,
atg.service.cache.Cache pCache)
This method will determine if the given path fits one of the patterns. |
void |
setSearchResultsPagePatterns(atg.core.util.PagePattern[] pSearchResultsPagePatterns)
Sets compiled search results page patterns |
void |
setSearchResultsPages(java.lang.String[] pSearchResultsPages)
Sets search results pages |
void |
setSearchResultsPagesCache(atg.service.cache.Cache pSearchResultsPagesCache)
Sets the search results pages cache |
void |
setSearchTermQueryArgs(java.lang.String[] pSearchTermQueryArgs)
Sets search term query arguments |
int |
updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
Stores the search keyword in the ADCRequestData. |
Methods inherited from class atg.adc.pipeline.PatternMappingProcessor |
---|
createPatternMappings, findMappingForPath |
Methods inherited from class atg.adc.pipeline.ADCPipelineProcessor |
---|
getRetCodes, isEnabled, runProcess, setEnabled |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, 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 |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String PERFORM_OPERATION_NAME
Constructor Detail |
---|
public SetSearchTermProcessor()
Method Detail |
---|
public java.lang.String[] getSearchResultsPages()
public void setSearchResultsPages(java.lang.String[] pSearchResultsPages)
pSearchResultsPages
- the array of search results pagespublic atg.service.cache.Cache getSearchResultsPagesCache()
public void setSearchResultsPagesCache(atg.service.cache.Cache pSearchResultsPagesCache)
pSearchResultsPagesCache
- the search results pages cachepublic atg.core.util.PagePattern[] getSearchResultsPagePatterns()
public void setSearchResultsPagePatterns(atg.core.util.PagePattern[] pSearchResultsPagePatterns)
pSearchResultsPagePatterns
- the compiled search results page patternspublic java.lang.String[] getSearchTermQueryArgs()
public void setSearchTermQueryArgs(java.lang.String[] pSearchTermQueryArgs)
pSearchTermQueryArgs
- the search term query argumentspublic void doStartService() throws atg.nucleus.ServiceException
searchResultsPagePatterns
property with
compiled page patterns corresponding to searchResultsPages
list.
doStartService
in class atg.nucleus.GenericService
atg.nucleus.ServiceException
- if the Service had a problem starting uppublic int updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
searchResultsPages
patterns then the current request is searched for to see if
the page has a query parameter specified in searchTermQueryArgs
If query parameter is found the corresponding search keyword is stored in
the ADCRequestData.
updateADCData
in class atg.adc.pipeline.ADCPipelineProcessor
pArgs
- The pipeline arguments
protected java.lang.String findSearchKeyword(atg.adc.pipeline.ADCPipelineArgs pArgs)
searchResultsPages
,
each argument name in searchTermQueryArgs
is checked until
something is found.
pArgs
- The pipeline arguments
protected java.lang.String findQueryArgument(atg.servlet.DynamoHttpServletRequest pRequest, java.lang.String[] pQueryArgs)
pRequest
- the request in which query arguments will be looked forpQueryArgs
- the array of arguments to be looked in request
pQueryArgs
that is found in the request or
null if none of them are found.public boolean pathMatchesPattern(java.lang.String pPath, atg.core.util.PagePattern[] pPatterns, atg.service.cache.Cache pCache) throws java.lang.Exception
pPath
- The url to search forpPatterns
- The url patternspCache
- Cached results of previous paths
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |