atg.droplet.multisite
Class SiteLinkDroplet

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.droplet.multisite.SiteLinkDroplet
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, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class SiteLinkDroplet
extends DynamoServlet

Droplet that gets the URL for a particular site. The site is set with the siteId parameter. If the siteId isn't provided, the current site will be used. An optional path parameter will be included in the returned URL. An optional queryParams parameter will be included in the returned URL. An optional protocolinInclude is ture, relative URLs will be relative to the included page's path, not the current request path. The output parameters for this Droplet are:

output
This parameter is rendered once if a site link was generated.
url
This parameter is set to the url returned from the SiteURLManager.
error
This optional parameter is rendered if there was an error.
errorMessage
This parameter is set with an error message if there is one.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName ERROR
          ParameterName for error
static java.lang.String ERROR_MSG_PROP_NAME
          Parameter name for errorMessage
static ParameterName IN_INCLUDE
          ParameterName for inInclude
static ParameterName OUTPUT
          ParameterName for output
static ParameterName PATH
          ParameterName for path
static ParameterName PROTOCOL
          ParameterName for protocol
static ParameterName QUERY_PARAMS
          ParameterName for queryParams
static ParameterName SITE_ID
          Class version string
static java.lang.String URL_PROP_NAME
          Parameter name for url
static java.lang.String USE_REMAP_PROP_NAME
          query parameter name for remap
 
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
SiteLinkDroplet()
           
 
Method Summary
protected  java.lang.String addDoNotRemapQueryParam(java.lang.String pUrl)
          tack on a special query param to the url to indicate to the dsp:a tag that this url should not be reverse mapped.
 java.lang.String getProtocol()
          Gets the default protocol.
 SiteURLManager getSiteURLManager()
          Gets the SiteURLManager.
 boolean isInInclude()
          Gets if the link is in an included page.
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          This method provides the default implementation of service, by dispatching to conventionally named methods which begin with "do".
 void setInInclude(boolean pInInclude)
          Sets if the link is in an included page.
 void setProtocol(java.lang.String pProtocol)
          Sets the default protocol
 void setSiteURLManager(SiteURLManager pSiteURLManager)
          Sets the SiteURLManager
 
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


SITE_ID

public static final ParameterName SITE_ID
Class version string


PROTOCOL

public static final ParameterName PROTOCOL
ParameterName for protocol


OUTPUT

public static final ParameterName OUTPUT
ParameterName for output


PATH

public static final ParameterName PATH
ParameterName for path


QUERY_PARAMS

public static final ParameterName QUERY_PARAMS
ParameterName for queryParams


ERROR

public static final ParameterName ERROR
ParameterName for error


ERROR_MSG_PROP_NAME

public static final java.lang.String ERROR_MSG_PROP_NAME
Parameter name for errorMessage

See Also:
Constant Field Values

URL_PROP_NAME

public static final java.lang.String URL_PROP_NAME
Parameter name for url

See Also:
Constant Field Values

USE_REMAP_PROP_NAME

public static final java.lang.String USE_REMAP_PROP_NAME
query parameter name for remap

See Also:
Constant Field Values

IN_INCLUDE

public static final ParameterName IN_INCLUDE
ParameterName for inInclude

Constructor Detail

SiteLinkDroplet

public SiteLinkDroplet()
Method Detail

getSiteURLManager

public SiteURLManager getSiteURLManager()
Gets the SiteURLManager. Tries to resolve a default component path if one isn't set.

Returns:
the siteURLManager

setSiteURLManager

public void setSiteURLManager(SiteURLManager pSiteURLManager)
Sets the SiteURLManager

Parameters:
pSiteURLManager - the siteURLManager to set

getProtocol

public java.lang.String getProtocol()
Gets the default protocol.

Returns:
the protocol

setProtocol

public void setProtocol(java.lang.String pProtocol)
Sets the default protocol

Parameters:
pProtocol - the protocol to set

isInInclude

public boolean isInInclude()
Gets if the link is in an included page.

Returns:
the inInclude

setInInclude

public void setInInclude(boolean pInInclude)
Sets if the link is in an included page.

Parameters:
pInInclude - the inInclude to set

service

public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
Description copied from class: DynamoServlet
This method provides the default implementation of service, by dispatching to conventionally named methods which begin with "do".

Overrides:
service in class DynamoServlet
Parameters:
pReq - The request
pRes - The response
Throws:
javax.servlet.ServletException - The ServletException
java.io.IOException - The IOException
See Also:
DynamoServlet.service(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

addDoNotRemapQueryParam

protected java.lang.String addDoNotRemapQueryParam(java.lang.String pUrl)
tack on a special query param to the url to indicate to the dsp:a tag that this url should not be reverse mapped. this query param should be stripped off by the dsp:a tag

Parameters:
pUrl - the url to add query param to
Returns:
the url with the added query param