Class AccountServiceSecuredImpl

  • All Implemented Interfaces:
    AccountService

    public class AccountServiceSecuredImpl
    extends Object
    implements AccountService
    This class wraps another AccountService implementation with AccessDecisionVoter security checks based on the AccountService annotations.
    Author:
    Andrew Woods Date: 4/7/11
    • Constructor Detail

      • AccountServiceSecuredImpl

        public AccountServiceSecuredImpl​(AccountService accountService,
                                         org.springframework.security.core.Authentication authentication,
                                         org.springframework.security.access.AccessDecisionVoter voter,
                                         AnnotationParser annotationParser)
    • Method Detail

      • retrieveAccountInfo

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

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