Class DuracloudGroupServiceImpl
java.lang.Object
org.duracloud.account.db.util.impl.DuracloudGroupServiceImpl
- All Implemented Interfaces:
DuracloudGroupService
@Component("duracloudGroupService")
public class DuracloudGroupServiceImpl
extends Object
implements DuracloudGroupService
- Author:
- Daniel Bernstein Date: Nov 11, 2011
-
Constructor Summary
ConstructorsConstructorDescriptionDuracloudGroupServiceImpl(org.duracloud.account.db.repo.DuracloudRepoMgr duracloudRepoMgr, org.duracloud.common.changenotifier.AccountChangeNotifier accountChangeNotifier) -
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.protected final booleanisGroupNameValid(String name) This method is 'protected' for testing purposes only.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.
-
Constructor Details
-
DuracloudGroupServiceImpl
@Autowired public DuracloudGroupServiceImpl(org.duracloud.account.db.repo.DuracloudRepoMgr duracloudRepoMgr, org.duracloud.common.changenotifier.AccountChangeNotifier accountChangeNotifier)
-
-
Method Details
-
getGroups
Description copied from interface:DuracloudGroupServiceReturns a set of groups associated with the underlying Account.- Specified by:
getGroupsin interfaceDuracloudGroupService- Parameters:
acctId- associated with group- Returns:
- a set of groups or null if no groups associated with the account.
-
getGroup
- Specified by:
getGroupin interfaceDuracloudGroupService- Parameters:
name- of the groupacctId- associated with group- Returns:
- the group with the matching name
-
createGroup
public org.duracloud.account.db.model.DuracloudGroup createGroup(String name, Long acctId) throws DuracloudGroupAlreadyExistsException, InvalidGroupNameException - Specified by:
createGroupin interfaceDuracloudGroupService- Parameters:
name- of the new groupacctId- associated with group- Returns:
- the newly created group
- Throws:
DuracloudGroupAlreadyExistsExceptionInvalidGroupNameException
-
isGroupNameValid
This method is 'protected' for testing purposes only. -
deleteGroup
Description copied from interface:DuracloudGroupServiceDeletes a group. If the group does not exist, nothing happens.- Specified by:
deleteGroupin interfaceDuracloudGroupService- Parameters:
group- to deleteacctId- associated with group
-
updateGroupUsers
public void updateGroupUsers(org.duracloud.account.db.model.DuracloudGroup group, Set<org.duracloud.account.db.model.DuracloudUser> users, Long acctId) throws DuracloudGroupNotFoundException Description copied from interface:DuracloudGroupServiceThis method replaces the users (if any) associated with the specified group.- Specified by:
updateGroupUsersin interfaceDuracloudGroupService- Parameters:
group- to be updatedusers- to associate with groupacctId- associated with group- Throws:
DuracloudGroupNotFoundException
-