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:
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 NodeImpl
extends BaseElementImpl
implements org.apache.jetspeed.page.document.Node

NodeImpl

Version:
$Id$
Author:
Randy Watler

Field Summary
private  String extendedAttributeName
           
private  String extendedAttributeValue
           
private  String group
           
private  boolean hidden
           
private  String locale
           
private  String logicalPath
           
private  String mediatype
           
private  Collection metadataFields
           
private  PageMetadataImpl pageMetadata
           
private  org.apache.jetspeed.page.document.Node parent
           
private  String path
           
private  String role
           
private  String subsite
           
private  String user
           
 
Fields inherited from interface org.apache.jetspeed.page.document.Node
PATH_SEPARATOR, PATH_SEPARATOR_CHAR
 
Constructor Summary
NodeImpl(SecurityConstraintsImpl constraints)
           
 
Method Summary
 void checkConstraints(List actions, List userPrincipals, List rolePrincipals, List groupPrincipals, boolean checkNodeOnly, boolean checkParentsOnly)
          checkConstraints Check fully parameterized principal against specified security constraint scope.
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
          checkPermissions
protected  String defaultTitleFromName()
          defaultTitleFromName Compute default title from name.
static String getCanonicalNodePath(String path)
          getCanonicalNodePath Format paths used to set and query NodeImpl instances.
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 String getLogicalPermissionPath()
          getLogicalPermissionPath
 org.apache.jetspeed.om.common.GenericMetadata getMetadata()
           
 String getName()
          getName
 PageMetadataImpl getPageMetadata()
          getPageMetadata Get page manager specific metadata implementation.
 org.apache.jetspeed.page.document.Node getParent()
           
 String getPath()
           
 String getPhysicalPermissionPath()
          getPhysicalPermissionPath
 String getShortTitle(Locale locale)
           
 String getTitle(Locale locale)
           
abstract  String getType()
           
 String getUrl()
           
 boolean isHidden()
           
 PageMetadataImpl newPageMetadata(Collection fields)
          newPageMetadata Construct page manager specific metadata implementation.
 void setHidden(boolean hidden)
           
 void setName(String name)
          setName
 void setParent(org.apache.jetspeed.page.document.Node parent)
           
 void setPath(String path)
           
 
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
 

Field Detail

parent

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

hidden

private boolean hidden

metadataFields

private Collection metadataFields

path

private String path

subsite

private String subsite

user

private String user

role

private String role

group

private String group

mediatype

private String mediatype

locale

private String locale

extendedAttributeName

private String extendedAttributeName

extendedAttributeValue

private String extendedAttributeValue

pageMetadata

private PageMetadataImpl pageMetadata

logicalPath

private String logicalPath
Constructor Detail

NodeImpl

public NodeImpl(SecurityConstraintsImpl constraints)
Method Detail

getCanonicalNodePath

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

Parameters:
path - specified path
Returns:
canonical path

newPageMetadata

public PageMetadataImpl newPageMetadata(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 String defaultTitleFromName()
defaultTitleFromName Compute default title from name.

Returns:
default title

getName

public String getName()
Description copied from class: BaseElementImpl
getName

Specified by:
getName in interface org.apache.jetspeed.page.document.Node
Overrides:
getName in class BaseElementImpl
Returns:
element name

setName

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

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

getEffectivePageSecurity

public org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
Description copied from class: BaseElementImpl
getEffectivePageSecurity

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

checkConstraints

public void checkConstraints(List actions,
                             List userPrincipals,
                             List rolePrincipals,
                             List groupPrincipals,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws 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:
SecurityException

checkPermissions

public void checkPermissions(String path,
                             int mask,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws 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:
SecurityException

getLogicalPermissionPath

public String getLogicalPermissionPath()
Description copied from class: BaseElementImpl
getLogicalPermissionPath

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

getPhysicalPermissionPath

public String getPhysicalPermissionPath()
Description copied from class: BaseElementImpl
getPhysicalPermissionPath

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

getParent

public org.apache.jetspeed.page.document.Node getParent()
Specified by:
getParent in interface org.apache.jetspeed.page.document.Node

setParent

public void setParent(org.apache.jetspeed.page.document.Node parent)
Specified by:
setParent in interface org.apache.jetspeed.page.document.Node

getPath

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

setPath

public void setPath(String path)
Specified by:
setPath in interface org.apache.jetspeed.page.document.Node

getMetadata

public org.apache.jetspeed.om.common.GenericMetadata getMetadata()
Specified by:
getMetadata in interface org.apache.jetspeed.page.document.Node

getTitle

public String getTitle(Locale locale)
Specified by:
getTitle in interface org.apache.jetspeed.page.document.Node

getShortTitle

public String getShortTitle(Locale locale)
Specified by:
getShortTitle in interface org.apache.jetspeed.page.document.Node

getType

public abstract String getType()
Specified by:
getType in interface org.apache.jetspeed.page.document.Node

getUrl

public String getUrl()
Specified by:
getUrl in interface org.apache.jetspeed.page.document.Node

isHidden

public boolean isHidden()
Specified by:
isHidden in interface org.apache.jetspeed.page.document.Node

setHidden

public void setHidden(boolean hidden)
Specified by:
setHidden in interface org.apache.jetspeed.page.document.Node


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