Class RMListOfValuesConstraint
- java.lang.Object
-
- org.alfresco.repo.dictionary.constraint.AbstractConstraint
-
- org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
- org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint
-
- All Implemented Interfaces:
Constraint
- Direct Known Subclasses:
RMListOfValuesConstraint
public class RMListOfValuesConstraint extends ListOfValuesConstraint
RM Constraint implementation that ensures the value is one of a constrained list of values. By default, this constraint is case-sensitive.- Author:
- janv
- See Also:
setAllowedValues(List)
,ListOfValuesConstraint.setCaseSensitive(boolean)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RMListOfValuesConstraint.MatchLogic
-
Field Summary
-
Fields inherited from class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
ALLOWED_VALUES_PARAM, CASE_SENSITIVE_PARAM, caseSensitive, CONSTRAINT_TYPE, sorted, SORTED_PARAM
-
Fields inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint
ERR_EVALUATE_EXCEPTION, ERR_PROP_NOT_SET
-
-
Constructor Summary
Constructors Constructor Description RMListOfValuesConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
evaluateSingleValue(Object value)
String
getDisplayLabel(String constraintAllowableValue, MessageLookup messageLookup)
String
getMatchLogic()
RMListOfValuesConstraint.MatchLogic
getMatchLogicEnum()
Map<String,Object>
getParameters()
List<String>
getRawAllowedValues()
Get the allowed values.void
initialize()
void
setAllowedValues(List allowedValues)
Set the values that are allowed by the constraint.void
setCaveatConfigService(RMCaveatConfigService caveatConfigService)
void
setMatchLogic(String matchLogicStr)
String
toString()
-
Methods inherited from class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
getAllowedValues, getType, isCaseSensitive, isSorted, setCaseSensitive, setSorted
-
Methods inherited from class org.alfresco.repo.dictionary.constraint.AbstractConstraint
checkPropertyNotNull, evaluate, evaluateCollection, getShortName, getTitle, set_shortName, setRegistry, setShortName, setTitle
-
-
-
-
Method Detail
-
setCaveatConfigService
public void setCaveatConfigService(RMCaveatConfigService caveatConfigService)
-
toString
public String toString()
- Overrides:
toString
in classListOfValuesConstraint
-
getRawAllowedValues
public List<String> getRawAllowedValues()
Get the allowed values. Note that these are String instances, but may represent non-String values. It is up to the caller to distinguish.- Overrides:
getRawAllowedValues
in classListOfValuesConstraint
- Returns:
- Returns the values allowed
-
getDisplayLabel
public String getDisplayLabel(String constraintAllowableValue, MessageLookup messageLookup)
- Overrides:
getDisplayLabel
in classListOfValuesConstraint
-
setAllowedValues
public void setAllowedValues(List allowedValues)
Set the values that are allowed by the constraint.- Overrides:
setAllowedValues
in classListOfValuesConstraint
- Parameters:
allowedValues
- a list of allowed values
-
initialize
public void initialize()
- Specified by:
initialize
in interfaceConstraint
- Overrides:
initialize
in classListOfValuesConstraint
-
getParameters
public Map<String,Object> getParameters()
- Specified by:
getParameters
in interfaceConstraint
- Overrides:
getParameters
in classListOfValuesConstraint
-
getMatchLogicEnum
public RMListOfValuesConstraint.MatchLogic getMatchLogicEnum()
-
getMatchLogic
public String getMatchLogic()
-
setMatchLogic
public void setMatchLogic(String matchLogicStr)
-
evaluateSingleValue
protected void evaluateSingleValue(Object value)
- Overrides:
evaluateSingleValue
in classListOfValuesConstraint
-
-