Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.forms.validation
Class ValidationError

    java.lang.Object
      org.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.java 587759 2007-10-24 03:00:37Z vgritsenko $

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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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