|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.permission.GenericPermission
A generic implementation of a Permissions object.
| Constructor Summary | |
GenericPermission(String id,
boolean allPermitted,
PermissionContext context)
Deprecated. Create a new Permission. |
|
GenericPermission(String id,
PermissionContext context)
Deprecated. Create a Permission using the default from the catalog. |
|
| Method Summary | |
void |
addGroup(int groupId)
Deprecated. Add a group to this permission's list of permitted groups. |
boolean |
containsGroup(int groupId)
Deprecated. Return true if this group exists in this permission's list of permitted groups. |
PermissionCatalogItem |
getCatalogItem()
Deprecated. Get the catalog item that describes this Permission. |
String |
getDescription()
Deprecated. Return a short description suitable for displaying to the user. |
int[] |
getGroupIDs()
Deprecated. Return the permitted UserGroup IDs for this permission. |
String |
getID()
Deprecated. Return this permission's ID. |
String |
getName()
Deprecated. Return a friendly name suitable for displaying to the user. |
boolean |
hasGroups()
Deprecated. Return true if permission permits one or more user groups. |
boolean |
isDirectlyPermitted(User user)
Deprecated. Return true if this user is permitted to this Permission and if the permission is granted directly by a Group the user is a member of (not a group that a group that the user is a member of inherits from). |
boolean |
isEveryonePermitted()
Deprecated. Return true if this permission permits everyone by default. |
boolean |
isGroupPermitted(UserGroup group)
Deprecated. Return true if this group is permitted to this Permission. |
boolean |
isIndirectlyPermitted(User user)
Deprecated. Return true if this user is permitted to this Permission and if the permission is not granted directly by a Group the user is a member of (meaning that the user has this permission because a group that s/he is a member of inherits this permission from another group). |
boolean |
isPermitted(User user)
Deprecated. Return true if this user is permitted to this Permission. |
void |
removeGroup(int groupId)
Deprecated. Remove a group from this permission's list of permitted groups. |
void |
setEveryonePermitted(boolean permitted)
Deprecated. Tell this permission whether to grant every user permission by default. |
String |
toString()
Deprecated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GenericPermission(String id,
boolean allPermitted,
PermissionContext context)
id - The permission ID. Converted to lowercase. The "sys."
prefix is reserved for standard permission IDs.allPermitted - True if everyone should be permitted by default.context - The PermissionContext within which this Permission lives.
public GenericPermission(String id,
PermissionContext context)
| Method Detail |
public String getID()
PermissiongetID in interface Permissionpublic String getName()
PermissiongetName in interface Permissionpublic String getDescription()
PermissiongetDescription in interface Permissionpublic boolean isEveryonePermitted()
PermissionisEveryonePermitted in interface Permissionpublic void setEveryonePermitted(boolean permitted)
PermissionsetEveryonePermitted in interface Permissionpublic boolean isGroupPermitted(UserGroup group)
Permission
If isEveryonePermitted() returns true, this
returns true. If everyone is not permitted, the group's id
and it's ancestor's group ids are checked against the
Permission's groups for an intersection.
Return false if the group is null or either list of groups is empty. Return true if there is any group contained in both lists.
isGroupPermitted in interface Permissionpublic boolean isPermitted(User user)
Permission
If isEveryonePermitted() returns true, this
returns true. If everyone is not permitted, the user's groups
are checked against the Permission's groups for an intersection.
Return false if the user is null or either list of groups is empty. Return true if there is any group contained in both lists.
isPermitted in interface Permissionpublic boolean isDirectlyPermitted(User user)
Permission
If isEveryonePermitted() returns true, this
returns true. If everyone is not permitted, the user's groups
are checked against the Permission's groups for an intersection.
Return false if the user is null or either list of groups is empty. Return true if there is any group contained in both lists.
isDirectlyPermitted in interface Permissionpublic boolean isIndirectlyPermitted(User user)
Permission
If isEveryonePermitted() returns true, this
returns false.
Return false if the user is null or either list of groups is empty.
isIndirectlyPermitted in interface Permissionpublic boolean containsGroup(int groupId)
PermissioncontainsGroup in interface Permissionpublic void addGroup(int groupId)
PermissionaddGroup in interface Permissionpublic void removeGroup(int groupId)
PermissionremoveGroup in interface Permissionpublic int[] getGroupIDs()
PermissiongetGroupIDs in interface Permissioncom.epicentric.permission.PermissionUserGrouppublic boolean hasGroups()
PermissionhasGroups in interface Permissionpublic String toString()
toString in class Objectpublic PermissionCatalogItem getCatalogItem()
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||