Package org.openremote.model.value
Class ValueConstraint
java.lang.Object
org.openremote.model.value.ValueConstraint
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ValueConstraint.AllowedValues
,ValueConstraint.Future
,ValueConstraint.FutureOrPresent
,ValueConstraint.Max
,ValueConstraint.Min
,ValueConstraint.NotBlank
,ValueConstraint.NotEmpty
,ValueConstraint.NotNull
,ValueConstraint.Past
,ValueConstraint.PastOrPresent
,ValueConstraint.Pattern
,ValueConstraint.Size
Represents a constraint to apply to a value; most are based on JSR-380 validation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The attribute value must match any of the specified values in theValueConstraint.AllowedValues.allowedValues
property.static class
The attribute value must be a java time object, java date object, a string in ISO8601 format or a number representing epoch milliseconds; the value must represent a time in the future.static class
The attribute value must be a java time object, java date object, a string in ISO8601 format or a number representing epoch milliseconds; the value must represent a time in the future or present.static class
The attribute value must be a number lower or equal to the specified value on theValueConstraint.Max.max
property.static class
The attribute value must be a number higher or equal to the specified value on theValueConstraint.Min.min
property.static class
The attribute value must not be null and must contain at least 1 non-whitespace character.static class
The attribute value must not be null nor empty.static class
The attribute value must not be null.static class
The attribute value must be a java time object, java date object, a string in ISO8601 format or a number representing epoch milliseconds; the value must represent a time in the past.static class
The attribute value must be a java time object, java date object, a string in ISO8601 format or a number representing epoch milliseconds; the value must represent a time in the past or present.static class
The attribute value must match the regular expression pattern described in theValueConstraint.Pattern.regexp
property.static class
The attribute value must be between the specified boundaries based on theValueConstraint.Size.min
andValueConstraint.Size.max
properties. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
protected String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueConstraint[]
constraints
(ValueConstraint... constraints) abstract boolean
-
Field Details
-
VALUE_CONSTRAINT_INVALID
- See Also:
-
SIZE_MESSAGE_TEMPLATE
- See Also:
-
MIN_MESSAGE_TEMPLATE
- See Also:
-
MAX_MESSAGE_TEMPLATE
- See Also:
-
PATTERN_MESSAGE_TEMPLATE
- See Also:
-
ALLOWED_VALUES_MESSAGE_TEMPLATE
- See Also:
-
PAST_MESSAGE_TEMPLATE
- See Also:
-
PAST_OR_PRESENT_MESSAGE_TEMPLATE
- See Also:
-
FUTURE_MESSAGE_TEMPLATE
- See Also:
-
FUTURE_OR_PRESENT_MESSAGE_TEMPLATE
- See Also:
-
NOT_EMPTY_MESSAGE_TEMPLATE
- See Also:
-
NOT_BLANK_MESSAGE_TEMPLATE
- See Also:
-
NOT_NULL_MESSAGE_TEMPLATE
- See Also:
-
message
-
-
Constructor Details
-
ValueConstraint
-
-
Method Details
-
evaluate
-
getParameters
-
getMessage
-
constraints
-