com.acsinet_solutions.util.validator
Class LocalizedValidationIssue

java.lang.Object
  extended by com.acsinet_solutions.util.validator.LocalizedValidationIssue
All Implemented Interfaces:
ValidationIssue, java.io.Serializable

public class LocalizedValidationIssue
extends java.lang.Object
implements ValidationIssue

Bean that represents a single validation issue that work in an internationalization environment. This issue does not store actual message values, but keys and arguments that are later interpreted according to a resource bundle.

Author:
Santiago Arriaga
See Also:
Serialized Form

Constructor Summary
LocalizedValidationIssue(java.lang.String key, java.lang.Object... args)
          Create a validation issue with multiple arguments
 
Method Summary
 java.lang.String getMessage(MessageFactory factory)
          If the MessageFactory contains no message for the given key, a String representation of this issue is printed instead.
 java.lang.String toString()
          For debugging purposes only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedValidationIssue

public LocalizedValidationIssue(java.lang.String key,
                                java.lang.Object... args)
Create a validation issue with multiple arguments

Parameters:
key - A not-null not-empty String instance
Method Detail

getMessage

public final java.lang.String getMessage(MessageFactory factory)
If the MessageFactory contains no message for the given key, a String representation of this issue is printed instead. This will normally result in a not-human-intelligible string, and a developer should correct this by placing the according message keys in the MessageFactory or ResourceBundle that is being used to interpret the validation error messages.

Specified by:
getMessage in interface ValidationIssue

toString

public final java.lang.String toString()
For debugging purposes only.

Overrides:
toString in class java.lang.Object