|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.support.PropertiesPropertyProvider
@NotThreadSafe public final class PropertiesPropertyProvider
Provides an adapter for Properties
instances to match the PropertyProvider
interface.
Constructor Summary | |
---|---|
PropertiesPropertyProvider(ConfigurationKey configurationKey, PropertyLocation sourceId, Properties properties) Default constructor. |
Method Summary | |
---|---|
boolean |
containsKey(String name) Checks if a given property is provided by the property provider. |
ConfigurationKey |
getConfigurationKey() The key of the configuration this property provider provides properties for. |
PropertyCollection |
getProperties() Returns the collection of all property values known to the system. |
Property |
getProperty(String name) Returns the property with the given name . |
PropertyLocation |
getSourceId() Returns the unique identifier of the property source. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertiesPropertyProvider(ConfigurationKey configurationKey, PropertyLocation sourceId, Properties properties) throws NullPointerException
configurationKey
- the key of the configuration whose properties are provided.
sourceId
- the unique identifier of the physical source of the properties.
properties
- the wrapped properties.
NullPointerException
- if either
configurationKey
,
sourceId
or
properties
is
null
.
Method Detail |
---|
public ConfigurationKey getConfigurationKey()
PropertyProvider
getConfigurationKey
in interface
PropertyProvider
public PropertyLocation getSourceId()
PropertyProvider
getSourceId
in interface
PropertyProvider
public Property getProperty(String name) throws NullPointerException, IllegalArgumentException
PropertyProvider
name
.
getProperty
in interface
PropertyProvider
name
- the name of the property to fetch.
NullPointerException
- if
name
is
null
.
IllegalArgumentException
- if the property is not known. A property is not known if its key has not been registered. A property that is registered with the
null
value is known.
public PropertyCollection getProperties()
PropertyProvider
getProperties
in interface
PropertyProvider
null
.
public boolean containsKey(String name) throws NullPointerException
PropertyProvider
containsKey
in interface
PropertyProvider
name
- the property name to check.
true
if the provider provides a property for the name,
false
otherwise.
NullPointerException
- if
name
is
null
.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |