public class EnvironmentPropertySource extends BasePropertySource
PropertySource provides all Properties which are set
via
export myprop=myval on UNIX Systems or
set myprop=myval on Windows. You can disable this feature by setting tamaya.envprops.disable
or tamaya.defaults.disable.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ORDINAL
Default ordinal used.
|
| Constructor and Description |
|---|
EnvironmentPropertySource()
Creates a new instance.
|
EnvironmentPropertySource(int ordinal)
Creates a new instance using a fixed ordinal value.
|
EnvironmentPropertySource(String prefix)
Creates a new instance.
|
EnvironmentPropertySource(String prefix,
int ordinal)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.tamaya.spi.PropertyValue |
get(String key) |
int |
getDefaultOrdinal()
Returns the default ordinal used, when no ordinal is set, or the ordinal was not parseable to an int value.
|
String |
getName() |
Map<String,org.apache.tamaya.spi.PropertyValue> |
getProperties() |
boolean |
isScannable() |
protected String |
toStringValues() |
getOrdinal, setDefaultOrdinal, setName, setOrdinal, toStringpublic static final int DEFAULT_ORDINAL
public EnvironmentPropertySource()
prefix and disabled properties
from the system-/ environment properties:
tamaya.envprops.prefix
tamaya.envprops.disable
public EnvironmentPropertySource(int ordinal)
ordinal - the ordinal number.public EnvironmentPropertySource(String prefix, int ordinal)
prefix - the prefix to be used, or null.ordinal - the ordinal to be used.public EnvironmentPropertySource(String prefix)
prefix - the prefix to be used, or null.public int getDefaultOrdinal()
BasePropertySourcegetDefaultOrdinal in class BasePropertySourcepublic String getName()
getName in interface org.apache.tamaya.spi.PropertySourcegetName in class BasePropertySourcepublic org.apache.tamaya.spi.PropertyValue get(String key)
get in interface org.apache.tamaya.spi.PropertySourceget in class BasePropertySourcepublic boolean isScannable()
isScannable in interface org.apache.tamaya.spi.PropertySourceisScannable in class BasePropertySourceprotected String toStringValues()
toStringValues in class BasePropertySourceCopyright © 2016–2017 Apache Software Foundation. All rights reserved.