public static final class ValidationResults.Builder extends Object implements Serializable, ModelBuilder, ValidationResultsContract
ValidationResults
instances. Enforces the constraints of the ValidationResultsContract
.Modifier and Type | Method and Description |
---|---|
void |
addError(String errorMessage)
Convenience method for adding an error message
|
void |
addError(String fieldName,
String errorMessage)
Convenience method for adding an error message for a given field
|
ValidationResults |
build()
Returns an instance of the object being built by this builder based
on the current state of the builder.
|
static ValidationResults.Builder |
create() |
static ValidationResults.Builder |
create(ValidationResultsContract contract) |
Map<String,String> |
getErrors() |
void |
setErrors(Map<String,String> errors) |
public static ValidationResults.Builder create()
public static ValidationResults.Builder create(ValidationResultsContract contract)
public ValidationResults build()
ModelBuilder
build
in interface ModelBuilder
public Map<String,String> getErrors()
getErrors
in interface ValidationResultsContract
public void addError(String errorMessage)
errorMessage
- Copyright © 2005–2014 The Kuali Foundation. All rights reserved.