public class DirConfigSource extends Object implements ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL
Constructor and Description |
---|
DirConfigSource(File dir,
int ordinal) |
Modifier and Type | Method and Description |
---|---|
String |
getName()
The name of the config might be used for logging or analysis of configured values.
|
int |
getOrdinal()
Return the ordinal for this config source.
|
Map<String,String> |
getProperties()
Return the properties in this config source
|
String |
getValue(String key)
Return the value for the specified property in this config source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPropertyNames
public DirConfigSource(File dir, int ordinal)
public Map<String,String> getProperties()
ConfigSource
getProperties
in interface ConfigSource
public String getValue(String key)
ConfigSource
getValue
in interface ConfigSource
key
- the property namepublic String getName()
ConfigSource
getName
in interface ConfigSource
public int getOrdinal()
ConfigSource
Some operating systems allow only alphabetic characters or an underscore(_), in environment variables.
Other characters such as ., /, etc may be disallowed.
In order to set a value for a config property that has a name containing such disallowed characters from an environment variable,
the following rules are used.
This ConfigSource searches for potentially 3 environment variables with a given property name (e.g. "com.ACME.size"
):
"com.ACME.size"
)"com_ACME_size"
)"COM_ACME_SIZE"
)The first environment variable that is found is returned by this ConfigSource.
getOrdinal
in interface ConfigSource
Copyright © 2019 JBoss by Red Hat. All rights reserved.