Class AccountServiceImpl

  • All Implemented Interfaces:
    AccountService

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

      • 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 Detail

      • getUsers

        public Set<org.duracloud.account.db.model.DuracloudUser> getUsers()
        Specified by:
        getUsers in interface AccountService
        Returns:
        empty list
      • 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.
      • 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