@Component(value="duracloudGroupService") public class DuracloudGroupServiceImpl extends Object implements DuracloudGroupService
| Constructor and Description |
|---|
DuracloudGroupServiceImpl(org.duracloud.account.db.repo.DuracloudRepoMgr duracloudRepoMgr,
org.duracloud.common.sns.AccountChangeNotifier accountChangeNotifier) |
| Modifier and Type | Method and 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.
|
protected boolean |
isGroupNameValid(String name)
This method is 'protected' for testing purposes only.
|
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.
|
@Autowired
public DuracloudGroupServiceImpl(org.duracloud.account.db.repo.DuracloudRepoMgr duracloudRepoMgr,
org.duracloud.common.sns.AccountChangeNotifier accountChangeNotifier)
public Set<org.duracloud.account.db.model.DuracloudGroup> getGroups(Long acctId)
DuracloudGroupServicegetGroups in interface DuracloudGroupServiceacctId - associated with grouppublic org.duracloud.account.db.model.DuracloudGroup getGroup(String name, Long acctId)
getGroup in interface DuracloudGroupServicename - of the groupacctId - associated with grouppublic org.duracloud.account.db.model.DuracloudGroup createGroup(String name, Long acctId) throws DuracloudGroupAlreadyExistsException, InvalidGroupNameException
createGroup in interface DuracloudGroupServicename - of the new groupacctId - associated with groupDuracloudGroupAlreadyExistsExceptionInvalidGroupNameExceptionprotected final boolean isGroupNameValid(String name)
public void deleteGroup(org.duracloud.account.db.model.DuracloudGroup group,
Long acctId)
DuracloudGroupServicedeleteGroup in interface DuracloudGroupServicegroup - to deleteacctId - associated with grouppublic void updateGroupUsers(org.duracloud.account.db.model.DuracloudGroup group,
Set<org.duracloud.account.db.model.DuracloudUser> users,
Long acctId)
throws DuracloudGroupNotFoundException
DuracloudGroupServiceupdateGroupUsers in interface DuracloudGroupServicegroup - to be updatedusers - to associate with groupacctId - associated with groupDuracloudGroupNotFoundExceptionCopyright © 2009–2016 DuraSpace. All rights reserved.