com.arsdigita.kernel
Class SiteNode

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.kernel.SiteNode

Deprecated. Use Application instead.

public class SiteNode
extends ACSObject

A SiteNode represents a part of the URL hierarchy on a server. Each instance of a SiteNode may be mapped to an application instance for the purpose of providing access to that application.

For example, the URL "http://www.example.com/news/" can be broken down into:

The hierarchy is delimited by slashes (/).

Since:
ACS 5.0
Version:
1.0

Field Summary
static String versionId
          Deprecated.  
 
Fields inherited from class com.arsdigita.kernel.ACSObject
BASE_DATA_OBJECT_TYPE, CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
SiteNode()
          Deprecated. Default constructor.
SiteNode(BigDecimal id)
          Deprecated. Retrieves the SiteNode with the specified ID.
SiteNode(DataObject dataObject)
          Deprecated. Creates a new DomainObject instance to encapsulate a given data object.
SiteNode(OID oid)
          Deprecated. Retrieves a SiteNode that corresponds to the specified OID.
 
Method Summary
 void addStylesheet(Stylesheet sheet)
          Deprecated.  
 void afterDelete()
          Deprecated.  
protected  void beforeSave()
          Deprecated. Overrides the default save method.
static SiteNode createSiteNode(String name)
          Deprecated.  
static SiteNode createSiteNode(String name, SiteNode parent)
          Deprecated.  
protected  String getBaseDataObjectType()
          Deprecated. Returns the base data object type for this domain object class.
 SiteNodeCollection getChildren()
          Deprecated.  
 String getDisplayName()
          Deprecated. Returns a display name for this site node.
 String getName()
          Deprecated.  
 BigDecimal getNodeId()
          Deprecated.  
 PackageInstance getPackageInstance()
          Deprecated.  
 SiteNode getParent()
          Deprecated.  
static SiteNode getRootSiteNode()
          Deprecated.  
static SiteNode getSiteNode(String path)
          Deprecated. Finds the site node corresponding to the largest portion of the specified path.
static SiteNode getSiteNode(String path, boolean readOnly)
          Deprecated. Finds the site node corresponding to the largest portion of the specified path.
 Stylesheet getStylesheet(Locale locale, String outputType)
          Deprecated.  
 Stylesheet[] getStylesheets(Locale locale, String outputType)
          Deprecated.  
 String getURL()
          Deprecated.  
 String getUrl(javax.servlet.http.HttpServletRequest req)
          Deprecated.  
 String getURL(javax.servlet.http.HttpServletRequest req)
          Deprecated. Gets the URL of the site note.
 String getUrl(String contextPath)
          Deprecated.  
 String getURL(String contextPath)
          Deprecated.  
 String getURLNoContext()
          Deprecated.  
protected  void initialize()
          Deprecated. Called from base class (DomainObject) constructors.
 boolean isDirectory()
          Deprecated.  
 boolean isPattern()
          Deprecated.  
 void mountPackage(PackageInstance pkg)
          Deprecated.  
 void removeStylesheet(Stylesheet sheet)
          Deprecated.  
static void repopulateCache()
          Deprecated. for testing, it is necessary to remove all statically cached site nodes.
 void setName(String name)
          Deprecated.  
 void setParent(SiteNode siteNode)
          Deprecated.  
 String toString()
          Deprecated. Return the OID plus the flags N,M,D,U depending on whether the object is new, modified, deleted, or unknown.
 void unMountPackage()
          Deprecated.  
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

SiteNode

public SiteNode()
Deprecated. 
Default constructor. The contained DataObject is initialized with a new DataObject with an ObjectType of "SiteNode".

See Also:
DataObject, ObjectType

SiteNode

public SiteNode(DataObject dataObject)
Deprecated. 
Creates a new DomainObject instance to encapsulate a given data object.

Parameters:
dataObject - the data object to encapsulate in the new domain object
See Also:
Session.retrieve(String)

SiteNode

public SiteNode(BigDecimal id)
         throws DataObjectNotFoundException
Deprecated. 
Retrieves the SiteNode with the specified ID.

Parameters:
id - a SiteNode ID
Throws:
DataObjectNotFoundException - if the ID does not match a SiteNode in the system.

SiteNode

public SiteNode(OID oid)
         throws DataObjectNotFoundException
Deprecated. 
Retrieves a SiteNode that corresponds to the specified OID.

Parameters:
oid - the OID for the retrieved instance
See Also:
DomainObject.DomainObject(OID), OID
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()
Deprecated. 
Description copied from class: DomainObject
Returns the base data object type for this domain object class. Intended to be overrided by subclasses whenever the subclass will only work if their primary data object is of a certain base type.

Overrides:
getBaseDataObjectType in class ACSObject

initialize

protected void initialize()
Deprecated. 
Description copied from class: ACSObject
Called from base class (DomainObject) constructors.

Overrides:
initialize in class ACSObject

getURL

public String getURL(javax.servlet.http.HttpServletRequest req)
Deprecated. 
Gets the URL of the site note.

Parameters:
req - Servlet request. This is needed to get the context path, in case the servlet is not mounted at /.
Returns:
the URL of the site node, not the URL requested by the user!

getUrl

public String getUrl(javax.servlet.http.HttpServletRequest req)
Deprecated. 

getURL

public String getURL(String contextPath)
Deprecated. 
Returns:
the URL of the site node, not the URL requested by the user!

getUrl

public String getUrl(String contextPath)
Deprecated. 

getURL

public String getURL()
Deprecated. 

getURLNoContext

public String getURLNoContext()
Deprecated. 
Returns:
the URL of the site node, not the URL requested by the user!

getNodeId

public BigDecimal getNodeId()
Deprecated. 

setName

public void setName(String name)
Deprecated. 

setParent

public void setParent(SiteNode siteNode)
Deprecated. 

getName

public String getName()
Deprecated. 

getDisplayName

public String getDisplayName()
Deprecated. 
Returns a display name for this site node.

Overrides:
getDisplayName in class ACSObject
Returns:
the displayable name for this object.
See Also:
ACSObject.getDisplayName()

isDirectory

public boolean isDirectory()
Deprecated. 
Returns:
true if this SiteNode can have children; false otherwise.

isPattern

public boolean isPattern()
Deprecated.  

Returns:
true if the SiteNode supports patterns; false otherwise.

getPackageInstance

public PackageInstance getPackageInstance()
Deprecated. 

mountPackage

public void mountPackage(PackageInstance pkg)
Deprecated. 

unMountPackage

public void unMountPackage()
Deprecated. 

getParent

public SiteNode getParent()
Deprecated. 

getChildren

public SiteNodeCollection getChildren()
Deprecated. 

getRootSiteNode

public static SiteNode getRootSiteNode()
Deprecated. 

repopulateCache

public static void repopulateCache()
Deprecated. 
for testing, it is necessary to remove all statically cached site nodes. Call this method AFTER creating any new site nodes as part of your unit test's setup method


getSiteNode

public static SiteNode getSiteNode(String path,
                                   boolean readOnly)
                            throws DataObjectNotFoundException
Deprecated. 
Finds the site node corresponding to the largest portion of the specified path. The path must begin with '/'. Any trailing slashes are ignored.

Parameters:
path - an absolute path to find the site node of
readOnly - if true, we return a read-only site node from our cache, which may be disconnected from a db session and can't be modified or deleted. (This is the desired behavior the majority of the time.)
Returns:
the site node corresponding to the path, or null if no matching site node can be found.
Throws:
DataObjectNotFoundException - if the path does not start with a slash (probably the wrong behavior) or if the RootSiteNode was requested but couldn't be found (also probably wrong).

getSiteNode

public static SiteNode getSiteNode(String path)
                            throws DataObjectNotFoundException
Deprecated. 
Finds the site node corresponding to the largest portion of the specified path. The path must begin with '/'. Any trailing slashes are ignored.

Parameters:
path - an absolute path to find the site node of
Returns:
the site node corresponding to the path, or null if no matching site node can be found.
Throws:
DataObjectNotFoundException - if the path does not start with a slash (probably the wrong behavior) or if the RootSiteNode was requested but couldn't be found (also probably wrong).

createSiteNode

public static SiteNode createSiteNode(String name)
Deprecated. 

beforeSave

protected void beforeSave()
Deprecated. 
Overrides the default save method. If we've changed the URL of this site node (either by changing its name or its parent), we need to also update the URL for all descendants of this site node.

Overrides:
beforeSave in class ACSObject

afterDelete

public void afterDelete()
Deprecated. 
Overrides:
afterDelete in class DomainObject

createSiteNode

public static SiteNode createSiteNode(String name,
                                      SiteNode parent)
Deprecated. 

toString

public String toString()
Deprecated. 
Description copied from class: DomainObject
Return the OID plus the flags N,M,D,U depending on whether the object is new, modified, deleted, or unknown. Unknown is for objects that have been invalidated.

Overrides:
toString in class DomainObject

addStylesheet

public void addStylesheet(Stylesheet sheet)
Deprecated. 

getStylesheets

public Stylesheet[] getStylesheets(Locale locale,
                                   String outputType)
Deprecated. 

getStylesheet

public Stylesheet getStylesheet(Locale locale,
                                String outputType)
Deprecated. 

removeStylesheet

public void removeStylesheet(Stylesheet sheet)
Deprecated. 


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC