atg.projects.store.droplet
Class PairedSiteDroplet

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.droplet.PairedSiteDroplet
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

public class PairedSiteDroplet
extends atg.servlet.DynamoServlet

This droplet returns a paired site ID for a site identified by "site ID". The "paired sites" concept was first introduced in CRS mobile for the "MobileDetectionInterceptor" component to be able to find corresponding mobile site by known non-mobile (full CRS) site and vice versa. A site is identified as "full CRS" when it has the "channel" property equal to "desktop". All other values are considered as not a "full CRS" identifiers: for example, the "channel" value of "mobile" identifies a mobile site. The "channel" property is defined in "sites.xml" files. The "MobileDetectionInterceptor" uses the "paired sites" info and the site "channel" property value for redirection between mobile and non-mobile sites, when a mobile user agent performs a request with non-mobile site URL or non-mobile (desktop) user agent requests a resource from a mobile site. Site pairs are defined in "sites.xml" files of "CRS mobile" submodule, by special site groups with "crs.MobileSitePairs" shareable type. Each site group with the "crs.MobileSitePairs" shareable type joins together a "full CRS" and corresponding mobile site (in other words, this way we get a "non-mobile - mobile" site pairs). For example, the CRS mobile "sites.xml" file defines the following "US stores" site group: Using this info, the "MobileDetectionInterceptor" component redirects a mobile user agent when the last one requests the "storeSiteUS" site URL - to the "mobileStoreSiteUS" site. The output parameters for this droplet are:

output
This parameter is rendered once if corresponding site ID was detected.
error
This optional parameter is rendered if there was an error. "errorMessage" request parameter will also be set in this case.

Author:
Andrei Urbanovich

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static atg.nucleus.naming.ParameterName OPARAM_ERROR
          "error" parameter name.
static atg.nucleus.naming.ParameterName OPARAM_OUTPUT
          "output" parameter name.
static java.lang.String PARAM_ERROR_MSG
          "errorMessage" parameter name.
static java.lang.String PARAM_PAIRED_SITE_ID
          "pairedSiteId" parameter name.
static atg.nucleus.naming.ParameterName PARAM_SITE_ID
          "siteId" parameter name.
static java.lang.String PROP_VALUE_CHANNEL_DESKTOP
          "channel" property value: desktop.
 
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
PairedSiteDroplet()
           
 
Method Summary
 java.lang.String getShareableTypeId()
          Gets the "ShareableType ID for site pairs" property.
 atg.multisite.SiteGroupManager getSiteGroupManager()
          This property contains a reference to SiteGroupManager to be used when determining sharing sites.
 StoreSitePropertiesManager getStoreSitePropertiesManager()
          Gets the StoreSitePropertiesManager bean which is used to manage store properties.
 void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
           
 void setShareableTypeId(java.lang.String pShareableTypeId)
          Sets the "ShareableType ID for site pairs" property.
 void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
          Sets the new reference to SiteGroupManager to be used when determining sharing sites.
 void setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager)
          Sets the StoreSitePropertiesManager bean which is used to manage store properties.
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, 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


PARAM_SITE_ID

public static final atg.nucleus.naming.ParameterName PARAM_SITE_ID
"siteId" parameter name.


PARAM_PAIRED_SITE_ID

public static final java.lang.String PARAM_PAIRED_SITE_ID
"pairedSiteId" parameter name.

See Also:
Constant Field Values

OPARAM_OUTPUT

public static final atg.nucleus.naming.ParameterName OPARAM_OUTPUT
"output" parameter name.


OPARAM_ERROR

public static final atg.nucleus.naming.ParameterName OPARAM_ERROR
"error" parameter name.


PARAM_ERROR_MSG

public static final java.lang.String PARAM_ERROR_MSG
"errorMessage" parameter name.

See Also:
Constant Field Values

PROP_VALUE_CHANNEL_DESKTOP

public static final java.lang.String PROP_VALUE_CHANNEL_DESKTOP
"channel" property value: desktop.

See Also:
Constant Field Values
Constructor Detail

PairedSiteDroplet

public PairedSiteDroplet()
Method Detail

getStoreSitePropertiesManager

public StoreSitePropertiesManager getStoreSitePropertiesManager()
Gets the StoreSitePropertiesManager bean which is used to manage store properties.

Returns:
The StoreSitePropertiesManager bean which is used to manage store properties.

setStoreSitePropertiesManager

public void setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager)
Sets the StoreSitePropertiesManager bean which is used to manage store properties.

Parameters:
StoreSitePropertiesManager - Set a new storeSitePropertyManager.

getShareableTypeId

public java.lang.String getShareableTypeId()
Gets the "ShareableType ID for site pairs" property.

Returns:
The "ShareableType ID for site pairs" property.

setShareableTypeId

public void setShareableTypeId(java.lang.String pShareableTypeId)
Sets the "ShareableType ID for site pairs" property.

Parameters:
pShareableTypeId - The "ShareableType ID for site pairs" property.

getSiteGroupManager

public atg.multisite.SiteGroupManager getSiteGroupManager()
This property contains a reference to SiteGroupManager to be used when determining sharing sites.

Returns:
SiteGroupManager instance.

setSiteGroupManager

public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the new reference to SiteGroupManager to be used when determining sharing sites.

Parameters:
pSiteGroupManager - Value to set.

service

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