public class DocumentTransformer extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DocumentTransformer.Conversion |
protected static class |
DocumentTransformer.PropertiesAccessor |
static class |
DocumentTransformer.PropertiesTransformer
An implementation of
Document.ValueTransformer that replaces variables in the
field values with values from the system properties. |
protected static interface |
DocumentTransformer.PropertyAccessor |
static class |
DocumentTransformer.SystemPropertiesTransformer
An implementation of
Document.ValueTransformer that replaces variables in the
field values with values from the system properties. |
protected static class |
DocumentTransformer.SystemPropertyAccessor |
Constructor and Description |
---|
DocumentTransformer() |
Modifier and Type | Method and Description |
---|---|
protected static Document |
convertValuesWithMismatchedTypes(Document original,
int level,
LinkedList<DocumentTransformer.Conversion> conversions) |
static Document |
convertValuesWithMismatchedTypes(Document original,
SchemaLibrary.Results results)
Return a copy of the supplied document that contains converted values for all of the fields (including in the nested
documents and arrays) that have values that are of the wrong type but can be converted to be of the correct type.
|
static String |
getSubstitutedProperty(String value,
DocumentTransformer.PropertyAccessor propertyAccessor)
getSubstitutedProperty is called to perform the property substitution on the value.
|
public static String getSubstitutedProperty(String value, DocumentTransformer.PropertyAccessor propertyAccessor)
value
- propertyAccessor
- public static Document convertValuesWithMismatchedTypes(Document original, SchemaLibrary.Results results)
This method does nothing and returns the original document if there are no changes to be made.
original
- the original document that contains fields with mismatched values; may not be nullresults
- the results of the JSON Schema validation
and which
contains the type mismatch errors
protected static Document convertValuesWithMismatchedTypes(Document original, int level, LinkedList<DocumentTransformer.Conversion> conversions)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.