Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.proxy
Class PermissionsManagerProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.PermissionsManagerProxy
All Implemented Interfaces:
PermissionsManager

public class PermissionsManagerProxy
extends java.lang.Object
implements PermissionsManager


Constructor Summary
PermissionsManagerProxy(int objectType, long objectID, Permissions permissions)
           
 
Method Summary
 void addAnonymousUserPermission(PermissionType permissionType, long permission)
          Add a permission of the specified PermissionType for anonymous users.
 void addGroupPermission(Group group, PermissionType permissionType, long permission)
          Grants a group a particular permission.
 void addRegisteredUserPermission(PermissionType permissionType, long permission)
          Add a permission of the specified PermissionType for registered users.
 void addUserPermission(User user, PermissionType permissionType, long permission)
          Add a permission of the specified PermissionType for the specified user.
 boolean anonymousUserHasPermission(PermissionType permissionType, long permission)
          Returns true if the anonymous users have a particular permission.
 java.util.Iterator groupsWithPermission(PermissionType permissionType, long permission)
          Returns an Iterator of groups with a particular permission.
 int groupsWithPermissionCount(PermissionType permissionType, long permission)
          Returns a count of the groups that have a particular permission.
 void permissionModificationDetected()
          Is called when a permission is modified.
 boolean registeredUserHasPermission(PermissionType permissionType, long permission)
          Returns true if registered users have a particular permission.
 void removeAllGroupPermissions(PermissionType permissionType)
          Revokes all group permissions.
 void removeAllUserPermissions(PermissionType permissionType)
          Removes all user permissions.
 void removeAnonymousUserPermission(PermissionType permissionType, long permission)
          Removes a permission of the specified PermissionType for anonymous users.
 void removeGroupPermission(Group group, PermissionType permissionType, long permission)
          Removes a permission of the specified PermissionType for a group.
 void removeRegisteredUserPermission(PermissionType permissionType, long permission)
          Removes a permission of the specified PermissionType for registered users.
 void removeUserPermission(User user, PermissionType permissionType, long permission)
          Removes a permission of the specified PermissionType for the specified user.
 java.util.Iterator usersWithPermission(PermissionType permissionType, long permission)
          Returns all the userID's of users with a particular permission.
 int usersWithPermissionCount(PermissionType permissionType, long permission)
          Returns a count of the users that have a particular permission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionsManagerProxy

public PermissionsManagerProxy(int objectType,
                               long objectID,
                               Permissions permissions)
Method Detail

addUserPermission

public void addUserPermission(User user,
                              PermissionType permissionType,
                              long permission)
                       throws UnauthorizedException
Description copied from interface: PermissionsManager
Add a permission of the specified PermissionType for the specified user. Only category or system administrators can assign permissions to a category, and only system admins can assign system level and category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
addUserPermission in interface PermissionsManager
Parameters:
user - the User to add a permission to.
permissionType - the type of permission to add.
permission - the permission to add.
Throws:
UnauthorizedException - if does not have proper admin permissions.

addAnonymousUserPermission

public void addAnonymousUserPermission(PermissionType permissionType,
                                       long permission)
                                throws UnauthorizedException
Description copied from interface: PermissionsManager
Add a permission of the specified PermissionType for anonymous users. Any registered user automatically inherits any anonymous user permissions. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
addAnonymousUserPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to add.
permission - the permission to add.
Throws:
UnauthorizedException - if does not have proper admin permissions.

addRegisteredUserPermission

public void addRegisteredUserPermission(PermissionType permissionType,
                                        long permission)
                                 throws UnauthorizedException
Description copied from interface: PermissionsManager
Add a permission of the specified PermissionType for registered users. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
addRegisteredUserPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to add.
permission - the permission to add.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeUserPermission

public void removeUserPermission(User user,
                                 PermissionType permissionType,
                                 long permission)
                          throws UnauthorizedException
Description copied from interface: PermissionsManager
Removes a permission of the specified PermissionType for the specified user. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
removeUserPermission in interface PermissionsManager
Parameters:
user - the User to remove a permission from.
permissionType - the type of permission to remove.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeAnonymousUserPermission

public void removeAnonymousUserPermission(PermissionType permissionType,
                                          long permission)
                                   throws UnauthorizedException
Description copied from interface: PermissionsManager
Removes a permission of the specified PermissionType for anonymous users. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
removeAnonymousUserPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to remove.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeRegisteredUserPermission

public void removeRegisteredUserPermission(PermissionType permissionType,
                                           long permission)
                                    throws UnauthorizedException
Description copied from interface: PermissionsManager
Removes a permission of the specified PermissionType for registered users. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
removeRegisteredUserPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to remove.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeAllUserPermissions

public void removeAllUserPermissions(PermissionType permissionType)
                              throws UnauthorizedException
Description copied from interface: PermissionsManager
Removes all user permissions. Only system administrators can call this method.

Specified by:
removeAllUserPermissions in interface PermissionsManager
Parameters:
permissionType - the type of permissions to remove.
Throws:
UnauthorizedException - if not a system admin.

anonymousUserHasPermission

public boolean anonymousUserHasPermission(PermissionType permissionType,
                                          long permission)
Description copied from interface: PermissionsManager
Returns true if the anonymous users have a particular permission.

Specified by:
anonymousUserHasPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
true if anonymous users have the specified permission.

registeredUserHasPermission

public boolean registeredUserHasPermission(PermissionType permissionType,
                                           long permission)
Description copied from interface: PermissionsManager
Returns true if registered users have a particular permission. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database.

Specified by:
registeredUserHasPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
true if all registered users have the specified permission.

usersWithPermission

public java.util.Iterator usersWithPermission(PermissionType permissionType,
                                              long permission)
Description copied from interface: PermissionsManager
Returns all the userID's of users with a particular permission. This list does not include the special "anonymous users" and "registered users" permission types. This method is not the normal method for determining if a user has a certain permission on an object in the system; instead it is only useful for permission management. For example, to check if a user has read access on a knowledge base category, simply call category.isAuthorized(KbPermissions.READ_ENTRY), where category is the category you want to check perms on.

Specified by:
usersWithPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
an Iterator of all the users with the specified permission.

usersWithPermissionCount

public int usersWithPermissionCount(PermissionType permissionType,
                                    long permission)
Description copied from interface: PermissionsManager
Returns a count of the users that have a particular permission. This list does not include the special "anonymous users" and "registered users" permission types.

Specified by:
usersWithPermissionCount in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
a count of the users that have a particular permission.

addGroupPermission

public void addGroupPermission(Group group,
                               PermissionType permissionType,
                               long permission)
                        throws UnauthorizedException
Description copied from interface: PermissionsManager
Grants a group a particular permission. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
addGroupPermission in interface PermissionsManager
Parameters:
group - the group to grant a permission to.
permissionType - the type of permission to add.
permission - the permission to grant the group.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeGroupPermission

public void removeGroupPermission(Group group,
                                  PermissionType permissionType,
                                  long permission)
                           throws UnauthorizedException
Description copied from interface: PermissionsManager
Removes a permission of the specified PermissionType for a group. Only category or system administrators can assign permissions to a category, and only system admins can assign category administration permissions. If this permissions context is at the system level, only system admins can call this method.

Specified by:
removeGroupPermission in interface PermissionsManager
Parameters:
group - the group to remove the permission from.
permissionType - the type of permission to remove.
permission - the permission to remove.
Throws:
UnauthorizedException - if does not have proper admin permissions.

removeAllGroupPermissions

public void removeAllGroupPermissions(PermissionType permissionType)
                               throws UnauthorizedException
Description copied from interface: PermissionsManager
Revokes all group permissions. Only system admins can call this method.

Specified by:
removeAllGroupPermissions in interface PermissionsManager
Parameters:
permissionType - the type of permissions to remove.
Throws:
UnauthorizedException - if not a system admin.

groupsWithPermission

public java.util.Iterator groupsWithPermission(PermissionType permissionType,
                                               long permission)
Description copied from interface: PermissionsManager
Returns an Iterator of groups with a particular permission.

Specified by:
groupsWithPermission in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
an Iterator of all the groups with the specified permission.

groupsWithPermissionCount

public int groupsWithPermissionCount(PermissionType permissionType,
                                     long permission)
Description copied from interface: PermissionsManager
Returns a count of the groups that have a particular permission.

Specified by:
groupsWithPermissionCount in interface PermissionsManager
Parameters:
permissionType - the type of permission to check.
permission - the permission to check.
Returns:
a count of the groups that have a particular permission.

permissionModificationDetected

public void permissionModificationDetected()
Description copied from interface: PermissionsManager
Is called when a permission is modified.

Specified by:
permissionModificationDetected in interface PermissionsManager

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.