Package org.onehippo.repository.security
Interface SecurityService
-
public interface SecurityService
A service for obtaining security related information from the repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Group
getGroup(String groupId)
Get the (@link Group} object identified by the givengroupId
.Iterable<Group>
getGroups(long offset, long limit)
Get all theGroup
s in the repository.User
getUser(String userId)
Get theUser
object identified by the givenuserId
.Iterable<User>
getUsers(long offset, long limit)
Get all theUser
s in the repository.boolean
hasGroup(String groupId)
Check if the group with givengroupId
exists.boolean
hasUser(String userId)
Check if the user with the givenuserId
exists.
-
-
-
Method Detail
-
hasUser
boolean hasUser(String userId) throws javax.jcr.RepositoryException
Check if the user with the givenuserId
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 theUser
object identified by the givenuserId
.- Parameters:
userId
- the id of the user to obtain.- Returns:
- the
User
identified by the givenuserId
- Throws:
javax.jcr.ItemNotFoundException
- if no user with the given id could be foundjavax.jcr.RepositoryException
-
getUsers
Iterable<User> getUsers(long offset, long limit)
Get all theUser
s in the repository.- Parameters:
offset
- the start offset of the result; only has effect when value is larger than zero; defaults to no offsetlimit
- maximum size of the result; only has effect when value is larger than zero; defaults to no limit- Returns:
- the list of
User
s in the repository. Nevernull
.
-
getGroups
Iterable<Group> getGroups(long offset, long limit)
Get all theGroup
s in the repository.- Parameters:
offset
- the start offset of the result; only has effect when value is larger than zero; defaults to no offsetlimit
- maximum size of the result; only has effect when value is larger than zero; defaults to no limit- Returns:
- the list of
Group
s in the repository. Nevernull
.
-
hasGroup
boolean hasGroup(String groupId) throws javax.jcr.RepositoryException
Check if the group with givengroupId
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 givengroupId
.- Parameters:
groupId
- the id of the group to obtain.- Returns:
- the
Group
identified by the givengroupId
- Throws:
javax.jcr.ItemNotFoundException
- if no group with the given id could be foundjavax.jcr.RepositoryException
-
-