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 Type
    Method
    Description
    void
    addStorageProvider(org.duracloud.storage.domain.StorageProviderType storageProviderType)
    Adds a new secondary storage provider to this account.
    void
    Changes the primary storage provider to the one specified by the id.
    void
    deleteUserInvitation(Long invitationId)
    Deletes an invitation to this account.
    This method returns the id of account
    Set<org.duracloud.account.db.model.UserInvitation>
    Gets a listing of the user invitations which are associated with this account.
    org.duracloud.account.db.model.StorageProviderAccount
    Retrieves the primary storage provider account info
    Set<org.duracloud.account.db.model.StorageProviderAccount>
    Retrieves the info for all secondary storage provider accounts
    This method returns the subdomain associated with this account.
    Set<org.duracloud.account.db.model.DuracloudUser>
     
    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.
    void
    removeStorageProvider(Long storageProviderId)
    Removes a storage provider from the list of secondary storage providers for this account.
    org.duracloud.account.db.model.AccountInfo
     
    void
    storeAccountInfo(String acctName, String orgName, String department)
     
    void
    storeAccountStatus(org.duracloud.account.db.model.AccountInfo.AccountStatus status)
     
  • Method Details

    • getAccountId

      @Secured("role:ROLE_ANONYMOUS, scope:ANY") Long 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

      @Secured("role:ROLE_USER, scope:SELF_ACCT") String 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

      @Secured("role:ROLE_OWNER, scope:SELF_ACCT") void removeStorageProvider(Long storageProviderId)
      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

      @Secured("role:ROLE_ADMIN, scope:SELF_ACCT") void deleteUserInvitation(Long invitationId)
      Deletes an invitation to this account.
      Parameters:
      invitationId -
    • changePrimaryStorageProvider

      @Secured("role:ROLE_OWNER, scope:SELF_ACCT") void changePrimaryStorageProvider(Long id)
      Changes the primary storage provider to the one specified by the id.
      Parameters:
      id - of the new primary storage provider.