| java.lang.Object java.security.Permission org.apache.jetspeed.security.PortalResourcePermission org.apache.jetspeed.security.FolderPermission
FolderPermission | public class FolderPermission extends PortalResourcePermission (Code) | | Folder permission.
This code was partially inspired from:
This class represents access to a portal content/folder or document. A FolderPermission consists
of a pathname and a set of actions valid for that pathname.
Pathname is the pathname of the folder or document granted the specified
actions. A pathname that ends in "/*" (where "/" is
the separator character) indicates all the folders and documents contained in that folder.
A pathname that ends with "/-" indicates (recursively) all documents
and subfolders contained in that directory. A pathname consisting of
the special token "<<ALL FILES>>" matches any folder or document.
author: David Sean Taylor author: Christophe Lombart version: $Id: FolderPermission.java 516448 2007-03-09 16:25:47Z ate $ |
Method Summary | |
public boolean | equals(Object obj) Checks two FolderPermission objects for equality. | public int | hashCode() Returns the hash code value for this object. | public boolean | implies(Permission p) Checks if this FolderPermission object "implies" the specified permission.
More specifically, this method returns true if:
- p is an instanceof FolderPermission,
- p's actions are a proper subset of this
object's actions, and
- p's pathname is implied by this object's
pathname.
| boolean | impliesIgnoreMask(FolderPermission that) Checks if the Permission's actions are a proper subset of the
this object's actions. |
FOLDER_SEPARATOR | final public static char FOLDER_SEPARATOR(Code) | | |
FOLDER_SEPARATOR_STR | final public static String FOLDER_SEPARATOR_STR(Code) | | |
RECURSIVE_CHAR | final public static char RECURSIVE_CHAR(Code) | | |
WILD_CHAR | final public static char WILD_CHAR(Code) | | |
FolderPermission | public FolderPermission(String name, String actions)(Code) | | Constructor for FolderPermission.
Parameters: name - The portlet name. Parameters: actions - The actions on the portlet. |
FolderPermission | public FolderPermission(String name, int mask)(Code) | | Constructor for FolderPermission.
Parameters: name - The portlet name. Parameters: mask - The mask of actions on the portlet. |
equals | public boolean equals(Object obj)(Code) | | Checks two FolderPermission objects for equality. Checks that obj is
a FolderPermission, and has the same pathname and actions as this object.
Parameters: obj - the object we are testing for equality with this object. true if obj is a FolderPermission, and has the same pathname andactions as this FolderPermission object. |
hashCode | public int hashCode()(Code) | | Returns the hash code value for this object.
a hash code value for this object. |
implies | public boolean implies(Permission p)(Code) | | Checks if this FolderPermission object "implies" the specified permission.
More specifically, this method returns true if:
- p is an instanceof FolderPermission,
- p's actions are a proper subset of this
object's actions, and
- p's pathname is implied by this object's
pathname. For example, "/tmp/*" implies "/tmp/foo", since
"/tmp/*" encompasses the "/tmp" folder and all subfolders or documents in that
directory, including the one named "foo".
Parameters: p - the permission to check against. true if the specified permission is implied by this object,false if not. |
impliesIgnoreMask | boolean impliesIgnoreMask(FolderPermission that)(Code) | | Checks if the Permission's actions are a proper subset of the
this object's actions. Returns the effective mask iff the
this FolderPermission's path also implies that FolderPermission's path.
Parameters: that - the FolderPermission to check against. the effective mask |
Fields inherited from org.apache.jetspeed.security.PortalResourcePermission | final protected int mask(Code)(Java Doc)
|
|
|