svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libTools / src / org / gvsig / tools / persistence / validation / ValidationResult.java @ 28076
History | View | Annotate | Download (1.27 KB)
1 |
package org.gvsig.tools.persistence.validation; |
---|---|
2 |
|
3 |
/**
|
4 |
* <p>ValidationResult is encapsulates the result of a validation.
|
5 |
* It allows to query whether the validation was passed or failed
|
6 |
* and which errors were found (if any).</p>.
|
7 |
*
|
8 |
* @see ValidationError
|
9 |
* @see org.gvsig.tools.dynobject.DynStruct
|
10 |
* @see org.gvsig.tools.persistence.PersistenceManager
|
11 |
*
|
12 |
* @author Cesar Martinez Izquierdo <cesar.martinez@iver.es>
|
13 |
* @author IVER T.I. <http://www.iver.es>
|
14 |
*/
|
15 |
public interface ValidationResult { |
16 |
/**
|
17 |
* <p>Returns <code>true</code> if the validation was passed, and
|
18 |
* <code>false</code> otherwise.
|
19 |
*
|
20 |
* @see #getErrors()
|
21 |
*
|
22 |
* @return True if no errors were found in the validation process,
|
23 |
* and false otherwise.
|
24 |
*/
|
25 |
public boolean isCorrect(); |
26 |
|
27 |
/**
|
28 |
* <p>Gets a textual report of the validation result. Normally, this should
|
29 |
* include the result of the validation (passed or failed) and a report
|
30 |
* of the found errors (if any).</p>
|
31 |
*
|
32 |
* @return A plain explanation of the validation result.
|
33 |
*/
|
34 |
public String getInfo(); |
35 |
|
36 |
/**
|
37 |
* <p>Gets all the errors found during the validation process.</p>
|
38 |
*
|
39 |
* @return An array of ValidationErrors, with as many elements as
|
40 |
* errors were found during the validation process.
|
41 |
*/
|
42 |
public ValidationError[] getErrors(); |
43 |
} |