TypeValidator
public class DurationValidator extends PatternValidator implements TypeValidator
resourceBundle
Constructor | Description |
---|---|
DurationValidator() |
No-arg constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clearFixed() |
Clears the fixed value for this Duration.
|
void |
clearMax() |
Clears the maximum value for this Duration.
|
void |
clearMin() |
Clears the minimum value for this Duration.
|
Duration |
getFixed() |
Returns the configured fixed value for Duration validation.
|
Duration |
getMaxExclusive() |
Returns the configured exclusive maximum value for Duration validation.
|
Duration |
getMaxInclusive() |
Returns the configured inclusive maximum value for Duration validation.
|
Duration |
getMinExclusive() |
Returns the configured exclusive minimum value for Duration validation.
|
Duration |
getMinInclusive() |
Returns the configured inclusive minimum value for Duration validation.
|
boolean |
hasFixed() |
Returns true if a fixed value to validate against has been set.
|
void |
setFixed(Duration fixedValue) |
Sets the fixed value for Duration validation.
|
void |
setMaxExclusive(Duration maxValue) |
Sets the maximum (exclusive) value for Duration validation.
|
void |
setMaxInclusive(Duration maxValue) |
Sets the maximum (inclusive) value for Duration validation.
|
void |
setMinExclusive(Duration minValue) |
Sets the minimum (exclusive) value for Duration validation.
|
void |
setMinInclusive(Duration minValue) |
Sets the minimum (inclusive) value for Duration validation.
|
void |
validate(java.lang.Object object) |
Validates the given Object.
|
void |
validate(java.lang.Object object,
ValidationContext context) |
Validates the given Object.
|
void |
validate(Duration duration) |
Validate a duration instance.
|
void |
validate(Duration duration,
ValidationContext context) |
Validates a duration instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPattern, clearPatterns, getPatterns, hasPattern, isNillable, setNillable, validate
public void clearFixed()
public void clearMax()
public void clearMin()
public Duration getFixed()
public Duration getMaxInclusive()
public Duration getMaxExclusive()
public Duration getMinInclusive()
public Duration getMinExclusive()
public boolean hasFixed()
public void setFixed(Duration fixedValue)
NOTE: If maximum and/or minimum values have been set and the fixed value is not within that max/min range, then no Duration will pass validation. This is as according to the XML Schema spec.
fixedValue
- the fixed value that a Duration validated with this
validator must be equal to.public void setMinExclusive(Duration minValue)
minValue
- the minimum (exclusive) value for Duration validation.public void setMinInclusive(Duration minValue)
minValue
- the minimum (inclusive) value for Duration validation.public void setMaxExclusive(Duration maxValue)
maxValue
- the maximum (exclusive) value for Duration validation.public void setMaxInclusive(Duration maxValue)
maxValue
- the maximum (inclusive) value for Duration validation.public void validate(Duration duration) throws ValidationException
duration
- the duration to validateValidationException
- if the duration fails validationpublic void validate(Duration duration, ValidationContext context) throws ValidationException
duration
- the duration type to validatecontext
- the ValidationContextValidationException
- if the duration fails validationpublic void validate(java.lang.Object object) throws ValidationException
object
- the Object to validateValidationException
- if the object fails validationpublic void validate(java.lang.Object object, ValidationContext context) throws ValidationException
validate
in interface TypeValidator
validate
in class PatternValidator
object
- the Object to validatecontext
- the ValidationContextValidationException
- if the object fails validationIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com