atg.search.query.config
Class SearchConfigurationRequestProcessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.search.query.config.SearchConfigurationRequestProcessor
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, SearchRequestProcessor, java.util.EventListener

public class SearchConfigurationRequestProcessor
extends GenericService
implements SearchRequestProcessor

This class implements the search request processor interface to allow it to be called from the search QueryFormHandler. It will add search configuration details to a search request. It also provides support for the search testing feature and can set the full rank-config xml in the search request object.


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
SearchConfigurationRequestProcessor()
           
 
Method Summary
 Repository getRefinementRepository()
          Getter method for refinementRepository property.
 java.lang.String getSearchConfigName()
          Getter method for searchConfigName property.
 SearchConfigNameService getSearchConfigNameService()
          Getter method for searchConfigNameService property.
 SearchConfigurationPropertyManager getSearchConfigurationPropertyManager()
          Getter method for SearchConfigurationPropertyManager property.
 SearchConfigurationXMLGenerator getSearchConfigurationXMLGenerator()
          Getter method for searchConfigurationXMLGenerator property.
 boolean isTestingMode()
          Getter method for testingMode property.
 SearchRequest processSearchRequest(SearchRequest pSearchRequest, DynamoHttpServletRequest pDynamoRequest, java.lang.Object pCallback)
          Called from search form handler to modify the request to include parameters for search configurations.
 void setRefinementRepository(Repository pRefinementRepository)
          Setter method for refinementRepository property.
 void setSearchConfigName(java.lang.String pSearchConfigName)
          Setter method for searchConfigName property.
 void setSearchConfigNameService(SearchConfigNameService pSearchConfigNameService)
          Setter method for searchConfigNameService property.
 void setSearchConfigurationPropertyManager(SearchConfigurationPropertyManager pSearchConfigurationPropertyManager)
          Setter method for SearchConfigurationPropertyManager property.
 void setSearchConfigurationXMLGenerator(SearchConfigurationXMLGenerator pSearchConfigurationXMLGenerator)
          Setter method for searchConfigurationXMLGenerator property.
 void setTestingMode(boolean pTestingMode)
          Setter method for testingMode property.
 
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
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

SearchConfigurationRequestProcessor

public SearchConfigurationRequestProcessor()
Method Detail

getSearchConfigName

public java.lang.String getSearchConfigName()
Getter method for searchConfigName property.

Returns:
String searchConfig name

setSearchConfigName

public void setSearchConfigName(java.lang.String pSearchConfigName)
Setter method for searchConfigName property.

Parameters:
pSearchConfigName - String search config name

isTestingMode

public boolean isTestingMode()
Getter method for testingMode property. If true then we are running on preview or search testing and so will need to pass the full rank-config xml in the query if we are using project based assets.

Returns:
boolean testing mode flag

setTestingMode

public void setTestingMode(boolean pTestingMode)
Setter method for testingMode property.

Parameters:
pTestingMode - boolean flag for testing mode

getSearchConfigNameService

public SearchConfigNameService getSearchConfigNameService()
Getter method for searchConfigNameService property.

Returns:
SearchConfigNameService search config name service

setSearchConfigNameService

public void setSearchConfigNameService(SearchConfigNameService pSearchConfigNameService)
Setter method for searchConfigNameService property.

Parameters:
pSearchConfigNameService - SearchConfigNameService reference to use

getSearchConfigurationXMLGenerator

public SearchConfigurationXMLGenerator getSearchConfigurationXMLGenerator()
Getter method for searchConfigurationXMLGenerator property.

Returns:
SearchConfigurationXMLGenerator SearchConfigurationXMLGenerator reference

setSearchConfigurationXMLGenerator

public void setSearchConfigurationXMLGenerator(SearchConfigurationXMLGenerator pSearchConfigurationXMLGenerator)
Setter method for searchConfigurationXMLGenerator property.

Parameters:
pSearchConfigurationXMLGenerator - SearchConfigurationXMLGenerator reference to use

getRefinementRepository

public Repository getRefinementRepository()
Getter method for refinementRepository property.

Returns:
Repository Refinement repository reference

setRefinementRepository

public void setRefinementRepository(Repository pRefinementRepository)
Setter method for refinementRepository property.

Parameters:
pRefinementRepository - Refinement repository reference to use

getSearchConfigurationPropertyManager

public SearchConfigurationPropertyManager getSearchConfigurationPropertyManager()
Getter method for SearchConfigurationPropertyManager property.

Returns:
SearchConfigurationPropertyManager SearchConfigurationPropertyManager reference

setSearchConfigurationPropertyManager

public void setSearchConfigurationPropertyManager(SearchConfigurationPropertyManager pSearchConfigurationPropertyManager)
Setter method for SearchConfigurationPropertyManager property.

Parameters:
pSearchConfigurationPropertyManager - SearchConfigurationPropertyManager reference to use

processSearchRequest

public SearchRequest processSearchRequest(SearchRequest pSearchRequest,
                                          DynamoHttpServletRequest pDynamoRequest,
                                          java.lang.Object pCallback)
                                   throws atg.search.client.SearchClientException
Called from search form handler to modify the request to include parameters for search configurations. This method will try to populate either a rank-config (search config) name or then entire rank-config xml as a parameter of the query. If the search config name property of this component is set then that is the search config that will be used for the query. Otherwise the SearchConfigNameService component will be called to determine the name. The full rank-config xml will be used if this component is running in testing mode (i.e. isTestingMode() returns true) and the form handler is using project based assets (i.e. ((BaseSearchFormHandler)pCallback).isForceDeployedAssets() is true) This will typically be the case when this component is used in the search testing feature of MerchUI or from the Preview server.

Specified by:
processSearchRequest in interface SearchRequestProcessor
Parameters:
pSearchRequest - SearchRequest object containing the query parameters to populate.
pDynamoRequest - DynamoHttpServletRequest object for the current request.
pCallback - Callback object to the form handler that called this method.
Throws:
atg.search.client.SearchClientException