org.apache.jetspeed.om.page.psml
Class AbstractBaseElement

java.lang.Object
  extended by org.apache.jetspeed.om.page.psml.AbstractBaseElement
All Implemented Interfaces:
java.io.Serializable, SecuredResource
Direct Known Subclasses:
AbstractNode, FragmentImpl

public abstract class AbstractBaseElement
extends java.lang.Object
implements java.io.Serializable, SecuredResource

Version:
$Id: AbstractBaseElement.java 516448 2007-03-09 16:25:47Z ate $
See Also:
Serialized Form

Constructor Summary
AbstractBaseElement()
           
 
Method Summary
static NodeSet checkAccess(NodeSet nodes, java.lang.String actions)
           checkAccess returns a set of nodes we can access.
 void checkAccess(java.lang.String actions)
           checkAccess
 void checkConstraints(java.util.List actions, java.util.List userPrincipals, java.util.List rolePrincipals, java.util.List groupPrincipals, boolean checkNodeOnly, boolean checkParentsOnly)
           checkConstraints
 void checkConstraints(java.lang.String actions)
           checkConstraints
 void checkPermissions(int mask)
           checkPermissions
 void checkPermissions(int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 void checkPermissions(java.lang.String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 boolean equals(java.lang.Object obj)
           equals
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 DocumentHandlerFactory getHandlerFactory()
           getHandlerFactory
 java.lang.String getId()
           
 java.lang.String getLogicalPermissionPath()
           getLogicalPermissionPath
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 java.lang.String getPhysicalPermissionPath()
           getPhysicalPermissionPath
 SecurityConstraints getSecurityConstraints()
           getSecurityConstraints
 java.lang.String getShortTitle()
           getShortTitle
 java.lang.String getTitle()
           getTitle
 boolean grantViewActionAccess()
           grantViewActionAccess
 int hashCode()
           hashCode
 void marshalling()
          marshalling - notification that this instance is to be saved to the persistent store
 SecurityConstraint newSecurityConstraint()
           newSecurityConstraint
 SecurityConstraints newSecurityConstraints()
           newSecurityConstraints
 void setConstraintsEnabled(boolean enabled)
           setConstraintsEnabled
 void setHandlerFactory(DocumentHandlerFactory factory)
           setHandlerFactory
 void setId(java.lang.String id)
           
 void setPermissionsEnabled(boolean enabled)
           setPermissionsEnabled
 void setSecurityConstraints(SecurityConstraints constraints)
           setSecurityConstraints
 void setShortTitle(java.lang.String title)
           setShortTitle
 void setTitle(java.lang.String title)
           setTitle
 java.lang.String toString()
           toString
 void unmarshalled()
          unmarshalled - notification that this instance has been loaded from the persistent store
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBaseElement

public AbstractBaseElement()
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getTitle

public java.lang.String getTitle()

getTitle

Returns:
See Also:
BaseElement.getTitle()

setTitle

public void setTitle(java.lang.String title)

setTitle

Parameters:
title -
See Also:
BaseElement.setTitle(java.lang.String)

getShortTitle

public java.lang.String getShortTitle()

getShortTitle

Returns:
short title
See Also:
BaseElement.getShortTitle()

setShortTitle

public void setShortTitle(java.lang.String title)

setShortTitle

Parameters:
title -
See Also:
BaseElement.setShortTitle(java.lang.String)

getConstraintsEnabled

public boolean getConstraintsEnabled()

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface SecuredResource
Returns:
whether security relies on PSML constraints
See Also:
org.apache.jetspeed.om.common.SecureResource#getConstraintsEnabled()

setConstraintsEnabled

public void setConstraintsEnabled(boolean enabled)

setConstraintsEnabled

Parameters:
enabled - indicator

getSecurityConstraints

public SecurityConstraints getSecurityConstraints()

getSecurityConstraints

Specified by:
getSecurityConstraints in interface SecuredResource
Returns:
the PSML security constraints
See Also:
org.apache.jetspeed.om.common.SecureResource#getSecurityConstraints()

newSecurityConstraints

public SecurityConstraints newSecurityConstraints()

newSecurityConstraints

Specified by:
newSecurityConstraints in interface SecuredResource
Returns:
a new security constraints object
See Also:
org.apache.jetspeed.om.common.SecureResource#newSecurityConstraints()

newSecurityConstraint

public SecurityConstraint newSecurityConstraint()

newSecurityConstraint

Specified by:
newSecurityConstraint in interface SecuredResource
Returns:
security constraint
See Also:
org.apache.jetspeed.om.common.SecureResource#newSecurityConstraint()

setSecurityConstraints

public void setSecurityConstraints(SecurityConstraints constraints)

setSecurityConstraints

Specified by:
setSecurityConstraints in interface SecuredResource
Parameters:
constraints -
See Also:
org.apache.jetspeed.om.common.SecureResource#setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints)

checkConstraints

public void checkConstraints(java.lang.String actions)
                      throws java.lang.SecurityException

checkConstraints

Specified by:
checkConstraints in interface SecuredResource
Parameters:
actions -
Throws:
java.lang.SecurityException
See Also:
org.apache.jetspeed.om.common.SecureResource#checkConstraints(java.lang.String)

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

checkConstraints

Parameters:
actions -
userPrincipals -
rolePrincipals -
groupPrincipals -
checkNodeOnly -
checkParentsOnly -
Throws:
java.lang.SecurityException

getPermissionsEnabled

public boolean getPermissionsEnabled()

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface SecuredResource
Returns:
See Also:
org.apache.jetspeed.om.common.SecureResource#getPermissionsEnabled()

setPermissionsEnabled

public void setPermissionsEnabled(boolean enabled)

setPermissionsEnabled

Parameters:
enabled - indicator

checkPermissions

public void checkPermissions(int mask)
                      throws java.lang.SecurityException

checkPermissions

Specified by:
checkPermissions in interface SecuredResource
Parameters:
mask - Mask of actions requested
Throws:
java.lang.SecurityException
See Also:
SecuredResource.checkPermissions(int)

checkPermissions

public void checkPermissions(int mask,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws java.lang.SecurityException

checkPermissions

Parameters:
mask - of actions
checkNodeOnly -
checkParentsOnly -
Throws:
java.lang.SecurityException

checkPermissions

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

checkPermissions

Parameters:
path -
mask - Mask of actions requested
checkNodeOnly -
checkParentsOnly -
Throws:
java.lang.SecurityException

getLogicalPermissionPath

public java.lang.String getLogicalPermissionPath()

getLogicalPermissionPath

Returns:
path used for permissions checks

getPhysicalPermissionPath

public java.lang.String getPhysicalPermissionPath()

getPhysicalPermissionPath

Returns:
path used for permissions checks

checkAccess

public void checkAccess(java.lang.String actions)
                 throws java.lang.SecurityException

checkAccess

Specified by:
checkAccess in interface SecuredResource
Parameters:
actions -
Throws:
java.lang.SecurityException
See Also:
org.apache.jetspeed.om.common.SecureResource#checkAccess(java.lang.String)

grantViewActionAccess

public boolean grantViewActionAccess()

grantViewActionAccess

Returns:
granted access for view action

getEffectivePageSecurity

public PageSecurity getEffectivePageSecurity()
getEffectivePageSecurity

Returns:
effective page security object

getHandlerFactory

public DocumentHandlerFactory getHandlerFactory()

getHandlerFactory

Returns:
element handler factory

setHandlerFactory

public void setHandlerFactory(DocumentHandlerFactory factory)

setHandlerFactory

Parameters:
factory - element handler factory

equals

public boolean equals(java.lang.Object obj)

equals

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
whether the supplied object equals this one
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

hashCode

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode for this object
See Also:
Object.hashCode()

toString

public java.lang.String toString()

toString

Overrides:
toString in class java.lang.Object
Returns:
the id as a string representation of this object
See Also:
Object.toString()

checkAccess

public static NodeSet checkAccess(NodeSet nodes,
                                  java.lang.String actions)

checkAccess returns a set of nodes we can access. It may be the passed in node set or a partial copy.

Parameters:
nodes -
actions -
Returns:
a NodeSet containing the nodes allowing access

unmarshalled

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


marshalling

public void marshalling()
marshalling - notification that this instance is to be saved to the persistent store



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