org.apache.jetspeed.page.document.psml
Class AbstractNode

java.lang.Object
  extended by org.apache.jetspeed.om.page.psml.AbstractBaseElement
      extended by org.apache.jetspeed.page.document.psml.AbstractNode
All Implemented Interfaces:
Serializable, org.apache.jetspeed.om.common.SecuredResource, org.apache.jetspeed.om.page.BaseElement, org.apache.jetspeed.page.document.Node
Direct Known Subclasses:
DocumentImpl, FolderImpl

public abstract class AbstractNode
extends AbstractBaseElement
implements org.apache.jetspeed.page.document.Node

AbstractNode

Version:
$Id: AbstractNode.java 551606 2007-06-28 16:07:53Z taylor $
Author:
Scott T. Weaver
See Also:
Serialized Form

Field Summary
private  boolean dirty
           
private  boolean hidden
           
private  PageMetadataImpl metadata
           
private  org.apache.jetspeed.page.document.Node parent
           
private  String path
           
private  String profiledPath
           
private  String url
           
 
Fields inherited from interface org.apache.jetspeed.page.document.Node
PATH_SEPARATOR, PATH_SEPARATOR_CHAR
 
Constructor Summary
AbstractNode()
           
 
Method Summary
 void checkConstraints(List actions, List userPrincipals, List rolePrincipals, List groupPrincipals, boolean checkNodeOnly, boolean checkParentsOnly)
           checkConstraints
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 String getLogicalPermissionPath()
           getLogicalPermissionPath
 org.apache.jetspeed.om.common.GenericMetadata getMetadata()
          getMetadata - get/construct metadata
 Collection getMetadataFields()
          getMetadataFields - get metadata fields collection for marshalling/unmarshalling
 String getName()
           getName
private  PageMetadataImpl getPageMetadata()
          getPageMetadata - get/construct page metadata instance
 org.apache.jetspeed.page.document.Node getParent()
           getParent
 org.apache.jetspeed.page.document.Node getParent(boolean checkAccess)
           getParent
 String getPath()
           
 String getPhysicalPermissionPath()
           getPhysicalPermissionPath
 String getProfiledPath()
           
 String getShortTitle(Locale locale)
           getShortTitle
 String getTitle(Locale locale)
           getTitle
 String getTitleName()
          getTitleName - get name for use as default titles
 String getUrl()
           getUrl
 boolean isDirty()
           
 boolean isHidden()
           isHidden
 void setDirty(boolean dirty)
           
 void setHidden(boolean hidden)
           
 void setMetadata(org.apache.jetspeed.om.common.GenericMetadata metadata)
          setMetadata - set metadata fields
 void setMetadataFields(Collection metadataFields)
          setMetadataFields - set metadata fields collection
 void setParent(org.apache.jetspeed.page.document.Node parent)
           setParent
 void setPath(String path)
           setPath
 void setProfiledPath(String profiledPath)
           
 void setUrl(String url)
           setUrl
 void unmarshalled()
          unmarshalled - notification that this instance has been loaded from the persistent store
 
Methods inherited from class org.apache.jetspeed.om.page.psml.AbstractBaseElement
checkAccess, checkAccess, checkConstraints, checkPermissions, checkPermissions, equals, getConstraintsEnabled, getHandlerFactory, getId, getPermissionsEnabled, getSecurityConstraints, getShortTitle, getTitle, grantViewActionAccess, hashCode, marshalling, newSecurityConstraint, newSecurityConstraints, setConstraintsEnabled, setHandlerFactory, setId, setPermissionsEnabled, setSecurityConstraints, setShortTitle, setTitle, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.page.document.Node
getType
 
Methods inherited from interface org.apache.jetspeed.om.page.BaseElement
getId, getShortTitle, getTitle, setShortTitle, setTitle
 
Methods inherited from interface org.apache.jetspeed.om.common.SecuredResource
checkAccess, checkConstraints, checkPermissions, getConstraintsEnabled, getPermissionsEnabled, getSecurityConstraints, newSecurityConstraint, newSecurityConstraints, setSecurityConstraints
 

Field Detail

metadata

private PageMetadataImpl metadata

parent

private org.apache.jetspeed.page.document.Node parent

path

private String path

url

private String url

hidden

private boolean hidden

profiledPath

private String profiledPath

dirty

private boolean dirty
Constructor Detail

AbstractNode

public AbstractNode()
Method Detail

getMetadata

public org.apache.jetspeed.om.common.GenericMetadata getMetadata()
getMetadata - get/construct metadata

Specified by:
getMetadata in interface org.apache.jetspeed.page.document.Node
Returns:
metadata

setMetadata

public void setMetadata(org.apache.jetspeed.om.common.GenericMetadata metadata)
setMetadata - set metadata fields

Parameters:
metadata - metadata

getMetadataFields

public Collection getMetadataFields()
getMetadataFields - get metadata fields collection for marshalling/unmarshalling

Returns:
metadata fields collection

setMetadataFields

public void setMetadataFields(Collection metadataFields)
setMetadataFields - set metadata fields collection

Parameters:
metadataFields - metadata fields collection

getPageMetadata

private PageMetadataImpl getPageMetadata()
getPageMetadata - get/construct page metadata instance

Returns:
metadata instance

getTitle

public String getTitle(Locale locale)

getTitle

Specified by:
getTitle in interface org.apache.jetspeed.page.document.Node
Parameters:
locale -
Returns:
title in specified locale
See Also:
Node.getTitle(java.util.Locale)

getShortTitle

public String getShortTitle(Locale locale)

getShortTitle

Specified by:
getShortTitle in interface org.apache.jetspeed.page.document.Node
Parameters:
locale -
Returns:
short title in specified locale
See Also:
Node.getShortTitle(java.util.Locale)

getParent

public org.apache.jetspeed.page.document.Node getParent(boolean checkAccess)

getParent

Parameters:
checkAccess - flag
Returns:
parent node

getParent

public org.apache.jetspeed.page.document.Node getParent()

getParent

Specified by:
getParent in interface org.apache.jetspeed.page.document.Node
Returns:
parent node
See Also:
Node.getParent()

setParent

public void setParent(org.apache.jetspeed.page.document.Node parent)

setParent

Specified by:
setParent in interface org.apache.jetspeed.page.document.Node
Parameters:
parent -
See Also:
Node.setParent(Node)

getName

public String getName()

getName

Specified by:
getName in interface org.apache.jetspeed.page.document.Node
Returns:
Name
See Also:
Node.getName()

getTitleName

public String getTitleName()
getTitleName - get name for use as default titles

Returns:
title name

getPath

public String getPath()
Specified by:
getPath in interface org.apache.jetspeed.page.document.Node
Returns:
Returns the path.

setPath

public void setPath(String path)

setPath

Specified by:
setPath in interface org.apache.jetspeed.page.document.Node
Parameters:
path - The path to set.

getUrl

public String getUrl()

getUrl

Same as invoking Node.getPath() unless url explicitly set.

Specified by:
getUrl in interface org.apache.jetspeed.page.document.Node
Returns:
url as string
See Also:
Node.getUrl()

setUrl

public void setUrl(String url)

setUrl

Parameters:
url - The url to set.

isHidden

public boolean isHidden()

isHidden

Specified by:
isHidden in interface org.apache.jetspeed.page.document.Node
Returns:
hidden
See Also:
Node.isHidden()

setHidden

public void setHidden(boolean hidden)
Specified by:
setHidden in interface org.apache.jetspeed.page.document.Node
Parameters:
hidden - The hidden to set.

getProfiledPath

public String getProfiledPath()
Returns:
Returns the profiled path.

setProfiledPath

public void setProfiledPath(String profiledPath)
Parameters:
profiledPath - The profiled path to set.

getEffectivePageSecurity

public org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
getEffectivePageSecurity

Overrides:
getEffectivePageSecurity in class AbstractBaseElement
Returns:
effective page security object
See Also:
AbstractBaseElement.getEffectivePageSecurity()

checkConstraints

public void checkConstraints(List actions,
                             List userPrincipals,
                             List rolePrincipals,
                             List groupPrincipals,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws SecurityException

checkConstraints

Overrides:
checkConstraints in class AbstractBaseElement
Parameters:
actions -
userPrincipals -
rolePrincipals -
groupPrincipals -
checkNodeOnly -
checkParentsOnly -
Throws:
SecurityException

checkPermissions

public void checkPermissions(String path,
                             int mask,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws SecurityException

checkPermissions

Overrides:
checkPermissions in class AbstractBaseElement
Parameters:
path -
mask - Mask of actions requested
checkNodeOnly -
checkParentsOnly -
Throws:
SecurityException

getLogicalPermissionPath

public String getLogicalPermissionPath()

getLogicalPermissionPath

Overrides:
getLogicalPermissionPath in class AbstractBaseElement
Returns:
path used for permissions checks

getPhysicalPermissionPath

public String getPhysicalPermissionPath()

getPhysicalPermissionPath

Overrides:
getPhysicalPermissionPath in class AbstractBaseElement
Returns:
path used for permissions checks

unmarshalled

public void unmarshalled()
unmarshalled - notification that this instance has been loaded from the persistent store

Overrides:
unmarshalled in class AbstractBaseElement

isDirty

public boolean isDirty()

setDirty

public void setDirty(boolean dirty)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.