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

    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 Details

    • 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.
    • getGroup

      @Secured("role:ROLE_ADMIN, scope:SELF_ACCT") org.duracloud.account.db.model.DuracloudGroup getGroup(String name, Long acctId) throws DuracloudGroupNotFoundException
      Parameters:
      name - of the group
      acctId - associated with group
      Returns:
      the group with the matching name
      Throws:
      DuracloudGroupNotFoundException
    • createGroup

      @Secured("role:ROLE_ADMIN, scope:SELF_ACCT") org.duracloud.account.db.model.DuracloudGroup createGroup(String name, Long acctId) throws DuracloudGroupAlreadyExistsException, InvalidGroupNameException
      Parameters:
      name - of the new group
      acctId - associated with group
      Returns:
      the newly created group
      Throws:
      DuracloudGroupAlreadyExistsException
      InvalidGroupNameException
    • 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