Class MailAutomationValidator
java.lang.Object
ch.tocco.nice2.persist.core.api.validation.AbstractEntitiesValidator
ch.tocco.nice2.optional.automation.impl.validator.MailAutomationValidator
- All Implemented Interfaces:
EntitiesValidator
Ensure that a valid mail automation configuration is saved. It is verified that:
- if no `recipient_path` is defined, correspondence language is mandatory
- if `recipient_path` is defined it is a valid path
- if a `recipient_path` is defined also the `mail_field` must be defined
- either the correspondence language is fix in the configuration or there is a to one mandatory relation to correspondence language in the recipient model
from the recipient entity
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.tocco.nice2.persist.core.api.validation.AbstractEntitiesValidator
addMyself, getName
-
Constructor Details
-
MailAutomationValidator
-
-
Method Details
-
validate
Description copied from interface:EntitiesValidator
Validate all entities (of one entity model) that where changed in a transaction- Parameters:
entities
- the entities to be validatedvalidationResults
- a map of EntityValidationResults, contains anEntityValidationResult
for each entity. SeeEntityValidationResult
for more details on how to use the EntityValidationResult
-