| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.droplet.multisite.SiteGroupsDroplet
@Service(requiredProperties={"siteGroupManager","siteManager"})
public class SiteGroupsDropletThis droplet returns site groups and optional un-grouped sites.
 The includeUngroupedSites property value determines whether to return un-grouped sites or not. If the includeUngroupedSites
 property value is true, un-grouped sites are included in the output parameter;Otherwise it is not included in output parameter/s.  
 
 This droplet takes two input parameters. The two input parameter names are SITE_TYPE and SHAREABLE_TYPE_ID.
 You could pass in input parameters or configure them in the properties files. The input parameters or properties configurations are optional.
 The input parameters and its corresponding properties are as follows:
 
SITE_TYPE  -- siteType SHAREABLE_TYPE_ID  -- shareableTypeId 
 Based on the input parameters SITE_TYPE and SHAREABLE_TYPE_ID or its corresponding configured values, 
 site groups and un-grouped sites are returned.
 
The complete description of SiteGroupsDroplet parameters is as follows:
siteType property value is used. 
 shareableTypeId property value is used. 
 SiteGroup as the key and sites as the value. filterSitesInSiteGroups(Collection, String).
 filterSites(Collection, String) method.
 
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static ParameterName | INCLUDE_ACTIVE_SITESParameterName for includeActiveSites | 
| protected  boolean | mIncludeActiveSitesIncludeActiveSites | 
| protected  boolean | mIncludeUngroupedSites | 
| protected  java.lang.String | mShareableTypeIdShareableTypeId | 
| protected  SiteGroupManager | mSiteGroupManagerSiteGroupManager | 
| protected  SiteManager | mSiteManagerSiteManager | 
| protected  java.lang.String | mSiteType | 
| static ParameterName | OUTPUTParameterName for output | 
| static ParameterName | SHAREABLE_TYPE_IDParameter name for shareableTypeId | 
| static java.lang.String | SITE_GROUPS_PROP_NAMEParameter name for site | 
| static ParameterName | SITE_TYPEParameterName for siteId | 
| static java.lang.String | UNGROUPED_SITES_PROP_NAMEParameter 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 | |
|---|---|
| SiteGroupsDroplet() | |
| Method Summary | |
|---|---|
| protected  java.util.Collection<Site> | filterSites(java.util.Collection<Site> pSites,
            java.lang.String pSiteType)This method returns sites with desired site type pSiteType. | 
| protected  java.util.Map<SiteGroup,java.util.Collection<Site>> | filterSitesInSiteGroups(java.util.Collection<SiteGroup> pSiteGroups,
                        java.lang.String pSiteType)This method filters sites in each site group. | 
|  java.lang.String | getShareableTypeId() | 
|  SiteGroupManager | getSiteGroupManager()Returns the SiteGroupManager. | 
| protected  java.util.Collection<SiteGroup> | getSiteGroups(java.lang.String pShareableTypeId,
              java.lang.String pSiteType)This method calls the SiteGroupManager.getSiteGroups(String, String)and returns the site groups. | 
|  SiteManager | getSiteManager()Returns the SiteManager. | 
|  java.lang.String | getSiteType()Returns the siteType | 
| protected  java.util.Collection<Site> | getUngroupedSites(java.util.Collection<SiteGroup> pSiteGroups,
                  java.lang.String pSiteType)This method calls SiteGroupManager.getSitesNotInGroups(Collection, String)and returns the un-grouped 
 sites. | 
|  boolean | isIncludeActiveSites()Returns the includeActiveSites parameter, determining whether only active sites are retrieved | 
|  boolean | isIncludeUngroupedSites()Returns the includeUngroupedSites | 
|  void | service(DynamoHttpServletRequest pReq,
        DynamoHttpServletResponse pRes)This method serves site groups and un-grouped sites in the output oparam. | 
|  void | setIncludeActiveSites(boolean pIncludeActiveSites)Sets the includeActiveSites parameter, determining whether only active site are retrieved | 
|  void | setIncludeUngroupedSites(boolean pIncludeUngroupedSites)Sets the includeUngroupedSites | 
|  void | setShareableTypeId(java.lang.String pShareableTypeId) | 
|  void | setSiteGroupManager(SiteGroupManager pSiteGroupManager)Sets the SiteGroupManager | 
|  void | setSiteManager(SiteManager pSiteManager)Sets the SiteManager | 
|  void | setSiteType(java.lang.String pSiteType)Sets the siteType | 
| 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.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 | 
|---|
public static java.lang.String CLASS_VERSION
public static final ParameterName SITE_TYPE
public static final ParameterName SHAREABLE_TYPE_ID
public static final ParameterName INCLUDE_ACTIVE_SITES
public static final ParameterName OUTPUT
public static final java.lang.String SITE_GROUPS_PROP_NAME
public static final java.lang.String UNGROUPED_SITES_PROP_NAME
protected SiteGroupManager mSiteGroupManager
protected java.lang.String mShareableTypeId
protected java.lang.String mSiteType
protected boolean mIncludeUngroupedSites
protected SiteManager mSiteManager
protected boolean mIncludeActiveSites
| Constructor Detail | 
|---|
public SiteGroupsDroplet()
| Method Detail | 
|---|
public SiteGroupManager getSiteGroupManager()
public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
pSiteGroupManager - the siteGroupManager to setpublic java.lang.String getShareableTypeId()
public void setShareableTypeId(java.lang.String pShareableTypeId)
mShareableTypeId - the mShareableTypeId to setpublic java.lang.String getSiteType()
public void setSiteType(java.lang.String pSiteType)
pSiteType - the siteType to setpublic boolean isIncludeUngroupedSites()
 The default value for this property is true.
 
public void setIncludeUngroupedSites(boolean pIncludeUngroupedSites)
 The default value for this property is true.
 
pIncludeUngroupedSites - the includeUngroupedSites to setpublic void setSiteManager(SiteManager pSiteManager)
pSiteManager - the siteManager to setpublic SiteManager getSiteManager()
public boolean isIncludeActiveSites()
 The default value for this property is false.
 
public void setIncludeActiveSites(boolean pIncludeActiveSites)
 The default value for this property is false.
 
pIncludeActiveSites - the includeActiveSites to set
public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
 First this method obtains input parameters. If the input parameter is not passed in, then configured value is used.
 Then this method calls getSiteGroups(String, String) and getUngroupedSites(Collection, String) to get the site groups
 and un-grouped sites. After getting the above values, this method calls filterSitesInSiteGroups(Collection, String) to filter the sites in the
 site groups and filterSites(Collection, String) to filter the un-grouped sites.
 
 The un-grouped sites output parameter is optional. You can configure this droplet to serve "ungroupedSites" output parameter.
 If includeUngroupedSites property value is true, then the un-grouped sites will be included as output parameter. 
 The includeUngroupedSites property value is true by default.
 
service in class DynamoServletpReq - The requestpRes - The response
javax.servlet.ServletException
java.io.IOExceptionDynamoServlet.service(atg.servlet.DynamoHttpServletRequest,
      atg.servlet.DynamoHttpServletResponse), 
getSiteGroups(String, String), 
getUngroupedSites(Collection, String), 
filterSitesInSiteGroups(Collection, String), 
filterSites(Collection, String)
protected java.util.Collection<SiteGroup> getSiteGroups(java.lang.String pShareableTypeId,
                                                        java.lang.String pSiteType)
SiteGroupManager.getSiteGroups(String, String) and returns the site groups.
 
pSiteType - pShareableTypeId - 
SiteGroupManager.getSiteGroups(String, String)
protected java.util.Collection<Site> getUngroupedSites(java.util.Collection<SiteGroup> pSiteGroups,
                                                       java.lang.String pSiteType)
SiteGroupManager.getSitesNotInGroups(Collection, String) and returns the un-grouped 
 sites. If a site does not belong to a site group, then it is called as an un-grouped site.
 
pSiteGroups - pSiteType - 
SiteGroupManager.getSitesNotInGroups(Collection, String)
protected java.util.Map<SiteGroup,java.util.Collection<Site>> filterSitesInSiteGroups(java.util.Collection<SiteGroup> pSiteGroups,
                                                                                      java.lang.String pSiteType)
 This method iterates through pSiteGroups and calls filterSites(Collection, String). If the filterSites(Collection, String)
 comes back with at least one valid site, then that site group and sites are added to the map. Once all valid sites are added for each site group, the resultant
 map is returned back. 
 
pSiteGroups - pSiteType - 
filterSites(Collection, String)
protected java.util.Collection<Site> filterSites(java.util.Collection<Site> pSites,
                                                 java.lang.String pSiteType)
pSiteType.
 
 If the site type is empty, then this method returns pSites. If the pSiteType is not empty,
 then iterates all sites and check to see if the site contains the desired site type. If the site contains the desired 
 site type, then that site is included in the returned site collection.
 
pSites - pSiteType - 
SiteManager.getSiteTypePropertyName()| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||