public interface GroupService
Modifier and Type | Interface and Description |
---|---|
static class |
GroupService.GroupSearchScope
Defines the scope in which to apply a group search.
|
Modifier and Type | Method and Description |
---|---|
com.edorasware.commons.core.entity.GroupId |
createGroup(Group group)
|
com.google.common.base.Optional<Group> |
findGroup(com.edorasware.commons.core.query.Predicate predicate,
GroupService.GroupSearchScope searchScope)
Finds the
Group that matches the given predicate. |
com.google.common.collect.ImmutableList<Group> |
findGroups(com.edorasware.commons.core.query.Predicate predicate,
GroupService.GroupSearchScope searchScope)
Finds the
Group s that match the given predicate. |
Group |
getGroup(com.edorasware.commons.core.entity.GroupId groupId)
Returns the
Group with the given id. |
SystemGroups |
getSystemGroups(com.edorasware.commons.core.entity.TenantId tenantId)
Returns the ids of the system groups for the specified tenant.
|
com.edorasware.commons.core.entity.GroupId |
updateGroup(Group group)
Updates an already persisted group.
|
Group getGroup(com.edorasware.commons.core.entity.GroupId groupId)
Group
with the given id.groupId
- the group id, not nullIllegalArgumentException
- if the given group id is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if a group with the given id does not existSystemGroups getSystemGroups(com.edorasware.commons.core.entity.TenantId tenantId)
tenantId
- the tenant id for which the system groups are returned, not nullRuntimeException
- if the system groups cannot be foundcom.google.common.base.Optional<Group> findGroup(com.edorasware.commons.core.query.Predicate predicate, GroupService.GroupSearchScope searchScope)
Group
that matches the given predicate.predicate
- the predicate to apply, never nullsearchScope
- the boundaries within which to searchIllegalArgumentException
- if the given predicate or search scope is nullIllegalStateException
- if more than one matching group is foundcom.google.common.collect.ImmutableList<Group> findGroups(com.edorasware.commons.core.query.Predicate predicate, GroupService.GroupSearchScope searchScope)
Group
s that match the given predicate.predicate
- the predicate to apply, never nullsearchScope
- the boundaries within which to searchIllegalArgumentException
- if the given predicate or search scope is nullcom.edorasware.commons.core.entity.GroupId createGroup(Group group)
group
- the group to be created, not nullIllegalArgumentException
- if the given group is nullcom.edorasware.commons.core.entity.GroupId updateGroup(Group group)
group
- the group to be updated, not nullIllegalArgumentException
- if the given group is null or the id of the group is undefinedCopyright © 2010 - 2017 edorasware ag. All Rights Reserved.