org.apache.portals.graffito.model.permission.impl
Class CmsPermissionImpl

java.lang.Object
  extended by java.security.Permission
      extended by org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl
All Implemented Interfaces:
java.io.Serializable, java.security.Guard, org.apache.portals.graffito.model.permission.CmsPermission

public class CmsPermissionImpl
extends java.security.Permission
implements org.apache.portals.graffito.model.permission.CmsPermission

CMS Permissions

Version:
$Id: CmsPermissionImpl.java,v 1.1 2004/12/22 20:37:03 christophe Exp $
Author:
Christophe Lombart
See Also:
Serialized Form

Field Summary
protected  int mask
          Mask used for determining what action to perform
protected  java.util.Collection principalFullPaths
          The full path associated to the principals
 
Fields inherited from interface org.apache.portals.graffito.model.permission.CmsPermission
ALL, DELETE, EDIT, INSERT, LOCK, UNLOCK, UPDATE, VIEW
 
Constructor Summary
CmsPermissionImpl(java.lang.String name, java.lang.String actions)
          Constructor
CmsPermissionImpl(java.lang.String name, java.lang.String actions, java.util.Collection principalFullPaths)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getActions()
           
 java.util.Collection getPrincipalFullPaths()
          Get the principal full paths associated to this permission
 int hashCode()
           
 boolean implies(java.security.Permission p)
          Checks if this FolderPermission object "implies" the specified permission.
 boolean isApplyToChildren()
           
 boolean isRecursive()
           
protected  void parseActions(java.lang.String actions)
           
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.portals.graffito.model.permission.CmsPermission
getName
 

Field Detail

principalFullPaths

protected java.util.Collection principalFullPaths
The full path associated to the principals


mask

protected int mask
Mask used for determining what action to perform

Constructor Detail

CmsPermissionImpl

public CmsPermissionImpl(java.lang.String name,
                         java.lang.String actions)
Constructor

Parameters:
name - The uri name (eg. /mypath/mydoc.doc)
actions - The actions allowed for this name

CmsPermissionImpl

public CmsPermissionImpl(java.lang.String name,
                         java.lang.String actions,
                         java.util.Collection principalFullPaths)
Constructor

Parameters:
name - The uri name (eg. /mypath/mydoc.doc)
actions - The actions allowed for this name
principalFullPaths - The principals full path associated to this permission
Method Detail

parseActions

protected void parseActions(java.lang.String actions)

getPrincipalFullPaths

public java.util.Collection getPrincipalFullPaths()
Get the principal full paths associated to this permission

Specified by:
getPrincipalFullPaths in interface org.apache.portals.graffito.model.permission.CmsPermission
Returns:
a Collection of fullpath (String)

isApplyToChildren

public boolean isApplyToChildren()
Specified by:
isApplyToChildren in interface org.apache.portals.graffito.model.permission.CmsPermission
See Also:
CmsPermission.isApplyToChildren()

isRecursive

public boolean isRecursive()
Specified by:
isRecursive in interface org.apache.portals.graffito.model.permission.CmsPermission
See Also:
CmsPermission.isRecursive()

getActions

public java.lang.String getActions()
Specified by:
getActions in interface org.apache.portals.graffito.model.permission.CmsPermission
Specified by:
getActions in class java.security.Permission
See Also:
Permission.getActions()

implies

public boolean implies(java.security.Permission p)
Checks if this FolderPermission object "implies" the specified permission.

More specifically, this method returns true if:

Specified by:
implies in class java.security.Permission
Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in class java.security.Permission
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Specified by:
hashCode in class java.security.Permission
See Also:
Object.hashCode()


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.