Interface DelegatedGroupManagement
-
public interface DelegatedGroupManagement
Internal engine API for delegated groups management- Author:
- P.Piernik
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addGroup(java.lang.String projectPath, java.lang.String parentPath, pl.edu.icm.unity.types.I18nString groupName, boolean isPublic)
Adds groupvoid
addMemberToGroup(java.lang.String projectPath, java.lang.String groupPath, long entityId)
Adds a new member to the groupjava.lang.String
getAttributeDisplayedName(java.lang.String projectPath, java.lang.String attributeName)
Gets attribute displayed nameDelegatedGroupContents
getContents(java.lang.String projectPath, java.lang.String path)
Allows to retrieve group's contents and metadata.java.util.List<DelegatedGroupMember>
getDelegatedGroupMemebers(java.lang.String projectPath, java.lang.String groupPath)
Gets delegated group membersjava.util.Map<java.lang.String,DelegatedGroupContents>
getGroupAndSubgroups(java.lang.String projectPath, java.lang.String groupPath)
java.util.List<DelegatedGroup>
getProjectsForEntity(long entityId)
void
removeGroup(java.lang.String projectPath, java.lang.String path)
Removes groupvoid
removeMemberFromGroup(java.lang.String projectPath, java.lang.String groupPath, long entityId)
Removes from the group and all subgroups if the user is in any.void
setGroupAccessMode(java.lang.String projectPath, java.lang.String path, boolean isPublic)
Updates group access modevoid
setGroupAuthorizationRole(java.lang.String projectPath, long entityId, GroupAuthorizationRole role)
Update value of group authorization role attributevoid
setGroupDisplayedName(java.lang.String projectPath, java.lang.String path, pl.edu.icm.unity.types.I18nString newName)
Sets group display name
-
-
-
Method Detail
-
addGroup
void addGroup(java.lang.String projectPath, java.lang.String parentPath, pl.edu.icm.unity.types.I18nString groupName, boolean isPublic) throws pl.edu.icm.unity.exceptions.EngineException
Adds group- Parameters:
projectPath
- project group pathparentPath
- parent group pathgroupName
- new group nameisPublic
- group access mode- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeGroup
void removeGroup(java.lang.String projectPath, java.lang.String path) throws pl.edu.icm.unity.exceptions.EngineException
Removes group- Parameters:
projectPath
- project group pathpath
- removed group path- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getContents
DelegatedGroupContents getContents(java.lang.String projectPath, java.lang.String path) throws pl.edu.icm.unity.exceptions.EngineException
Allows to retrieve group's contents and metadata.- Parameters:
path
- group to be queried.- Returns:
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
setGroupDisplayedName
void setGroupDisplayedName(java.lang.String projectPath, java.lang.String path, pl.edu.icm.unity.types.I18nString newName) throws pl.edu.icm.unity.exceptions.EngineException
Sets group display name- Parameters:
projectPath
- project group pathpath
- renamed group pathnewName
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
setGroupAccessMode
void setGroupAccessMode(java.lang.String projectPath, java.lang.String path, boolean isPublic) throws pl.edu.icm.unity.exceptions.EngineException
Updates group access mode- Parameters:
projectPath
- project group pathpath
- updated group pathisPublic
- indicates is group public or private mode- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getGroupAndSubgroups
java.util.Map<java.lang.String,DelegatedGroupContents> getGroupAndSubgroups(java.lang.String projectPath, java.lang.String groupPath) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
projectPath
- project group pathgroupPath
- group to be queried- Returns:
- keys of the returned map include the selected group and all its children. Values are objects with group's metadata and subgroups
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getAttributeDisplayedName
java.lang.String getAttributeDisplayedName(java.lang.String projectPath, java.lang.String attributeName) throws pl.edu.icm.unity.exceptions.EngineException
Gets attribute displayed name- Parameters:
projectPath
- project group pathattributeName
-- Returns:
- attribute display name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
setGroupAuthorizationRole
void setGroupAuthorizationRole(java.lang.String projectPath, long entityId, GroupAuthorizationRole role) throws pl.edu.icm.unity.exceptions.EngineException
Update value of group authorization role attribute- Parameters:
projectPath
- project group pathentityId
- attribute ownerrole
- value to set- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getProjectsForEntity
java.util.List<DelegatedGroup> getProjectsForEntity(long entityId) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
entityId
- project manager- Returns:
- All project group of entity
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addMemberToGroup
void addMemberToGroup(java.lang.String projectPath, java.lang.String groupPath, long entityId) throws pl.edu.icm.unity.exceptions.EngineException
Adds a new member to the group- Parameters:
projectPath
- project group pathgroupPath
-entityId
- entity id to add- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeMemberFromGroup
void removeMemberFromGroup(java.lang.String projectPath, java.lang.String groupPath, long entityId) throws pl.edu.icm.unity.exceptions.EngineException
Removes from the group and all subgroups if the user is in any. Entity can not be removed from the group == '/'- Parameters:
projectPath
- project group pathgroupPath
- group removing fromentityId
- entity id to remove- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getDelegatedGroupMemebers
java.util.List<DelegatedGroupMember> getDelegatedGroupMemebers(java.lang.String projectPath, java.lang.String groupPath) throws pl.edu.icm.unity.exceptions.EngineException
Gets delegated group members- Parameters:
projectPath
- project group pathgroupPath
-- Returns:
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-