@Manager public class DefaultGroupManager extends Object implements GroupManager
Default group manager which provides groups related information.
Constructor and Description |
---|
DefaultGroupManager(GroupService groupService,
CurrentTenantService currentTenantService) |
Modifier and Type | Method and Description |
---|---|
String |
createGroup(Group group)
|
Optional<Group> |
findGroup(Predicate predicate)
Finds the
Group that matches the given predicate. |
com.google.common.collect.ImmutableList<Group> |
findGroups(Predicate predicate)
Finds the
Group s that match the given predicate. |
SystemGroups |
getCurrentSystemGroups()
Returns the current system groups.
|
Group |
getGroup(String groupId)
Returns the group with the given id.
|
String |
updateGroup(Group group)
Updates an already persisted group.
|
public DefaultGroupManager(GroupService groupService, CurrentTenantService currentTenantService)
public Group getGroup(String groupId)
GroupManager
Returns the group with the given id.
getGroup
in interface GroupManager
groupId
- the group id, not nullpublic SystemGroups getCurrentSystemGroups()
GroupManager
Returns the current system groups.
getCurrentSystemGroups
in interface GroupManager
public Optional<Group> findGroup(Predicate predicate)
GroupManager
Finds the Group
that matches the given predicate.
findGroup
in interface GroupManager
predicate
- the predicate to apply, never nullpublic com.google.common.collect.ImmutableList<Group> findGroups(Predicate predicate)
GroupManager
Finds the Group
s that match the given predicate.
findGroups
in interface GroupManager
predicate
- the predicate to apply, never nullpublic String createGroup(Group group)
GroupManager
Persists the given Group
object as an AnyWorkObject
with type WorkObjectTypes.GROUP_TYPE
.
createGroup
in interface GroupManager
group
- the group to be created, not nullpublic String updateGroup(Group group)
GroupManager
Updates 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 GroupManager
group
- the group to be updated, not nullCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.