Package org.commonjava.indy.conf
Interface IndyConfigFactory
-
public interface IndyConfigFactoryDescribes a facility for loading all the configurations related to Indy, only one of which isIndyConfiguration.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPROX_CONFIG_DIR_PROPDeprecated.static StringAPROX_CONFIG_PATH_PROPDeprecated.static StringAPROX_HOME_PROPDeprecated.static StringCONFIG_DIR_PROPstatic StringCONFIG_PATH_PROPstatic StringDEFAULT_CONFIG_DIRstatic StringDEFAULT_CONFIG_PATHstatic StringINDY_HOME_PROP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TgetConfiguration(Class<T> configCls)Return the configuration instance corresponding to the given class.voidload(String config)Read all configurations and apply them to the different configuration-class instances available.voidwriteDefaultConfigs(File dir)Query all configuration modules for their default configuration files and content, and write them to the specified configuration directory structure.
-
-
-
Field Detail
-
INDY_HOME_PROP
static final String INDY_HOME_PROP
- See Also:
- Constant Field Values
-
CONFIG_PATH_PROP
static final String CONFIG_PATH_PROP
- See Also:
- Constant Field Values
-
CONFIG_DIR_PROP
static final String CONFIG_DIR_PROP
- See Also:
- Constant Field Values
-
APROX_HOME_PROP
@Deprecated static final String APROX_HOME_PROP
Deprecated.- See Also:
- Constant Field Values
-
APROX_CONFIG_PATH_PROP
@Deprecated static final String APROX_CONFIG_PATH_PROP
Deprecated.- See Also:
- Constant Field Values
-
APROX_CONFIG_DIR_PROP
@Deprecated static final String APROX_CONFIG_DIR_PROP
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_CONFIG_DIR
static final String DEFAULT_CONFIG_DIR
- See Also:
- Constant Field Values
-
DEFAULT_CONFIG_PATH
static final String DEFAULT_CONFIG_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConfiguration
<T> T getConfiguration(Class<T> configCls) throws org.commonjava.propulsor.config.ConfigurationException
Return the configuration instance corresponding to the given class.- Throws:
org.commonjava.propulsor.config.ConfigurationException
-
load
void load(String config) throws org.commonjava.propulsor.config.ConfigurationException
Read all configurations and apply them to the different configuration-class instances available.
NOTE:If the main.conf doesn't exist,writeDefaultConfigs(File)will be called.- Parameters:
config- Most commonly, a path to a configuration file.- Throws:
org.commonjava.propulsor.config.ConfigurationException
-
writeDefaultConfigs
void writeDefaultConfigs(File dir) throws org.commonjava.propulsor.config.ConfigurationException
Query all configuration modules for their default configuration files and content, and write them to the specified configuration directory structure. The given directory is equivalent to ${indy.home}/etc/indy, and configuration modules are allowed to return relative paths that include a subdirectory (like conf.d/foo.conf).- Parameters:
dir- The directory into which default configurations should be written.- Throws:
org.commonjava.propulsor.config.ConfigurationException
-
-