Package pl.edu.icm.unity.engine.api
Interface GroupsManagement
-
public interface GroupsManagementInternal engine API for groups management.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddGroup(pl.edu.icm.unity.types.basic.Group toAdd)Adds a new groupvoidaddMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity)AsaddMemberFromParent(String, EntityParam, List)with an empty list of attribute classes.voidaddMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity, java.util.List<pl.edu.icm.unity.types.basic.Attribute> attributes)Adds a new member to the group.voidaddMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity, java.util.List<pl.edu.icm.unity.types.basic.Attribute> attributes, java.lang.String idp, java.lang.String translationProfile)Adds a new member to the group.java.util.Set<java.lang.String>getChildGroups(java.lang.String root)pl.edu.icm.unity.types.basic.GroupContentsgetContents(java.lang.String path, int filter)Allows to retrieve group's contents and metadata.java.util.List<pl.edu.icm.unity.types.basic.Group>getGroupsByWildcard(java.lang.String pathWildcard)Retrieves list of all groups matching a given ant-style wildcardbooleanisPresent(java.lang.String group)voidremoveGroup(java.lang.String path, boolean recursive)Removes a given group.voidremoveMember(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity)Removes from the group and all subgroups if the user is in any.voidupdateGroup(java.lang.String path, pl.edu.icm.unity.types.basic.Group group)Updates the group.voidupdateGroup(java.lang.String path, pl.edu.icm.unity.types.basic.Group group, java.lang.String changedProperty, java.lang.String newValue)Updates the group and pass information: changed property and new value.
-
-
-
Method Detail
-
isPresent
boolean isPresent(java.lang.String group) throws pl.edu.icm.unity.exceptions.AuthorizationException- Parameters:
group-- Returns:
- true if the given group exists
- Throws:
pl.edu.icm.unity.exceptions.AuthorizationException
-
addGroup
void addGroup(pl.edu.icm.unity.types.basic.Group toAdd) throws pl.edu.icm.unity.exceptions.EngineExceptionAdds a new group- Parameters:
toAdd- group to add- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeGroup
void removeGroup(java.lang.String path, boolean recursive) throws pl.edu.icm.unity.exceptions.EngineExceptionRemoves a given group. Doesn't work for '/' path.- Parameters:
path-recursive-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addMemberFromParent
void addMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity, java.util.List<pl.edu.icm.unity.types.basic.Attribute> attributes, java.lang.String idp, java.lang.String translationProfile) throws pl.edu.icm.unity.exceptions.EngineExceptionAdds 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:
path-entity-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'sAttributesClasses 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:
pl.edu.icm.unity.exceptions.EngineException
-
addMemberFromParent
void addMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity, java.util.List<pl.edu.icm.unity.types.basic.Attribute> attributes) throws pl.edu.icm.unity.exceptions.EngineExceptionAdds 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:
path-entity-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'sAttributesClasses require some attributes from all members.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addMemberFromParent
void addMemberFromParent(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity) throws pl.edu.icm.unity.exceptions.EngineExceptionAsaddMemberFromParent(String, EntityParam, List)with an empty list of attribute classes.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeMember
void removeMember(java.lang.String path, pl.edu.icm.unity.types.basic.EntityParam entity) throws pl.edu.icm.unity.exceptions.EngineExceptionRemoves from the group and all subgroups if the user is in any. Entity can not be removed from the group == '/'- Parameters:
path-entity-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getContents
pl.edu.icm.unity.types.basic.GroupContents getContents(java.lang.String path, int filter) throws pl.edu.icm.unity.exceptions.EngineExceptionAllows to retrieve group's contents and metadata.- Parameters:
path- group to be queried.filter- what should be retrieved. Flags are defined inGroupContentsclass. Can be OR-ed.- Returns:
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getGroupsByWildcard
java.util.List<pl.edu.icm.unity.types.basic.Group> getGroupsByWildcard(java.lang.String pathWildcard)
Retrieves list of all groups matching a given ant-style wildcard
-
getChildGroups
java.util.Set<java.lang.String> getChildGroups(java.lang.String root) throws pl.edu.icm.unity.exceptions.EngineException- Parameters:
root-- Returns:
- all groups which are children of the root group (including grand children). The root group is also in the returned set.
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateGroup
void updateGroup(java.lang.String path, pl.edu.icm.unity.types.basic.Group group) throws pl.edu.icm.unity.exceptions.EngineExceptionUpdates the group.- Parameters:
path-group- new group's metadata- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateGroup
void updateGroup(java.lang.String path, pl.edu.icm.unity.types.basic.Group group, java.lang.String changedProperty, java.lang.String newValue) throws pl.edu.icm.unity.exceptions.EngineExceptionUpdates the group and pass information: changed property and new value.- Parameters:
path-group- new group's metadatachangedProperty- description of changenewValue- value that was set- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-