Schnittstelle ValidationMessageHandler

Alle bekannten Implementierungsklassen:
DefaultValidationMessageHandler

public interface ValidationMessageHandler

Definition of an interface for a central instance that manages validation messages.

This interface is used by concrete Validator 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 TransformerContext. It can then be used for requesting ValidationMessage objects for specified keys.

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 $
Autor:
Oliver Heger
  • Methodendetails

    • getValidationMessage

      ValidationMessage getValidationMessage(TransformerContext context, String key, Object... params)
      Returns a 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.
      Parameter:
      context - the transformer context
      key - the key for the validation message
      params - an array with additional parameters
      Gibt zurück:
      the corresponding ValidationMessage object