org.apache.jetspeed.om.page.impl
Class BaseElementImpl

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

public abstract class BaseElementImpl
extends java.lang.Object
implements BaseElement

BaseElementImpl

Version:
$Id$
Author:
Randy Watler

Constructor Summary
protected BaseElementImpl(SecurityConstraintsImpl constraints)
           
 
Method Summary
 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 Check fully parameterized principal against specified security constraint scope.
 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 o)
           
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 java.lang.String getId()
          Returns the unique Id of this element.
 java.lang.String getLogicalPermissionPath()
          getLogicalPermissionPath
 java.lang.String getName()
          getName
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 java.lang.String getPhysicalPermissionPath()
          getPhysicalPermissionPath
 SecurityConstraints getSecurityConstraints()
           getSecurityConstraints
 java.lang.String getShortTitle()
          Returns the short title in the default Locale
 java.lang.String getTitle()
          Returns the title in the default Locale
 boolean grantViewActionAccess()
          grantViewActionAccess
 int hashCode()
           
 SecurityConstraint newSecurityConstraint()
           newSecurityConstraint
 SecurityConstraints newSecurityConstraints()
           newSecurityConstraints
 void resetCachedSecurityConstraints()
          resetCachedSecurityConstraints
 void setConstraintsEnabled(boolean enabled)
          setConstraintsEnabled
 void setName(java.lang.String name)
          setName
 void setPermissionsEnabled(boolean enabled)
          setPermissionsEnabled
 void setSecurityConstraints(SecurityConstraints constraints)
           setSecurityConstraints
 void setShortTitle(java.lang.String shortTitle)
          Sets the short title for the default Locale
 void setTitle(java.lang.String title)
          Sets the title for the default Locale
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseElementImpl

protected BaseElementImpl(SecurityConstraintsImpl constraints)
Method Detail

getName

public java.lang.String getName()
getName

Returns:
element name

setName

public void setName(java.lang.String name)
setName

Parameters:
name - element name

setConstraintsEnabled

public void setConstraintsEnabled(boolean enabled)
setConstraintsEnabled

Parameters:
enabled - enable/disable security constraints checks

setPermissionsEnabled

public void setPermissionsEnabled(boolean enabled)
setPermissionsEnabled

Parameters:
enabled - enable/disable security permissions checks

grantViewActionAccess

public boolean grantViewActionAccess()
grantViewActionAccess

Returns:
granted access for view action

getEffectivePageSecurity

public PageSecurity getEffectivePageSecurity()
getEffectivePageSecurity

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
checkConstraints Check fully parameterized principal against specified security constraint scope.

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

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

checkPermissions

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

Parameters:
mask - mask of actions to check
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
checkPermissions

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

getConstraintsEnabled

public boolean getConstraintsEnabled()
Description copied from interface: SecuredResource

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface SecuredResource
Returns:
enabled indicator

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSecurityConstraints

public SecurityConstraints getSecurityConstraints()
Description copied from interface: SecuredResource

getSecurityConstraints

Specified by:
getSecurityConstraints in interface SecuredResource
Returns:
security constraints for resource

newSecurityConstraints

public SecurityConstraints newSecurityConstraints()
Description copied from interface: SecuredResource

newSecurityConstraints

Specified by:
newSecurityConstraints in interface SecuredResource
Returns:
a newly created SecurityConstraints object for use in SecuredResource

newSecurityConstraint

public SecurityConstraint newSecurityConstraint()
Description copied from interface: SecuredResource

newSecurityConstraint

Specified by:
newSecurityConstraint in interface SecuredResource
Returns:
a newly created SecurityConstraint object for use in SecuredResource

setSecurityConstraints

public void setSecurityConstraints(SecurityConstraints constraints)
Description copied from interface: SecuredResource

setSecurityConstraints

Specified by:
setSecurityConstraints in interface SecuredResource
Parameters:
constraints - security constraints for resource

checkConstraints

public void checkConstraints(java.lang.String actions)
                      throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkConstraints

Specified by:
checkConstraints in interface SecuredResource
Parameters:
actions - list to be checked against in CSV string form
Throws:
java.lang.SecurityException

resetCachedSecurityConstraints

public void resetCachedSecurityConstraints()
resetCachedSecurityConstraints


getPermissionsEnabled

public boolean getPermissionsEnabled()
Description copied from interface: SecuredResource

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface SecuredResource
Returns:
enabled indicator

checkPermissions

public void checkPermissions(int mask)
                      throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkPermissions

Specified by:
checkPermissions in interface SecuredResource
Parameters:
mask - Mask of actions to be checked
Throws:
java.lang.SecurityException

checkAccess

public void checkAccess(java.lang.String actions)
                 throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkAccess

Specified by:
checkAccess in interface SecuredResource
Parameters:
actions - list to be checked against in CSV string form
Throws:
java.lang.SecurityException

getId

public java.lang.String getId()
Description copied from interface: BaseElement
Returns the unique Id of this element. This id is guaranteed to be unique from the complete portal and is suitable to be used as a unique key.

Specified by:
getId in interface BaseElement
Returns:
the unique id of this element.

getTitle

public java.lang.String getTitle()
Description copied from interface: BaseElement
Returns the title in the default Locale

Specified by:
getTitle in interface BaseElement
Returns:
the page title

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: BaseElement
Sets the title for the default Locale

Specified by:
setTitle in interface BaseElement
Parameters:
title - the new title

getShortTitle

public java.lang.String getShortTitle()
Description copied from interface: BaseElement
Returns the short title in the default Locale

Specified by:
getShortTitle in interface BaseElement
Returns:
the page short title

setShortTitle

public void setShortTitle(java.lang.String shortTitle)
Description copied from interface: BaseElement
Sets the short title for the default Locale

Specified by:
setShortTitle in interface BaseElement
Parameters:
shortTitle - the new title


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