Class AccountServiceImpl

java.lang.Object
org.duracloud.account.db.util.impl.AccountServiceImpl
All Implemented Interfaces:
AccountService

public class AccountServiceImpl extends Object implements AccountService
Author:
"Daniel Bernstein (dbernstein@duraspace.org)"
  • Constructor Details

    • AccountServiceImpl

      public AccountServiceImpl(AmaEndpoint amaEndpoint, org.duracloud.account.db.model.AccountInfo acct, org.duracloud.account.db.repo.DuracloudRepoMgr repoMgr, org.duracloud.common.changenotifier.AccountChangeNotifier accountChangeNotifier, NotificationMgr notificationMgr, EmailTemplateService emailTemplateService)
      Parameters:
      acct -
  • Method Details

    • getUsers

      public Set<org.duracloud.account.db.model.DuracloudUser> getUsers()
      Specified by:
      getUsers in interface AccountService
      Returns:
      empty list
    • getAccountId

      public Long getAccountId()
      Description copied from interface: AccountService
      This method returns the id of account
      Specified by:
      getAccountId in interface AccountService
      Returns:
      account id
    • retrieveAccountInfo

      public org.duracloud.account.db.model.AccountInfo retrieveAccountInfo()
      Specified by:
      retrieveAccountInfo in interface AccountService
      Returns:
    • getPrimaryStorageProvider

      public org.duracloud.account.db.model.StorageProviderAccount getPrimaryStorageProvider()
      Description copied from interface: AccountService
      Retrieves the primary storage provider account info
      Specified by:
      getPrimaryStorageProvider in interface AccountService
      Returns:
    • getSecondaryStorageProviders

      public Set<org.duracloud.account.db.model.StorageProviderAccount> getSecondaryStorageProviders()
      Description copied from interface: AccountService
      Retrieves the info for all secondary storage provider accounts
      Specified by:
      getSecondaryStorageProviders in interface AccountService
      Returns:
    • addStorageProvider

      public void addStorageProvider(org.duracloud.storage.domain.StorageProviderType storageProviderType)
      Description copied from interface: AccountService
      Adds a new secondary storage provider to this account.
      Specified by:
      addStorageProvider in interface AccountService
    • removeStorageProvider

      public void removeStorageProvider(Long storageProviderId)
      Description copied from interface: AccountService
      Removes a storage provider from the list of secondary storage providers for this account. The primary storage provider cannot be removed.
      Specified by:
      removeStorageProvider in interface AccountService
    • changePrimaryStorageProvider

      public void changePrimaryStorageProvider(Long storageProviderId)
      Description copied from interface: AccountService
      Changes the primary storage provider to the one specified by the id.
      Specified by:
      changePrimaryStorageProvider in interface AccountService
      Parameters:
      storageProviderId - of the new primary storage provider.
    • storeAccountInfo

      public void storeAccountInfo(String acctName, String orgName, String department)
      Specified by:
      storeAccountInfo in interface AccountService
    • storeAccountStatus

      public void storeAccountStatus(org.duracloud.account.db.model.AccountInfo.AccountStatus status)
      Specified by:
      storeAccountStatus in interface AccountService
    • getSubdomain

      public String getSubdomain()
      Description copied from interface: AccountService
      This method returns the subdomain associated with this account.
      Specified by:
      getSubdomain in interface AccountService
      Returns:
      subdomain
    • inviteUser

      public org.duracloud.account.db.model.UserInvitation inviteUser(String emailAddress, String adminUsername)
      Description copied from interface: AccountService
      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.
      Specified by:
      inviteUser in interface AccountService
      Parameters:
      emailAddress - address at which to invite user
      Returns:
      UserInvitation
    • getPendingInvitations

      public Set<org.duracloud.account.db.model.UserInvitation> getPendingInvitations()
      Description copied from interface: AccountService
      Gets a listing of the user invitations which are associated with this account.
      Specified by:
      getPendingInvitations in interface AccountService
      Returns:
      UserInvitation set
    • deleteUserInvitation

      public void deleteUserInvitation(Long invitationId)
      Description copied from interface: AccountService
      Deletes an invitation to this account.
      Specified by:
      deleteUserInvitation in interface AccountService