Interface TransactionCodeModifier
-
- All Superinterfaces:
IntermediateStorageProvider
,Modifier<TransactionCode>
,UndeletableModifier<TransactionCode>
public interface TransactionCodeModifier extends UndeletableModifier<TransactionCode>, IntermediateStorageProvider
Defines an API to modify an instance of typeTransactionCode
- Since:
- 10.0.38
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TransactionCodeModifier
addAssignedCategories(Category... categories)
Assign the transaction code to the passed categories.java.util.Set<Category>
getAssignedCategories()
Get an unmodifiable view of the current assigned categories which are held in thisTransactionCodeModifier
.java.lang.String
getDescription()
Get the current transaction code description which is held in thisTransactionCodeModifier
.IntermediateStorage
getIntermediateStorage()
Returns the IntermediateStorage for the instance of thisAccountModifier
java.lang.String
getName()
Get the current transaction code name which is held in thisTransactionCodeModifier
.TransactionCodeModifier
removeAssignedCategories(Category... categories)
Remove the assignment of the transaction code to the passed categories.TransactionCodeModifier
setDescription(java.lang.String description)
Change the description of the associatedTransactionCode
.TransactionCodeModifier
setName(java.lang.String name)
Change the name of the associatedTransactionCode
.boolean
validateDescription(java.lang.String description)
Validate the given description.boolean
validateName(java.lang.String name)
Validate the given name.-
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 Detail
-
getName
java.lang.String getName()
Get the current transaction code name which is held in thisTransactionCodeModifier
.- Returns:
- the name as String
- Since:
- 10.0.38
-
setName
TransactionCodeModifier setName(java.lang.String name) throws ValidationException
Change the name of the associated
TransactionCode
.The change is applied after the
Modifier.write()
method is called.- Parameters:
name
- the new name as String- Returns:
- the
TransactionCodeModifier
- Throws:
ValidationException
- if the new name is invalid- Since:
- 10.0.38
-
validateName
boolean validateName(java.lang.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- Since:
- 10.0.38
-
getDescription
java.lang.String getDescription()
Get the current transaction code description which is held in thisTransactionCodeModifier
.- Returns:
- the description as String
- Since:
- 10.0.38
-
setDescription
TransactionCodeModifier setDescription(java.lang.String description) throws ValidationException
Change the description of the associated
TransactionCode
.The change is applied after the
Modifier.write()
method is called.- Parameters:
description
- the new description as String- Returns:
- the
TransactionCodeModifier
- Throws:
ValidationException
- if the new description is invalid- Since:
- 10.0.38
-
validateDescription
boolean validateDescription(java.lang.String description) throws ValidationException
Validate the given description.- Parameters:
description
- the description to validate as String- Returns:
- true if the description is valid
- Throws:
ValidationException
- if the description is invalid- Since:
- 10.0.38
-
getAssignedCategories
java.util.Set<Category> getAssignedCategories()
Get an unmodifiable view of the current assigned categories which are held in thisTransactionCodeModifier
.- Returns:
- the current assigned categories as an unmodifiable set
- Since:
- 10.0.38
-
addAssignedCategories
TransactionCodeModifier addAssignedCategories(Category... categories) throws ValidationException
Assign the transaction code to the passed categories.
The change is applied after the
Modifier.write()
method is called.- Parameters:
categories
- the categories the transaction code should be assigned to- Returns:
- the
TransactionCodeModifier
- Throws:
ValidationException
- if a category is null or already assigned- Since:
- 10.0.38
-
removeAssignedCategories
TransactionCodeModifier removeAssignedCategories(Category... categories) throws ValidationException
Remove the assignment of the transaction code to the passed categories.
The change is applied after the
Modifier.write()
method is called.- Parameters:
categories
- the categories for which the assignment should be removed- Returns:
- the
TransactionCodeModifier
- Throws:
ValidationException
- if a category is null or not assigned- Since:
- 10.0.38
-
getIntermediateStorage
IntermediateStorage getIntermediateStorage() throws PersistencyException
Description copied from interface:IntermediateStorageProvider
Returns the IntermediateStorage for the instance of thisAccountModifier
- Specified by:
getIntermediateStorage
in interfaceIntermediateStorageProvider
- Returns:
- the
IntermediateStorage
- Throws:
PersistencyException
- is thrown if an error occurs during the initialization of the Storage- Since:
- 11.14
-
-