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

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

public abstract class AbstractBaseElement
extends Object
implements Serializable, org.apache.jetspeed.om.common.SecuredResource

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

Field Summary
private  org.apache.jetspeed.om.common.SecurityConstraints constraints
           
private  boolean constraintsEnabled
           
private  org.apache.jetspeed.page.document.DocumentHandlerFactory handlerFactory
           
private  String id
           
private static org.apache.commons.logging.Log log
           
private  boolean permissionsEnabled
           
private  String shortTitle
           
private  String title
           
 
Constructor Summary
AbstractBaseElement()
           
 
Method Summary
static org.apache.jetspeed.page.document.NodeSet checkAccess(org.apache.jetspeed.page.document.NodeSet nodes, String actions)
           checkAccess returns a set of nodes we can access.
 void checkAccess(String actions)
           checkAccess
 void checkConstraints(List actions, List userPrincipals, List rolePrincipals, List groupPrincipals, boolean checkNodeOnly, boolean checkParentsOnly)
           checkConstraints
 void checkConstraints(String actions)
           checkConstraints
 void checkPermissions(int mask)
           checkPermissions
 void checkPermissions(int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 boolean equals(Object obj)
           equals
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 org.apache.jetspeed.page.document.DocumentHandlerFactory getHandlerFactory()
           getHandlerFactory
 String getId()
           
 String getLogicalPermissionPath()
           getLogicalPermissionPath
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 String getPhysicalPermissionPath()
           getPhysicalPermissionPath
 org.apache.jetspeed.om.common.SecurityConstraints getSecurityConstraints()
           getSecurityConstraints
 String getShortTitle()
           getShortTitle
 String getTitle()
           getTitle
 boolean grantViewActionAccess()
           grantViewActionAccess
 int hashCode()
           hashCode
 void marshalling()
          marshalling - notification that this instance is to be saved to the persistent store
 org.apache.jetspeed.om.common.SecurityConstraint newSecurityConstraint()
           newSecurityConstraint
 org.apache.jetspeed.om.common.SecurityConstraints newSecurityConstraints()
           newSecurityConstraints
 void setConstraintsEnabled(boolean enabled)
           setConstraintsEnabled
 void setHandlerFactory(org.apache.jetspeed.page.document.DocumentHandlerFactory factory)
           setHandlerFactory
 void setId(String id)
           
 void setPermissionsEnabled(boolean enabled)
           setPermissionsEnabled
 void setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints constraints)
           setSecurityConstraints
 void setShortTitle(String title)
           setShortTitle
 void setTitle(String title)
           setTitle
 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
 

Field Detail

log

private static final org.apache.commons.logging.Log log

id

private String id

title

private String title

shortTitle

private String shortTitle

constraintsEnabled

private boolean constraintsEnabled

constraints

private org.apache.jetspeed.om.common.SecurityConstraints constraints

permissionsEnabled

private boolean permissionsEnabled

handlerFactory

private org.apache.jetspeed.page.document.DocumentHandlerFactory handlerFactory
Constructor Detail

AbstractBaseElement

public AbstractBaseElement()
Method Detail

getId

public String getId()

setId

public void setId(String id)

getTitle

public String getTitle()

getTitle

Returns:
See Also:
BaseElement.getTitle()

setTitle

public void setTitle(String title)

setTitle

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

getShortTitle

public String getShortTitle()

getShortTitle

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

setShortTitle

public void setShortTitle(String title)

setShortTitle

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

getConstraintsEnabled

public boolean getConstraintsEnabled()

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface org.apache.jetspeed.om.common.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 org.apache.jetspeed.om.common.SecurityConstraints getSecurityConstraints()

getSecurityConstraints

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

newSecurityConstraints

public org.apache.jetspeed.om.common.SecurityConstraints newSecurityConstraints()

newSecurityConstraints

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

newSecurityConstraint

public org.apache.jetspeed.om.common.SecurityConstraint newSecurityConstraint()

newSecurityConstraint

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

setSecurityConstraints

public void setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints constraints)

setSecurityConstraints

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

checkConstraints

public void checkConstraints(String actions)
                      throws SecurityException

checkConstraints

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

checkConstraints

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

checkConstraints

Parameters:
actions -
userPrincipals -
rolePrincipals -
groupPrincipals -
checkNodeOnly -
checkParentsOnly -
Throws:
SecurityException

getPermissionsEnabled

public boolean getPermissionsEnabled()

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface org.apache.jetspeed.om.common.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 SecurityException

checkPermissions

Specified by:
checkPermissions in interface org.apache.jetspeed.om.common.SecuredResource
Parameters:
mask - Mask of actions requested
Throws:
SecurityException
See Also:
SecuredResource.checkPermissions(int)

checkPermissions

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

checkPermissions

Parameters:
mask - of actions
checkNodeOnly -
checkParentsOnly -
Throws:
SecurityException

checkPermissions

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

checkPermissions

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

getLogicalPermissionPath

public String getLogicalPermissionPath()

getLogicalPermissionPath

Returns:
path used for permissions checks

getPhysicalPermissionPath

public String getPhysicalPermissionPath()

getPhysicalPermissionPath

Returns:
path used for permissions checks

checkAccess

public void checkAccess(String actions)
                 throws SecurityException

checkAccess

Specified by:
checkAccess in interface org.apache.jetspeed.om.common.SecuredResource
Parameters:
actions -
Throws:
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 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
getEffectivePageSecurity

Returns:
effective page security object

getHandlerFactory

public org.apache.jetspeed.page.document.DocumentHandlerFactory getHandlerFactory()

getHandlerFactory

Returns:
element handler factory

setHandlerFactory

public void setHandlerFactory(org.apache.jetspeed.page.document.DocumentHandlerFactory factory)

setHandlerFactory

Parameters:
factory - element handler factory

equals

public boolean equals(Object obj)

equals

Overrides:
equals in class 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 Object
Returns:
the hashcode for this object
See Also:
Object.hashCode()

toString

public String toString()

toString

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

checkAccess

public static org.apache.jetspeed.page.document.NodeSet checkAccess(org.apache.jetspeed.page.document.NodeSet nodes,
                                                                    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-2007 Apache Software Foundation. All Rights Reserved.