|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.security.Permission
org.norther.tammi.core.security.DefaultPermission
org.norther.tammi.core.security.ResourcePermission
public class ResourcePermission
ResourcePermission represents access to server resources. The actions to be granted are passed to the constructor in a string containing a list of one or more comma-separated keywords. The possible keywords are "read", "write", "execute", and "delete". Their meaning is defined as follows:
read
read permission
write
write permission
execute
execute permission
delete
delete permission
The actions string is converted to lowercase before processing.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.security.DefaultPermission |
|---|
ALL, ALL_ACTION, ANY_ROLE, DELETE, DELETE_ACTION, EXECUTE, EXECUTE_ACTION, GROUP, GROUP_ACTION, NO_ACTION, NONE, OVERRIDE, OVERRIDE_ACTION, READ, READ_ACTION, READ_WRITE, READ_WRITE_ACTION, WRITE, WRITE_ACTION |
| Constructor Summary | |
|---|---|
ResourcePermission(String name,
int mask)
Constructs a new permission with a mask. |
|
ResourcePermission(String name,
String actions)
Constructs a new permission with actions. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Checks two permissions for equality. |
String |
getActions()
Gets the actions as a string. |
int |
hashCode()
Returns the hash code. |
boolean |
implies(Permission p)
Checks if the permission implies the specified permission. |
protected boolean |
impliesIgnoreMask(ResourcePermission p)
Checks if this permission object implies the specified permission when actions are ignored. |
PermissionCollection |
newPermissionCollection()
Returns a new permission collection for storing resource permissions. |
| Methods inherited from class org.norther.tammi.core.security.DefaultPermission |
|---|
toActionMask, toActionString |
| 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 |
| Constructor Detail |
|---|
public ResourcePermission(String name,
String actions)
name - the name of the resource.actions - the action string.
public ResourcePermission(String name,
int mask)
name - the name of the resource.mask - the action mask to use.| Method Detail |
|---|
public String getActions()
getActions in class Permissionpublic boolean implies(Permission p)
implies in class Permissionp - the permission to check against.
public PermissionCollection newPermissionCollection()
newPermissionCollection in class Permissionpublic boolean equals(Object obj)
equals in class Permissionobj - the object we are testing.
public int hashCode()
hashCode in class Permissionprotected boolean impliesIgnoreMask(ResourcePermission p)
p - the permission to check against.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||