02/28/2005
 

com.epicentric.permission
Class GenericPermission

java.lang.Object
  |
  +--com.epicentric.permission.GenericPermission
All Implemented Interfaces:
Permission

Deprecated. As of version 4.0, to be removed in 8.0 or later; replaced by a new permissioning system, described in the section on permissions checking in Vignette Portal Developer's Guide.

public class GenericPermission
extends Object
implements Permission

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

GenericPermission

public GenericPermission(String id,
                         boolean allPermitted,
                         PermissionContext context)
Deprecated. 
Create a new Permission.
Parameters:
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.

GenericPermission

public GenericPermission(String id,
                         PermissionContext context)
Deprecated. 
Create a Permission using the default from the catalog.
Method Detail

getID

public String getID()
Deprecated. 
Description copied from interface: Permission
Return this permission's ID.
Specified by:
getID in interface Permission

getName

public String getName()
Deprecated. 
Description copied from interface: Permission
Return a friendly name suitable for displaying to the user.
Specified by:
getName in interface Permission

getDescription

public String getDescription()
Deprecated. 
Description copied from interface: Permission
Return a short description suitable for displaying to the user.
Specified by:
getDescription in interface Permission

isEveryonePermitted

public boolean isEveryonePermitted()
Deprecated. 
Description copied from interface: Permission
Return true if this permission permits everyone by default. If true, this overrides any group memberships the permission may have.
Specified by:
isEveryonePermitted in interface Permission

setEveryonePermitted

public void setEveryonePermitted(boolean permitted)
Deprecated. 
Description copied from interface: Permission
Tell this permission whether to grant every user permission by default. If set to false, the permission's list of groups is used for permissions.
Specified by:
setEveryonePermitted in interface Permission

isGroupPermitted

public boolean isGroupPermitted(UserGroup group)
Deprecated. 
Description copied from interface: Permission
Return true if this group is permitted to this 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.

Specified by:
isGroupPermitted in interface Permission

isPermitted

public boolean isPermitted(User user)
Deprecated. 
Description copied from interface: Permission
Return true if this user is permitted to this 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.

Specified by:
isPermitted in interface Permission

isDirectlyPermitted

public boolean isDirectlyPermitted(User user)
Deprecated. 
Description copied from interface: Permission
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).

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.

Specified by:
isDirectlyPermitted in interface Permission

isIndirectlyPermitted

public boolean isIndirectlyPermitted(User user)
Deprecated. 
Description copied from interface: Permission
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).

If isEveryonePermitted() returns true, this returns false.

Return false if the user is null or either list of groups is empty.

Specified by:
isIndirectlyPermitted in interface Permission

containsGroup

public boolean containsGroup(int groupId)
Deprecated. 
Description copied from interface: Permission
Return true if this group exists in this permission's list of permitted groups.
Specified by:
containsGroup in interface Permission

addGroup

public void addGroup(int groupId)
Deprecated. 
Description copied from interface: Permission
Add a group to this permission's list of permitted groups. Does nothing if the group is already a member.
Specified by:
addGroup in interface Permission

removeGroup

public void removeGroup(int groupId)
Deprecated. 
Description copied from interface: Permission
Remove a group from this permission's list of permitted groups. Does nothing if the group is null or is not a member.
Specified by:
removeGroup in interface Permission

getGroupIDs

public int[] getGroupIDs()
Deprecated. 
Description copied from interface: Permission
Return the permitted UserGroup IDs for this permission.
Specified by:
getGroupIDs in interface Permission
Following copied from interface: com.epicentric.permission.Permission
See Also:
UserGroup

hasGroups

public boolean hasGroups()
Deprecated. 
Description copied from interface: Permission
Return true if permission permits one or more user groups.
Specified by:
hasGroups in interface Permission

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

getCatalogItem

public PermissionCatalogItem getCatalogItem()
Deprecated. 
Get the catalog item that describes this Permission.

02/28/2005
 

Copyright and Trademark Notices