Class ValueSetValidationResult


  • public class ValueSetValidationResult
    extends Object
    Represents a result for the validation of an object against value sets, see ValueSetValidator.
    Author:
    Martin Lindström (martin@idsec.se), Henrik Bengtsson (extern.henrik.bengtsson@digg.se), Henric Norlander (extern.henric.norlander@digg.se)
    • Constructor Detail

      • ValueSetValidationResult

        public ValueSetValidationResult()
        Default constructor.
      • ValueSetValidationResult

        public ValueSetValidationResult​(String propertyName)
        Constructor setting up the root property name.
        Parameters:
        propertyName - the root property name
      • ValueSetValidationResult

        public ValueSetValidationResult​(String propertyName,
                                        ValueSetValidationResult.Status result,
                                        String message)
        Constructor setting the property name, result and result message
        Parameters:
        propertyName - the root property name
        result - the result
        message - the message
    • Method Detail

      • isSuccess

        public boolean isSuccess()
        Predicate that tells if this object represents a successful result.
        Returns:
        true for success and false otherwise
      • addChildResult

        public void addChildResult​(ValueSetValidationResult childResult)
        Adds a result for the validation of a child property of the root object.
        Parameters:
        childResult - the result
      • getPropertyName

        public String getPropertyName()
        Gets the property name for the object being validation.
        Returns:
        the property name, or null if this is the root object
      • getMessage

        public String getMessage()
        Gets the result message.
        Returns:
        the message
      • getChildren

        public List<ValueSetValidationResult> getChildren()
        Gets the validation results of all childrens to this root object.
        Returns:
        the children or null