public class SendMessagePropertyValidationHandler extends LoggingPropertyValidationHandler
ValidationMessager if either the PropertyIO and any of the Property's is invalid.ValidationMessenger,
Serialized Form| Constructor and Description |
|---|
SendMessagePropertyValidationHandler(Property<List<String>> sendToList,
Property<String> validationFailedSubject,
ValidationMessenger messenger)
Constructor.
|
SendMessagePropertyValidationHandler(Property<List<String>> sendToList,
Property<String> validationFailedSubject,
ValidationMessenger messenger,
boolean doSystemExitIfAnythingNotInvalid)
Constructor.
|
SendMessagePropertyValidationHandler(String[] sendToArray,
String validationFailedSubject,
ValidationMessenger messenger)
Constructor.
|
SendMessagePropertyValidationHandler(String[] sendToArray,
String validationFailedSubject,
ValidationMessenger messenger,
boolean doSystemExitIfAnythingNotInvalid)
Constructor.
|
SendMessagePropertyValidationHandler(String sendTo,
String validationFailedSubject,
ValidationMessenger messenger)
Constructor.
|
SendMessagePropertyValidationHandler(String sendTo,
String validationFailedSubject,
ValidationMessenger messenger,
boolean doSystemExitIfAnythingNotInvalid)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterValidation(org.apache.commons.logging.Log logger,
boolean isAllValid)
Method called after validation of the PropertyIO and all the Property's.
|
ValidationMessenger |
getMessenger()
The validation messager.
|
String[] |
getSendTo()
Who shall the message be sent to.
|
String |
getValidationFailedSubject()
What subject will there be for the message, use something easily recognizable so a filter easily will pick it up.
|
void |
invalidProperty(org.apache.commons.logging.Log logger,
Property<?> property,
Exception exception)
A handle of a property which is INVALID.
|
void |
invalidPropertyIO(org.apache.commons.logging.Log logger,
PropertyIO io,
Exception exception)
If the propertyIO was INVALID (aka it could NOT find the property file etc.)
|
boolean |
isLazyLoad() |
protected void |
sendMessage(org.apache.commons.logging.Log logger) |
isDoSystemExitIfAnythingIsInvalid, logError, logInfo, validProperty, validPropertyIOpublic SendMessagePropertyValidationHandler(String[] sendToArray, String validationFailedSubject, ValidationMessenger messenger, boolean doSystemExitIfAnythingNotInvalid)
sendToArray - who shall the message be sent to as an array.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.doSystemExitIfAnythingNotInvalid - if true an System.exit(42); will be performed if either the PropertyIO or any Property is invalid.public SendMessagePropertyValidationHandler(String[] sendToArray, String validationFailedSubject, ValidationMessenger messenger)
false.sendToArray - who shall the message be sent to as an array.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.public SendMessagePropertyValidationHandler(String sendTo, String validationFailedSubject, ValidationMessenger messenger, boolean doSystemExitIfAnythingNotInvalid)
sendTo - who shall the message be sent to.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.doSystemExitIfAnythingNotInvalid - if true an System.exit(42); will be performed if either the PropertyIO or any Property is invalid.public SendMessagePropertyValidationHandler(String sendTo, String validationFailedSubject, ValidationMessenger messenger)
false.sendTo - who shall the message be sent to.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.public SendMessagePropertyValidationHandler(Property<List<String>> sendToList, Property<String> validationFailedSubject, ValidationMessenger messenger, boolean doSystemExitIfAnythingNotInvalid)
sendMessage method is executed.sendToList - who shall the message be sent to as a Property as List of String.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.doSystemExitIfAnythingNotInvalid - if true an System.exit(42); will be performed if either the PropertyIO or any Property is invalid.public SendMessagePropertyValidationHandler(Property<List<String>> sendToList, Property<String> validationFailedSubject, ValidationMessenger messenger)
sendMessage method is executed. Where doSystemExitIfAnythingNotInvalid is false.sendToList - who shall the message be sent to as a Property as List of String.validationFailedSubject - what subject will there be for the message, use something easily recognizable so a filter easily will pick it up.messenger - the validationMessager instance.public void invalidProperty(org.apache.commons.logging.Log logger,
Property<?> property,
Exception exception)
PropertyValidationHandlerinvalidProperty in interface PropertyValidationHandlerinvalidProperty in class LoggingPropertyValidationHandlerlogger - the logger, if null than System.err is used.property - the property which is INVALID, can be null.exception - the exceptionpublic void invalidPropertyIO(org.apache.commons.logging.Log logger,
PropertyIO io,
Exception exception)
PropertyValidationHandlerinvalidPropertyIO in interface PropertyValidationHandlerinvalidPropertyIO in class LoggingPropertyValidationHandlerlogger - the logger, if null than System.err is used.io - the IO usedexception - the exceptionpublic void afterValidation(org.apache.commons.logging.Log logger,
boolean isAllValid)
PropertyValidationHandlerafterValidation in interface PropertyValidationHandlerafterValidation in class LoggingPropertyValidationHandlerlogger - the logger, if null than System.err or System.out is usedisAllValid - true if PropertyIO and all Property's is valid, otherwise false.protected void sendMessage(org.apache.commons.logging.Log logger)
public ValidationMessenger getMessenger()
public String[] getSendTo()
public boolean isLazyLoad()
public String getValidationFailedSubject()