Class ValueSetValidationResult
- java.lang.Object
-
- se.digg.dgc.valueset.v1.validation.ValueSetValidationResult
-
public class ValueSetValidationResult extends Object
Represents a result for the validation of an object against value sets, seeValueSetValidator.- Author:
- Martin Lindström (martin@idsec.se), Henrik Bengtsson (extern.henrik.bengtsson@digg.se), Henric Norlander (extern.henric.norlander@digg.se)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValueSetValidationResult.StatusStatus for validation.
-
Constructor Summary
Constructors Constructor Description ValueSetValidationResult()Default constructor.ValueSetValidationResult(String propertyName)Constructor setting up the root property name.ValueSetValidationResult(String propertyName, ValueSetValidationResult.Status result, String message)Constructor setting the property name, result and result message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildResult(ValueSetValidationResult childResult)Adds a result for the validation of a child property of the root object.List<ValueSetValidationResult>getChildren()Gets the validation results of all childrens to this root object.StringgetMessage()Gets the result message.StringgetPropertyName()Gets the property name for the object being validation.ValueSetValidationResult.StatusgetResult()Gets the overall result.booleanisSuccess()Predicate that tells if this object represents a successful result.StringtoString()
-
-
-
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 nameresult- the resultmessage- 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
-
getResult
public ValueSetValidationResult.Status getResult()
Gets the overall result.- Returns:
- 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
-
-