|
|||||||||
| 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 ConstraintgetType in class AbstractConstraintpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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 ConstraintgetParameters in class AbstractConstraintprotected 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 | ||||||||