|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.security.Permission
com.cc.framework.security.FunctionBasedPermission
This class represents a permission for a function in the application
| Field Summary | |
private java.lang.String |
function
Function |
static java.lang.String |
INDICATOR
INDICATOR |
private static long |
serialVersionUID
Serial Version UID |
| Fields inherited from class com.cc.framework.security.Permission |
|
| Constructor Summary | |
FunctionBasedPermission(java.lang.String function)
Constructor for FunctionBasedPermission |
|
FunctionBasedPermission(java.lang.String function,
java.lang.String message)
Constructor for FunctionBasedPermission |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
|
protected java.lang.String |
getDefaultMessage()
If no message is assigned to the permission this method returns a default message. |
java.lang.String |
getFunction()
Returns the function name |
boolean |
isGranted(Principal principal)
Checks if the permission is granted. |
boolean |
isGranted(Principal principal,
java.util.List notGranted)
Checks if the permission is granted. |
static Permission |
parse(java.lang.String permissionLiteral)
Creates for the argument an Object of type Permission. |
java.lang.String |
toString()
|
| Methods inherited from class com.cc.framework.security.Permission |
getMessage, setMessage |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
public static final java.lang.String INDICATOR
private java.lang.String function
| Constructor Detail |
public FunctionBasedPermission(java.lang.String function)
function - the name of the function
public FunctionBasedPermission(java.lang.String function,
java.lang.String message)
function - the name of the functionmessage - a message assigned to the permission| Method Detail |
public java.lang.String getFunction()
public static Permission parse(java.lang.String permissionLiteral)
throws PermissionException
Legal Values:
permissionLiteral - String to parse
PermissionException - if the argument is not matchedpublic boolean isGranted(Principal principal)
Permission
isGranted in class Permissionprincipal - Principal
Permission.isGranted(Principal)
public boolean isGranted(Principal principal,
java.util.List notGranted)
Permission
isGranted in class Permissionprincipal - PrincipalnotGranted - List with Permission
Permission.isGranted(Principal, List)protected java.lang.String getDefaultMessage()
Permission
getDefaultMessage in class PermissionPermission.getDefaultMessage()public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)public java.lang.String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||