public class ConfigBeanFiller
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigBeanFiller.DecryptInterface
Interface to provide a way of decrypt "encrypted" keys.
|
static class |
ConfigBeanFiller.DefaultConfig
Default configuration class.
|
protected static class |
ConfigBeanFiller.FillResult |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARRAY_REPRESENTATION |
protected static ConfigBeanFiller.DecryptInterface |
decryptProvider |
Constructor and Description |
---|
ConfigBeanFiller(com.exalead.config.ConfigApi cpapi) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
decryptValue(java.lang.String value)
Called to resolve "encrypted" values.
|
protected void |
dynamicFill(DynamicBeanConfig config) |
protected static void |
ensureAnnotationIsNotPresent(java.lang.reflect.Method met,
java.lang.Class<?> cls)
Ensure annotation classes are sane (class loader hell)
|
protected static java.lang.String |
fancyClass(java.lang.Object obj) |
protected BeanConfig |
fill(java.lang.Class<?> connectorConfigClass)
Fill the bean object and return a BeanConfig
|
BeanConfig |
fill(java.lang.Class<?> connectorConfigClass,
java.lang.ClassLoader loader)
Fill the bean object and return a BeanConfig
|
BeanConfig |
fill(java.lang.String configClassName,
java.lang.ClassLoader loader)
Fill the bean object and return a BeanConfig
|
protected java.lang.Object[] |
fillArrayBean(java.lang.String baseName,
java.lang.Class<?> cls)
Fill the bean array object and return a FillResult
|
protected java.lang.Object |
fillBean(java.lang.Class<?> classBean) |
protected ConfigBeanFiller.FillResult |
fillBean(java.lang.String baseName,
java.lang.Class<?> classBean)
Fill the bean object and return a FillResult
|
protected java.lang.Object |
fillBean(java.lang.String className,
java.lang.ClassLoader loader) |
java.lang.Object |
fillObject(java.lang.ClassLoader loader,
java.lang.Class<?> connectorConfigClass)
Fill the bean object and return a BeanConfig
|
java.lang.ClassLoader |
getClassLoader()
Return the class loader.
|
ConfigPropertyDefinition[] |
getDynamicParameters(java.lang.String className,
java.lang.ClassLoader loader)
Deprecated.
|
static ConfigPropertyDefinition[] |
getStaticParameters(java.lang.String className,
java.lang.ClassLoader loader)
Deprecated.
|
protected boolean |
hasNonEmptySubkeys(java.lang.String key)
Has sub-keys ("
|
static java.lang.Class<?> |
loadClass(java.lang.String name,
java.lang.ClassLoader loader) |
protected java.lang.Class<?> |
resolveGenericTypeClass(com.exalead.config.ConfigApi cpapi,
java.lang.String baseKey,
java.lang.Class<?> classGeneric)
Resolve a generic type.
|
static void |
setGlobalDecryptProvider(ConfigBeanFiller.DecryptInterface provider)
Set the global decrypt provider.
|
public static final java.lang.String ARRAY_REPRESENTATION
protected static ConfigBeanFiller.DecryptInterface decryptProvider
protected static void ensureAnnotationIsNotPresent(java.lang.reflect.Method met, java.lang.Class<?> cls) throws java.lang.ClassCastException
java.lang.ClassCastException
protected static java.lang.String fancyClass(java.lang.Object obj)
public java.lang.ClassLoader getClassLoader()
@Deprecated public static ConfigPropertyDefinition[] getStaticParameters(java.lang.String className, java.lang.ClassLoader loader) throws java.lang.Exception
java.lang.Exception
@Deprecated public ConfigPropertyDefinition[] getDynamicParameters(java.lang.String className, java.lang.ClassLoader loader) throws java.lang.Exception
java.lang.Exception
protected java.lang.Object fillBean(java.lang.String className, java.lang.ClassLoader loader) throws java.lang.Exception
java.lang.Exception
protected java.lang.Object fillBean(java.lang.Class<?> classBean) throws java.lang.Exception
java.lang.Exception
public static void setGlobalDecryptProvider(ConfigBeanFiller.DecryptInterface provider)
provider
- protected java.lang.String decryptValue(java.lang.String value)
value
- the encrypted valueprotected ConfigBeanFiller.FillResult fillBean(java.lang.String baseName, java.lang.Class<?> classBean) throws java.lang.Exception
baseName
- the config key prefix (flattened)classBean
- the classjava.lang.Exception
protected boolean hasNonEmptySubkeys(java.lang.String key) throws java.lang.Exception
java.lang.Exception
public static java.lang.Class<?> loadClass(java.lang.String name, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected java.lang.Class<?> resolveGenericTypeClass(com.exalead.config.ConfigApi cpapi, java.lang.String baseKey, java.lang.Class<?> classGeneric) throws java.lang.ClassNotFoundException, java.lang.Exception
cpapi
- the configbaseKey
- the base key configurationclassGeneric
- the base class expected in returnjava.lang.ClassNotFoundException
java.lang.Exception
protected java.lang.Object[] fillArrayBean(java.lang.String baseName, java.lang.Class<?> cls) throws java.lang.Exception
baseName
- the config key prefixcls
- the config classjava.lang.Exception
- upon filling errorprotected void dynamicFill(DynamicBeanConfig config) throws java.lang.Exception
java.lang.Exception
public java.lang.Object fillObject(java.lang.ClassLoader loader, java.lang.Class<?> connectorConfigClass) throws MandatoryKeyMissingException, IllegalValueException, java.lang.Exception
connectorConfigClass
- the connector config classConfigurationException
- upon configuration errorMandatoryKeyMissingException
IllegalValueException
java.lang.Exception
public BeanConfig fill(java.lang.String configClassName, java.lang.ClassLoader loader) throws MandatoryKeyMissingException, IllegalValueException, java.lang.Exception
connectorConfigClassName
- the connector config class nameloader
- the class loaderConfigurationException
- upon configuration errorMandatoryKeyMissingException
IllegalValueException
java.lang.Exception
public BeanConfig fill(java.lang.Class<?> connectorConfigClass, java.lang.ClassLoader loader) throws MandatoryKeyMissingException, IllegalValueException, java.lang.Exception
connectorConfigClass
- the connector config classloader
- the class loader (this parameter is ignored)ConfigurationException
- upon configuration errorMandatoryKeyMissingException
IllegalValueException
java.lang.Exception
protected BeanConfig fill(java.lang.Class<?> connectorConfigClass) throws MandatoryKeyMissingException, IllegalValueException, java.lang.Exception
connectorConfigClass
- the connector config classConfigurationException
- upon configuration errorMandatoryKeyMissingException
IllegalValueException
java.lang.Exception
Copyright © 2013 Dassault Systèmes, All Rights Reserved.