|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.security.Permission com.cc.framework.security.RoleBasedPermission
This class represents a role based permission
Field Summary | |
static java.lang.String |
INDICATOR
INDICATOR |
private java.lang.String |
role
The role |
private static long |
serialVersionUID
Serial Version UID |
Fields inherited from class com.cc.framework.security.Permission |
|
Constructor Summary | |
RoleBasedPermission(java.lang.String role)
Constructor for RoleBasedPermission |
|
RoleBasedPermission(java.lang.String role,
java.lang.String message)
Constructor for RoleBasedPermission |
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. |
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 (role name) 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 role
Constructor Detail |
public RoleBasedPermission(java.lang.String role)
role
- The rolepublic RoleBasedPermission(java.lang.String role, java.lang.String message)
role
- The rolemessage
- A message assigned to the permissionMethod Detail |
public static Permission parse(java.lang.String permissionLiteral) throws PermissionException
permissionLiteral
- String to parse
null
PermissionException
- if the argument is not matchedpublic boolean isGranted(Principal principal)
Permission
isGranted
in class Permission
principal
- Principal
Permission.isGranted(Principal)
public boolean isGranted(Principal principal, java.util.List notGranted)
Permission
isGranted
in class Permission
principal
- PrincipalnotGranted
- List with Permission
Permission.isGranted(Principal, List)
protected java.lang.String getDefaultMessage()
Permission
getDefaultMessage
in class Permission
Permission.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 |