Package org.onehippo.repository.security
Interface SecurityService
public interface SecurityService
A service for obtaining security related information from the repository.
-
Method Summary
Modifier and TypeMethodDescriptionGet the (@link Group} object identified by the givengroupId
.getGroups
(long offset, long limit) Get all theGroup
s in the repository.Get theUser
object identified by the givenuserId
.getUsers
(long offset, long limit) Get all theUser
s in the repository.boolean
Check if the group with givengroupId
exists.boolean
Check if the user with the givenuserId
exists.
-
Method Details
-
hasUser
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:
RepositoryException
-
getUser
Get theUser
object identified by the givenuserId
.- Parameters:
userId
- the id of the user to obtain.- Returns:
- the
User
identified by the givenuserId
- Throws:
ItemNotFoundException
- if no user with the given id could be foundRepositoryException
-
getUsers
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
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
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:
RepositoryException
-
getGroup
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:
ItemNotFoundException
- if no group with the given id could be foundRepositoryException
-