Class 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)
    • Constructor Detail

      • RMListOfValuesConstraint

        public RMListOfValuesConstraint()
    • Method Detail

      • setCaveatConfigService

        public void setCaveatConfigService​(RMCaveatConfigService caveatConfigService)
      • toString

        public String toString()
        Overrides:
        toString in class org.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 class org.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 class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
      • setAllowedValues

        public void setAllowedValues​(List allowedValues)
        Set the values that are allowed by the constraint.
        Overrides:
        setAllowedValues in class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
        Parameters:
        allowedValues - a list of allowed values
      • initialize

        public void initialize()
        Specified by:
        initialize in interface org.alfresco.service.cmr.dictionary.Constraint
        Overrides:
        initialize in class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
      • getParameters

        public Map<String,​Object> getParameters()
        Specified by:
        getParameters in interface org.alfresco.service.cmr.dictionary.Constraint
        Overrides:
        getParameters in class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint
      • getMatchLogic

        public String getMatchLogic()
      • setMatchLogic

        public void setMatchLogic​(String matchLogicStr)
      • evaluateSingleValue

        protected void evaluateSingleValue​(Object value)
        Overrides:
        evaluateSingleValue in class org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint