Package pl.edu.icm.unity.engine.api
Interface GroupsManagement
-
public interface GroupsManagement
Internal engine API for groups management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addGroup(Group toAdd)
Adds a new groupvoid
addGroup(Group toAdd, boolean withParents)
Adds a new group in a recursive wayvoid
addGroups(Set<Group> toAdd)
Adds new groupsvoid
addMemberFromParent(String path, EntityParam entity)
AsaddMemberFromParent(String, EntityParam, List)
with an empty list of attribute classes.void
addMemberFromParent(String path, EntityParam entity, List<Attribute> attributes)
Adds a new member to the group.void
addMemberFromParent(String path, EntityParam entity, List<Attribute> attributes, String idp, String translationProfile)
Adds a new member to the group.Set<String>
getChildGroups(String root)
GroupContents
getContents(String path, int filter)
Allows to retrieve group's contents and metadata.List<Group>
getGroupsByWildcard(String pathWildcard)
Retrieves list of all groups matching a given ant-style wildcardGroupsChain
getGroupsChain(String path)
boolean
isPresent(String group)
void
removeGroup(String path, boolean recursive)
Removes a given group.void
removeMember(String path, EntityParam entity)
Removes from the group and all subgroups if the user is in any.void
updateGroup(String path, Group group)
Updates the group, without specifying any special audit log informationvoid
updateGroup(String path, Group group, String changedProperty, String newValue)
Updates the group and pass information: changed property and new value used for audit log only
-
-
-
Method Detail
-
isPresent
boolean isPresent(String group) throws AuthorizationException
- Returns:
- true if the given group exists
- Throws:
AuthorizationException
-
addGroup
void addGroup(Group toAdd) throws EngineException
Adds a new group- Parameters:
toAdd
- group to add- Throws:
EngineException
-
addGroup
void addGroup(Group toAdd, boolean withParents) throws EngineException
Adds a new group in a recursive way- Parameters:
toAdd
- group to addwithParents
- flag to add group recursively- Throws:
EngineException
-
addGroups
void addGroups(Set<Group> toAdd) throws EngineException
Adds new groups- Parameters:
requestedGroups
- set of groups to add- Throws:
EngineException
-
removeGroup
void removeGroup(String path, boolean recursive) throws EngineException
Removes a given group. Doesn't work for '/' path.- Throws:
EngineException
-
addMemberFromParent
void addMemberFromParent(String path, EntityParam entity, List<Attribute> attributes, String idp, String translationProfile) throws EngineException
Adds a new member to the group. The entity must be a member of a parent group. This method should be used when adding to a group in effect of remote account mapping.- Parameters:
attributes
- an optional list of attributes to be assigned to the member in this group scope. It is especially useful in the case when group'sAttributesClass
es require some attributes from all members.idp
- Id of Idp responsible (typically implicitly via translation profile) for addition to the grouptranslationProfile
- name of an input translation profile which created the membership- Throws:
EngineException
-
addMemberFromParent
void addMemberFromParent(String path, EntityParam entity, List<Attribute> attributes) throws EngineException
Adds a new member to the group. The entity must be a member of a parent group. This method must be used when adding to a group manually.- Parameters:
attributes
- an optional list of attributes to be assigned to the member in this group scope. It is especially useful in the case when group'sAttributesClass
es require some attributes from all members.- Throws:
EngineException
-
addMemberFromParent
void addMemberFromParent(String path, EntityParam entity) throws EngineException
AsaddMemberFromParent(String, EntityParam, List)
with an empty list of attribute classes.- Throws:
EngineException
-
removeMember
void removeMember(String path, EntityParam entity) throws EngineException
Removes from the group and all subgroups if the user is in any. Entity can not be removed from the group == '/'- Throws:
EngineException
-
getContents
GroupContents getContents(String path, int filter) throws EngineException
Allows to retrieve group's contents and metadata.- Parameters:
path
- group to be queried.filter
- what should be retrieved. Flags are defined inGroupContents
class. Can be OR-ed.- Throws:
EngineException
-
getGroupsByWildcard
List<Group> getGroupsByWildcard(String pathWildcard)
Retrieves list of all groups matching a given ant-style wildcard
-
getChildGroups
Set<String> getChildGroups(String root) throws EngineException
- Returns:
- all groups which are children of the root group (including grand children). The root group is also in the returned set.
- Throws:
EngineException
-
updateGroup
void updateGroup(String path, Group group) throws EngineException
Updates the group, without specifying any special audit log information- Throws:
EngineException
-
updateGroup
void updateGroup(String path, Group group, String changedProperty, String newValue) throws EngineException
Updates the group and pass information: changed property and new value used for audit log only- Throws:
EngineException
-
getGroupsChain
GroupsChain getGroupsChain(String path) throws EngineException
- Returns:
- GroupChain for given group
- Throws:
EngineException
-
-