public class JSONPropertySource extends Object implements org.apache.tamaya.spi.PropertySource
| Modifier and Type | Field and Description |
|---|---|
static String |
JOHNZON_SUPPORTS_COMMENTS_PROP
Constant for enabling comments in Johnzon.
|
| Constructor and Description |
|---|
JSONPropertySource(URL resource)
Constructor, hereby using 0 as the default ordinal.
|
JSONPropertySource(URL resource,
int defaultOrdinal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.tamaya.spi.PropertyValue |
get(String key) |
String |
getName() |
int |
getOrdinal() |
Map<String,String> |
getProperties() |
boolean |
isScannable() |
protected Map<String,String> |
readConfig(URL urlResource)
Reads the configuration.
|
public static final String JOHNZON_SUPPORTS_COMMENTS_PROP
public JSONPropertySource(URL resource)
resource - the resource modelled as URL, not null.public JSONPropertySource(URL resource, int defaultOrdinal)
resource - the resource modelled as URL, not null.defaultOrdinal - the defaultOrdinal to be used.public int getOrdinal()
getOrdinal in interface org.apache.tamaya.spi.PropertySourcepublic String getName()
getName in interface org.apache.tamaya.spi.PropertySourcepublic org.apache.tamaya.spi.PropertyValue get(String key)
get in interface org.apache.tamaya.spi.PropertySourcepublic Map<String,String> getProperties()
getProperties in interface org.apache.tamaya.spi.PropertySourceprotected Map<String,String> readConfig(URL urlResource)
urlResource - soure of the configuration.org.apache.tamaya.ConfigException - if resource URL cannot be read.public boolean isScannable()
isScannable in interface org.apache.tamaya.spi.PropertySourceCopyright © 2015–2016 Apache Software Foundation. All rights reserved.