Class ParameterEvaluatorImpl

    • Constructor Detail

      • ParameterEvaluatorImpl

        public ParameterEvaluatorImpl()
    • Method Detail

      • evaluationSucceeds

        public boolean evaluationSucceeds()
        If the constraint is allow and the constrainedValue is in the list of allowed values specified by the parameter this will return true, and if the constraint is deny and the constrainedValue is not in the list of denied values specified by the parameter this method will return true.
        Specified by:
        evaluationSucceeds in interface ParameterEvaluator
        Returns:
        boolean indicating whether the constrained value adheres to the restriction specified by the combination of the parameter constraint and the parameter value
      • evaluateAndAddError

        public boolean evaluateAndAddError​(Class<? extends Object> businessObjectOrDocumentClass,
                                           String constrainedPropertyName)
        Description copied from interface: ParameterEvaluator
        This method uses the evaluateAndAddError method. It passes the constrainedPropertyName as both the constrainedPropertyName and the userEditablePropertyName, i.e. it should be used when they are one and the same.
        Specified by:
        evaluateAndAddError in interface ParameterEvaluator
        Returns:
        boolean indicating whether evaluation succeeded (see evaluationSucceeds)
      • evaluateAndAddError

        public boolean evaluateAndAddError​(Class<? extends Object> businessObjectOrDocumentClass,
                                           String constrainedPropertyName,
                                           String userEditablePropertyName)
        This method uses the evaluationSucceeds method to evaluate the constrainedValue. If evaluation does not succeed, it adds an error to GlobalVariables.getErrorMap(). The businessObjectOrDocumentClass, nameOfConstrainedProperty and userEditablePropertyName are used to retrieve the appropriate labels from the DataDictionary.
        Specified by:
        evaluateAndAddError in interface ParameterEvaluator
        Parameters:
        businessObjectOrDocumentClass -
        Returns:
        boolean indicating whether evaluation succeeded (see evaluationSucceeds)
      • constraintIsAllow

        public boolean constraintIsAllow()
        Description copied from interface: ParameterEvaluator
        This method determines whether the parameter lists allowed values or denied values.
        Specified by:
        constraintIsAllow in interface ParameterEvaluator
        Returns:
        boolean indicating whether the parameter lists allowed values
      • getParameterValuesForMessage

        public String getParameterValuesForMessage()
        This method uses the List toString method and eliminates the [].
        Specified by:
        getParameterValuesForMessage in interface ParameterEvaluator
        Returns:
        user-friendly String representation of Parameter values
      • getValue

        public String getValue()
        Description copied from interface: ParameterEvaluator
        This method returns the value of the correspnding Parameter.
        Specified by:
        getValue in interface ParameterEvaluator
        Returns:
        String value of underlying Parameter
      • getModuleAndComponent

        public String getModuleAndComponent()
      • setConstrainedValue

        public void setConstrainedValue​(String constrainedValue)
      • setConstraintIsAllow

        public void setConstraintIsAllow​(boolean constraintIsAllow)
      • setParameter

        public void setParameter​(Parameter parameter)
      • setValues

        public void setValues​(List<String> values)
      • getDataDictionaryService

        protected DataDictionaryService getDataDictionaryService()
        Returns:
        the dataDictionaryService