public class DefaultDelegatingConfigTypeAdapter<T,ST> extends Object implements ConfigTypeAdapter<T,ST>
Constructor and Description |
---|
DefaultDelegatingConfigTypeAdapter() |
Modifier and Type | Method and Description |
---|---|
T |
fromConfigNode(ST configNode,
ConfigProperty property,
LoadingContext ctx,
Object parent)
Converts serialized configuration representation to the type provided by this adaptor.
|
protected ConfigTypeAdapter<T,ST> |
getDefaultTypeAdapter(ProcessingContext ctx,
ConfigProperty property) |
Map<String,Object> |
getSchema(ConfigProperty property,
ProcessingContext ctx)
Returns a metadata node in json-schema format (http://json-schema.org/)
Additional proprietary optional schema parameters:
essentialType - e.g., "base64" for type string class - simple name of the ConfigurableClass if this is a corresponding object mapkey - container that denotes schema for the key (type will always be string, but there could be essentialType, etc) |
ST |
normalize(Object configNode,
ConfigProperty property,
ProcessingContext ctx)
Converts allowed representations (e.g., "123" for Integer) to proper serialized representation
|
ST |
toConfigNode(T object,
ConfigProperty property,
SavingContext ctx)
Creates a serialized configuration representation for a provided object.
|
public DefaultDelegatingConfigTypeAdapter()
protected ConfigTypeAdapter<T,ST> getDefaultTypeAdapter(ProcessingContext ctx, ConfigProperty property)
public T fromConfigNode(ST configNode, ConfigProperty property, LoadingContext ctx, Object parent) throws ConfigurationException
ConfigTypeAdapter
fromConfigNode
in interface ConfigTypeAdapter<T,ST>
property
- the property which is going to be assigned the returned value (Can be null)ConfigurationException
public ST toConfigNode(T object, ConfigProperty property, SavingContext ctx) throws ConfigurationException
ConfigTypeAdapter
Creates a serialized configuration representation for a provided object. Throws ConfigurationUnserializableException when the object allows configuration with setters in which case it is impossible to trace the parameters used in the setters back.
toConfigNode
in interface ConfigTypeAdapter<T,ST>
ctx
- @returnConfigurationException
public Map<String,Object> getSchema(ConfigProperty property, ProcessingContext ctx) throws ConfigurationException
ConfigTypeAdapter
getSchema
in interface ConfigTypeAdapter<T,ST>
ConfigurationException
public ST normalize(Object configNode, ConfigProperty property, ProcessingContext ctx) throws ConfigurationException
ConfigTypeAdapter
normalize
in interface ConfigTypeAdapter<T,ST>
ConfigurationException
Copyright © 2017 dcm4che.org. All rights reserved.