|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.security.Permission
org.apache.jetspeed.security.PortalResourcePermission
org.apache.jetspeed.security.FolderPermission
Folder permission.
This code was partially inspired from:
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.
| Field Summary | |
private String |
cpath
|
private boolean |
folder
|
static char |
FOLDER_SEPARATOR
|
private boolean |
recursive
|
static char |
RECURSIVE_CHAR
|
static char |
WILD_CHAR
|
| Fields inherited from class org.apache.jetspeed.security.PortalResourcePermission |
mask, subject |
| Fields inherited from class java.security.Permission |
|
| Constructor Summary | |
FolderPermission(String name,
String actions)
Constructor for FolderPermission. |
|
FolderPermission(String name,
String actions,
Subject subject)
Constructor for FolderPermission. |
|
| Method Summary | |
boolean |
equals(Object obj)
Checks two FolderPermission objects for equality. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(Permission p)
Checks if this FolderPermission object "implies" the specified permission. |
(package private) boolean |
impliesIgnoreMask(FolderPermission that)
Checks if the Permission's actions are a proper subset of the this object's actions. |
PermissionCollection |
newPermissionCollection()
Overrides Permission.newPermissionCollection(). |
private void |
parseActions(String actions)
Parses the actions string. |
| Methods inherited from class org.apache.jetspeed.security.PortalResourcePermission |
getActions, getSubject |
| Methods inherited from class java.security.Permission |
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final char RECURSIVE_CHAR
public static final char WILD_CHAR
public static final char FOLDER_SEPARATOR
private transient boolean folder
private transient boolean recursive
private transient String cpath
| Constructor Detail |
public FolderPermission(String name,
String actions)
Constructor for FolderPermission.
name - The portlet name.actions - The actions on the portlet.
public FolderPermission(String name,
String actions,
Subject subject)
Constructor for FolderPermission.
name - The portlet name.actions - The actions on the portlet.| Method Detail |
public PermissionCollection newPermissionCollection()
Overrides Permission.newPermissionCollection().
Permission.newPermissionCollection()private void parseActions(String actions)
Parses the actions string.
Actions are separated by commas or white space.
actions - The actionspublic boolean implies(Permission p)
More specifically, this method returns true if:
implies in class PortalResourcePermissionp - the permission to check against.
boolean impliesIgnoreMask(FolderPermission that)
that - the FolderPermission to check against.
public boolean equals(Object obj)
equals in class PortalResourcePermissionobj - the object we are testing for equality with this object.
Permission.equals(Object)public int hashCode()
hashCode in class PortalResourcePermissionPermission.hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||