public class ReflectiveConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ReflectiveConfig.ConfigReader
Used by reflective config reader, should implement storage type-specific
methods
|
static interface |
ReflectiveConfig.ConfigTypeAdapter<T,ST>
Type adapter that handles configuration read/write/serialize/deserialize
for a specific java class.
|
static interface |
ReflectiveConfig.ConfigWriter
Used by reflective config writer, should implement storage type-specific
methods
|
static interface |
ReflectiveConfig.DiffWriter
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
ReflectiveConfig(Map<Class,ReflectiveConfig.ConfigTypeAdapter> customRepresentations,
DicomConfiguration configCtx)
Creates an instance of ReflectiveConfig that will use the specified
config context and custom representations
|
| Modifier and Type | Method and Description |
|---|---|
DicomConfiguration |
getDicomConfiguration() |
<T> ReflectiveConfig.ConfigTypeAdapter<T,?> |
lookupTypeAdapter(Class<T> clazz) |
static <T> void |
read(T confObj,
ReflectiveConfig.ConfigReader reader)
Reads the configuration into the properties of the specified
configuration object using the provided reader.
|
<T> void |
readConfig(T confObj,
ReflectiveConfig.ConfigReader reader) |
static <T> void |
reconfigure(T from,
T to)
Walk through the from object and for each field annotated with
|
void |
setCustomRepresentations(Map<Class,ReflectiveConfig.ConfigTypeAdapter> customRepresentations) |
void |
setDicomConfiguration(DicomConfiguration dicomConfiguration) |
static <T> void |
store(T confObj,
ReflectiveConfig.ConfigWriter writer)
Writes the configuration from the properties of the specified
configuration object into the config storage using the provided writer.
|
static <T> void |
storeAllDiffs(T prevConfObj,
T confObj,
ReflectiveConfig.ConfigWriter diffWriter)
Calls store diff methods for all pairs of the annotated fields of
prevConfObj and confObj
|
<T> void |
storeConfig(T confObj,
ReflectiveConfig.ConfigWriter writer) |
<T> void |
storeConfigDiffs(T prevConfObj,
T confObj,
ReflectiveConfig.ConfigWriter ldapDiffWriter) |
public ReflectiveConfig(Map<Class,ReflectiveConfig.ConfigTypeAdapter> customRepresentations, DicomConfiguration configCtx)
customRepresentations - Null can be provided. class-representation map for types that
should be treated in a special way when reading/writing the
configuration.configCtx - Null can be provided. DicomCofiguration that will be forwarded
to type adapters as a config context.public static <T> void store(T confObj,
ReflectiveConfig.ConfigWriter writer)
throws ConfigurationException
confObj - Configuration objectwriter - Configuration writerConfigurationExceptionpublic static <T> void read(T confObj,
ReflectiveConfig.ConfigReader reader)
throws ConfigurationException
confObj - reader - ConfigurationExceptionpublic static <T> void reconfigure(T from,
T to)
from - to - public static <T> void storeAllDiffs(T prevConfObj,
T confObj,
ReflectiveConfig.ConfigWriter diffWriter)
throws ConfigurationException
prevConfObj - confObj - diffWriter - ConfigurationExceptionpublic <T> void readConfig(T confObj,
ReflectiveConfig.ConfigReader reader)
throws ConfigurationException
ConfigurationExceptionpublic <T> void storeConfig(T confObj,
ReflectiveConfig.ConfigWriter writer)
throws ConfigurationException
ConfigurationExceptionpublic <T> void storeConfigDiffs(T prevConfObj,
T confObj,
ReflectiveConfig.ConfigWriter ldapDiffWriter)
throws ConfigurationException
ConfigurationExceptionpublic <T> ReflectiveConfig.ConfigTypeAdapter<T,?> lookupTypeAdapter(Class<T> clazz)
public DicomConfiguration getDicomConfiguration()
public void setDicomConfiguration(DicomConfiguration dicomConfiguration)
public void setCustomRepresentations(Map<Class,ReflectiveConfig.ConfigTypeAdapter> customRepresentations)
Copyright © 2014 dcm4che.org. All Rights Reserved.