org.apache.cocoon.forms.validation
Class ValidationError

java.lang.Object
  extended byorg.apache.cocoon.forms.validation.ValidationError

public class ValidationError
extends Object

An object that holds a validation error message. The error message can be a simple string or a piece of XML.

Version:
$Id: ValidationError.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
ValidationError(String errorMessageKey)
           
ValidationError(String errorMessage, boolean i18n)
           
ValidationError(String errorMessageKey, String[] parameters)
           
ValidationError(String errorMessageKey, String[] parameters, boolean[] keys)
           
ValidationError(XMLizable errorMessage)
           
 
Method Summary
 boolean equals(Object obj)
           
 void generateSaxFragment(ContentHandler contentHandler)
          Generates SAX events for this ValidationError.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationError

public ValidationError(String errorMessage,
                       boolean i18n)
Parameters:
i18n - should the errorMessage be interpreted as an i18n key?

ValidationError

public ValidationError(String errorMessageKey)
See Also:
I18nMessage.I18nMessage(java.lang.String)

ValidationError

public ValidationError(String errorMessageKey,
                       String[] parameters)
See Also:
I18nMessage.I18nMessage(java.lang.String, java.lang.String[])

ValidationError

public ValidationError(String errorMessageKey,
                       String[] parameters,
                       boolean[] keys)
See Also:
I18nMessage.I18nMessage(java.lang.String, java.lang.String[], boolean[])

ValidationError

public ValidationError(XMLizable errorMessage)
Parameters:
errorMessage - the errormessages in the form of something that is "XMLizable", i.e. can produce SAX events. It should however not produce start/endDocument calls, only a piece of embeddable, stand-alone SAX events. Helpful implementations are SaxBuffer, I18nMessage or StringMessage.
Method Detail

generateSaxFragment

public void generateSaxFragment(ContentHandler contentHandler)
                         throws SAXException
Generates SAX events for this ValidationError. In case of the constructors where a String error message key was supplied, the necessary I18n tags will be generated.

Throws:
SAXException

equals

public boolean equals(Object obj)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.