atg.search.cache.droplet
Class GetClickThroughId

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.search.cache.droplet.GetClickThroughId
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class GetClickThroughId
extends DynamoServlet

This droplet is used to form search click identifier based on the search result. It also puts documents into the query cache to access them faster. The identifier has form [query identifier][delimiter][document identifier]. Droplet would normally be used within a loop that iterates through the search results.

Configurable properties:

Input parameters:

Output parameters:

Open parameters:

The use of the droplet is shown in the following example:

 <dsp:importbean bean="/atg/search/droplet/GetClickThroughId"/>
 <dsp:droplet name="GetClickThroughId">
   <dsp:param name="result" value="${searchResult}"/>
   <dsp:oparam name="output">
     <dsp:a href="/path/to/productDetail.jsp">
       <dsp:param name="searchClickId" param="${searchClickId}"
     </dsp:a>
   </dsp:oparam>
 </dsp:droplet>
 


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_SEARCH_CLICK_ID_PARAM_NAME
          The default name for search click id parameter.
static java.lang.String DEFAULT_SEARCH_RESULT_PARAM_NAME
          The default name for search result parameter used to get required data.
static ParameterName OUTPUT
          Output parameter's name.
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
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
GetClickThroughId()
           
 
Method Summary
 java.lang.String getSearchClickIdDelimiter()
          Gets property searchClickIdDelimiter.
 java.lang.String getSearchClickIdParameter()
          Gets property searchClickIdParameter.
 java.lang.String getSearchQueryCachePath()
          Gets property searchQueryCachePath.
 java.lang.String getSearchResultParameter()
          Gets property searchResultParameter.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Retrieves query id and document object from input parameters and caches the document for later use.
 void setSearchClickIdDelimiter(java.lang.String pSearchClickIdDelimiter)
          Sets property searchClickIdDelimiter.
 void setSearchClickIdParameter(java.lang.String pSearchClickIdParameter)
          Sets property searchClickIdParameter.
 void setSearchQueryCachePath(java.lang.String pSearchQueryCachePath)
          Sets property searchQueryCachePath.
 void setSearchResultParameter(java.lang.String pSearchResultParameter)
          Sets property searchResultParameter.
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


DEFAULT_SEARCH_RESULT_PARAM_NAME

public static final java.lang.String DEFAULT_SEARCH_RESULT_PARAM_NAME
The default name for search result parameter used to get required data.

See Also:
Constant Field Values

DEFAULT_SEARCH_CLICK_ID_PARAM_NAME

public static final java.lang.String DEFAULT_SEARCH_CLICK_ID_PARAM_NAME
The default name for search click id parameter.

See Also:
Constant Field Values

OUTPUT

public static final ParameterName OUTPUT
Output parameter's name.

Constructor Detail

GetClickThroughId

public GetClickThroughId()
Method Detail

getSearchResultParameter

public java.lang.String getSearchResultParameter()
Gets property searchResultParameter. This property contains name of the input parameter, which represent current search result object.

Returns:
Name of search result parameter.

setSearchResultParameter

public void setSearchResultParameter(java.lang.String pSearchResultParameter)
Sets property searchResultParameter. This property contains name of the input parameter, which represent current search result object.

Parameters:
pSearchResultParameter - Name of search result parameter.

getSearchClickIdParameter

public java.lang.String getSearchClickIdParameter()
Gets property searchClickIdParameter. This property contains name of the output parameter, which represent generated search click identifier.

Returns:
Name of search click id parameter.

setSearchClickIdParameter

public void setSearchClickIdParameter(java.lang.String pSearchClickIdParameter)
Sets property searchClickIdParameter. This property contains name of the output parameter, which represent generated search click identifier.

Parameters:
pSearchClickIdParameter - Name of search click id parameter.

getSearchQueryCachePath

public java.lang.String getSearchQueryCachePath()
Gets property searchQueryCachePath. This property contains nucleus path to search query cache.

Returns:
Nucleus path to search query cache component.

setSearchQueryCachePath

public void setSearchQueryCachePath(java.lang.String pSearchQueryCachePath)
Sets property searchQueryCachePath. This property contains nucleus path to search query cache.

Parameters:
pSearchQueryCachePath - Nucleus path to search query cache component.

getSearchClickIdDelimiter

public java.lang.String getSearchClickIdDelimiter()
Gets property searchClickIdDelimiter. This property contains delimiter character to separate the query ID from the document ID.

Returns:
Delimiter which is used to delimit parts of the search click id.

setSearchClickIdDelimiter

public void setSearchClickIdDelimiter(java.lang.String pSearchClickIdDelimiter)
Sets property searchClickIdDelimiter. This property contains delimiter character to separate the query ID from the document ID.

Parameters:
pSearchClickIdDelimiter - Delimiter which is used to delimit parts of the search click id.

service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Retrieves query id and document object from input parameters and caches the document for later use. Current search result object is expected as input parameter. Search click identifier is expected as output parameter.

Overrides:
service in class DynamoServlet
Parameters:
pRequest - The request to be processed.
pResponse - Response object for this request.
Throws:
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.