Interface SecurityService


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

      • hasUser

        boolean hasUser​(String userId)
                 throws javax.jcr.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:
        javax.jcr.RepositoryException
      • getUser

        User getUser​(String userId)
              throws javax.jcr.ItemNotFoundException,
                     javax.jcr.RepositoryException
        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:
        javax.jcr.ItemNotFoundException - if no user with the given id could be found
        javax.jcr.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 javax.jcr.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:
        javax.jcr.RepositoryException
      • getGroup

        Group getGroup​(String groupId)
                throws javax.jcr.ItemNotFoundException,
                       javax.jcr.RepositoryException
        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:
        javax.jcr.ItemNotFoundException - if no group with the given id could be found
        javax.jcr.RepositoryException