public class DefaultReferenceAdapter extends Object implements ConfigTypeAdapter
| Modifier and Type | Field and Description |
|---|---|
private static Logger |
log |
private Map<String,String> |
metadata |
private static PathPattern |
uuidReferencePath |
| Constructor and Description |
|---|
DefaultReferenceAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
fromConfigNode(Object configNode,
ConfigProperty property,
LoadingContext ctx,
Object parent)
Converts serialized configuration representation to the type provided by this adaptor.
|
private Object |
getReferencedConfigurableObject(String uuid,
LoadingContext 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) |
Object |
normalize(Object configNode,
ConfigProperty property,
ProcessingContext ctx)
Converts allowed representations (e.g., "123" for Integer) to proper serialized representation
|
private Object |
resolveDeprecatedReference(String configNode,
ConfigProperty property,
LoadingContext ctx) |
Object |
toConfigNode(Object object,
ConfigProperty property,
SavingContext ctx)
Creates a serialized configuration representation for a provided object.
|
private static final PathPattern uuidReferencePath
public DefaultReferenceAdapter()
public Object fromConfigNode(Object configNode, ConfigProperty property, LoadingContext ctx, Object parent) throws ConfigurationException
ConfigTypeAdapterfromConfigNode in interface ConfigTypeAdapterproperty - the property which is going to be assigned the returned value (Can be null)ConfigurationExceptionprivate Object resolveDeprecatedReference(String configNode, ConfigProperty property, LoadingContext ctx)
private Object getReferencedConfigurableObject(String uuid, LoadingContext ctx, ConfigProperty property)
public Object toConfigNode(Object object, ConfigProperty property, SavingContext ctx) throws ConfigurationException
ConfigTypeAdapterCreates 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 ConfigTypeAdapterctx - @returnConfigurationExceptionpublic Map<String,Object> getSchema(ConfigProperty property, ProcessingContext ctx) throws ConfigurationException
ConfigTypeAdaptergetSchema in interface ConfigTypeAdapterConfigurationExceptionpublic Object normalize(Object configNode, ConfigProperty property, ProcessingContext ctx) throws ConfigurationException
ConfigTypeAdapternormalize in interface ConfigTypeAdapterConfigurationExceptionCopyright © 2017 dcm4che.org. All rights reserved.