com.ivata.mask.validation
Class ValidationErrors

java.lang.Object
  extended bycom.ivata.mask.validation.ValidationErrors
All Implemented Interfaces:
java.io.Serializable

public class ValidationErrors
extends java.lang.Object
implements java.io.Serializable

Represents a list of ValidationError instances which have occurred in data which is being validated for submission.

Currently, this class serves to encapsulate the functionality of the Struts class ActionErrors. In the future, it could be extended to be used in error handling with another platform.

.

Since:
ivata masks 0.4 (2002-11-11)
Version:
$Revision: 1.5 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
ValidationError, org.apache.struts.action.ActionErrors, Serialized Form

Constructor Summary
ValidationErrors()
           
 
Method Summary
 void add(ValidationError error)
           Add a new ValidationError to the list.
 void addAll(ValidationErrors validationErrors)
           Add all elements of another ValidationErrors instance to the list.
 java.util.List getErrors()
           Contains all of the errors represented by the ValidationErrors instance.
 boolean isEmpty()
           Evaluates whether or not this object contains errors.
 java.lang.String toString()
          Overridden to show you the errors this object contains.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationErrors

public ValidationErrors()
Method Detail

add

public final void add(ValidationError error)

Add a new ValidationError to the list.

Parameters:
error - new instance of ValidationError to be added. Cannot be null.

addAll

public final void addAll(ValidationErrors validationErrors)

Add all elements of another ValidationErrors instance to the list.

Parameters:
validationErrors - new instance of ValidationErrors to be added. Cannot be null.

getErrors

public final java.util.List getErrors()

Contains all of the errors represented by the ValidationErrors instance.

Returns:
the current value of errors.

isEmpty

public final boolean isEmpty()

Evaluates whether or not this object contains errors.

Returns:
true if there are errors in this object, otherwise false

toString

public java.lang.String toString()
Overridden to show you the errors this object contains.

Returns:
string represeting all errors this object contains.


Copyright © 2001-2005 ivata limited. All Rights Reserved.