public class DefaultGroupService extends Object implements GroupService
Default implementation of the group service that retrieves group information from AnyWorkObjects
of type WorkObjectTypes.GROUP_TYPE via AnyWorkObjectService.
All group fields that are derived from work object variables are fetched from the local variables only. This optimization is possible since it is a pre-condition that each group work object has values defined for all these variables.
GroupService.GroupSearchScope| Constructor and Description | 
|---|
DefaultGroupService(AnyWorkObjectService anyWorkObjectService,
                   SystemDefinitionHelper systemDefinitionHelper,
                   CurrentUserService currentUserService,
                   CurrentTenantService currentTenantService)  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
createGroup(Group group)
 | 
Optional<Group> | 
findGroup(Predicate predicate,
         GroupService.GroupSearchScope searchScope)
Finds the  
Group that matches the given predicate. | 
com.google.common.collect.ImmutableList<Group> | 
findGroups(Predicate predicate,
          GroupService.GroupSearchScope searchScope)
Finds the  
Groups that match the given predicate. | 
Group | 
getGroup(String groupId)
Returns the  
Group with the given id. | 
SystemGroups | 
getSystemGroups(String tenantId)
Returns the ids of the system groups for the specified tenant. 
 | 
String | 
updateGroup(Group group)
Updates an already persisted group. 
 | 
public DefaultGroupService(AnyWorkObjectService anyWorkObjectService, SystemDefinitionHelper systemDefinitionHelper, CurrentUserService currentUserService, CurrentTenantService currentTenantService)
public Group getGroup(String groupId)
GroupServiceReturns the Group with the given id.
getGroup in interface GroupServicegroupId - the group id, not null@Cacheable(value="edorasOne-systemGroupsByTenantId") public SystemGroups getSystemGroups(String tenantId)
GroupServiceReturns the ids of the system groups for the specified tenant.
getSystemGroups in interface GroupServicetenantId - the tenant id for which the system groups are returned, not nullpublic Optional<Group> findGroup(Predicate predicate, GroupService.GroupSearchScope searchScope)
GroupServiceFinds the Group that matches the given predicate.
findGroup in interface GroupServicepredicate - the predicate to apply, never nullsearchScope - the boundaries within which to searchpublic com.google.common.collect.ImmutableList<Group> findGroups(Predicate predicate, GroupService.GroupSearchScope searchScope)
GroupServiceFinds the Groups that match the given predicate.
findGroups in interface GroupServicepredicate - the predicate to apply, never nullsearchScope - the boundaries within which to searchpublic String createGroup(Group group)
GroupServicePersists the given Group object as an AnyWorkObject
with type WorkObjectTypes.GROUP_TYPE.
createGroup in interface GroupServicegroup - the group to be created, not nullpublic String updateGroup(Group group)
GroupServiceUpdates an already persisted group. All group properties are updated except the following id’s:
<ul>
    <li>Group.id</li>
    <li>Group.externalId</li>
    <li>Group.tenantId</li>
</ul>
updateGroup in interface GroupServicegroup - the group to be updated, not nullCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.