atg.targeting
Class TargetingServices

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.targeting.TargetingServices
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class TargetingServices
extends GenericService

A collection of services that execute targeters and return Repo2XML items


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
TargetingServices()
           
 
Method Summary
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath, int pMaxNumber)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath, int pStartingIndex, int pEndingIndex)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath, int pStartingIndex, int pEndingIndex, java.lang.String pMappingFile)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath, int pMaxNumber, java.lang.String pMappingFile)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath, java.lang.String pMappingFile)
          Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items.
 atg.repository.xml.ItemDescriptorMappingManager getMappingManager()
          Get property MappingManager
 TargetingSourceMap getTargetingSourceMap()
          Get property TargetingSourceMap
 GetService getXmlGetService()
          Get property XmlGetService
 boolean isUseDefaultMappings()
          Get property UseDefaultMappings DEFAULT: true
 void setMappingManager(atg.repository.xml.ItemDescriptorMappingManager pMappingManager)
          Set property MappingManager
 void setTargetingSourceMap(TargetingSourceMap pTargetingSourceMap)
          Set property TargetingSourceMap
 void setUseDefaultMappings(boolean pUseDefaultMappings)
          Set property UseDefaultMappings DEFAULT: true
 void setXmlGetService(GetService pXmlGetService)
          Set property XmlGetService
 
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, 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

Constructor Detail

TargetingServices

public TargetingServices()
Method Detail

setXmlGetService

public void setXmlGetService(GetService pXmlGetService)
Set property XmlGetService

Parameters:
pXmlGetService - the service that turns a RepositoryItem into an XML file

getXmlGetService

public GetService getXmlGetService()
Get property XmlGetService

Returns:
the service that turns a RepositoryItem into an XML file

setMappingManager

public void setMappingManager(atg.repository.xml.ItemDescriptorMappingManager pMappingManager)
Set property MappingManager

Parameters:
pMappingManager - the service that controls mapping files for all item descriptors

getMappingManager

public atg.repository.xml.ItemDescriptorMappingManager getMappingManager()
Get property MappingManager

Returns:
the service that controls mapping files for all item descriptors

setUseDefaultMappings

public void setUseDefaultMappings(boolean pUseDefaultMappings)
Set property UseDefaultMappings DEFAULT: true

Parameters:
pUseDefaultMappings - true if services that return Repo2Xml items should use default mapping files supplied by the ItemMappingManager configured for this component. This property is ignored if a mapping file is explicitly passed to the service

isUseDefaultMappings

public boolean isUseDefaultMappings()
Get property UseDefaultMappings DEFAULT: true

Returns:
true if services that return Repo2Xml items should use default mapping files supplied by the ItemMappingManager configured for this component. This property is ignored if a mapping file is explicitly passed to the service

setTargetingSourceMap

public void setTargetingSourceMap(TargetingSourceMap pTargetingSourceMap)
Set property TargetingSourceMap

Parameters:
pTargetingSourceMap -

getTargetingSourceMap

public TargetingSourceMap getTargetingSourceMap()
Get property TargetingSourceMap

Returns:

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
pMappingFile - the mapping file to use when turning the item into an XML document
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath,
                                                    java.lang.String pMappingFile)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath,
                                                    int pMaxNumber)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
pMaxNumber - the maximum number of elements to return
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath,
                                                    int pMaxNumber,
                                                    java.lang.String pMappingFile)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
pMaxNumber - the maximum number of elements to return
pMappingFile - the mapping file to use when turning the item into an XML document
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath,
                                                    int pStartingIndex,
                                                    int pEndingIndex)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
pMaxNumber - the maximum number of elements to return
pStartingIndex - if items are returned from the targeter, the index of the result that should be the first item in the result set
pEndingIndex - if items are returned, the index of the result that should be the last item in the result set
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items

executeRepositoryTargeter

public java.lang.String[] executeRepositoryTargeter(java.lang.String pTargeterPath,
                                                    int pStartingIndex,
                                                    int pEndingIndex,
                                                    java.lang.String pMappingFile)
                                             throws atg.targeting.TargetingException,
                                                    GetException
Executes the repository targeter that exists at pTargeterPath in the config layer, and returns the results as Repo2XML items. If this targeter is called in the context or a request, then that request is used to resolve and execute the targeter, so that any session or request scoped components referenced (e.g. Profile) can be resolved properly

Parameters:
pTargeterPath - the nucleus path of the targeter to execute
pMaxNumber - the maximum number of elements to return
pStartingIndex - if items are returned from the targeter, the index of the result that should be the first item in the result set
pEndingIndex - if items are returned, the index of the result that should be the last item in the result set
pMappingFile - the mapping file to use when turning the item into an XML document
Returns:
an array of Repo2XML items that satisfy the given targeter.
Throws:
TargetingException - if a targeting error occurs
GetException - if an error occurs turning the results into Repo2XML items