org.opencms.site
Class CmsSite

java.lang.Object
  extended by org.opencms.site.CmsSite
All Implemented Interfaces:
Cloneable

public final class CmsSite
extends Object
implements Cloneable

Describes a configured site in OpenCms.

Since:
6.0.0
Version:
$Revision: 1.23 $
Author:
Alexander Kandzior, Jan Baudisch

Constructor Summary
CmsSite(String siteRoot, CmsSiteMatcher siteMatcher)
          Constructs a new site object without title and id information, this is to be used for lookup purposes only.
CmsSite(String siteRoot, CmsUUID siteRootUUID, String title)
          Constructs a new site object with a default (wildcard) a site matcher, this is to be used for display purposes only.
CmsSite(String siteRoot, CmsUUID siteRootUUID, String title, CmsSiteMatcher siteMatcher)
          Constructs a new site object.
 
Method Summary
protected  void addAlias(CmsSiteMatcher aliasServer)
          Adds an alias for the site.
 Object clone()
          Returns a clone of this Objects instance.
 boolean equals(Object obj)
           
 List getAliases()
          Returns the aliases for this site.
 String getSecureUrl()
          Returns the secure server url of this site root.
 CmsSiteMatcher getSiteMatcher()
          Returns the site matcher that describes the URL of this site.
 String getSiteRoot()
          Returns the server URL prefix to which this site is mapped.
 CmsUUID getSiteRootUUID()
          Returns the UUID of this site's root directory in the OpenCms VFS.
 String getTitle()
          Returns the root directory of this site in the OpenCms VFS.
 String getUrl()
          Returns the server url of this site root.
 int hashCode()
           
 boolean hasSecureServer()
          Returns true, if the site has a secure server.
protected  void setAliases(List aliases)
          Sets the aliases for the site.
protected  void setSecureServer(CmsSiteMatcher secureServer)
          Sets the secure server.
protected  void setSiteMatcher(CmsSiteMatcher siteMatcher)
          Sets the site matcher that describes the URL of this site.
protected  void setSiteRoot(String siteRoot)
          Sets the server URL prefix to which this site is mapped.
protected  void setSiteRootUUID(CmsUUID siteRootUUID)
          Sets the UUID of this site's root directory in the OpenCms VFS.
protected  void setTitle(String name)
          Sets the display title of this site in the OpenCms VFS.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsSite

public CmsSite(String siteRoot,
               CmsSiteMatcher siteMatcher)
Constructs a new site object without title and id information, this is to be used for lookup purposes only.

Parameters:
siteRoot - root directory of this site in the OpenCms VFS
siteMatcher - the site matcher for this site

CmsSite

public CmsSite(String siteRoot,
               CmsUUID siteRootUUID,
               String title)
Constructs a new site object with a default (wildcard) a site matcher, this is to be used for display purposes only.

Parameters:
siteRoot - root directory of this site in the OpenCms VFS
siteRootUUID - UUID of this site's root directory in the OpenCms VFS
title - display name of this site

CmsSite

public CmsSite(String siteRoot,
               CmsUUID siteRootUUID,
               String title,
               CmsSiteMatcher siteMatcher)
Constructs a new site object.

Parameters:
siteRoot - root directory of this site in the OpenCms VFS
siteRootUUID - UUID of this site's root directory in the OpenCms VFS
title - display name of this site
siteMatcher - the site matcher for this site
Method Detail

clone

public Object clone()
Returns a clone of this Objects instance.

Overrides:
clone in class Object
Returns:
a clone of this instance

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getAliases

public List getAliases()
Returns the aliases for this site.

Returns:
a ArrayList with the aliases

getSecureUrl

public String getSecureUrl()
Returns the secure server url of this site root.

Returns:
the secure server url

getSiteMatcher

public CmsSiteMatcher getSiteMatcher()
Returns the site matcher that describes the URL of this site.

Returns:
the site matcher that describes the URL of this site

getSiteRoot

public String getSiteRoot()
Returns the server URL prefix to which this site is mapped.

Returns:
the server URL prefix to which this site is mapped

getSiteRootUUID

public CmsUUID getSiteRootUUID()
Returns the UUID of this site's root directory in the OpenCms VFS.

Returns:
the UUID of this site's root directory in the OpenCms VFS

getTitle

public String getTitle()
Returns the root directory of this site in the OpenCms VFS.

Returns:
the root directory of this site in the OpenCms VFS

getUrl

public String getUrl()
Returns the server url of this site root.

Returns:
the server url

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

hasSecureServer

public boolean hasSecureServer()
Returns true, if the site has a secure server.

Returns:
true, if the site has a secure server

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

addAlias

protected void addAlias(CmsSiteMatcher aliasServer)
Adds an alias for the site.

Parameters:
aliasServer - the sitematcher for the alias

setAliases

protected void setAliases(List aliases)
Sets the aliases for the site.

Parameters:
aliases - the aliases for the site

setSecureServer

protected void setSecureServer(CmsSiteMatcher secureServer)
Sets the secure server.

Parameters:
secureServer - the sitematcher of the secure server

setSiteMatcher

protected void setSiteMatcher(CmsSiteMatcher siteMatcher)
Sets the site matcher that describes the URL of this site.

Parameters:
siteMatcher - the site matcher that describes the URL of this site

setSiteRoot

protected void setSiteRoot(String siteRoot)
Sets the server URL prefix to which this site is mapped.

Parameters:
siteRoot - the server URL prefix to which this site is mapped

setSiteRootUUID

protected void setSiteRootUUID(CmsUUID siteRootUUID)
Sets the UUID of this site's root directory in the OpenCms VFS.

Parameters:
siteRootUUID - the UUID of this site's root directory in the OpenCms VFS

setTitle

protected void setTitle(String name)
Sets the display title of this site in the OpenCms VFS.

Parameters:
name - the display title of this site in the OpenCms VFS