Package org.commonjava.indy.conf
Class EnvironmentConfig
- java.lang.Object
-
- org.commonjava.propulsor.config.section.MapSectionListener
-
- org.commonjava.indy.conf.EnvironmentConfig
-
- All Implemented Interfaces:
IndyConfigInfo,org.commonjava.propulsor.config.section.ConfigurationSectionListener<Map<String,String>>
@ApplicationScoped public class EnvironmentConfig extends org.commonjava.propulsor.config.section.MapSectionListener implements IndyConfigInfo
Created by yma on 2019/3/19.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENV_PREFIXstatic StringHOSTNAMEstatic StringSECTION_NAMEstatic StringUNKNOWN-
Fields inherited from interface org.commonjava.propulsor.config.section.ConfigurationSectionListener
DEFAULT_SECTION
-
Fields inherited from interface org.commonjava.indy.conf.IndyConfigInfo
APPEND_DEFAULTS_TO_MAIN_CONF, CONF_INCLUDES_DIR
-
-
Constructor Summary
Constructors Constructor Description EnvironmentConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetDefaultConfig()The actual content which should be added to the default configuration file in case no configuration is provided, to allow modification of defaults in future executions.StringgetDefaultConfigFileName()The name of the file to be written in case no configuration is provided, to allow modification of defaults in future executions.Map<String,String>getEnvars()voidparameter(String name, String value)
-
-
-
Field Detail
-
SECTION_NAME
public static final String SECTION_NAME
- See Also:
- Constant Field Values
-
ENV_PREFIX
public static final String ENV_PREFIX
- See Also:
- Constant Field Values
-
HOSTNAME
public static final String HOSTNAME
- See Also:
- Constant Field Values
-
UNKNOWN
public static final String UNKNOWN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultConfigFileName
public String getDefaultConfigFileName()
Description copied from interface:IndyConfigInfoThe name of the file to be written in case no configuration is provided, to allow modification of defaults in future executions.- Specified by:
getDefaultConfigFileNamein interfaceIndyConfigInfo- Returns:
- a filename, of the form *.conf (unless it's 'main.conf', in which case it'll be appended to the main config file), which will be written to the etc/indy/conf.d directory.
-
getDefaultConfig
public InputStream getDefaultConfig()
Description copied from interface:IndyConfigInfoThe actual content which should be added to the default configuration file in case no configuration is provided, to allow modification of defaults in future executions.- Specified by:
getDefaultConfigin interfaceIndyConfigInfo- Returns:
- The content, usually as a result of loading Thread.currentThread().getContextClassLoader().getResourceAsStream("foo")
-
parameter
public void parameter(String name, String value) throws org.commonjava.propulsor.config.ConfigurationException
-
-