Interface SecurityService


public interface SecurityService
A service for obtaining security related information from the repository.
  • Method Summary

    Modifier and Type
    Method
    Description
    getGroup(String groupId)
    Get the (@link Group} object identified by the given groupId.
    getGroups(long offset, long limit)
    Get all the Groups in the repository.
    getUser(String userId)
    Get the User object identified by the given userId.
    getUsers(long offset, long limit)
    Get all the Users in the repository.
    boolean
    hasGroup(String groupId)
    Check if the group with given groupId exists.
    boolean
    hasUser(String userId)
    Check if the user with the given userId exists.
  • Method Details

    • hasUser

      boolean hasUser(String userId) throws RepositoryException
      Check if the user with the given userId exists.
      Parameters:
      userId - the id of the user to check
      Returns:
      whether the user with the given userId exists
      Throws:
      RepositoryException
    • getUser

      Get the User object identified by the given userId.
      Parameters:
      userId - the id of the user to obtain.
      Returns:
      the User identified by the given userId
      Throws:
      ItemNotFoundException - if no user with the given id could be found
      RepositoryException
    • getUsers

      Iterable<User> getUsers(long offset, long limit)
      Get all the Users in the repository.
      Parameters:
      offset - the start offset of the result; only has effect when value is larger than zero; defaults to no offset
      limit - maximum size of the result; only has effect when value is larger than zero; defaults to no limit
      Returns:
      the list of Users in the repository. Never null.
    • getGroups

      Iterable<Group> getGroups(long offset, long limit)
      Get all the Groups in the repository.
      Parameters:
      offset - the start offset of the result; only has effect when value is larger than zero; defaults to no offset
      limit - maximum size of the result; only has effect when value is larger than zero; defaults to no limit
      Returns:
      the list of Groups in the repository. Never null.
    • hasGroup

      boolean hasGroup(String groupId) throws RepositoryException
      Check if the group with given groupId exists.
      Parameters:
      groupId - the id of the group to check
      Returns:
      whether the group with the given groupId exists
      Throws:
      RepositoryException
    • getGroup

      Get the (@link Group} object identified by the given groupId.
      Parameters:
      groupId - the id of the group to obtain.
      Returns:
      the Group identified by the given groupId
      Throws:
      ItemNotFoundException - if no group with the given id could be found
      RepositoryException