org.apache.jetspeed.page.document.impl
Class NodeImpl

java.lang.Object
  extended by org.apache.jetspeed.om.page.impl.BaseElementImpl
      extended by org.apache.jetspeed.page.document.impl.NodeImpl
All Implemented Interfaces:
SecuredResource, BaseElement, Node
Direct Known Subclasses:
DocumentImpl, FolderImpl

public abstract class NodeImpl
extends BaseElementImpl
implements Node

NodeImpl

Version:
$Id$
Author:
Randy Watler

Field Summary
 
Fields inherited from interface org.apache.jetspeed.page.document.Node
PATH_SEPARATOR, PATH_SEPARATOR_CHAR
 
Constructor Summary
NodeImpl(SecurityConstraintsImpl constraints)
           
 
Method Summary
 void checkConstraints(java.util.List actions, java.util.List userPrincipals, java.util.List rolePrincipals, java.util.List groupPrincipals, boolean checkNodeOnly, boolean checkParentsOnly)
          checkConstraints Check fully parameterized principal against specified security constraint scope.
 void checkPermissions(java.lang.String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
          checkPermissions
protected  java.lang.String defaultTitleFromName()
          defaultTitleFromName Compute default title from name.
static java.lang.String getCanonicalNodePath(java.lang.String path)
          getCanonicalNodePath Format paths used to set and query NodeImpl instances.
 PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 java.lang.String getLogicalPermissionPath()
          getLogicalPermissionPath
 GenericMetadata getMetadata()
           getMetadata
 java.lang.String getName()
          getName
 PageMetadataImpl getPageMetadata()
          getPageMetadata Get page manager specific metadata implementation.
 Node getParent()
           getParent
 java.lang.String getPath()
           getPath
 java.lang.String getPhysicalPermissionPath()
          getPhysicalPermissionPath
 java.lang.String getShortTitle(java.util.Locale locale)
           getShortTitle
 java.lang.String getTitle(java.util.Locale locale)
           getTitle
abstract  java.lang.String getType()
           getType
 java.lang.String getUrl()
           getUrl
 boolean isHidden()
           isHidden
 PageMetadataImpl newPageMetadata(java.util.Collection fields)
          newPageMetadata Construct page manager specific metadata implementation.
 void setHidden(boolean hidden)
           setHidden
 void setName(java.lang.String name)
          setName
 void setParent(Node parent)
           setParent
 void setPath(java.lang.String path)
           setPath
 
Methods inherited from class org.apache.jetspeed.om.page.impl.BaseElementImpl
checkAccess, checkConstraints, checkPermissions, checkPermissions, equals, getConstraintsEnabled, getId, getPermissionsEnabled, getSecurityConstraints, getShortTitle, getTitle, grantViewActionAccess, hashCode, newSecurityConstraint, newSecurityConstraints, resetCachedSecurityConstraints, setConstraintsEnabled, setPermissionsEnabled, setSecurityConstraints, setShortTitle, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

NodeImpl

public NodeImpl(SecurityConstraintsImpl constraints)
Method Detail

getCanonicalNodePath

public static java.lang.String getCanonicalNodePath(java.lang.String path)
getCanonicalNodePath Format paths used to set and query NodeImpl instances.

Parameters:
path - specified path
Returns:
canonical path

newPageMetadata

public PageMetadataImpl newPageMetadata(java.util.Collection fields)
newPageMetadata Construct page manager specific metadata implementation.

Parameters:
fields - mutable fields collection
Returns:
page metadata

getPageMetadata

public PageMetadataImpl getPageMetadata()
getPageMetadata Get page manager specific metadata implementation.

Returns:
page metadata

defaultTitleFromName

protected java.lang.String defaultTitleFromName()
defaultTitleFromName Compute default title from name.

Returns:
default title

getName

public java.lang.String getName()
Description copied from class: BaseElementImpl
getName

Specified by:
getName in interface Node
Overrides:
getName in class BaseElementImpl
Returns:
element name

setName

public void setName(java.lang.String name)
Description copied from class: BaseElementImpl
setName

Overrides:
setName in class BaseElementImpl
Parameters:
name - element name

getEffectivePageSecurity

public PageSecurity getEffectivePageSecurity()
Description copied from class: BaseElementImpl
getEffectivePageSecurity

Overrides:
getEffectivePageSecurity in class BaseElementImpl
Returns:
effective page security object

checkConstraints

public void checkConstraints(java.util.List actions,
                             java.util.List userPrincipals,
                             java.util.List rolePrincipals,
                             java.util.List groupPrincipals,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws java.lang.SecurityException
Description copied from class: BaseElementImpl
checkConstraints Check fully parameterized principal against specified security constraint scope.

Overrides:
checkConstraints in class BaseElementImpl
Parameters:
actions - actions to check
userPrincipals - principal users list
rolePrincipals - principal roles list
groupPrincipals - principal group list
checkNodeOnly - check node scope only
checkParentsOnly - check parent folder scope only
Throws:
java.lang.SecurityException

checkPermissions

public void checkPermissions(java.lang.String path,
                             int mask,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws java.lang.SecurityException
Description copied from class: BaseElementImpl
checkPermissions

Overrides:
checkPermissions in class BaseElementImpl
Parameters:
path - permissions path to check
mask - mask of actions to check
checkNodeOnly - check node scope only
checkParentsOnly - check parent folder scope only
Throws:
java.lang.SecurityException

getLogicalPermissionPath

public java.lang.String getLogicalPermissionPath()
Description copied from class: BaseElementImpl
getLogicalPermissionPath

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

getPhysicalPermissionPath

public java.lang.String getPhysicalPermissionPath()
Description copied from class: BaseElementImpl
getPhysicalPermissionPath

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

getParent

public Node getParent()
Description copied from interface: Node

getParent

Specified by:
getParent in interface Node
Returns:

setParent

public void setParent(Node parent)
Description copied from interface: Node

setParent

Specified by:
setParent in interface Node

getPath

public java.lang.String getPath()
Description copied from interface: Node

getPath

Specified by:
getPath in interface Node
Returns:

setPath

public void setPath(java.lang.String path)
Description copied from interface: Node

setPath

Sets the full-qualified path of this node.

Specified by:
setPath in interface Node

getMetadata

public GenericMetadata getMetadata()
Description copied from interface: Node

getMetadata

Specified by:
getMetadata in interface Node
Returns:

getTitle

public java.lang.String getTitle(java.util.Locale locale)
Description copied from interface: Node

getTitle

Returns the title for the specified locale.

Specified by:
getTitle in interface Node
Returns:
localized title of this Node.

getShortTitle

public java.lang.String getShortTitle(java.util.Locale locale)
Description copied from interface: Node

getShortTitle

Returns the short title for the specified locale.

Specified by:
getShortTitle in interface Node
Returns:
localized title of this Node.

getType

public abstract java.lang.String getType()
Description copied from interface: Node

getType

Specified by:
getType in interface Node
Returns:

getUrl

public java.lang.String getUrl()
Description copied from interface: Node

getUrl

Specified by:
getUrl in interface Node
Returns:

isHidden

public boolean isHidden()
Description copied from interface: Node

isHidden

Whether or not this Node should be hidden in terms of the view. This MUST NOT restrict the presence of this node in terms of being returned in org.apache.jetspeed.page.document.NodeSet.

Specified by:
isHidden in interface Node
Returns:
hidden flag

setHidden

public void setHidden(boolean hidden)
Description copied from interface: Node

setHidden

Whether or not this Node should be hidden in terms of the view.

Specified by:
setHidden in interface Node
Parameters:
hidden - flag


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