public interface ValidationMessageHandler
Definition of an interface for a central instance that manages validation messages.
This interface is used by concrete
implementations to obtain meaningful error messages when they decide that
user input is not valid. An object implementing this interface can be queried
from the Validator
. It can then be used for
requesting TransformerContext
objects for specified
keys.
ValidationMessage
Because all validation error messages are obtained through this interface, it provides a way for hooking into the mechanism of creating error messages. While the framework ships a fully functional default implementation, an application with completely different requirements can choose to use a custom implementation.
Modifier and Type | Method and Description |
---|---|
ValidationMessage |
getValidationMessage(TransformerContext context,
String key,
Object... params)
Returns a
ValidationMessage object for the specified key. |
ValidationMessage getValidationMessage(TransformerContext context, String key, Object... params)
ValidationMessage
object for the specified key.
The message will be initialized with the given parameters. From this
object the final error message can be obtained.context
- the transformer contextkey
- the key for the validation messageparams
- an array with additional parametersValidationMessage
objectCopyright © 2016 The JGUIraffe Team. All rights reserved.