Interface AccountModifier
- All Superinterfaces:
IntermediateStorageProvider
,Modifier<Account>
,UndeletableModifier<Account>
Account
-
Method Summary
Modifier and TypeMethodDescriptionGet theAccount.AccountType
representing the type of this account which is held in thisAccountModifier
.Get the current account address which is held in thisAccountModifier
.Get the current optional alternative outgoing account which is held in thisAccountModifier
.Get the current channel which is held in thisAccountModifier
.getName()
Get the current account name which is held in thisAccountModifier
.Get the current protocol which is held in thisAccountModifier
.Get the current tenant which is held in thisAccountModifier
.boolean
Get the current enabled state which is held in thisAccountModifier
.boolean
Get the current sendAllowed state which is held in thisAccountModifier
.Set theAccount.AccountType
representing the type of this account while creating.setAddress
(String address) Change the address of the associatedAccount
.setAlternativeOutgoingAccount
(Optional<Account> outgoingAccount) Change the optional alternative outgoing account of the associatedAccount
.setChannel
(Channel channel) Change the channel of the associatedAccount
.setEnabled
(boolean enabled) Change the enabled state of the associatedAccount
.Change the name of the associatedAccount
.setProtocol
(String protocol) Change the protocol of the associatedAccount
.setSendAllowed
(boolean sendAllowed) Change the sendAllowed state of the associatedAccount
.Change the tenant of the associatedAccount
.boolean
Validate the given type of account.boolean
validateAddress
(String address) Validate the given address.boolean
validateAlternativeOutgoingAccount
(Optional<Account> outgoingAccount) Validate the given alternative outgoing account.boolean
validateChannel
(Channel channel) Validate the given channel.boolean
validateEnabled
(boolean enabled) Validate the given enabled.boolean
validateName
(String name) Validate the given name.boolean
validateProtocol
(String protocol) Validate the given protocol.boolean
validateSendAllowed
(boolean sendAllowed) Validate the given sendAllowed.boolean
validateTenant
(Tenant tenant) Validate the given tenant.Methods inherited from interface com.novomind.ecom.api.iagent.provider.IntermediateStorageProvider
getIntermediateStorage
Methods inherited from interface com.novomind.ecom.api.imail.routing.persistence.Modifier
delete, get, write
Methods inherited from interface com.novomind.ecom.api.imail.routing.persistence.UndeletableModifier
undelete
-
Method Details
-
getName
String getName()Get the current account name which is held in thisAccountModifier
.- 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
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 thisAccountModifier
.- Returns:
- the address as String
-
setAddress
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
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 thisAccountModifier
.- Returns:
- the protocol as String
-
setProtocol
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
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 thisAccountModifier
.- Returns:
- the channel as String
-
setChannel
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
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 thisAccountModifier
.- Returns:
- the tenant as String
-
setTenant
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
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 thisAccountModifier
.- Returns:
- the enabled state
-
setEnabled
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
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 thisAccountModifier
.- Returns:
- the sendAllowed state
-
setSendAllowed
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
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
Get the current optional alternative outgoing account which is held in thisAccountModifier
.- 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 sendisSendAllowed()
.- Since:
- 10.0.142
-
getAccountType
Account.AccountType getAccountType()Get theAccount.AccountType
representing the type of this account which is held in thisAccountModifier
.- 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 newAccount.AccountType
representing the type of this account- Returns:
- the
AccountModifier
- Throws:
ValidationException
- if the change is invalid- Since:
- 12.22
-
validateAccountType
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
-