Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices.server
Class PermissionServiceImpl

java.lang.Object
  extended by com.jivesoftware.forum.webservices.server.PermissionServiceImpl
All Implemented Interfaces:
PermissionService

public class PermissionServiceImpl
extends java.lang.Object
implements PermissionService


Field Summary
static int LONG_SIZE
           
 
Constructor Summary
PermissionServiceImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LONG_SIZE

public static final int LONG_SIZE
See Also:
Constant Field Values
Constructor Detail

PermissionServiceImpl

public PermissionServiceImpl()
Method Detail

addPermissionToUser

public void addPermissionToUser(long permission,
                                boolean additive,
                                long userID)
                         throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission to the user with the specified id.

Specified by:
addPermissionToUser in interface PermissionService
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

public void removePermissionFromUser(long permission,
                                     boolean additive,
                                     long userID)
                              throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission from the user with the specified id.

Specified by:
removePermissionFromUser in interface PermissionService
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

public void addPermissionToUsers(long permission,
                                 boolean additive,
                                 long[] userIDs)
                          throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission to all specified users.

Specified by:
addPermissionToUsers in interface PermissionService
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

public void removePermissionFromUsers(long permission,
                                      boolean additive,
                                      long[] userIDs)
                               throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission from all specified users.

Specified by:
removePermissionFromUsers in interface PermissionService
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

public void addAnonymousUserPermission(long permission,
                                       boolean additive)
                                throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission to anonymous users.

Specified by:
addAnonymousUserPermission in interface PermissionService
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

public void removeAnonymousUserPermission(long permission,
                                          boolean additive)
                                   throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission from anonymous users.

Specified by:
removeAnonymousUserPermission in interface PermissionService
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

public void addRegisteredUserPermission(long permission,
                                        boolean additive)
                                 throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission to registered users.

Specified by:
addRegisteredUserPermission in interface PermissionService
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

public void removeRegisteredUserPermission(long permission,
                                           boolean additive)
                                    throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission from registered users.

Specified by:
removeRegisteredUserPermission in interface PermissionService
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

public void addPermissionToGroup(long permission,
                                 boolean additive,
                                 long groupID)
                          throws GroupNotFoundException
Description copied from interface: PermissionService
Add the specified permission to the group with the specified id.

Specified by:
addPermissionToGroup in interface PermissionService
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

public void removePermissionFromGroup(long permission,
                                      boolean additive,
                                      long groupID)
                               throws GroupNotFoundException
Description copied from interface: PermissionService
Remove the specified permission from the group with the specified id.

Specified by:
removePermissionFromGroup in interface PermissionService
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

public void addForumPermissionToUser(long permission,
                                     boolean additive,
                                     long userID,
                                     long forumID)
                              throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified forum to the user with the specified id.

Specified by:
addForumPermissionToUser in interface PermissionService
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

public void removeForumPermissionFromUser(long permission,
                                          boolean additive,
                                          long userID,
                                          long forumID)
                                   throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified forum from the user with the specified id.

Specified by:
removeForumPermissionFromUser in interface PermissionService
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

public void addForumPermissionToUsers(long permission,
                                      boolean additive,
                                      long[] userIDs,
                                      long forumID)
                               throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified forum to the specified users.

Specified by:
addForumPermissionToUsers in interface PermissionService
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

public void removeForumPermissionFromUsers(long permission,
                                           boolean additive,
                                           long[] userIDs,
                                           long forumID)
                                    throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified forum from the specified users.

Specified by:
removeForumPermissionFromUsers in interface PermissionService
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

public void addForumPermissionToAnonymousUser(long permission,
                                              boolean additive,
                                              long forumID)
Description copied from interface: PermissionService
Add the specified permission on the specified forum to anonymous users.

Specified by:
addForumPermissionToAnonymousUser in interface PermissionService
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

public void removeForumPermissionFromAnonymousUser(long permission,
                                                   boolean additive,
                                                   long forumID)
Description copied from interface: PermissionService
Remove the specified permission on the specified forum to anonymous users.

Specified by:
removeForumPermissionFromAnonymousUser in interface PermissionService
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

public void addForumPermissionToRegisteredUser(long permission,
                                               boolean additive,
                                               long forumID)
Description copied from interface: PermissionService
Remove the specified permission on the specified forum from registered users.

Specified by:
addForumPermissionToRegisteredUser in interface PermissionService
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

public void removeForumPermissionFromRegisteredUser(long permission,
                                                    boolean additive,
                                                    long forumID)
Description copied from interface: PermissionService
Remove the specified permission on the specified forum to registered users.

Specified by:
removeForumPermissionFromRegisteredUser in interface PermissionService
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

public void addCategoryPermissionToUser(long permission,
                                        boolean additive,
                                        long userID,
                                        long categoryID)
                                 throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified category to the user with the specified id.

Specified by:
addCategoryPermissionToUser in interface PermissionService
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

public void removeCategoryPermissionFromUser(long permission,
                                             boolean additive,
                                             long userID,
                                             long categoryID)
                                      throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified category from the user with the specified id.

Specified by:
removeCategoryPermissionFromUser in interface PermissionService
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

public void addCategoryPermissionToUsers(long permission,
                                         boolean additive,
                                         long[] userIDs,
                                         long categoryID)
                                  throws UserNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified category to the specified users.

Specified by:
addCategoryPermissionToUsers in interface PermissionService
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

public void removeCategoryPermissionFromUsers(long permission,
                                              boolean additive,
                                              long[] userIDs,
                                              long categoryID)
                                       throws UserNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified category from the specified users.

Specified by:
removeCategoryPermissionFromUsers in interface PermissionService
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

public void addCategoryPermissionToAnonymousUser(long permission,
                                                 boolean additive,
                                                 long categoryID)
Description copied from interface: PermissionService
Add the specified permission on the specified category to anonymous users.

Specified by:
addCategoryPermissionToAnonymousUser in interface PermissionService
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

public void removeCategoryPermissionFromAnonymousUser(long permission,
                                                      boolean additive,
                                                      long categoryID)
Description copied from interface: PermissionService
Remove the specified permission on the specified category from anonymous users.

Specified by:
removeCategoryPermissionFromAnonymousUser in interface PermissionService
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

public void addCategoryPermissionToRegisteredUser(long permission,
                                                  boolean additive,
                                                  long categoryID)
Description copied from interface: PermissionService
Add the specified permission on the specified category to registered users.

Specified by:
addCategoryPermissionToRegisteredUser in interface PermissionService
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

public void removeCategoryPermissionFromRegisteredUser(long permission,
                                                       boolean additive,
                                                       long categoryID)
Description copied from interface: PermissionService
Remove the specified permission on the specified category from registered users.

Specified by:
removeCategoryPermissionFromRegisteredUser in interface PermissionService
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.

removeCategoryPermissionFromGroup

public void removeCategoryPermissionFromGroup(long permission,
                                              boolean additive,
                                              long groupID,
                                              long categoryID)
                                       throws GroupNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified category from the group with the specified id.

Specified by:
removeCategoryPermissionFromGroup in interface PermissionService
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

public void addForumPermissionToGroup(long permission,
                                      boolean additive,
                                      long groupID,
                                      long forumID)
                               throws GroupNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified forum to the group with the specified id.

Specified by:
addForumPermissionToGroup in interface PermissionService
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

public void removeForumPermissionFromGroup(long permission,
                                           boolean additive,
                                           long groupID,
                                           long forumID)
                                    throws GroupNotFoundException
Description copied from interface: PermissionService
Remove the specified permission on the specified forum from the group with the specified id.

Specified by:
removeForumPermissionFromGroup in interface PermissionService
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

public void addCategoryPermissionToGroup(long permission,
                                         boolean additive,
                                         long groupID,
                                         long categoryID)
                                  throws GroupNotFoundException
Description copied from interface: PermissionService
Add the specified permission on the specified category to the group with the specified id.

Specified by:
addCategoryPermissionToGroup in interface PermissionService
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

isAuthorized

public boolean isAuthorized(long permission)
Description copied from interface: PermissionService
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.

Specified by:
isAuthorized in interface PermissionService
Parameters:
permission - a permission type.
Returns:
True If the permssion exists globally for the current user.

isAuthorizedOnForum

public boolean isAuthorizedOnForum(long permission,
                                   long forumID)
                            throws ForumNotFoundException
Description copied from interface: PermissionService
Returns true if the current user has the permission specified on the specified forum.

Specified by:
isAuthorizedOnForum in interface PermissionService
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

public boolean isAuthorizedOnCategory(long permission,
                                      long categoryID)
                               throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
Returns true if the current user has the permission specified on the specified category.

Specified by:
isAuthorizedOnCategory in interface PermissionService
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

public long getPermissions()
Description copied from interface: PermissionService
Returns global permissions for current user.

Specified by:
getPermissions in interface PermissionService
Returns:
The permissions.

getPermissionsOnForum

public long getPermissionsOnForum(long forumID)
                           throws ForumNotFoundException
Description copied from interface: PermissionService
Returns permissions for current user on specified forum.

Specified by:
getPermissionsOnForum in interface PermissionService
Parameters:
forumID - The id of the forum.
Returns:
The permissions.
Throws:
ForumNotFoundException - If the specified forum does not exist.

getPermissionsOnCategory

public long getPermissionsOnCategory(long categoryID)
                              throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
Returns permissions for current user on specified category.

Specified by:
getPermissionsOnCategory in interface PermissionService
Parameters:
categoryID - The id of the category.
Returns:
The permissions.
Throws:
ForumCategoryNotFoundException - If the specified category does not exist.

isUserAuthorized

public boolean isUserAuthorized(long permission,
                                long userID)
Description copied from interface: PermissionService
Checks to see if a particular user has a praticular permission system wide.

Specified by:
isUserAuthorized in interface PermissionService
Parameters:
permission - The permission to check.
userID - The id of the user
Returns:
True if the user has the permission.

isUserAuthorizedOnCategory

public boolean isUserAuthorizedOnCategory(long permission,
                                          long userID,
                                          long categoryID)
                                   throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
Checks to see if a particular user has a particular permission on the specified category.

Specified by:
isUserAuthorizedOnCategory in interface PermissionService
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

public boolean isUserAuthorizedOnForum(long permission,
                                       long userID,
                                       long forumID)
                                throws ForumNotFoundException
Description copied from interface: PermissionService
Checks to see if a particular user has a particular permission on the specified forum.

Specified by:
isUserAuthorizedOnForum in interface PermissionService
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

public long getUserPermissions(long userID)
Description copied from interface: PermissionService
Returns global permissions for specified user.

Specified by:
getUserPermissions in interface PermissionService
Parameters:
userID - The id of the user.
Returns:
The permissions.

getUserPermissionsOnCategory

public long getUserPermissionsOnCategory(long userID,
                                         long categoryID)
                                  throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
Returns permissions for specified user on specified category.

Specified by:
getUserPermissionsOnCategory in interface PermissionService
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

public long getUserPermissionsOnForum(long userID,
                                      long forumID)
                               throws ForumNotFoundException
Description copied from interface: PermissionService
Returns permissions for specified user on specified forum.

Specified by:
getUserPermissionsOnForum in interface PermissionService
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.

registeredUserHasPermission

public boolean registeredUserHasPermission(long permission,
                                           boolean additive)
Description copied from interface: PermissionService
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.

Specified by:
registeredUserHasPermission in interface PermissionService
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

public boolean registeredUserHasPermissionOnForum(long permission,
                                                  boolean additive,
                                                  long forumID)
                                           throws UserNotFoundException,
                                                  ForumNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
registeredUserHasPermissionOnForum in interface PermissionService
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

public boolean registeredUserHasPermissionOnCategory(long permission,
                                                     boolean additive,
                                                     long categoryID)
                                              throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
registeredUserHasPermissionOnCategory in interface PermissionService
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

public boolean anonymousUserHasPermission(long permission,
                                          boolean additive)
Description copied from interface: PermissionService
Returns true if the anonymous users have a particular permission globally.

Specified by:
anonymousUserHasPermission in interface PermissionService
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

public boolean anonymousUserHasPermissionOnForum(long permission,
                                                 boolean additive,
                                                 long forumID)
                                          throws ForumNotFoundException
Description copied from interface: PermissionService
Returns true if the anonymous users have a particular permission on the forum with the specified ID.

Specified by:
anonymousUserHasPermissionOnForum in interface PermissionService
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

public boolean anonymousUserHasPermissionOnCategory(long permission,
                                                    boolean additive,
                                                    long categoryID)
                                             throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
Returns true if the anonymous users have a particular permission on the category with the specified ID.

Specified by:
anonymousUserHasPermissionOnCategory in interface PermissionService
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

public int usersWithPermissionCount(long permission,
                                    boolean additive)
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermissionCount in interface PermissionService
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

public long[] usersWithPermission(long permission,
                                  boolean additive)
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermission in interface PermissionService
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

public int usersWithPermissionCountOnForum(long permission,
                                           boolean additive,
                                           long forumID)
                                    throws ForumNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermissionCountOnForum in interface PermissionService
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

public long[] usersWithPermissionOnForum(long permission,
                                         boolean additive,
                                         long forumID)
                                  throws ForumNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermissionOnForum in interface PermissionService
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

public int usersWithPermissionCountOnCategory(long permission,
                                              boolean additive,
                                              long categoryID)
                                       throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermissionCountOnCategory in interface PermissionService
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

public long[] usersWithPermissionOnCategory(long permission,
                                            boolean additive,
                                            long categoryID)
                                     throws ForumCategoryNotFoundException
Description copied from interface: PermissionService
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.

Specified by:
usersWithPermissionOnCategory in interface PermissionService
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

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.