atg.repository.search.testing
Class SearchTestingService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.search.testing.SearchTestingService
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, java.util.EventListener
Direct Known Subclasses:
CommerceSearchTestingService

public class SearchTestingService
extends GenericService

This service provide methods for the search testing feature. It provides the list of search environments available for testing and also the sort by properties that have been configured.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  atg.search.multisite.SiteIndexInfoService mSiteIndexInfoService
          Property siteManager
protected  SiteManager mSiteManager
          Property siteManager
 
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
SearchTestingService()
           
 
Method Summary
 java.lang.String[] getAvailableLocaleNames()
          Getter for availableLocaleNames property
 java.util.List<java.util.Locale> getAvailableLocales()
          Method to get the global list of java Locale object that are deemed valid.
 java.util.List<java.util.Locale> getAvailableLocales(SearchTestingEnvironment pEnvironment)
          Returns the list of locales available for a given search environment.
 java.util.List<java.util.Locale> getAvailableLocales(java.lang.String pContentLabel, java.lang.String pTargetType)
          Returns the list of locales available for content label and target type.
 RepositoryItem[] getAvailableSites(java.lang.String pContentLabel, java.lang.String pTargetType)
           
 java.lang.String getDefaultContentLabel()
           
 SearchTestingEnvironment getDefaultSearchEnvironment()
          Gets the default search environment to use for testing
 java.lang.String getDefaultTargetType()
           
protected  java.util.List<java.util.Locale> getIndexedLocales(atg.repository.search.routing.beans.SearchEnvironment pEnvironment)
           
 atg.search.routing.RoutingSystemService getRoutingSystemService()
          Get RoutingSystemService
 SearchTestingEnvironment[] getSearchEnvironments()
          Gets the SearchTestingEnvironments list of search environments available to merchandiser
 atg.search.multisite.SiteIndexInfoService getSiteIndexInfoService()
          The SiteIndexInfoService component that will be used to do the actual assocation lookup.
 SiteManager getSiteManager()
          Return property siteManager
 java.lang.String[] getSortByPropertyNames()
          Getter method for the mSortByPropertyNames property containing the array of indexed property name strings available for sorting search results
 java.lang.String getTestingEnvironmentName(java.lang.String pContentLabel, java.lang.String pTargetType)
          Returns name of the logical partition with content for the given content label, for the given target type
 void setAvailableLocaleNames(java.lang.String[] pAvailableLocaleNames)
          Setter for availableLocaleNames property
 void setDefaultContentLabel(java.lang.String pDefaultContentLabel)
           
 void setDefaultSearchEnvironment(SearchTestingEnvironment pDefaultSearchEnvironment)
          Sets the default search environment to use for testing
 void setDefaultTargetType(java.lang.String pDefaultTargetType)
           
 void setRoutingSystemService(atg.search.routing.RoutingSystemService pRoutingSystemService)
          Set RoutingSystemService
 void setSearchEnvironments(SearchTestingEnvironment[] pSearchEnvironments)
          Sets the SearchTestingEnvironments list of search environments available to merchandiser
 void setSiteIndexInfoService(atg.search.multisite.SiteIndexInfoService pService)
          The SiteIndexInfoService component that will be used to do the actual assocation lookup.
 void setSiteManager(SiteManager pSiteManager)
          Set property siteManager
 void setSortByPropertyNames(java.lang.String[] pSortByPropertyNames)
          Sets the array of indexed property name strings available for sorting search results
 
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 java.lang.String CLASS_VERSION
Class version string


mSiteManager

protected SiteManager mSiteManager
Property siteManager


mSiteIndexInfoService

protected atg.search.multisite.SiteIndexInfoService mSiteIndexInfoService
Property siteManager

Constructor Detail

SearchTestingService

public SearchTestingService()
Method Detail

getRoutingSystemService

public atg.search.routing.RoutingSystemService getRoutingSystemService()
Get RoutingSystemService

Returns:
RoutingSystemService

setRoutingSystemService

public void setRoutingSystemService(atg.search.routing.RoutingSystemService pRoutingSystemService)
Set RoutingSystemService

Parameters:
pRoutingSystemService - RoutingSystemService

getSearchEnvironments

public SearchTestingEnvironment[] getSearchEnvironments()
Gets the SearchTestingEnvironments list of search environments available to merchandiser

Returns:
the SearchTestingEnvironments

setSearchEnvironments

public void setSearchEnvironments(SearchTestingEnvironment[] pSearchEnvironments)
Sets the SearchTestingEnvironments list of search environments available to merchandiser

Parameters:
pSearchEnvironments - list components

getDefaultContentLabel

public java.lang.String getDefaultContentLabel()

setDefaultContentLabel

public void setDefaultContentLabel(java.lang.String pDefaultContentLabel)

getDefaultTargetType

public java.lang.String getDefaultTargetType()

setDefaultTargetType

public void setDefaultTargetType(java.lang.String pDefaultTargetType)

getDefaultSearchEnvironment

public SearchTestingEnvironment getDefaultSearchEnvironment()
Gets the default search environment to use for testing

Returns:
the SearchTestingEnvironment default search environment

setDefaultSearchEnvironment

public void setDefaultSearchEnvironment(SearchTestingEnvironment pDefaultSearchEnvironment)
Sets the default search environment to use for testing

Parameters:
pDefaultSearchEnvironment - SearchTestingEnvironment default search environment to use

getSortByPropertyNames

public java.lang.String[] getSortByPropertyNames()
Getter method for the mSortByPropertyNames property containing the array of indexed property name strings available for sorting search results

Returns:
Array of String indexed property names

setSortByPropertyNames

public void setSortByPropertyNames(java.lang.String[] pSortByPropertyNames)
Sets the array of indexed property name strings available for sorting search results

Parameters:
pSortByPropertyNames - Array of String indexed property names

getAvailableLocaleNames

public java.lang.String[] getAvailableLocaleNames()
Getter for availableLocaleNames property

Returns:
Array of String available locale names

setAvailableLocaleNames

public void setAvailableLocaleNames(java.lang.String[] pAvailableLocaleNames)
Setter for availableLocaleNames property

Parameters:
pAvailableLocaleNames - Array of String available locale names

getSiteManager

public SiteManager getSiteManager()
Return property siteManager

Returns:
SiteManager

setSiteManager

public void setSiteManager(SiteManager pSiteManager)
Set property siteManager

Parameters:
pSiteManager - SiteManager

setSiteIndexInfoService

public void setSiteIndexInfoService(atg.search.multisite.SiteIndexInfoService pService)
The SiteIndexInfoService component that will be used to do the actual assocation lookup.

Parameters:
pService - the index info service

getSiteIndexInfoService

public atg.search.multisite.SiteIndexInfoService getSiteIndexInfoService()
The SiteIndexInfoService component that will be used to do the actual assocation lookup.

Returns:
the index info service

getAvailableLocales

public java.util.List<java.util.Locale> getAvailableLocales()
Method to get the global list of java Locale object that are deemed valid. This global list can be overriden by an environment. For this reason it is better to call the getAvailableLocales(pEnvironment) method instead.

Returns:
List of Locale or null if none defined

getAvailableSites

public RepositoryItem[] getAvailableSites(java.lang.String pContentLabel,
                                          java.lang.String pTargetType)

getAvailableLocales

public java.util.List<java.util.Locale> getAvailableLocales(SearchTestingEnvironment pEnvironment)
Returns the list of locales available for a given search environment. Uses the global locale list if the environment is null or doesn't define its own list.

Parameters:
pEnvironment - SearchTestingEnvironment to check.
Returns:
List of Locale or null if none defined

getAvailableLocales

public java.util.List<java.util.Locale> getAvailableLocales(java.lang.String pContentLabel,
                                                            java.lang.String pTargetType)
Returns the list of locales available for content label and target type. Uses the global locale list if the environment is null or doesn't define its own list.

Returns:
List of Locale or null if none defined

getTestingEnvironmentName

public java.lang.String getTestingEnvironmentName(java.lang.String pContentLabel,
                                                  java.lang.String pTargetType)
Returns name of the logical partition with content for the given content label, for the given target type

Parameters:
contentLabel - the content label
targetType - the target type of the environment
Returns:
name

getIndexedLocales

protected java.util.List<java.util.Locale> getIndexedLocales(atg.repository.search.routing.beans.SearchEnvironment pEnvironment)
                                                      throws atg.search.routing.RoutingInspectException
Throws:
atg.search.routing.RoutingInspectException