atg.projects.store.recommendations.droplet
Class RecommendationAlternativeSiteIdsDroplet

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.projects.store.recommendations.droplet.RecommendationAlternativeSiteIdsDroplet
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, atg.servlet.ParameterServlet, java.util.EventListener, javax.servlet.Servlet

@Service(requiredProperties={"siteGroupManager","siteContextManager"})
public class RecommendationAlternativeSiteIdsDroplet
extends atg.servlet.DynamoServlet

This droplet returns the list of alternative store IDs in the order of preference that will be used to lookup product link, price, etc. The first sites in the list will be sites from the same site sharing group as the current site, then the rest sites will go. The input parameters:

siteId (optional)
The site ID that should be used to look for the sites in the same sharing group. If siteId is not provided the current site ID will be used.
shareableTypeId (optional)
The shareable type ID to use to look up for the sites in the same site sharing group. If not provided the shareable type ID configured in the corresponding component's property is used
excludeInputSite
If true current site will be excluded form the list of alternative site IDs.
includeActiveSites
If true only active sites will be returned.
The output parameters for this droplet are:
output
This parameter is rendered once if a collection of sites is found.
sites
This parameter is set to the list of Site objects in the order of preference.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static atg.nucleus.naming.ParameterName EXCLUDE_INPUT_SITE
          ParameterName for excludeInputSite
static atg.nucleus.naming.ParameterName INCLUDE_ACTIVE_SITES
          ParameterName for includeActiveSites
protected  boolean mExcludeInputSite
          ExcludeInputSite
protected  boolean mIncludeActiveSites
          IncludeActiveSites
protected  java.lang.String mShareableTypeId
          ShareableTypeId
protected  atg.multisite.SiteContextManager mSiteContextManager
          SiteContextManager
protected  atg.multisite.SiteGroupManager mSiteGroupManager
          SiteGroupManager
static atg.nucleus.naming.ParameterName OUTPUT
          ParameterName for output
static atg.nucleus.naming.ParameterName SHAREABLE_TYPE_ID
          ParameterName for shareableTypeId
static atg.nucleus.naming.ParameterName SITE_ID
          ParameterName for siteId
static java.lang.String SITES_IDS_PROP_NAME
          Parameter name for site
 
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
RecommendationAlternativeSiteIdsDroplet()
           
 
Method Summary
 java.lang.String getShareableTypeId()
           
 atg.multisite.SiteContextManager getSiteContextManager()
          Gets the SiteContextManager.
 atg.multisite.SiteGroupManager getSiteGroupManager()
          Returns the SiteGroupManager.
 boolean isExcludeInputSite()
           
 boolean isIncludeActiveSites()
          Returns the includeActiveSites parameter, determining whether only active sites should be retrieved
 void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Services the output oparam if a the list of sites can be determined.
 void setExcludeInputSite(boolean pExcludeInputSite)
           
 void setIncludeActiveSites(boolean pIncludeActiveSites)
          Sets the includeActiveSites parameter, determining whether only active site should be retrieved
 void setShareableTypeId(java.lang.String pShareableTypeId)
           
 void setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
          Sets the SiteContextManager
 void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
          Sets the SiteGroupManager
 
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, 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


SITE_ID

public static final atg.nucleus.naming.ParameterName SITE_ID
ParameterName for siteId


SHAREABLE_TYPE_ID

public static final atg.nucleus.naming.ParameterName SHAREABLE_TYPE_ID
ParameterName for shareableTypeId


EXCLUDE_INPUT_SITE

public static final atg.nucleus.naming.ParameterName EXCLUDE_INPUT_SITE
ParameterName for excludeInputSite


INCLUDE_ACTIVE_SITES

public static final atg.nucleus.naming.ParameterName INCLUDE_ACTIVE_SITES
ParameterName for includeActiveSites


OUTPUT

public static final atg.nucleus.naming.ParameterName OUTPUT
ParameterName for output


SITES_IDS_PROP_NAME

public static final java.lang.String SITES_IDS_PROP_NAME
Parameter name for site

See Also:
Constant Field Values

mSiteGroupManager

protected atg.multisite.SiteGroupManager mSiteGroupManager
SiteGroupManager


mSiteContextManager

protected atg.multisite.SiteContextManager mSiteContextManager
SiteContextManager


mShareableTypeId

protected java.lang.String mShareableTypeId
ShareableTypeId


mExcludeInputSite

protected boolean mExcludeInputSite
ExcludeInputSite


mIncludeActiveSites

protected boolean mIncludeActiveSites
IncludeActiveSites

Constructor Detail

RecommendationAlternativeSiteIdsDroplet

public RecommendationAlternativeSiteIdsDroplet()
Method Detail

getSiteGroupManager

public atg.multisite.SiteGroupManager getSiteGroupManager()
Returns the SiteGroupManager.

Returns:
the siteGroupManager

setSiteGroupManager

public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager

Parameters:
pSiteGroupManager - the siteGroupManager to set

getSiteContextManager

public atg.multisite.SiteContextManager getSiteContextManager()
Gets the SiteContextManager.

Returns:
the siteContextManager

setSiteContextManager

public void setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
Sets the SiteContextManager

Parameters:
pSiteContextManager - the siteContextManager to set

getShareableTypeId

public java.lang.String getShareableTypeId()
Returns:
the mShareableTypeId

setShareableTypeId

public void setShareableTypeId(java.lang.String pShareableTypeId)
Parameters:
mShareableTypeId - the mShareableTypeId to set

isExcludeInputSite

public boolean isExcludeInputSite()
Returns:
the excludeInputSite

setExcludeInputSite

public void setExcludeInputSite(boolean pExcludeInputSite)
Parameters:
pExcludeInputSite - the excludeInputSite to set

isIncludeActiveSites

public boolean isIncludeActiveSites()
Returns the includeActiveSites parameter, determining whether only active sites should be retrieved

The default value for this property is false.

Returns:
the includeActiveSites

setIncludeActiveSites

public void setIncludeActiveSites(boolean pIncludeActiveSites)
Sets the includeActiveSites parameter, determining whether only active site should be retrieved

The default value for this property is false.

Parameters:
pIncludeActiveSites - the activeOnly to set

service

public void service(atg.servlet.DynamoHttpServletRequest pRequest,
                    atg.servlet.DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Services the output oparam if a the list of sites can be determined.

Overrides:
service in class atg.servlet.DynamoServlet
Parameters:
pRequest - The request
pResponse - The response
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
DynamoServlet.service(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse), SiteGroupManager.findSharingSites(String, String, boolean, boolean)