public class SetSearchTermProcessor
extends atg.adc.pipeline.PatternMappingProcessor
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.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
PERFORM_OPERATION_NAME |
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
Constructor and Description |
---|
SetSearchTermProcessor() |
Modifier and Type | Method and Description |
---|---|
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.AbstractCache |
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.AbstractCache 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.AbstractCache 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.
|
createPatternMappings, findMappingForPath
getRetCodes, isEnabled, runProcess, setEnabled
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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String PERFORM_OPERATION_NAME
public java.lang.String[] getSearchResultsPages()
public void setSearchResultsPages(java.lang.String[] pSearchResultsPages)
pSearchResultsPages
- the array of search results pagespublic atg.service.cache.AbstractCache getSearchResultsPagesCache()
public void setSearchResultsPagesCache(atg.service.cache.AbstractCache 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 argumentsprotected java.lang.String findSearchKeyword(atg.adc.pipeline.ADCPipelineArgs pArgs)
searchResultsPages
,
each argument name in searchTermQueryArgs
is checked until
something is found.pArgs
- The pipeline argumentsprotected 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 requestpQueryArgs
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.AbstractCache pCache) throws java.lang.Exception
pPath
- The url to search forpPatterns
- The url patternspCache
- Cached results of previous pathsjava.lang.Exception