Class PropertyValidationResult


  • public class PropertyValidationResult
    extends Object
    Validation result for a property This class is not thread safe.
    • Constructor Detail

      • PropertyValidationResult

        public PropertyValidationResult()
    • Method Detail

      • isValid

        public boolean isValid()
        Is the property value valid?
        Returns:
        true if the value is valid
      • getErrors

        public List<String> getErrors()
        If isValid() returns false this returns a list of human readable errors.
        Returns:
        A list of errors - empty if isValid() returns true
      • getWarnings

        public List<String> getWarnings()
        Return the list of warnings
        Returns:
        The list of warnings - might be empty
      • isSkipped

        public boolean isSkipped()
        Has the validation for this property be skipped?
        Returns:
        true if it has been skipped
      • markSkipped

        public void markSkipped()
        Mark the property to be skipped during validation
      • isUseDefaultValue

        public boolean isUseDefaultValue()
        Should the default be used instead of the configuration value?
        Returns:
        true if the default should be used.
        Since:
        1.2
        See Also:
        getDefaultValue()
      • setUseDefaultValue

        public void setUseDefaultValue​(boolean useDefault)
        Set whether the default value should be used
        Parameters:
        useDefault - boolean flag
        Since:
        1.2
      • getDefaultValue

        public Object getDefaultValue()
        Get the default value. The default value is only returned if isUseDefaultValue() returns true.
        Returns:
        the defaultValue (it might be null)
        Since:
        1.2
      • setDefaultValue

        public void setDefaultValue​(Object defaultValue)
        Set the default value
        Parameters:
        defaultValue - the defaultValue to set
        Since:
        1.2