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:
org.alfresco.service.cmr.dictionary.Constraint
- Direct Known Subclasses:
RMListOfValuesConstraint
public class RMListOfValuesConstraint extends org.alfresco.repo.dictionary.constraint.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
-
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, org.alfresco.service.cmr.i18n.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
-
-
-
-
Method Detail
-
setCaveatConfigService
public void setCaveatConfigService(RMCaveatConfigService caveatConfigService)
-
toString
public String toString()
- Overrides:
toString
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
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 classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
- Returns:
- Returns the values allowed
-
getDisplayLabel
public String getDisplayLabel(String constraintAllowableValue, org.alfresco.service.cmr.i18n.MessageLookup messageLookup)
- Overrides:
getDisplayLabel
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
setAllowedValues
public void setAllowedValues(List allowedValues)
Set the values that are allowed by the constraint.- Overrides:
setAllowedValues
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
- Parameters:
allowedValues
- a list of allowed values
-
initialize
public void initialize()
- Specified by:
initialize
in interfaceorg.alfresco.service.cmr.dictionary.Constraint
- Overrides:
initialize
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
getParameters
public Map<String,Object> getParameters()
- Specified by:
getParameters
in interfaceorg.alfresco.service.cmr.dictionary.Constraint
- Overrides:
getParameters
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
getMatchLogicEnum
public RMListOfValuesConstraint.MatchLogic getMatchLogicEnum()
-
getMatchLogic
public String getMatchLogic()
-
setMatchLogic
public void setMatchLogic(String matchLogicStr)
-
evaluateSingleValue
protected void evaluateSingleValue(Object value)
- Overrides:
evaluateSingleValue
in classorg.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
-
-