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 String
addGroup(String projectPath, String parentPath, I18nString groupName, boolean isPublic)
Adds groupvoid
addMemberToGroup(String projectPath, String subgroupPath, long entityId)
Adds a new member to the groupString
getAttributeDisplayedName(String projectPath, String attributeName)
Gets attribute displayed nameDelegatedGroupContents
getContents(String projectPath, String subgroupPath)
Allows to retrieve group's contents and metadata.List<DelegatedGroupMember>
getDelegatedGroupMembers(String projectPath, String subgroupPath)
Gets delegated group membersMap<String,DelegatedGroupContents>
getGroupAndSubgroups(String projectPath, String subgroupPath)
Gets group with all child (recursive) groups as map.GroupAuthorizationRole
getGroupAuthorizationRole(String projectPath, long entityId)
Update value of group authorization role attributeList<DelegatedGroup>
getProjectsForEntity(long entityId)
Gets projects for entityvoid
removeGroup(String projectPath, String path)
Removes groupvoid
removeMemberFromGroup(String projectPath, String subgroupPath, long entityId)
Removes from the group and all subgroups if the user is in any.void
removeProject(String projectPath, String subProjectPath)
Removes subprojectvoid
setGroupAccessMode(String projectPath, String path, boolean isPublic)
Updates group access modevoid
setGroupAuthorizationRole(String projectPath, String subgroupPath, long entityId, GroupAuthorizationRole role)
Update value of group authorization role attributevoid
setGroupDelegationConfiguration(String projectPath, String subgroupPath, SubprojectGroupDelegationConfiguration subprojectGroupDelegationConfiguration)
Sets group delegation configurationvoid
setGroupDisplayedName(String projectPath, String path, I18nString newName)
Sets group display name
-
-
-
Method Detail
-
addGroup
String addGroup(String projectPath, String parentPath, I18nString groupName, boolean isPublic) throws EngineException
Adds group- Parameters:
projectPath
- project group pathparentPath
- parent group pathgroupName
- new group nameisPublic
- group access mode- Returns:
- Throws:
EngineException
-
removeGroup
void removeGroup(String projectPath, String path) throws EngineException
Removes group- Parameters:
projectPath
- project group pathpath
- removed group path- Throws:
EngineException
-
removeProject
void removeProject(String projectPath, String subProjectPath) throws EngineException
Removes subproject- Parameters:
projectPath
- project group pathsubProjectPath
- removed subproject group path- Throws:
EngineException
-
getContents
DelegatedGroupContents getContents(String projectPath, String subgroupPath) throws EngineException
Allows to retrieve group's contents and metadata.- Parameters:
subgroupPath
- group to be queried.- Returns:
- Throws:
EngineException
-
setGroupDisplayedName
void setGroupDisplayedName(String projectPath, String path, I18nString newName) throws EngineException
Sets group display name- Parameters:
projectPath
- project group pathpath
- renamed group pathnewName
-- Throws:
EngineException
-
setGroupAccessMode
void setGroupAccessMode(String projectPath, String path, boolean isPublic) throws EngineException
Updates group access mode- Parameters:
projectPath
- project group pathpath
- updated group pathisPublic
- indicates is group public or private mode- Throws:
EngineException
-
getGroupAndSubgroups
Map<String,DelegatedGroupContents> getGroupAndSubgroups(String projectPath, String subgroupPath) throws EngineException
Gets group with all child (recursive) groups as map.- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which groups will be received- Returns:
- keys of the returned map include the selected group and all its children. Values are objects with group's metadata and subgroups
- Throws:
EngineException
-
getAttributeDisplayedName
String getAttributeDisplayedName(String projectPath, String attributeName) throws EngineException
Gets attribute displayed name- Parameters:
projectPath
- project group pathattributeName
-- Returns:
- attribute display name
- Throws:
EngineException
-
setGroupAuthorizationRole
void setGroupAuthorizationRole(String projectPath, String subgroupPath, long entityId, GroupAuthorizationRole role) throws EngineException
Update value of group authorization role attribute- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which authorization role will be setentityId
- attribute ownerrole
- value to set- Throws:
EngineException
-
getGroupAuthorizationRole
GroupAuthorizationRole getGroupAuthorizationRole(String projectPath, long entityId) throws EngineException
Update value of group authorization role attribute- Parameters:
projectPath
- project group pathentityId
- attribute ownerrole
- value to set- Throws:
EngineException
-
setGroupDelegationConfiguration
void setGroupDelegationConfiguration(String projectPath, String subgroupPath, SubprojectGroupDelegationConfiguration subprojectGroupDelegationConfiguration) throws EngineException
Sets group delegation configuration- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which delegation configuration will be addedsubprojectGroupDelegationConfiguration
- group delegation configuration to set- Throws:
EngineException
-
getProjectsForEntity
List<DelegatedGroup> getProjectsForEntity(long entityId) throws EngineException
Gets projects for entity- Parameters:
entityId
- project manager- Returns:
- All project group of entity
- Throws:
EngineException
-
addMemberToGroup
void addMemberToGroup(String projectPath, String subgroupPath, long entityId) throws EngineException
Adds a new member to the group- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which member will be addedentityId
- entity id to add- Throws:
EngineException
-
removeMemberFromGroup
void removeMemberFromGroup(String projectPath, String subgroupPath, long entityId) throws EngineException
Removes from the group and all subgroups if the user is in any. Entity can not be removed from the group == '/'- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which member will be removedentityId
- entity id to remove- Throws:
EngineException
-
getDelegatedGroupMembers
List<DelegatedGroupMember> getDelegatedGroupMembers(String projectPath, String subgroupPath) throws EngineException
Gets delegated group members- Parameters:
projectPath
- is a full path to the project's underlying groupsubgroupPath
- is a full path to a subgroup of the project of which members will be returned- Returns:
- Throws:
EngineException
-
-