atg.droplet.multisite
Class SharingSitesDroplet

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.SharingSitesDroplet
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

@Service(requiredProperties={"siteGroupManager","siteContextManager"})
public class SharingSitesDroplet
extends DynamoServlet

This Droplet returns all the sharing sites within the given site group. If the siteId is not provided as an input parameter, it will be retrieved from the SiteContext. Similarly, the ShareableTypeId may be provided as an optional input parameter. If not, the value specified in the configuration file will instead be used. If excludeInputSite is true, the input site, either specified by siteId or the current site, will not be included in the returned site collection. The output parameters for this Droplet are:

output
This parameter is rendered once if a collection of sites is found.
error
This optional parameter is rendered if there was an error getting the
empty
This optional parameter is rendered if the collection of sites is empty
sites
This parameter is set to the collection of Site objects for the given Site Group


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName EMPTY
          ParameterName for empty
static java.lang.String ERROR_MSG_PROP_NAME
          Parameter name for errorMessage
static ParameterName EXCLUDE_INPUT_SITE
          ParameterName for excludeInputSite
static ParameterName INCLUDE_ACTIVE_SITES
          ParameterName for includeActiveSites
protected  boolean mExcludeInputSite
          ExcludeInputSite
protected  boolean mIncludeActiveSites
          IncludeActiveSites
protected  java.lang.String mShareableTypeId
          ShareableTypeId
protected  SiteContextManager mSiteContextManager
          SiteContextManager
protected  SiteGroupManager mSiteGroupManager
          SiteGroupManager
protected  SiteManager mSiteManager
          SiteManager
static ParameterName OUTPUT
          ParameterName for output
static ParameterName SHAREABLE_TYPE_ID
          ParameterName for shareableTypeId
static ParameterName SITE_ID
          ParameterName for siteId
static java.lang.String SITES_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
SharingSitesDroplet()
           
 
Method Summary
protected  java.util.Collection<Site> filterSites(java.util.Collection<Site> pSites)
          This method returns sites that are active
 java.lang.String getShareableTypeId()
           
 SiteContextManager getSiteContextManager()
          Gets the SiteContextManager.
 SiteGroupManager getSiteGroupManager()
          Returns the SiteGroupManager.
 SiteManager getSiteManager()
          Returns the SiteManager.
 boolean isExcludeInputSite()
           
 boolean isIncludeActiveSites()
          Returns the includeActiveSites parameter, determining whether only active sites should be retrieved
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          Services the output oparam if a site 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(SiteContextManager pSiteContextManager)
          Sets the SiteContextManager
 void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
          Sets the SiteGroupManager
 void setSiteManager(SiteManager pSiteManager)
          Sets the SiteManager
 
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 ParameterName SITE_ID
ParameterName for siteId


SHAREABLE_TYPE_ID

public static final ParameterName SHAREABLE_TYPE_ID
ParameterName for shareableTypeId


EXCLUDE_INPUT_SITE

public static final ParameterName EXCLUDE_INPUT_SITE
ParameterName for excludeInputSite


INCLUDE_ACTIVE_SITES

public static final ParameterName INCLUDE_ACTIVE_SITES
ParameterName for includeActiveSites


OUTPUT

public static final ParameterName OUTPUT
ParameterName for output


EMPTY

public static final ParameterName EMPTY
ParameterName for empty


ERROR_MSG_PROP_NAME

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

See Also:
Constant Field Values

SITES_PROP_NAME

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

See Also:
Constant Field Values

mSiteManager

protected SiteManager mSiteManager
SiteManager


mSiteGroupManager

protected SiteGroupManager mSiteGroupManager
SiteGroupManager


mSiteContextManager

protected SiteContextManager mSiteContextManager
SiteContextManager


mShareableTypeId

protected java.lang.String mShareableTypeId
ShareableTypeId


mExcludeInputSite

protected boolean mExcludeInputSite
ExcludeInputSite


mIncludeActiveSites

protected boolean mIncludeActiveSites
IncludeActiveSites

Constructor Detail

SharingSitesDroplet

public SharingSitesDroplet()
Method Detail

setSiteManager

public void setSiteManager(SiteManager pSiteManager)
Sets the SiteManager

Parameters:
pSiteManager - the siteManager to set

getSiteManager

public SiteManager getSiteManager()
Returns the SiteManager.

Returns:
the siteManager

getSiteGroupManager

public SiteGroupManager getSiteGroupManager()
Returns the SiteGroupManager.

Returns:
the siteGroupManager

setSiteGroupManager

public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager

Parameters:
pSiteGroupManager - the siteGroupManager to set

getSiteContextManager

public SiteContextManager getSiteContextManager()
Gets the SiteContextManager.

Returns:
the siteContextManager

setSiteContextManager

public void setSiteContextManager(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(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
Services the output oparam if a site can be determined. Otherwise the empty oparam is serviced.

Overrides:
service in class DynamoServlet
Parameters:
pReq - The request
pRes - 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)

filterSites

protected java.util.Collection<Site> filterSites(java.util.Collection<Site> pSites)
This method returns sites that are active

If the site type is empty, then this method returns pSites.

Parameters:
pSites - The collection of sites
Returns:
The collection of filtered sites
See Also:
SiteManager#isSiteActive()