|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.dictionary.constraint.AbstractConstraint
org.alfresco.repo.dictionary.constraint.NumericRangeConstraint
public class NumericRangeConstraint
Constraint implementation that ensures that the value is a numeric value bewteen a given
minimum and maximum value. If a minimum or maximum value are not provided, then the JAVA
Double's minimum value
or maximum value
are assumed.
NumericRangeConstraint.setMinValue(double)
,
NumericRangeConstraint.setMaxValue(double)
,
Double.parseDouble(java.lang.String)
Field Summary |
---|
Fields inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint |
---|
ERR_EVALUATE_EXCEPTION, ERR_PROP_NOT_SET |
Constructor Summary | |
---|---|
NumericRangeConstraint()
|
Method Summary | |
---|---|
protected void |
evaluateSingleValue(java.lang.Object value)
Support for evaluation of properties. |
double |
getMaxValue()
|
double |
getMinValue()
|
java.util.Map |
getParameters()
Returns the parameters passed to the instance of the constraint. |
java.lang.String |
getType()
Returns the 'type' of the constraint, this is the identifier given to constraint in the configuration. |
void |
setMaxValue(double maxValue)
Set the maximum value allowed, which can be any value between Double.MIN_VALUE and Double.MAX_VALUE . |
void |
setMinValue(double minValue)
Set the minimum value allowed, which can be any value between Double.MIN_VALUE and Double.MAX_VALUE . |
java.lang.String |
toString()
|
Methods inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint |
---|
checkPropertyNotNull, evaluate, evaluateCollection, getShortName, getTitle, initialize, set_shortName, setRegistry, setShortName, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NumericRangeConstraint()
Method Detail |
---|
public java.lang.String getType()
Constraint
getType
in interface Constraint
getType
in class AbstractConstraint
public java.lang.String toString()
toString
in class java.lang.Object
public double getMinValue()
public void setMinValue(double minValue)
Double.MIN_VALUE
and Double.MAX_VALUE
.
minValue
- the minimum value allowed by the constraintpublic double getMaxValue()
public void setMaxValue(double maxValue)
Double.MIN_VALUE
and Double.MAX_VALUE
.
maxValue
- the minimum value allowed by the constraintpublic java.util.Map getParameters()
Constraint
getParameters
in interface Constraint
getParameters
in class AbstractConstraint
protected void evaluateSingleValue(java.lang.Object value)
AbstractConstraint
evaluateSingleValue
in class AbstractConstraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |