Package org.duracloud.account.db.util
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 TypeMethodDescriptionorg.duracloud.account.db.model.DuracloudGroupcreateGroup(String name, Long acctId) voiddeleteGroup(org.duracloud.account.db.model.DuracloudGroup group, Long acctId) Deletes a group.org.duracloud.account.db.model.DuracloudGroupSet<org.duracloud.account.db.model.DuracloudGroup>Returns a set of groups associated with the underlying Account.voidupdateGroupUsers(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 groupacctId- 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 groupacctId- associated with group- Returns:
- the newly created group
- Throws:
DuracloudGroupAlreadyExistsExceptionInvalidGroupNameException
-
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 deleteacctId- 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 updatedusers- to associate with groupacctId- associated with group- Throws:
DuracloudGroupNotFoundException
-