|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.servlet.pipeline.PipelineableServletImpl atg.servlet.pipeline.InsertableServletImpl atg.search.servlet.SearchClickThroughServlet
public class SearchClickThroughServlet
This class is used to create components for inserting into servlet pipeline to get search click identifier (query id and document id) from the request. After getting searchClickId value and parsing it into queryId and documentId values it perform lookup for document and cacheElement objects in cache/history components. In case of all objects where found, we can treat such activity as a successful click-through action and fire SearchClickThroughMessage JMS event with required information.
Component is implemented to proceed only with configured list of page URLs and configured request parameter names.
Enabled property controls whether servlet should process request or transfer its execution to the next one in a chain. SearchClickIdQueryArgs property contains query parameter names which we will look for searchClickId value in request. ClickThroughPages property controls the list of pages which will be processed by servlet and we will look for searchClickIdQueryArgs for them. Wildcard characters can be used. If this property is null, then searchClickIdQueryArgs are looked for all pages.
The use of the clickThroughPages configuration is shown in the following example:
clickThroughPages=/*/*/productDetailWithPicker.jsp,/*/*/productDetail.jsp,/*/*/giftCertificateProduct.jsp,/*/facet/facetGlossary.jsp
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
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 | |
---|---|
SearchClickThroughServlet()
|
Method Summary | |
---|---|
void |
doStartService()
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
java.lang.String |
findQueryArgument(DynamoHttpServletRequest pRequest,
java.lang.String[] pQueryArgs)
Return the first pQueryArgs that is found in the request. |
Cache |
getClickThroughPageCache()
Returns clickThroughPageCache property. |
protected PagePattern[] |
getClickThroughPagePatterns()
Returns clickThroughPagePatterns property compiled from the elements in the clickThroughPages property. |
java.lang.String[] |
getClickThroughPages()
Returns clickThroughPages property. |
java.lang.String |
getHistoryComponentPath()
Returns historyComponentPath property. |
java.lang.String |
getSearchClickIdDelimiter()
Returns searchClickIdDelimiter property. |
java.lang.String[] |
getSearchClickIdQueryArgs()
Returns searchClickIdQueryArgs property. |
atg.search.events.SearchMessageSource |
getSearchMessageSource()
Returns searchMessageSource property. |
java.lang.String |
getSearchQueryCachePath()
Returns searchQueryCachePath property. |
boolean |
isEnabled()
Returns property 'enabled' which specifies whether servlet should process request |
boolean |
pathMatchesPattern(java.lang.String pPath,
PagePattern[] pPatterns,
Cache pCache)
This method will determine if the given path fits one of the patterns. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The service method looks for the searchClickId parameter value in request. |
void |
setClickThroughPageCache(Cache pClickThroughPageCache)
Sets clickThroughPageCache property. |
protected void |
setClickThroughPagePatterns(PagePattern[] pClickThroughPagePatterns)
Sets clickThroughPagePatterns property compiled from the elements in the clickThroughPages property. |
void |
setClickThroughPages(java.lang.String[] pClickThroughPages)
Sets clickThroughPages property. |
void |
setEnabled(boolean pEnabled)
Sets property 'enabled' which specifies whether servlet should process request |
void |
setHistoryComponentPath(java.lang.String pHistoryComponentPath)
Sets historyComponentPath property. |
void |
setSearchClickIdDelimiter(java.lang.String pSearchClickIdDelimiter)
Sets searchClickIdDelimiter property. |
void |
setSearchClickIdQueryArgs(java.lang.String[] pSearchClickIdQueryArgs)
Sets searchClickIdQueryArgs property. |
void |
setSearchMessageSource(atg.search.events.SearchMessageSource pSearchMessageSource)
Sets searchMessageSource property. |
void |
setSearchQueryCachePath(java.lang.String pSearchQueryCachePath)
Sets searchQueryCachePath property. |
Methods inherited from class atg.servlet.pipeline.InsertableServletImpl |
---|
getInsertAfterServlet, setInsertAfterServlet |
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
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 atg.servlet.pipeline.PipelineableServlet |
---|
getNextServlet, passRequest, setNextServlet |
Methods inherited from interface javax.servlet.Servlet |
---|
destroy, getServletConfig, getServletInfo, init, service |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public SearchClickThroughServlet()
Method Detail |
---|
public void setSearchClickIdQueryArgs(java.lang.String[] pSearchClickIdQueryArgs)
pSearchClickIdQueryArgs
- New value for searchClickIdQueryArgs
propertypublic java.lang.String[] getSearchClickIdQueryArgs()
public void setClickThroughPages(java.lang.String[] pClickThroughPages)
pClickThroughPages
- New value for clickThroughPages propertypublic java.lang.String[] getClickThroughPages()
protected void setClickThroughPagePatterns(PagePattern[] pClickThroughPagePatterns)
pClickThroughPagePatterns
- New value for clickThroughPagePatterns propertyprotected PagePattern[] getClickThroughPagePatterns()
public void setClickThroughPageCache(Cache pClickThroughPageCache)
pClickThroughPageCache
- New value for clickThroughPageCache propertypublic Cache getClickThroughPageCache()
public void setEnabled(boolean pEnabled)
pEnabled
- New value for property 'enabled'public boolean isEnabled()
public java.lang.String getSearchClickIdDelimiter()
public void setSearchClickIdDelimiter(java.lang.String pSearchClickIdDelimiter)
pSearchClickIdDelimiter
- New value for searchClickIdDelimiter
propertypublic void setSearchQueryCachePath(java.lang.String pSearchQueryCachePath)
pSearchQueryCachePath
- New value for searchQueryCachePath propertypublic java.lang.String getSearchQueryCachePath()
public void setHistoryComponentPath(java.lang.String pHistoryComponentPath)
pHistoryComponentPath
- New value for historyComponentPath propertypublic java.lang.String getHistoryComponentPath()
public void setSearchMessageSource(atg.search.events.SearchMessageSource pSearchMessageSource)
pSearchMessageSource
- New value for searchMessageSource propertypublic atg.search.events.SearchMessageSource getSearchMessageSource()
public void doStartService() throws ServiceException
doStartService
in class InsertableServletImpl
ServiceException
- if the Service had a problem
starting uppublic boolean pathMatchesPattern(java.lang.String pPath, PagePattern[] pPatterns, Cache pCache) throws java.lang.Exception
pPath
- The URL to search forpPatterns
- The URL patternspCache
- Cached results of previous paths
java.lang.Exception
public java.lang.String findQueryArgument(DynamoHttpServletRequest pRequest, java.lang.String[] pQueryArgs)
pQueryArgs
that is found in the request.
Return null if none of them are found.
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class PipelineableServletImpl
pRequest
- The request to be processed.pResponse
- Response object for this request.
javax.servlet.ServletException
- An application specific error
occurred processing this request.
java.io.IOException
- An error occurred reading data from the request
or writing data to the response.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |