Interface DelegatedGroupManagement


  • public interface DelegatedGroupManagement
    Internal engine API for delegated groups management
    Author:
    P.Piernik
    • Method Detail

      • addGroup

        String addGroup​(String projectPath,
                        String parentPath,
                        I18nString groupName,
                        boolean isPublic)
                 throws EngineException
        Adds group
        Parameters:
        projectPath - project group path
        parentPath - parent group path
        groupName - new group name
        isPublic - group access mode
        Returns:
        Throws:
        EngineException
      • removeProject

        void removeProject​(String projectPath,
                           String subProjectPath)
                    throws EngineException
        Removes subproject
        Parameters:
        projectPath - project group path
        subProjectPath - removed subproject group path
        Throws:
        EngineException
      • setGroupDisplayedName

        void setGroupDisplayedName​(String projectPath,
                                   String path,
                                   I18nString newName)
                            throws EngineException
        Sets group display name
        Parameters:
        projectPath - project group path
        path - renamed group path
        newName -
        Throws:
        EngineException
      • setGroupAccessMode

        void setGroupAccessMode​(String projectPath,
                                String path,
                                boolean isPublic)
                         throws EngineException
        Updates group access mode
        Parameters:
        projectPath - project group path
        path - updated group path
        isPublic - indicates is group public or private mode
        Throws:
        EngineException
      • getGroupAndSubgroups

        Map<String,​DelegatedGroupContents> getGroupAndSubgroups​(String projectPath,
                                                                      String groupPath)
                                                               throws EngineException
        Gets group with all child (recursive) groups as map.
        Parameters:
        projectPath - project group path
        groupPath - 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:
        EngineException
      • getAttributeDisplayedName

        String getAttributeDisplayedName​(String projectPath,
                                         String attributeName)
                                  throws EngineException
        Gets attribute displayed name
        Parameters:
        projectPath - project group path
        attributeName -
        Returns:
        attribute display name
        Throws:
        EngineException
      • setGroupAuthorizationRole

        void setGroupAuthorizationRole​(String projectPath,
                                       String groupPath,
                                       long entityId,
                                       GroupAuthorizationRole role)
                                throws EngineException
        Update value of group authorization role attribute
        Parameters:
        projectPath - project group path
        entityId - attribute owner
        role - 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 path
        entityId - attribute owner
        role - value to set
        Throws:
        EngineException
      • setGroupDelegationConfiguration

        void setGroupDelegationConfiguration​(String projectPath,
                                             String groupPath,
                                             SubprojectGroupDelegationConfiguration subprojectGroupDelegationConfiguration)
                                      throws EngineException
        Sets group delegation configuration
        Parameters:
        projectPath - project group path
        groupPath - group path
        subprojectGroupDelegationConfiguration - group delegation configuration to set
        Throws:
        EngineException
      • addMemberToGroup

        void addMemberToGroup​(String projectPath,
                              String groupPath,
                              long entityId)
                       throws EngineException
        Adds a new member to the group
        Parameters:
        projectPath - project group path
        groupPath -
        entityId - entity id to add
        Throws:
        EngineException
      • removeMemberFromGroup

        void removeMemberFromGroup​(String projectPath,
                                   String groupPath,
                                   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 - project group path
        groupPath - group removing from
        entityId - entity id to remove
        Throws:
        EngineException