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

## net.sourceforge.pebble.web.validation
Class ValidationContext

    java.lang.Object
      net.sourceforge.pebble.web.validation.ValidationContext

    public class ValidationContext

extends java.lang.Object

A context within which to perform validation and raise errors against.

Author:
  Simon Brown

Constructor Summary
`ValidationContext()`

Method Summary
`void` | `addError(java.lang.String message)` Adds a new error to this context.
`void` | `addError(ValidationError error)` Adds a new error to this context.
`ValidationError` | `getError(int index)` Gets the specified ValidationError.
`java.util.List` | `getErrors()` Gets a list of all errors raised against this context.
`int` | `getNumberOfErrors()` Gets the number of errors.
`boolean` | `hasErrors()` Determines whether this context has errors rasied against it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ValidationContext

    public ValidationContext()

Method Detail

### addError

    public void addError(java.lang.String message)

  Adds a new error to this context.

  Parameters:
    `message` - the error message as a String

### addError

    public void addError(ValidationError error)

  Adds a new error to this context.

  Parameters:
    `error` - a ValidationError instance

### hasErrors

    public boolean hasErrors()

  Determines whether this context has errors rasied against it.

  Returns:
    true if this context has errors, false otherwise

### getErrors

    public java.util.List getErrors()

  Gets a list of all errors raised against this context.

  Returns:
    a List of ValidationError instances

### getNumberOfErrors

    public int getNumberOfErrors()

  Gets the number of errors.

  Returns:
    the number of errors as in int

### getError

    public ValidationError getError(int index)

  Gets the specified ValidationError.

  Parameters:
    `index` - the index of the error to get
  Returns:
    the ValidationError at the specified index

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 © 2003-2006, Simon Brown. All Rights Reserved.