| java.lang.Object com.jgoodies.validation.util.PropertyValidationSupport
Method Summary | |
public void | add(String property, String text) Adds a PropertyValidationMessage to this object's
default ValidationResult . | public void | add(Severity severity, String property, String text) Adds a PropertyValidationMessage to this object's
default ValidationResult . | public void | add(ValidationResult result, String property, String text) Adds a PropertyValidationMessage to the specified
ValidationResult . | public void | add(ValidationResult result, Severity severity, String property, String text) Adds a PropertyValidationMessage to the specified
ValidationResult . | public void | addError(String property, String text) Adds an error PropertyValidationMessage to this object's
default ValidationResult . | public void | addError(ValidationResult result, String property, String text) Adds an error PropertyValidationMessage to the specified
ValidationResult . | public void | addWarning(String property, String text) Adds a warning PropertyValidationMessage to this object's
default ValidationResult . | public void | addWarning(ValidationResult result, String property, String text) Adds a warning PropertyValidationMessage to the specified
ValidationResult . | public void | clearResult() Sets an empty
ValidationResult as default result. | public PropertyValidationMessage | create(String property, String text) Creates and returns a PropertyValidationMessage
for the given property and message text using the default severity. | public PropertyValidationMessage | create(Severity severity, String property, String text) Creates and returns an error PropertyValidationMessage
for the given property and message text using the specified severity. | public PropertyValidationMessage | createError(String property, String text) Creates and returns an error PropertyValidationMessage
for the given property and message text. | public PropertyValidationMessage | createWarning(String property, String text) Creates and returns a warning PropertyValidationMessage
for the given property and message text. | public ValidationResult | getResult() Returns the default
ValidationResult . |
PropertyValidationSupport | public PropertyValidationSupport(Object target, String role)(Code) | | Constructs a PropertyValidationSupport instance for the
given validation target and its validation role. The default severity
is set to Severity.WARNING .
Parameters: target - the object to be validated Parameters: role - the validation target's role in the outer context throws: NullPointerException - if the target or role is null |
PropertyValidationSupport | public PropertyValidationSupport(Severity defaultSeverity, Object target, String role)(Code) | | Constructs a PropertyValidationSupport instance for the
given validation target and its validation role.
Parameters: defaultSeverity - the optional Severity used formessage creation when no severity is specified Parameters: target - the object to be validated Parameters: role - the validation target's role in the outer context throws: NullPointerException - if the target or role is null throws: IllegalArgumentException - if defaultSeverity is Severity.OK |
PropertyValidationSupport | public PropertyValidationSupport(ValidationResult defaultResult, Severity defaultSeverity, Object target, String role)(Code) | | Constructs a PropertyValidationSupport instance for the
given default result, default severity, validation target and the given
validation role.
Parameters: defaultResult - the optional ValidationResult that is used to add ValidationMessage s to Parameters: defaultSeverity - the optional Severity used formessage creation when no severity is specified Parameters: target - the object to be validated Parameters: role - the validation target's role in the outer context throws: NullPointerException - if the target or role is null throws: IllegalArgumentException - if defaultSeverity is Severity.OK |
add | public void add(String property, String text)(Code) | | Adds a PropertyValidationMessage to this object's
default ValidationResult .
Uses the default severity and the given property and message text.
Parameters: property - describes the validated property Parameters: text - the message text |
add | public void add(Severity severity, String property, String text)(Code) | | Adds a PropertyValidationMessage to this object's
default ValidationResult . Uses the specified
Severity and given property and message text.
Parameters: severity - the Severity to be used Parameters: property - describes the validated property Parameters: text - the message text |
add | public void add(ValidationResult result, String property, String text)(Code) | | Adds a PropertyValidationMessage to the specified
ValidationResult . Uses this object's default severity
and the given property and message text.
Parameters: result - the result the message will be added to Parameters: property - describes the validated property Parameters: text - the message text |
add | public void add(ValidationResult result, Severity severity, String property, String text)(Code) | | Adds a PropertyValidationMessage to the specified
ValidationResult . Uses the specified severity
and the given property and message text.
Parameters: result - the result the message will be added to Parameters: severity - the severity used for the created message Parameters: property - describes the validated property Parameters: text - the message text throws: IllegalArgumentException - if severity is Severity.OK |
addError | public void addError(String property, String text)(Code) | | Adds an error PropertyValidationMessage to this object's
default ValidationResult .
Uses the given property and message text.
Parameters: property - describes the validated property Parameters: text - the message text |
addError | public void addError(ValidationResult result, String property, String text)(Code) | | Adds an error PropertyValidationMessage to the specified
ValidationResult .
Uses the given property and message text.
Parameters: result - the result the message will be added to Parameters: property - describes the validated property Parameters: text - the message text |
addWarning | public void addWarning(String property, String text)(Code) | | Adds a warning PropertyValidationMessage to this object's
default ValidationResult .
Uses the given property and message text.
Parameters: property - describes the validated property Parameters: text - the message text |
addWarning | public void addWarning(ValidationResult result, String property, String text)(Code) | | Adds a warning PropertyValidationMessage to the specified
ValidationResult .
Uses the given property and message text.
Parameters: result - the result the message will be added to Parameters: property - describes the validated property Parameters: text - the message text |
clearResult | public void clearResult()(Code) | | Sets an empty
ValidationResult as default result.
Useful at the begin of a validation sequence.
|
create | public PropertyValidationMessage create(String property, String text)(Code) | | Creates and returns a PropertyValidationMessage
for the given property and message text using the default severity.
Parameters: property - describes the validated property Parameters: text - the message text a PropertyValidationMessage with default severityfor the given property and text |
create | public PropertyValidationMessage create(Severity severity, String property, String text)(Code) | | Creates and returns an error PropertyValidationMessage
for the given property and message text using the specified severity.
Parameters: severity - the Severity to be used Parameters: property - describes the validated property Parameters: text - the message text a PropertyValidationMessage with the specified severityfor the given property and text |
createError | public PropertyValidationMessage createError(String property, String text)(Code) | | Creates and returns an error PropertyValidationMessage
for the given property and message text.
Parameters: property - describes the validated property Parameters: text - the message text a PropertyValidationMessage with error severityfor the given property and text |
createWarning | public PropertyValidationMessage createWarning(String property, String text)(Code) | | Creates and returns a warning PropertyValidationMessage
for the given property and message text.
Parameters: property - describes the validated property Parameters: text - the message text a PropertyValidationMessage with warning severityfor the given property and text |
|
|