| 
 | |||||||||
| 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.multisite.SiteGroupManager
public class SiteGroupManager
Utility class that gets information regarding SiteGroups and the ShareableTypes they share.
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| protected  SiteContextManager | mSiteContextManagerSiteContextManager | 
| protected  SiteManager | mSiteManagerSiteManager | 
| 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 | |
|---|---|
| SiteGroupManager()Constructs an instanceof SiteGroupManager | |
| Method Summary | |
|---|---|
|  boolean | addShareableTypeChangeListener(atg.multisite.ShareableTypeChangeListener pListener)Adds a ShareableTypeChangeListener | 
|  boolean | containsSiteWithId(java.util.Collection<Site> pSites,
                   java.lang.String pId)Searches for a particular Site id in a collection of sites | 
|  boolean | doSitesShare(Site pOtherSite,
             ShareableType pShareableTypeId)check to see if a specified site shares a shareable type with the current site. | 
|  boolean | doSitesShare(Site pSite1,
             Site pSite2,
             ShareableType pShareableType)check to see if two sites share a shareable type. | 
|  boolean | doSitesShare(java.lang.String pOtherSiteId,
             java.lang.String pShareableTypeId)check to see if a specified site shares a shareable type with the current site. | 
|  boolean | doSitesShare(java.lang.String pSiteId1,
             java.lang.String pSiteId2,
             java.lang.String pShareableTypeId)check to see if two sites share a shareable type. | 
|  java.util.Collection<Site> | filterInactiveSites(java.util.Collection<Site> pSites)This method returns sites that are active | 
|  java.util.Collection<Site> | findSharingSites(java.lang.String pSiteId,
                 java.lang.String pShareableTypeId,
                 boolean pExcludeGivenSite,
                 boolean pExcludeInactiveSites)Returns a collection of sites that share with the given site based on the given shareable type. | 
|  java.util.Collection<ShareableType> | getAllShareableTypes()get a list of all available shareable types | 
|  java.util.Collection<java.lang.String> | getOtherSharingSiteIds(java.lang.String pShareableTypeId)get a collection of site Ids (excluding the current site) for all the sites that share a given shareable type with the current site | 
|  java.util.Collection<java.lang.String> | getOtherSharingSiteIds(java.lang.String pSiteId,
                       java.lang.String pShareableTypeId)get a collection of site Ids (excluding the specified site) for all the sites that share a given shareable type with the specified site. | 
|  java.util.Collection<Site> | getOtherSharingSites(ShareableType pShareableType)get a collection of sites (excluding the current site) that share a given shareable type with the current site. | 
|  java.util.Collection<Site> | getOtherSharingSites(Site pSite,
                     ShareableType pShareableTypeId)get a collection of all the sites (excluding the specified site) that share a given shareable type with the specified site. | 
|  ShareableType | getShareableTypeById(java.lang.String pShareableTypeId)get a ShareableType given an Id | 
|  ShareableType[] | getShareableTypes()get ShareableTypes | 
|  java.util.Collection<ShareableType> | getShareableTypesByGenre(java.lang.String pGenreName)get a list of all available shareable types of a specific genre | 
|  java.util.Collection<java.lang.String> | getSharingSiteIds(java.lang.String pShareableTypeId)get a collection of site Ids for all the sites that share a given shareable type with the current site. | 
|  java.util.Collection<java.lang.String> | getSharingSiteIds(java.lang.String pSiteId,
                  java.lang.String pShareableTypeId)get a collection of site Ids for all the sites that share a given shareable type with the specified site. | 
|  java.util.Collection<Site> | getSharingSites(ShareableType pShareableType)get a collection of sites that share a given shareable type with the current site. | 
|  java.util.Collection<Site> | getSharingSites(Site pSite,
                ShareableType pShareableType)get a collection of all the sites that share a given shareable type with the specified site. | 
|  SiteContextManager | getSiteContextManager()Gets the SiteContextManager. | 
|  SiteGroup | getSiteGroup(Site pSite,
             ShareableType pShareableType)get the SiteGroup in which the specified site shares the specificed shareable type. | 
|  SiteGroup | getSiteGroup(java.lang.String pShareableTypeId)get the SiteGroup in which the current site shares the specificed shareable type. | 
|  SiteGroup | getSiteGroup(java.lang.String pSiteId,
             java.lang.String pShareableTypeId)get the SiteGroup in which the specified site shares the specificed shareable type. | 
|  SiteGroup | getSiteGroupById(java.lang.String pSiteGroupId)get a SiteGroup with a specific id. | 
|  java.lang.String | getSiteGroupNamePropertyName()Gets the site group name property name | 
|  java.util.Collection<SiteGroup> | getSiteGroups(java.lang.String pShareableTypeId)get a collection of all site groups that share a given shareable type. | 
|  java.util.Collection<SiteGroup> | getSiteGroups(java.lang.String pShareableTypeId,
              java.lang.String pSiteType)get a collection of all site groups that share a given shareable type and contain at least one site of a particular type. | 
|  java.util.Collection<SiteGroup> | getSiteGroupsBySite(java.lang.String pSiteId)get a collection of all site groups to which the specified site belongs. | 
|  atg.multisite.SiteGroupStorageAdapter | getSiteGroupStorageAdapter() | 
|  java.util.Collection<java.lang.String> | getSiteIdCollection(java.util.Collection<Site> pSites)Converts a Collection of Sites to a Collection of site ids. | 
|  Site | getSiteInSiteGroup(java.lang.String pSiteGroupId)get a random site from a specified site group. | 
|  SiteManager | getSiteManager()Returns the SiteManager. | 
|  java.util.Collection<Site> | getSitesNotInGroups(java.util.Collection<SiteGroup> pSiteGroups)returns sites that are not in a collection of SiteGroups. | 
|  java.util.Collection<Site> | getSitesNotInGroups(java.util.Collection<SiteGroup> pSiteGroups,
                    java.lang.String pSiteType)returns sites of a particular type that are not in a collection of SiteGroups. | 
|  atg.multisite.SiteStorageAdapter | getSiteStorageAdapter() | 
|  java.lang.String | getSiteTypePropertyName()Gets the site type property name | 
|  boolean | isShareableTypeRegistered(java.lang.String pShareableTypeId)check to see if a given ShareableType is registered | 
| protected  void | notifiyShareableTypeChangeListeners()Notify all ShareableTypeChangeListenerthat the ShareableTypes have
 changed. | 
|  boolean | removeShareableTypeChangeListener(atg.multisite.ShareableTypeChangeListener pListener)Removes a ShareableTypeChangeListener | 
|  void | setShareableTypes(ShareableType[] pShareableTypes)set ShareableTypes | 
|  void | setSiteContextManager(SiteContextManager pSiteContextManager)Sets the SiteContextManager | 
|  void | setSiteGroupNamePropertyName(java.lang.String pSiteGroupNamePropertyName)Sets the site group name property name | 
|  void | setSiteGroupStorageAdapter(atg.multisite.SiteGroupStorageAdapter pSiteGroupStorageAdapter) | 
|  void | setSiteManager(SiteManager pSiteManager)Sets the SiteManager | 
|  void | setSiteStorageAdapter(atg.multisite.SiteStorageAdapter pSiteStorageAdapter) | 
|  void | setSiteTypePropertyName(java.lang.String pSiteTypePropertyName)Sets the site type property name | 
| 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
protected SiteManager mSiteManager
protected SiteContextManager mSiteContextManager
| Constructor Detail | 
|---|
public SiteGroupManager()
| Method Detail | 
|---|
public void setShareableTypes(ShareableType[] pShareableTypes)
pShareableTypes - the ShareableTypespublic ShareableType[] getShareableTypes()
public atg.multisite.SiteGroupStorageAdapter getSiteGroupStorageAdapter()
public void setSiteGroupStorageAdapter(atg.multisite.SiteGroupStorageAdapter pSiteGroupStorageAdapter)
pSiteGroupStorageAdapter - the siteGroupStorageAdapter to setpublic atg.multisite.SiteStorageAdapter getSiteStorageAdapter()
public void setSiteStorageAdapter(atg.multisite.SiteStorageAdapter pSiteStorageAdapter)
pSiteStorageAdapter - the siteStorageAdapter to setpublic java.lang.String getSiteTypePropertyName()
public void setSiteTypePropertyName(java.lang.String pSiteTypePropertyName)
pSiteTypePropertyName - the siteTypePropertyName to setpublic java.lang.String getSiteGroupNamePropertyName()
public void setSiteGroupNamePropertyName(java.lang.String pSiteGroupNamePropertyName)
pSiteGroupNamePropertyName - The name of the site group propertypublic void setSiteManager(SiteManager pSiteManager)
pSiteManager - the siteManager to setpublic SiteManager getSiteManager()
public SiteContextManager getSiteContextManager()
public void setSiteContextManager(SiteContextManager pSiteContextManager)
pSiteContextManager - the siteContextManager to setpublic SiteGroup getSiteGroupById(java.lang.String pSiteGroupId)
pSiteGroupId - the Id of the site group to get
public SiteGroup getSiteGroup(java.lang.String pShareableTypeId)
pShareableTypeId - the id of the shareable type
public SiteGroup getSiteGroup(java.lang.String pSiteId,
                              java.lang.String pShareableTypeId)
pSiteId - the site in questionpShareableTypeId - The id of the shareable type in question
public SiteGroup getSiteGroup(Site pSite,
                              ShareableType pShareableType)
pSite - the site in questionpShareableType - the shareable type in question
public java.util.Collection<SiteGroup> getSiteGroups(java.lang.String pShareableTypeId)
pShareableTypeId - the id of the shareable type in question, all site
          groups will be returned if null
public java.util.Collection<SiteGroup> getSiteGroups(java.lang.String pShareableTypeId,
                                                     java.lang.String pSiteType)
pShareableTypeId - The shareable type id, all site groups will be
          returned if nullpSiteType - The site type, all site types will be returned if null
public java.util.Collection<SiteGroup> getSiteGroupsBySite(java.lang.String pSiteId)
pSiteId - the id of the site in question
public boolean isShareableTypeRegistered(java.lang.String pShareableTypeId)
pShareableTypeId - the Id of the ShareableType in question
public ShareableType getShareableTypeById(java.lang.String pShareableTypeId)
pShareableTypeId - the Id of the ShareableType to get
public java.util.Collection<ShareableType> getAllShareableTypes()
public java.util.Collection<ShareableType> getShareableTypesByGenre(java.lang.String pGenreName)
pGenreName - The name of the genre
public Site getSiteInSiteGroup(java.lang.String pSiteGroupId)
pSiteGroupId - the id of the site group in question
public boolean doSitesShare(java.lang.String pSiteId1,
                            java.lang.String pSiteId2,
                            java.lang.String pShareableTypeId)
pSiteId1 - the id of the first sitepSiteId2 - the id of the second sitepShareableTypeId - the id of the shareable type in question
public boolean doSitesShare(Site pSite1,
                            Site pSite2,
                            ShareableType pShareableType)
pSite1 - the first site to comparepSite2 - the second site to comparepShareableType - the shareable type in question
public boolean doSitesShare(java.lang.String pOtherSiteId,
                            java.lang.String pShareableTypeId)
pOtherSiteId - the id of the sitepShareableTypeId - the id of the shareable type in question
public boolean doSitesShare(Site pOtherSite,
                            ShareableType pShareableTypeId)
pOtherSite - the site to compare against the current sitepShareableTypeId - the shareable type in question
public java.util.Collection<java.lang.String> getOtherSharingSiteIds(java.lang.String pSiteId,
                                                                     java.lang.String pShareableTypeId)
pSiteId - the Id of the site in questionpShareableTypeId - the id of the shareable type in question
public java.util.Collection<java.lang.String> getOtherSharingSiteIds(java.lang.String pShareableTypeId)
pShareableTypeId - the id of the shareable type in question
public java.util.Collection<Site> getOtherSharingSites(Site pSite,
                                                       ShareableType pShareableTypeId)
pSite - the site in questionpShareableTypeId - the shareable type in question
public java.util.Collection<Site> getOtherSharingSites(ShareableType pShareableType)
pShareableType - the shareable type in question
public java.util.Collection<java.lang.String> getSharingSiteIds(java.lang.String pSiteId,
                                                                java.lang.String pShareableTypeId)
pSiteId - the Id of the site in questionpShareableTypeId - the id of the shareable type in question
public java.util.Collection<java.lang.String> getSharingSiteIds(java.lang.String pShareableTypeId)
pShareableTypeId - the id of the shareable type in question
public java.util.Collection<Site> getSharingSites(Site pSite,
                                                  ShareableType pShareableType)
pSite - the site in questionpShareableTypeId - the shareable type in question
public java.util.Collection<Site> getSharingSites(ShareableType pShareableType)
pShareableType - the shareable type in question
public java.util.Collection<Site> getSitesNotInGroups(java.util.Collection<SiteGroup> pSiteGroups)
pSiteGroups - The SiteGroups
public java.util.Collection<Site> getSitesNotInGroups(java.util.Collection<SiteGroup> pSiteGroups,
                                                      java.lang.String pSiteType)
pSiteGroups - The SiteGroupspSiteType - The site type
public boolean addShareableTypeChangeListener(atg.multisite.ShareableTypeChangeListener pListener)
pListener - The listener to add
public boolean removeShareableTypeChangeListener(atg.multisite.ShareableTypeChangeListener pListener)
pListener - The listener to remove
public java.util.Collection<java.lang.String> getSiteIdCollection(java.util.Collection<Site> pSites)
pSites - The Collection of Sites
public boolean containsSiteWithId(java.util.Collection<Site> pSites,
                                  java.lang.String pId)
pSites - The Collection of sites to searchpId - The id to search for.
protected void notifiyShareableTypeChangeListeners()
ShareableTypeChangeListener that the ShareableTypes have
 changed.
public java.util.Collection<Site> filterInactiveSites(java.util.Collection<Site> pSites)
pSites - The collection of sites
SiteManager#isSiteActive()
public java.util.Collection<Site> findSharingSites(java.lang.String pSiteId,
                                                   java.lang.String pShareableTypeId,
                                                   boolean pExcludeGivenSite,
                                                   boolean pExcludeInactiveSites)
                                            throws SiteContextException
You may optionally exclude the given site or any inactive sites from the result
pSiteId - the site for which the sharing sites are found.pShareableTypeId - sites must share this typepExcludeGivenSite - true if you want to exclude the given site from the resultpExcludeInactiveSites - true if you want to exclude inactive sites from the result.
SiteContextException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||