Interface DuracloudGroupService

  • All Known Implementing Classes:
    DuracloudGroupServiceImpl

    public interface DuracloudGroupService
    A 'group-centric' interface for reading and writing groups associated with an individual account.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.duracloud.account.db.model.DuracloudGroup createGroup​(String name, Long acctId)  
      void deleteGroup​(org.duracloud.account.db.model.DuracloudGroup group, Long acctId)
      Deletes a group.
      org.duracloud.account.db.model.DuracloudGroup getGroup​(String name, Long acctId)  
      Set<org.duracloud.account.db.model.DuracloudGroup> getGroups​(Long acctId)
      Returns a set of groups associated with the underlying Account.
      void updateGroupUsers​(org.duracloud.account.db.model.DuracloudGroup group, Set<org.duracloud.account.db.model.DuracloudUser> users, Long acctId)
      This method replaces the users (if any) associated with the specified group.
    • Method Detail

      • getGroups

        @Secured("role:ROLE_ADMIN, scope:SELF_ACCT")
        Set<org.duracloud.account.db.model.DuracloudGroup> getGroups​(Long acctId)
        Returns a set of groups associated with the underlying Account.
        Parameters:
        acctId - associated with group
        Returns:
        a set of groups or null if no groups associated with the account.
      • deleteGroup

        @Secured("role:ROLE_ADMIN, scope:SELF_ACCT")
        void deleteGroup​(org.duracloud.account.db.model.DuracloudGroup group,
                         Long acctId)
        Deletes a group. If the group does not exist, nothing happens.
        Parameters:
        group - to delete
        acctId - associated with group
      • updateGroupUsers

        @Secured("role:ROLE_ADMIN, scope:SELF_ACCT")
        void updateGroupUsers​(org.duracloud.account.db.model.DuracloudGroup group,
                              Set<org.duracloud.account.db.model.DuracloudUser> users,
                              Long acctId)
                       throws DuracloudGroupNotFoundException
        This method replaces the users (if any) associated with the specified group.
        Parameters:
        group - to be updated
        users - to associate with group
        acctId - associated with group
        Throws:
        DuracloudGroupNotFoundException