org.opencms.site
Class CmsSiteManager

java.lang.Object
  extended by org.opencms.site.CmsSiteManager

Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance instead of the direct static access methods of this class.

public final class CmsSiteManager
extends java.lang.Object

Static site manager, kept for reasons of keeping the API backward compatible only.

Use OpenCms.getSiteManager() to obtain the configured site manager instance instead of the direct static access methods of this class.

Please note that this class may be removed or significantly changes in the next major OpenCms released, so make sure you remove all references ASAP.

Since:
6.0.0
Version:
$Revision: 1.61 $
Author:
Alexander Kandzior

Method Summary
static java.util.List getAvailableSites(CmsObject cms, boolean workplaceMode)
          Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.
static java.util.List getAvailableSites(CmsObject cms, boolean workplaceMode, java.lang.String ouFqn)
          Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.
static CmsSite getCurrentSite(CmsObject cms)
          Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.
static CmsSite getSite(java.lang.String siteRoot)
          Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.
static java.lang.String getSiteRoot(java.lang.String rootPath)
          Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAvailableSites

public static java.util.List getAvailableSites(CmsObject cms,
                                               boolean workplaceMode)
Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.

Returns a list of all sites available for the current user.

Parameters:
cms - the current cms context
workplaceMode - if true, the root and current site is included for the admin user and the view permission is required to see the site root
Returns:
a list of all site available for the current user

getAvailableSites

public static java.util.List getAvailableSites(CmsObject cms,
                                               boolean workplaceMode,
                                               java.lang.String ouFqn)
Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.

Returns a list of all sites that are compatible to the given organizational unit.

Parameters:
cms - the current cms context
workplaceMode - if true, the root and current site is included for the admin user and the view permission is required to see the site root
ouFqn - the organizational unit
Returns:
a list of all site available for the current user

getCurrentSite

public static CmsSite getCurrentSite(CmsObject cms)
Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.

Returns the current site for the provided OpenCms user context object.

In the unlikely case that no site matches with the provided OpenCms user context, the default site is returned.

Parameters:
cms - the OpenCms user context object to check for the site
Returns:
the current site for the provided OpenCms user context object

getSite

public static CmsSite getSite(java.lang.String siteRoot)
Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.

Returns the site with has the provided site root path, or null if no configured site has that root path.

The site root must have the form: /sites/default.
That means there must be a leading, but no trailing slash.

Parameters:
siteRoot - the root path to look up the site for
Returns:
the site with has the provided site root path, or null if no configured site has that root path

getSiteRoot

public static java.lang.String getSiteRoot(java.lang.String rootPath)
Deprecated. Use OpenCms.getSiteManager() to obtain the configured site manager instance, then use the method with the same name and signature.

Returns the site root part of the resources root path, or null if the path does not match any site root.

The site root returned will have the form: /sites/default.
That means there will a leading, but no trailing slash.

Parameters:
rootPath - the root path of a resource
Returns:
the site root part of the resources root path, or null if the path does not match any site root