org.apache.struts.util

Class ErrorMessages


public class ErrorMessages
extends java.lang.Object

Utility class that is useful for accumulating error message keys in action classes or validation methods. Use this class as follows:

Version:
$Revision: 1.5 $ $Date: 2002/06/25 01:30:41 $

Author:
David Geary

Field Summary

private Vector
errors
The accumulated set of error message keys.

Method Summary

void
addError(String key)
Add an error message key to the accumulated set of errors.
String
getError(int index)
Return the error message key at the specified zero-relative index.
String[]
getErrors()
Return the set of error message keys we have accumulated.
int
getSize()
Return the number of error message keys we have accumulated so far.

Field Details

errors

private Vector errors
The accumulated set of error message keys.

Method Details

addError

public void addError(String key)
Add an error message key to the accumulated set of errors.

Parameters:
key - The error message key to be added


getError

public String getError(int index)
Return the error message key at the specified zero-relative index.

Parameters:
index - Zero-relative index of the error message key to return


getErrors

public String[] getErrors()
Return the set of error message keys we have accumulated.


getSize

public int getSize()
Return the number of error message keys we have accumulated so far.


Copyright B) 2000-2005 - Apache Software Foundation