| java.lang.Object | |
| ↳ | com.google.gdata.model.ValidationContext |
Data structure used to accumulate data model validation errors.
would be used as follows:
public interface Validatable {
public static class ValidationContext { ... }
public boolean validate(ValidationContext vc);
}
public class Element implements Validatable { ... }
Then we could eventually reuse the context class and the accumulation
model in other places (attribute validation? metadata validation?).
In that case, we might want to make the 1st arg of addError
more generic (like 'Object relatedTo') or something.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| errors | Collection of validation error messages associated with elements. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Add an error by error string.
| |||||||||||
Add a validation error to list.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Collection of validation error messages associated with elements.
Add an error by error string. This will register an error in the core
gdata domain with an error code of "invalidElement" and the internal reason
set to the given error string. For a more useful error message,
addError(Element, ErrorContent) should be used instead.
| element | |
|---|---|
| error |
Add a validation error to list.
| element | Element that was found to be invalid |
|---|---|
| error | Error message |