Package net.sf.jguiraffe.transform
Interface ValidationMessageHandler
-
- All Known Implementing Classes:
DefaultValidationMessageHandler
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 theValidator
. It can then be used for requestingTransformerContext
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.
- Version:
- $Id: ValidationMessageHandler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValidationMessage
getValidationMessage(TransformerContext context, String key, Object... params)
Returns aValidationMessage
object for the specified key.
-
-
-
Method Detail
-
getValidationMessage
ValidationMessage getValidationMessage(TransformerContext context, String key, Object... params)
Returns aValidationMessage
object for the specified key. The message will be initialized with the given parameters. From this object the final error message can be obtained.- Parameters:
context
- the transformer contextkey
- the key for the validation messageparams
- an array with additional parameters- Returns:
- the corresponding
ValidationMessage
object
-
-