|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.core.constraint.AbstractPropertyConstraint<T>
T
- the type of the property value.
public abstract class AbstractPropertyConstraint<T>
Base implementation of the PropertyConstraint
interface.
Constructor Summary | |
---|---|
protected |
AbstractPropertyConstraint() Default constructor. |
Method Summary | |
---|---|
String |
getDescription() Returns a description of the defined constraints. |
boolean |
isMandatoryConstraint() Determines if the constraint is a check that evaluates if a property is present or not and fails if a value is not present. |
String |
toString() Returns the string representation of the object. |
void |
validate(PropertyDescriptor propertyDescriptor, T value) Checks if the given value is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.smartics.properties.api.core.domain.PropertyConstraint |
---|
getDescription, isValid |
Constructor Detail |
---|
protected AbstractPropertyConstraint()
Method Detail |
---|
public boolean isMandatoryConstraint()
PropertyConstraint
isMandatoryConstraint
in interface
PropertyConstraint<T>
true
if the constraint is a check for value presence,
false
if it is any regular constraint.
public final String getDescription()
PropertyConstraint
This is not the validation message that is displayed if the validation fails. This is a description of the constraints on a value that must be met to pass the validation process successfully. The description may be displayed to a user prior to request the input of a value.
getDescription
in interface
PropertyConstraint<T>
public final void validate(PropertyDescriptor propertyDescriptor, T value) throws PropertyValidationException
PropertyConstraint
validate
in interface
PropertyConstraint<T>
propertyDescriptor
- information about the name of the property to validate.
value
- the value to be checked.
PropertyValidationException
- if the
value
is not valid.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |