public interface UserGroupManagement
Manage an user group.
| Modifier and Type | Method and Description |
|---|---|
Long |
createExternalGroup(ExternalGroupVO groupVO)
Create a group imported from an external system.
|
Group |
createGroup(GroupVO groupVO)
Create a new group.
|
Long |
createOrUpdateExternalGroup(ExternalGroupVO groupVO)
Create a group imported from an external system or if that group already exists it is
updated.
|
void |
deleteExternalGroup(Long groupId,
String externalSystemId)
Delete an external group.
|
void |
deleteGroup(Long groupId)
Delete a group.
|
<T> T |
findGroupByAlias(String alias,
Converter<Group,T> converter)
Find a user group by its alias and convert it to the object to be returned.
|
<T> T |
findGroupById(Long id,
Converter<Group,T> converter)
Find a user group by its ID and convert it to the object to be returned.
|
boolean |
isExternalGroup(Long groupId)
Test whether a group is an external group or an internal group.
|
void |
updateExternalGroup(Long groupId,
ExternalGroupVO groupVO)
Update a group that was imported from an external system.
|
void |
updateGroup(Long groupId,
GroupVO groupVO)
Update an existing group.
|
Long createExternalGroup(ExternalGroupVO groupVO) throws AliasValidationException, AliasAlreadyExistsException, GroupAlreadyExistsException
Create a group imported from an external system.
groupVO - a value object with details about the group. If the alias member is not set it
will be generated from the name.AliasValidationException - in case the alias field is not validAliasAlreadyExistsException - in case the alias already existsGroupAlreadyExistsException - in case there is already a local group for the external groupGroup createGroup(GroupVO groupVO) throws AliasAlreadyExistsException, AliasValidationException, AuthorizationException
AuthorizationException - in case the current user is not the client manager or the internal system userAliasAlreadyExistsExceptionAliasValidationExceptionLong createOrUpdateExternalGroup(ExternalGroupVO groupVO) throws AliasValidationException, AliasAlreadyExistsException
Create a group imported from an external system or if that group already exists it is updated.
groupVO - a value object with details about the group. If the alias member is not set it
will be generated from the name.AliasValidationException - in case the alias field is not validAliasAlreadyExistsException - in case the alias already existsvoid deleteExternalGroup(Long groupId, String externalSystemId) throws AuthorizationException
AuthorizationException - in case the current user is not the internal system uservoid deleteGroup(Long groupId) throws GroupOperationNotPermittedException, AuthorizationException
groupId - the Id of the group to deleteGroupOperationNotPermittedException - if the group refers to an external groupAuthorizationException - if the current user is not client manager<T> T findGroupByAlias(String alias, Converter<Group,T> converter)
T - the type of the target objectalias - the alias of the group to retrieveconverter - the converter to create the target object<T> T findGroupById(Long id, Converter<Group,T> converter)
T - the type of the target objectid - the ID of the group to retrieveconverter - the converter to create the target objectboolean isExternalGroup(Long groupId)
groupId - the ID of the group to testvoid updateExternalGroup(Long groupId, ExternalGroupVO groupVO) throws GroupNotFoundException
groupId - ID of the group to updategroupVO - a value object with details about the groupGroupNotFoundException - in case the group to update does not existvoid updateGroup(Long groupId, GroupVO groupVO) throws GroupNotFoundException, GroupOperationNotPermittedException
Update an existing group. The alias won't be changed.
groupId - the ID of the group to updategroupVO - a value object with details about the groupGroupNotFoundException - in case the group to update does not existGroupNotFoundException - in case the group is an external groupGroupOperationNotPermittedExceptionCopyright © 2019 Communote team. All rights reserved.