Interface AccountModifier

All Superinterfaces:
IntermediateStorageProvider, Modifier<Account>, UndeletableModifier<Account>

public interface AccountModifier extends UndeletableModifier<Account>, IntermediateStorageProvider
Defines an API to modify an instance of type Account
  • Method Details

    • getName

      String getName()
      Get the current account name which is held in this AccountModifier.
      Returns:
      the name as String
    • setName

      Change the name of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      name - the new name as String
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new name is invalid
    • validateName

      boolean validateName(String name) throws ValidationException
      Validate the given name.
      Parameters:
      name - the name to validate as String
      Returns:
      true if the name is valid
      Throws:
      ValidationException - if the name is invalid
    • getAddress

      String getAddress()
      Get the current account address which is held in this AccountModifier.
      Returns:
      the address as String
    • setAddress

      AccountModifier setAddress(String address) throws ValidationException

      Change the address of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      address - the new address as String
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new address is invalid
    • validateAddress

      boolean validateAddress(String address) throws ValidationException
      Validate the given address.
      Parameters:
      address - the address to validate as String
      Returns:
      true if the address is valid
      Throws:
      ValidationException - if the address is invalid
    • getProtocol

      String getProtocol()
      Get the current protocol which is held in this AccountModifier.
      Returns:
      the protocol as String
    • setProtocol

      AccountModifier setProtocol(String protocol) throws ValidationException

      Change the protocol of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      protocol - the new protocol as String
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new protocol is invalid
    • validateProtocol

      boolean validateProtocol(String protocol) throws ValidationException
      Validate the given protocol.
      Parameters:
      protocol - the protocol to validate as String
      Returns:
      true if the protocol is valid
      Throws:
      ValidationException - if the protocol is invalid
    • getChannel

      Channel getChannel()
      Get the current channel which is held in this AccountModifier.
      Returns:
      the channel as String
    • setChannel

      AccountModifier setChannel(Channel channel) throws ValidationException

      Change the channel of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      channel - the new channel
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new channel is invalid
    • validateChannel

      boolean validateChannel(Channel channel) throws ValidationException
      Validate the given channel.
      Parameters:
      channel - the channel to validate
      Returns:
      true if the channel is valid
      Throws:
      ValidationException - if the channel is invalid
    • getTenant

      Tenant getTenant()
      Get the current tenant which is held in this AccountModifier.
      Returns:
      the tenant as String
    • setTenant

      AccountModifier setTenant(Tenant tenant) throws ValidationException

      Change the tenant of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      tenant - the new tenant
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new tenant is invalid
    • validateTenant

      boolean validateTenant(Tenant tenant) throws ValidationException
      Validate the given tenant.
      Parameters:
      tenant - the tenant to validate
      Returns:
      true if the tenant is valid
      Throws:
      ValidationException - if the tenant is invalid
    • isEnabled

      boolean isEnabled()
      Get the current enabled state which is held in this AccountModifier.
      Returns:
      the enabled state
    • setEnabled

      AccountModifier setEnabled(boolean enabled) throws ValidationException

      Change the enabled state of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      enabled - the new enabled state
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new enabled state cannot be applied
    • validateEnabled

      boolean validateEnabled(boolean enabled) throws ValidationException
      Validate the given enabled.
      Parameters:
      enabled - the enabled state to validate
      Returns:
      true if the enabled is valid
      Throws:
      ValidationException - if the enabled is invalid
    • isSendAllowed

      boolean isSendAllowed()
      Get the current sendAllowed state which is held in this AccountModifier.
      Returns:
      the sendAllowed state
    • setSendAllowed

      AccountModifier setSendAllowed(boolean sendAllowed) throws ValidationException

      Change the sendAllowed state of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      sendAllowed - the new sendAllowed state
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new sendAllowed state cannot be applied
    • validateSendAllowed

      boolean validateSendAllowed(boolean sendAllowed) throws ValidationException
      Validate the given sendAllowed.
      Parameters:
      sendAllowed - the sendAllowed state to validate
      Returns:
      true if the sendAllowed is valid
      Throws:
      ValidationException - if the sendAllowed is invalid
    • getAlternativeOutgoingAccount

      Optional<Account> getAlternativeOutgoingAccount()
      Get the current optional alternative outgoing account which is held in this AccountModifier.
      Returns:
      the optional alternative outgoing account
      Since:
      10.0.142
    • setAlternativeOutgoingAccount

      AccountModifier setAlternativeOutgoingAccount(Optional<Account> outgoingAccount) throws ValidationException

      Change the optional alternative outgoing account of the associated Account.

      The change is applied after the Modifier.write() method is called.

      Parameters:
      outgoingAccount - the new optional alternative outgoing account
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the new optional alternative outgoing account is invalid
      Since:
      10.0.142
    • validateAlternativeOutgoingAccount

      boolean validateAlternativeOutgoingAccount(Optional<Account> outgoingAccount) throws ValidationException
      Validate the given alternative outgoing account.
      Parameters:
      outgoingAccount - the new optional alternative outgoing account
      Returns:
      true if the outgoing account is valid
      Throws:
      ValidationException - if the outgoing account is invalid, or the alternative outgoing account does not allow to send isSendAllowed().
      Since:
      10.0.142
    • getAccountType

      Account.AccountType getAccountType()
      Get the Account.AccountType representing the type of this account which is held in this AccountModifier.
      Returns:
      the type as Account.AccountType
      Since:
      12.22
    • setAccountType

      Set the Account.AccountType representing the type of this account while creating. Please note, the type of an account is only setable for new accounts. Changing the type of an existing Account leads to a ValidationException.

      Parameters:
      type - the new Account.AccountType representing the type of this account
      Returns:
      the AccountModifier
      Throws:
      ValidationException - if the change is invalid
      Since:
      12.22
    • validateAccountType

      boolean validateAccountType(Account.AccountType type) throws ValidationException
      Validate the given type of account.
      Parameters:
      type - the type of account
      Returns:
      true if the type of account is valid
      Throws:
      ValidationException - if the type of account is not valid
      Since:
      12.22