Note, config files MUST contain a "DEFAULT" profile, else validation will fail. Additional profiles are optional.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | ConfigFileReader.
ConfigFile represents a simple lookup mechanism for a OCI config file. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_FILE_PATH
Default location of the config file. |
| private static final String | |
| public static final String | FALLBACK_DEFAULT_FILE_PATH
The fallback default location of the config file. |
| private static final Logger | |
| public static final String | OCI_CONFIG_FILE_PATH_ENV_VAR_NAME
Environment variable name for the config file location |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ConfigFileReader. | |
| public static ConfigFileReader. | |
| public static ConfigFileReader. | Returns: A new ConfigFile instance.The path to the config file. configurationStream, String The profile name to load, or null if you want to load the "DEFAULT" profile. profile)Create a new instance using an UTF-8 input stream. |
| public static ConfigFileReader. | Returns: A new ConfigFile instance.The path to the config file. configurationStream, String The profile name to load, or null if you want to load the "DEFAULT" profile. profile, Charset The charset used when parsing the input stream charset)Create a new instance using an input stream. |
| public static ConfigFileReader. | Returns: A new ConfigFile instance.Creates a new ConfigFile instance using the configuration at the default location, using the default profile. |
| public static ConfigFileReader. | Returns: A new ConfigFile instance.The profile name to load, or null if you want to load the "DEFAULT" profile. profile)Creates a new ConfigFile instance using the configuration at the default location, using the given profile. |
| DEFAULT_FILE_PATH | back to summary |
|---|---|
| public static final String DEFAULT_FILE_PATH Default location of the config file. | |
| DEFAULT_PROFILE_NAME | back to summary |
|---|---|
| private static final String DEFAULT_PROFILE_NAME | |
| FALLBACK_DEFAULT_FILE_PATH | back to summary |
|---|---|
| public static final String FALLBACK_DEFAULT_FILE_PATH The fallback default location of the config file. If and only if the | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| OCI_CONFIG_FILE_PATH_ENV_VAR_NAME | back to summary |
|---|---|
| public static final String OCI_CONFIG_FILE_PATH_ENV_VAR_NAME Environment variable name for the config file location | |
| ConfigFileReader | back to summary |
|---|---|
| private ConfigFileReader() | |
| parse | back to summary |
|---|---|
| public static ConfigFileReader. Create a new instance using a file at a given location. This method is the same as calling
| |
| parse | back to summary |
|---|---|
| public static ConfigFileReader. Create a new instance using a file at a given location.
| |
| parse | back to summary |
|---|---|
| public static ConfigFileReader. Create a new instance using an UTF-8 input stream.
| |
| parse | back to summary |
|---|---|
| public static ConfigFileReader. Create a new instance using an input stream.
| |
| parseDefault | back to summary |
|---|---|
| public static ConfigFileReader. Creates a new ConfigFile instance using the configuration at the default location, using the
default profile. See
| |
| parseDefault | back to summary |
|---|---|
| public static ConfigFileReader. Creates a new ConfigFile instance using the configuration at the default location, using the
given profile. See
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Map | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| configurationsByProfile | back to summary |
|---|---|
| pack-priv final Map<String, Map<String, String>> configurationsByProfile | |
| currentProfile | back to summary |
|---|---|
| private String currentProfile | |
| foundDefaultProfile | back to summary |
|---|---|
| private boolean foundDefaultProfile | |
| ConfigAccumulator | back to summary |
|---|---|
| private ConfigAccumulator() | |
| accept | back to summary |
|---|---|
| private void accept(String line) | |
| Modifier and Type | Field and Description |
|---|---|
| private final ConfigFileReader. | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| accumulator | back to summary |
|---|---|
| private final ConfigFileReader. | |
| profile | back to summary |
|---|---|
| private final String profile | |
| ConfigFile | back to summary |
|---|---|
private ConfigFile(ConfigFileReader.
| |
| get | back to summary |
|---|---|
| public String get(String key) Gets the value associated with a given key. The value returned will be the one for the selected profile (if available), else the value in the DEFAULT profile (if specified), else null. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |