|
|||||||||
| 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.ListOfValuesConstraint
public class ListOfValuesConstraint
Constraint implementation that ensures the value is one of a constrained list of values. By default, this constraint is case-sensitive.
ListOfValuesConstraint.setAllowedValues(List),
ListOfValuesConstraint.setCaseSensitive(boolean)| Field Summary |
|---|
| Fields inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint |
|---|
ERR_EVALUATE_EXCEPTION, ERR_PROP_NOT_SET |
| Constructor Summary | |
|---|---|
ListOfValuesConstraint()
|
|
| Method Summary | |
|---|---|
protected void |
evaluateSingleValue(java.lang.Object value)
Support for evaluation of properties. |
java.util.List |
getAllowedValues()
Get the allowed values. |
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 |
initialize()
Initializes the constraint with appropriate values, which will depend on the implementation itself. |
boolean |
isCaseSensitive()
|
void |
setAllowedValues(java.util.List allowedValues)
Set the values that are allowed by the constraint. |
void |
setCaseSensitive(boolean caseSensitive)
Set the handling of case checking. |
java.lang.String |
toString()
|
| Methods inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint |
|---|
checkPropertyNotNull, evaluate, evaluateCollection, getShortName, getTitle, 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 ListOfValuesConstraint()
| Method Detail |
|---|
public java.lang.String getType()
getType in interface ConstraintgetType in class AbstractConstraintpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List getAllowedValues()
public void setAllowedValues(java.util.List allowedValues)
values - a list of allowed valuespublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - true if the constraint is case-sensitive (default),
or false for case-insensitive.public void initialize()
AbstractConstraintRegisters the constraint with the registry, if present. Call this method if you want the constraint to be auto-registered.
initialize in interface Constraintinitialize in class AbstractConstraintpublic 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 | ||||||||