Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices
Interface PermissionService

All Known Implementing Classes:
PermissionServiceImpl

public interface PermissionService

Provides a webservice for managing permissions on users and groups.

See Also:
Permissions, ForumPermissions

Method Summary
 void addAnonymousUserPermission(long permission, boolean additive)
          Add the specified permission to anonymous users.
 void addCategoryPermissionToAnonymousUser(long permission, boolean additive, long categoryID)
          Add the specified permission on the specified category to anonymous users.
 void addCategoryPermissionToGroup(long permission, boolean additive, long groupID, long categoryID)
          Add the specified permission on the specified category to the group with the specified id.
 void addCategoryPermissionToRegisteredUser(long permission, boolean additive, long categoryID)
          Add the specified permission on the specified category to registered users.
 void addCategoryPermissionToUser(long permission, boolean additive, long userID, long categoryID)
          Add the specified permission on the specified category to the user with the specified id.
 void addCategoryPermissionToUsers(long permission, boolean additive, long[] userIDs, long categoryID)
          Add the specified permission on the specified category to the specified users.
 void addForumPermissionToAnonymousUser(long permission, boolean additive, long forumID)
          Add the specified permission on the specified forum to anonymous users.
 void addForumPermissionToGroup(long permission, boolean additive, long groupID, long forumID)
          Add the specified permission on the specified forum to the group with the specified id.
 void addForumPermissionToRegisteredUser(long permission, boolean additive, long forumID)
          Remove the specified permission on the specified forum from registered users.
 void addForumPermissionToUser(long permission, boolean additive, long userID, long forumID)
          Add the specified permission on the specified forum to the user with the specified id.
 void addForumPermissionToUsers(long permission, boolean additive, long[] userIDs, long forumID)
          Add the specified permission on the specified forum to the specified users.
 void addPermissionToGroup(long permission, boolean additive, long groupID)
          Add the specified permission to the group with the specified id.
 void addPermissionToUser(long permission, boolean additive, long userID)
          Add the specified permission to the user with the specified id.
 void addPermissionToUsers(long permission, boolean additive, long[] userIDs)
          Add the specified permission to all specified users.
 void addRegisteredUserPermission(long permission, boolean additive)
          Add the specified permission to registered users.
 boolean anonymousUserHasPermission(long permission, boolean additive)
          Returns true if the anonymous users have a particular permission globally.
 boolean anonymousUserHasPermissionOnCategory(long permission, boolean additive, long categoryID)
          Returns true if the anonymous users have a particular permission on the category with the specified ID.
 boolean anonymousUserHasPermissionOnForum(long permission, boolean additive, long forumID)
          Returns true if the anonymous users have a particular permission on the forum with the specified ID.
 long getPermissions()
          Returns global permissions for current user.
 long getPermissionsOnCategory(long categoryID)
          Returns permissions for current user on specified category.
 long getPermissionsOnForum(long forumID)
          Returns permissions for current user on specified forum.
 long getUserPermissions(long userID)
          Returns global permissions for specified user.
 long getUserPermissionsOnCategory(long userID, long categoryID)
          Returns permissions for specified user on specified category.
 long getUserPermissionsOnForum(long userID, long forumID)
          Returns permissions for specified user on specified forum.
 boolean isAuthorized(long permission)
          Returns true if the current user has globally has the specified permission.
 boolean isAuthorizedOnCategory(long permission, long categoryID)
          Returns true if the current user has the permission specified on the specified category.
 boolean isAuthorizedOnForum(long permission, long forumID)
          Returns true if the current user has the permission specified on the specified forum.
 boolean isUserAuthorized(long permission, long userID)
          Checks to see if a particular user has a praticular permission system wide.
 boolean isUserAuthorizedOnCategory(long permission, long userID, long categoryID)
          Checks to see if a particular user has a particular permission on the specified category.
 boolean isUserAuthorizedOnForum(long permission, long userID, long forumID)
          Checks to see if a particular user has a particular permission on the specified forum.
 boolean registeredUserHasPermission(long permission, boolean additive)
          Returns true if registered users have a particular permission globally.
 boolean registeredUserHasPermissionOnCategory(long permission, boolean additive, long categoryID)
          Returns true if registered users have a particular permission on the category with the specified ID.
 boolean registeredUserHasPermissionOnForum(long permission, boolean additive, long forumID)
          Returns true if registered users have a particular permission on the forum with the specified ID.
 void removeAnonymousUserPermission(long permission, boolean additive)
          Remove the specified permission from anonymous users.
 void removeCategoryPermissionFromAnonymousUser(long permission, boolean additive, long categoryID)
          Remove the specified permission on the specified category from anonymous users.
 void removeCategoryPermissionFromGroup(long permission, boolean additive, long groupID, long categoryID)
          Remove the specified permission on the specified category from the group with the specified id.
 void removeCategoryPermissionFromRegisteredUser(long permission, boolean additive, long categoryID)
          Remove the specified permission on the specified category from registered users.
 void removeCategoryPermissionFromUser(long permission, boolean additive, long userID, long categoryID)
          Remove the specified permission on the specified category from the user with the specified id.
 void removeCategoryPermissionFromUsers(long permission, boolean additive, long[] userIDs, long categoryID)
          Remove the specified permission on the specified category from the specified users.
 void removeForumPermissionFromAnonymousUser(long permission, boolean additive, long forumID)
          Remove the specified permission on the specified forum to anonymous users.
 void removeForumPermissionFromGroup(long permission, boolean additive, long groupID, long forumID)
          Remove the specified permission on the specified forum from the group with the specified id.
 void removeForumPermissionFromRegisteredUser(long permission, boolean additive, long forumID)
          Remove the specified permission on the specified forum to registered users.
 void removeForumPermissionFromUser(long permission, boolean additive, long userID, long forumID)
          Remove the specified permission on the specified forum from the user with the specified id.
 void removeForumPermissionFromUsers(long permission, boolean additive, long[] userIDs, long forumID)
          Remove the specified permission on the specified forum from the specified users.
 void removePermissionFromGroup(long permission, boolean additive, long groupID)
          Remove the specified permission from the group with the specified id.
 void removePermissionFromUser(long permission, boolean additive, long userID)
          Remove the specified permission from the user with the specified id.
 void removePermissionFromUsers(long permission, boolean additive, long[] userIDs)
          Remove the specified permission from all specified users.
 void removeRegisteredUserPermission(long permission, boolean additive)
          Remove the specified permission from registered users.
 long[] usersWithPermission(long permission, boolean additive)
          Returns all the userID's of users with a particular permission.
 int usersWithPermissionCount(long permission, boolean additive)
          Returns a count of the users that have a particular permission.
 int usersWithPermissionCountOnCategory(long permission, boolean additive, long categoryID)
          Returns a count of the users that have a particular permission on the specified category.
 int usersWithPermissionCountOnForum(long permission, boolean additive, long forumID)
          Returns a count of the users that have a particular permission on the specified forum.
 long[] usersWithPermissionOnCategory(long permission, boolean additive, long categoryID)
          Returns all the userID's of users with a particular permission on the specified category.
 long[] usersWithPermissionOnForum(long permission, boolean additive, long forumID)
          Returns all the userID's of users with a particular permission on the specified forum.
 

Method Detail

addPermissionToUser

void addPermissionToUser(long permission,
                         boolean additive,
                         long userID)
                         throws UserNotFoundException
Add the specified permission to the user with the specified id.

Parameters:
permission - The permission to add to a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to add a permission too.
Throws:
UserNotFoundException

removePermissionFromUser

void removePermissionFromUser(long permission,
                              boolean additive,
                              long userID)
                              throws UserNotFoundException
Remove the specified permission from the user with the specified id.

Parameters:
permission - The permission remove from a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to remove a permission from.
Throws:
UserNotFoundException

addPermissionToUsers

void addPermissionToUsers(long permission,
                          boolean additive,
                          long[] userIDs)
                          throws UserNotFoundException
Add the specified permission to all specified users.

Parameters:
permission - The permission to add to the users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids to which permission will be added.
Throws:
UserNotFoundException

removePermissionFromUsers

void removePermissionFromUsers(long permission,
                               boolean additive,
                               long[] userIDs)
                               throws UserNotFoundException
Remove the specified permission from all specified users.

Parameters:
permission - The permission to remove from the users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids from which permission will be removed.
Throws:
UserNotFoundException

addAnonymousUserPermission

void addAnonymousUserPermission(long permission,
                                boolean additive)
                                throws UserNotFoundException
Add the specified permission to anonymous users.

Parameters:
permission - The permission to add to anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Throws:
UserNotFoundException

removeAnonymousUserPermission

void removeAnonymousUserPermission(long permission,
                                   boolean additive)
                                   throws UserNotFoundException
Remove the specified permission from anonymous users.

Parameters:
permission - The permission remove from anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Throws:
UserNotFoundException

addRegisteredUserPermission

void addRegisteredUserPermission(long permission,
                                 boolean additive)
                                 throws UserNotFoundException
Add the specified permission to registered users.

Parameters:
permission - The permission to add to registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Throws:
UserNotFoundException

removeRegisteredUserPermission

void removeRegisteredUserPermission(long permission,
                                    boolean additive)
                                    throws UserNotFoundException
Remove the specified permission from registered users.

Parameters:
permission - The permission remove from registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Throws:
UserNotFoundException

addPermissionToGroup

void addPermissionToGroup(long permission,
                          boolean additive,
                          long groupID)
                          throws GroupNotFoundException
Add the specified permission to the group with the specified id.

Parameters:
permission - The permission to add to a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to add a permission too.
Throws:
GroupNotFoundException

removePermissionFromGroup

void removePermissionFromGroup(long permission,
                               boolean additive,
                               long groupID)
                               throws GroupNotFoundException
Remove the specified permission from the group with the specified id.

Parameters:
permission - The permission remove from a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to remove a permission from.
Throws:
GroupNotFoundException

addForumPermissionToUser

void addForumPermissionToUser(long permission,
                              boolean additive,
                              long userID,
                              long forumID)
                              throws UserNotFoundException
Add the specified permission on the specified forum to the user with the specified id.

Parameters:
permission - The permission to add to a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to add a permission too.
forumID - The ID of the forum to add the permission on
Throws:
UserNotFoundException

removeForumPermissionFromUser

void removeForumPermissionFromUser(long permission,
                                   boolean additive,
                                   long userID,
                                   long forumID)
                                   throws UserNotFoundException
Remove the specified permission on the specified forum from the user with the specified id.

Parameters:
permission - The permission remove from a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to remove a permission from.
forumID - The ID of the forum to remove the permission from.
Throws:
UserNotFoundException

addForumPermissionToUsers

void addForumPermissionToUsers(long permission,
                               boolean additive,
                               long[] userIDs,
                               long forumID)
                               throws UserNotFoundException
Add the specified permission on the specified forum to the specified users.

Parameters:
permission - The permission to add to the users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids to which permission will be added.
forumID - The ID of the forum on which permission will be added.
Throws:
UserNotFoundException

removeForumPermissionFromUsers

void removeForumPermissionFromUsers(long permission,
                                    boolean additive,
                                    long[] userIDs,
                                    long forumID)
                                    throws UserNotFoundException
Remove the specified permission on the specified forum from the specified users.

Parameters:
permission - The permission to remove from the users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids from which permission will be removed.
forumID - The ID of the forum on which permission will be removed.
Throws:
UserNotFoundException

addForumPermissionToAnonymousUser

void addForumPermissionToAnonymousUser(long permission,
                                       boolean additive,
                                       long forumID)
Add the specified permission on the specified forum to anonymous users.

Parameters:
permission - The permission to add to anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to add the permission on

removeForumPermissionFromAnonymousUser

void removeForumPermissionFromAnonymousUser(long permission,
                                            boolean additive,
                                            long forumID)
Remove the specified permission on the specified forum to anonymous users.

Parameters:
permission - The permission remove from to anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to remove the permission from.

addForumPermissionToRegisteredUser

void addForumPermissionToRegisteredUser(long permission,
                                        boolean additive,
                                        long forumID)
Remove the specified permission on the specified forum from registered users.

Parameters:
permission - The permission remove from registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to remove the permission from.

removeForumPermissionFromRegisteredUser

void removeForumPermissionFromRegisteredUser(long permission,
                                             boolean additive,
                                             long forumID)
Remove the specified permission on the specified forum to registered users.

Parameters:
permission - The permission remove from to registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to remove the permission from.

addCategoryPermissionToUser

void addCategoryPermissionToUser(long permission,
                                 boolean additive,
                                 long userID,
                                 long categoryID)
                                 throws UserNotFoundException
Add the specified permission on the specified category to the user with the specified id.

Parameters:
permission - The permission to add to a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to add a permission too.
categoryID - The ID of the category to add the permission on
Throws:
UserNotFoundException

removeCategoryPermissionFromUser

void removeCategoryPermissionFromUser(long permission,
                                      boolean additive,
                                      long userID,
                                      long categoryID)
                                      throws UserNotFoundException
Remove the specified permission on the specified category from the user with the specified id.

Parameters:
permission - The permission remove from a user.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userID - The id of the user to remove a permission from.
categoryID - The ID of the category to remove the permission from.
Throws:
UserNotFoundException

addCategoryPermissionToUsers

void addCategoryPermissionToUsers(long permission,
                                  boolean additive,
                                  long[] userIDs,
                                  long categoryID)
                                  throws UserNotFoundException
Add the specified permission on the specified category to the specified users.

Parameters:
permission - The permission to add to the users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids to which permission will be added.
categoryID - The ID of the category on which permission will be added.
Throws:
UserNotFoundException

removeCategoryPermissionFromUsers

void removeCategoryPermissionFromUsers(long permission,
                                       boolean additive,
                                       long[] userIDs,
                                       long categoryID)
                                       throws UserNotFoundException
Remove the specified permission on the specified category from the specified users.

Parameters:
permission - The permission to remove from users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
userIDs - The user ids to which permission will be added.
categoryID - The ID of the category on which permission will be removed.
Throws:
UserNotFoundException

addCategoryPermissionToAnonymousUser

void addCategoryPermissionToAnonymousUser(long permission,
                                          boolean additive,
                                          long categoryID)
Add the specified permission on the specified category to anonymous users.

Parameters:
permission - The permission to add to anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to add the permission on

removeCategoryPermissionFromAnonymousUser

void removeCategoryPermissionFromAnonymousUser(long permission,
                                               boolean additive,
                                               long categoryID)
Remove the specified permission on the specified category from anonymous users.

Parameters:
permission - The permission remove from anonymous users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to remove the permission from.

addCategoryPermissionToRegisteredUser

void addCategoryPermissionToRegisteredUser(long permission,
                                           boolean additive,
                                           long categoryID)
Add the specified permission on the specified category to registered users.

Parameters:
permission - The permission to add to registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to add the permission on

removeCategoryPermissionFromRegisteredUser

void removeCategoryPermissionFromRegisteredUser(long permission,
                                                boolean additive,
                                                long categoryID)
Remove the specified permission on the specified category from registered users.

Parameters:
permission - The permission remove from registered users.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to remove the permission from.

isAuthorized

boolean isAuthorized(long permission)
Returns true if the current user has globally has the specified permission. Certain methods of this class are restricted to certain permissions as specified in the method comments.

Parameters:
permission - a permission type.
Returns:
True If the permssion exists globally for the current user.

isAuthorizedOnForum

boolean isAuthorizedOnForum(long permission,
                            long forumID)
                            throws ForumNotFoundException
Returns true if the current user has the permission specified on the specified forum.

Parameters:
permission - a permission type.
forumID - to see if the current user has permission on.
Returns:
true if the current user has the permissions.
Throws:
ForumNotFoundException

isAuthorizedOnCategory

boolean isAuthorizedOnCategory(long permission,
                               long categoryID)
                               throws ForumCategoryNotFoundException
Returns true if the current user has the permission specified on the specified category.

Parameters:
permission - a permission type.
categoryID - to see if the current user has permission on.
Returns:
true if the current user has the permissions.
Throws:
ForumCategoryNotFoundException

getPermissions

long getPermissions()
Returns global permissions for current user.

Returns:
The permissions.

getPermissionsOnForum

long getPermissionsOnForum(long forumID)
                           throws ForumNotFoundException
Returns permissions for current user on specified forum.

Parameters:
forumID - The id of the forum.
Returns:
The permissions.
Throws:
ForumNotFoundException - If the specified forum does not exist.

getPermissionsOnCategory

long getPermissionsOnCategory(long categoryID)
                              throws ForumCategoryNotFoundException
Returns permissions for current user on specified category.

Parameters:
categoryID - The id of the category.
Returns:
The permissions.
Throws:
ForumCategoryNotFoundException - If the specified category does not exist.

registeredUserHasPermission

boolean registeredUserHasPermission(long permission,
                                    boolean additive)
Returns true if registered users have a particular permission globally. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database.

Parameters:
permission - The permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Returns:
true if all registered users have the specified permission.

registeredUserHasPermissionOnForum

boolean registeredUserHasPermissionOnForum(long permission,
                                           boolean additive,
                                           long forumID)
                                           throws UserNotFoundException,
                                                  ForumNotFoundException
Returns true if registered users have a particular permission on the forum with the specified ID. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database.

Parameters:
permission - The permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to check the permission on.
Returns:
true if all registered users have the specified permission.
Throws:
UserNotFoundException
ForumNotFoundException

registeredUserHasPermissionOnCategory

boolean registeredUserHasPermissionOnCategory(long permission,
                                              boolean additive,
                                              long categoryID)
                                              throws ForumCategoryNotFoundException
Returns true if registered users have a particular permission on the category with the specified ID. "Registered Users" does not refer to the static current list of users. Instead, it dynamically matches to any member of the user database.

Parameters:
permission - The permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to check the permission on.
Returns:
true if all registered users have the specified permission.
Throws:
ForumCategoryNotFoundException

anonymousUserHasPermission

boolean anonymousUserHasPermission(long permission,
                                   boolean additive)
Returns true if the anonymous users have a particular permission globally.

Parameters:
permission - The permission to see if anonymous users have this permission.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Returns:
True if anonymous users have the specified permission.

anonymousUserHasPermissionOnForum

boolean anonymousUserHasPermissionOnForum(long permission,
                                          boolean additive,
                                          long forumID)
                                          throws ForumNotFoundException
Returns true if the anonymous users have a particular permission on the forum with the specified ID.

Parameters:
permission - The permission to see if anonymous users have this permission on the specified forum.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to check to see if a user has permission on.
Returns:
True if anonymous users have the specified permission.
Throws:
ForumNotFoundException

anonymousUserHasPermissionOnCategory

boolean anonymousUserHasPermissionOnCategory(long permission,
                                             boolean additive,
                                             long categoryID)
                                             throws ForumCategoryNotFoundException
Returns true if the anonymous users have a particular permission on the category with the specified ID.

Parameters:
permission - The permission to see if anonymous users have this permission on the specified category.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to check to see if a user has permission on.
Returns:
True if anonymous users have the specified permission.
Throws:
ForumCategoryNotFoundException

usersWithPermissionCount

int usersWithPermissionCount(long permission,
                             boolean additive)
Returns a count of the users that have a particular permission. This count does not include the special "anonymous users" and "registered users" permission types.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Returns:
a count of the users that have a particular permission.

usersWithPermission

long[] usersWithPermission(long permission,
                           boolean additive)
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(perm), where category is the category you want to check perms on.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
Returns:
an Iterator of all the users with the specified permission.

usersWithPermissionCountOnForum

int usersWithPermissionCountOnForum(long permission,
                                    boolean additive,
                                    long forumID)
                                    throws ForumNotFoundException
Returns a count of the users that have a particular permission on the specified forum. This count does not include the special "anonymous users" and "registered users" permission types.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects
forumID - The id of the forum..
Returns:
a count of the users that have a particular permission.
Throws:
ForumNotFoundException

usersWithPermissionOnForum

long[] usersWithPermissionOnForum(long permission,
                                  boolean additive,
                                  long forumID)
                                  throws ForumNotFoundException
Returns all the userID's of users with a particular permission on the specified forum. 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(perm), where category is the category you want to check perms on.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
forumID - The ID of the forum to get users with the specified permission.
Returns:
an Iterator of all the users with the specified permission.
Throws:
ForumNotFoundException

usersWithPermissionCountOnCategory

int usersWithPermissionCountOnCategory(long permission,
                                       boolean additive,
                                       long categoryID)
                                       throws ForumCategoryNotFoundException
Returns a count of the users that have a particular permission on the specified category. This count does not include the special "anonymous users" and "registered users" permission types.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects
categoryID - The id of the category..
Returns:
a count of the users that have a particular permission.
Throws:
ForumCategoryNotFoundException

usersWithPermissionOnCategory

long[] usersWithPermissionOnCategory(long permission,
                                     boolean additive,
                                     long categoryID)
                                     throws ForumCategoryNotFoundException
Returns all the userID's of users with a particular permission on the specified category. 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(perm), where category is the category you want to check perms on.

Parameters:
permission - the permission to check.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
categoryID - The ID of the category to get users with the specified permission.
Returns:
an Iterator of all the users with the specified permission.
Throws:
ForumCategoryNotFoundException

removeCategoryPermissionFromGroup

void removeCategoryPermissionFromGroup(long permission,
                                       boolean additive,
                                       long groupID,
                                       long categoryID)
                                       throws GroupNotFoundException
Remove the specified permission on the specified category from the group with the specified id.

Parameters:
permission - The permission remove from a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to remove a permission from.
categoryID - The ID of the category to remove the permission from.
Throws:
GroupNotFoundException

addForumPermissionToGroup

void addForumPermissionToGroup(long permission,
                               boolean additive,
                               long groupID,
                               long forumID)
                               throws GroupNotFoundException
Add the specified permission on the specified forum to the group with the specified id.

Parameters:
permission - The permission to add to a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to add a permission too.
forumID - The ID of the forum to add the permission on
Throws:
GroupNotFoundException

removeForumPermissionFromGroup

void removeForumPermissionFromGroup(long permission,
                                    boolean additive,
                                    long groupID,
                                    long forumID)
                                    throws GroupNotFoundException
Remove the specified permission on the specified forum from the group with the specified id.

Parameters:
permission - The permission remove from a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to remove a permission from.
forumID - The ID of the forum to remove the permission from.
Throws:
GroupNotFoundException

addCategoryPermissionToGroup

void addCategoryPermissionToGroup(long permission,
                                  boolean additive,
                                  long groupID,
                                  long categoryID)
                                  throws GroupNotFoundException
Add the specified permission on the specified category to the group with the specified id.

Parameters:
permission - The permission to add to a group.
additive - True if the permission should be 'added' to the permissions retrieved from a parent object(s). This means that if the permission has been already set in a parent object, it will be inherited by all child objects.
groupID - The id of the group to add a permission too.
categoryID - The ID of the category to add the permission on
Throws:
GroupNotFoundException

isUserAuthorized

boolean isUserAuthorized(long permission,
                         long userID)
Checks to see if a particular user has a praticular permission system wide.

Parameters:
permission - The permission to check.
userID - The id of the user
Returns:
True if the user has the permission.

isUserAuthorizedOnCategory

boolean isUserAuthorizedOnCategory(long permission,
                                   long userID,
                                   long categoryID)
                                   throws ForumCategoryNotFoundException
Checks to see if a particular user has a particular permission on the specified category.

Parameters:
permission - The permission to check.
userID - The id of the user.
categoryID - The id of the category.
Returns:
True if the user has the permission.
Throws:
ForumCategoryNotFoundException - If the specified category does not exist.

isUserAuthorizedOnForum

boolean isUserAuthorizedOnForum(long permission,
                                long userID,
                                long forumID)
                                throws ForumNotFoundException
Checks to see if a particular user has a particular permission on the specified forum.

Parameters:
permission - The permission to check.
userID - The id of the user.
forumID - The id of the forum.
Returns:
True if the user has the permission.
Throws:
ForumNotFoundException - If the specified form does not exist.

getUserPermissions

long getUserPermissions(long userID)
Returns global permissions for specified user.

Parameters:
userID - The id of the user.
Returns:
The permissions.

getUserPermissionsOnCategory

long getUserPermissionsOnCategory(long userID,
                                  long categoryID)
                                  throws ForumCategoryNotFoundException
Returns permissions for specified user on specified category.

Parameters:
userID - The id of the user.
categoryID - The id of the category.
Returns:
The permissions.
Throws:
ForumCategoryNotFoundException - If the specified category does not exist.

getUserPermissionsOnForum

long getUserPermissionsOnForum(long userID,
                               long forumID)
                               throws ForumNotFoundException
Returns permissions for specified user on specified forum.

Parameters:
userID - The id of the user.
forumID - The id of the forum.
Returns:
The permissions.
Throws:
ForumNotFoundException - If the specified forum does not exist.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.