Package org.duracloud.account.db.util
Interface AccountService
- All Known Implementing Classes:
AccountServiceImpl,AccountServiceSecuredImpl
public interface AccountService
An interface for manipulating account data.
- Author:
- "Daniel Bernstein (dbernstein@duraspace.org)"
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStorageProvider(org.duracloud.storage.domain.StorageProviderType storageProviderType) Adds a new secondary storage provider to this account.voidChanges the primary storage provider to the one specified by the id.voiddeleteUserInvitation(Long invitationId) Deletes an invitation to this account.This method returns the id of accountSet<org.duracloud.account.db.model.UserInvitation>Gets a listing of the user invitations which are associated with this account.org.duracloud.account.db.model.StorageProviderAccountRetrieves the primary storage provider account infoSet<org.duracloud.account.db.model.StorageProviderAccount>Retrieves the info for all secondary storage provider accountsThis method returns the subdomain associated with this account.Set<org.duracloud.account.db.model.DuracloudUser>getUsers()org.duracloud.account.db.model.UserInvitationinviteUser(String emailAddress, String adminUsername) Invites a user to join this account by sending a notification to the provided email address.voidremoveStorageProvider(Long storageProviderId) Removes a storage provider from the list of secondary storage providers for this account.org.duracloud.account.db.model.AccountInfovoidstoreAccountInfo(String acctName, String orgName, String department) voidstoreAccountStatus(org.duracloud.account.db.model.AccountInfo.AccountStatus status)
-
Method Details
-
getAccountId
This method returns the id of account- Returns:
- account id
-
retrieveAccountInfo
@Secured("role:ROLE_ADMIN, scope:SELF_ACCT") org.duracloud.account.db.model.AccountInfo retrieveAccountInfo()- Returns:
-
storeAccountInfo
@Secured("role:ROLE_OWNER, scope:SELF_ACCT") void storeAccountInfo(String acctName, String orgName, String department) - Parameters:
acctName-orgName-department-
-
storeAccountStatus
@Secured("role:ROLE_OWNER, scope:SELF_ACCT") void storeAccountStatus(org.duracloud.account.db.model.AccountInfo.AccountStatus status) - Parameters:
status-
-
getSubdomain
This method returns the subdomain associated with this account.- Returns:
- subdomain
-
getPrimaryStorageProvider
@Secured("role:ROLE_ADMIN, scope:SELF_ACCT") org.duracloud.account.db.model.StorageProviderAccount getPrimaryStorageProvider()Retrieves the primary storage provider account info- Returns:
-
getSecondaryStorageProviders
@Secured("role:ROLE_ADMIN, scope:SELF_ACCT") Set<org.duracloud.account.db.model.StorageProviderAccount> getSecondaryStorageProviders()Retrieves the info for all secondary storage provider accounts- Returns:
-
addStorageProvider
@Secured("role:ROLE_OWNER, scope:SELF_ACCT") void addStorageProvider(org.duracloud.storage.domain.StorageProviderType storageProviderType) Adds a new secondary storage provider to this account.- Parameters:
storageProviderType-
-
removeStorageProvider
Removes a storage provider from the list of secondary storage providers for this account. The primary storage provider cannot be removed.- Parameters:
storageProviderId-
-
getUsers
@Secured("role:ROLE_ANONYMOUS, scope:ANY") Set<org.duracloud.account.db.model.DuracloudUser> getUsers()- Returns:
- empty list
-
inviteUser
@Secured("role:ROLE_ADMIN, scope:SELF_ACCT") org.duracloud.account.db.model.UserInvitation inviteUser(String emailAddress, String adminUsername) Invites a user to join this account by sending a notification to the provided email address. The invitation sent to the user is also returned by this method, as it may be useful to an administrator.- Parameters:
emailAddress- address at which to invite user- Returns:
- UserInvitation
-
getPendingInvitations
@Secured("role:ROLE_ADMIN, scope:SELF_ACCT") Set<org.duracloud.account.db.model.UserInvitation> getPendingInvitations()Gets a listing of the user invitations which are associated with this account.- Returns:
- UserInvitation set
-
deleteUserInvitation
Deletes an invitation to this account.- Parameters:
invitationId-
-
changePrimaryStorageProvider
Changes the primary storage provider to the one specified by the id.- Parameters:
id- of the new primary storage provider.
-