Interface DelegatedGroupManagement


  • public interface DelegatedGroupManagement
    Internal engine API for delegated groups management
    Author:
    P.Piernik
    • 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 path
        parentPath - parent group path
        groupName - new group name
        isPublic - 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 path
        path - 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 path
        path - renamed group path
        newName -
        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 path
        path - updated group path
        isPublic - 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 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:
        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 path
        attributeName -
        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 path
        entityId - attribute owner
        role - 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 path
        groupPath -
        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 path
        groupPath - group removing from
        entityId - 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 path
        groupPath -
        Returns:
        Throws:
        pl.edu.icm.unity.exceptions.EngineException