org.liquidsite.app.template
Class SiteBean

java.lang.Object
  extended byorg.liquidsite.app.template.TemplateBean
      extended byorg.liquidsite.app.template.ContentBean
          extended byorg.liquidsite.app.template.SiteBean

public class SiteBean
extends ContentBean

A site template bean. This class is used to access sites from the template data model.


Method Summary
 java.lang.String getDirectory()
          Returns the site base directory.
 java.lang.String getHost()
          Returns the site host name.
 int getPort()
          Returns the site port number.
 java.lang.String getProtocol()
          Returns the site protocol.
 boolean isAdmin()
          Checks if this site is an admin site.
protected  java.lang.String linkTo(java.lang.String path)
          Returns a link to an object in the site.
 
Methods inherited from class org.liquidsite.app.template.ContentBean
getContent, getCreated, getDate, getId, getLock, getName, getOnline, getParent, getPath, getRevision, getUser, hasAccess, toString
 
Methods inherited from class org.liquidsite.app.template.TemplateBean
getContext, getContextRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getProtocol

public java.lang.String getProtocol()
Returns the site protocol. This string is identical to the protocol specified in the URL, i.e. "http" or "https".

Returns:
the site protocol

getHost

public java.lang.String getHost()
Returns the site host name. Note that if this site has a default host name, the current request host name will be returned.

Returns:
the site or request host name

getPort

public int getPort()
Returns the site port number. Note that if this site has a default port number, the current request port number will be returned.

Returns:
the site or request port number

getDirectory

public java.lang.String getDirectory()
Returns the site base directory.

Returns:
the site base directory

isAdmin

public boolean isAdmin()
Checks if this site is an admin site.

Returns:
true if this is an admin site, or false otherwise

linkTo

protected java.lang.String linkTo(java.lang.String path)
Returns a link to an object in the site. All paths must be relative to the root directory of the site. Also, this method uses the request host name and port numbers if this site uses default values.

Parameters:
path - the site-relative link path
Returns:
the URL to the site path