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

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

public abstract class BaseElementImpl
extends Object
implements org.apache.jetspeed.om.page.BaseElement

BaseElementImpl

Version:
$Id$
Author:
Randy Watler

Field Summary
private  SecurityConstraintsImpl constraints
           
private  boolean constraintsEnabled
           
private  int id
           
private  String name
           
private  boolean permissionsEnabled
           
private  String shortTitle
           
private  String title
           
 
Constructor Summary
protected BaseElementImpl(SecurityConstraintsImpl constraints)
           
 
Method Summary
 void checkAccess(String actions)
           
 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 checkConstraints(String actions)
           
 void checkPermissions(int mask)
           
 void checkPermissions(int mask, boolean checkNodeOnly, boolean checkParentsOnly)
          checkPermissions
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
          checkPermissions
 boolean equals(Object o)
           
 boolean getConstraintsEnabled()
           
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 String getId()
           
 String getLogicalPermissionPath()
          getLogicalPermissionPath
 String getName()
          getName
 boolean getPermissionsEnabled()
           
 String getPhysicalPermissionPath()
          getPhysicalPermissionPath
 org.apache.jetspeed.om.common.SecurityConstraints getSecurityConstraints()
           
 String getShortTitle()
           
 String getTitle()
           
 boolean grantViewActionAccess()
          grantViewActionAccess
 int hashCode()
           
 org.apache.jetspeed.om.common.SecurityConstraint newSecurityConstraint()
           
 org.apache.jetspeed.om.common.SecurityConstraints newSecurityConstraints()
           
 void resetCachedSecurityConstraints()
          resetCachedSecurityConstraints
 void setConstraintsEnabled(boolean enabled)
          setConstraintsEnabled
 void setName(String name)
          setName
 void setPermissionsEnabled(boolean enabled)
          setPermissionsEnabled
 void setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints constraints)
           
 void setShortTitle(String shortTitle)
           
 void setTitle(String title)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private int id

name

private String name

title

private String title

shortTitle

private String shortTitle

constraints

private SecurityConstraintsImpl constraints

constraintsEnabled

private boolean constraintsEnabled

permissionsEnabled

private boolean permissionsEnabled
Constructor Detail

BaseElementImpl

protected BaseElementImpl(SecurityConstraintsImpl constraints)
Method Detail

getName

public String getName()
getName

Returns:
element name

setName

public void setName(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 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
getEffectivePageSecurity

Returns:
effective page security object

checkConstraints

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

getLogicalPermissionPath

public String getLogicalPermissionPath()
getLogicalPermissionPath

Returns:
path used for permissions checks

getPhysicalPermissionPath

public String getPhysicalPermissionPath()
getPhysicalPermissionPath

Returns:
path used for permissions checks

checkPermissions

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

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

getConstraintsEnabled

public boolean getConstraintsEnabled()
Specified by:
getConstraintsEnabled in interface org.apache.jetspeed.om.common.SecuredResource

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getSecurityConstraints

public org.apache.jetspeed.om.common.SecurityConstraints getSecurityConstraints()
Specified by:
getSecurityConstraints in interface org.apache.jetspeed.om.common.SecuredResource

newSecurityConstraints

public org.apache.jetspeed.om.common.SecurityConstraints newSecurityConstraints()
Specified by:
newSecurityConstraints in interface org.apache.jetspeed.om.common.SecuredResource

newSecurityConstraint

public org.apache.jetspeed.om.common.SecurityConstraint newSecurityConstraint()
Specified by:
newSecurityConstraint in interface org.apache.jetspeed.om.common.SecuredResource

setSecurityConstraints

public void setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints constraints)
Specified by:
setSecurityConstraints in interface org.apache.jetspeed.om.common.SecuredResource

checkConstraints

public void checkConstraints(String actions)
                      throws SecurityException
Specified by:
checkConstraints in interface org.apache.jetspeed.om.common.SecuredResource
Throws:
SecurityException

resetCachedSecurityConstraints

public void resetCachedSecurityConstraints()
resetCachedSecurityConstraints


getPermissionsEnabled

public boolean getPermissionsEnabled()
Specified by:
getPermissionsEnabled in interface org.apache.jetspeed.om.common.SecuredResource

checkPermissions

public void checkPermissions(int mask)
                      throws SecurityException
Specified by:
checkPermissions in interface org.apache.jetspeed.om.common.SecuredResource
Throws:
SecurityException

checkAccess

public void checkAccess(String actions)
                 throws SecurityException
Specified by:
checkAccess in interface org.apache.jetspeed.om.common.SecuredResource
Throws:
SecurityException

getId

public String getId()
Specified by:
getId in interface org.apache.jetspeed.om.page.BaseElement

getTitle

public String getTitle()
Specified by:
getTitle in interface org.apache.jetspeed.om.page.BaseElement

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface org.apache.jetspeed.om.page.BaseElement

getShortTitle

public String getShortTitle()
Specified by:
getShortTitle in interface org.apache.jetspeed.om.page.BaseElement

setShortTitle

public void setShortTitle(String shortTitle)
Specified by:
setShortTitle in interface org.apache.jetspeed.om.page.BaseElement


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