|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.property.SubsetPropertySource
This class allows access to subsets of a larger PropertySource without constant reuse of the prefix.
Field Summary | |
private PropertySource |
parent
|
private java.lang.String |
prefix
|
Constructor Summary | |
protected |
SubsetPropertySource(java.lang.String prefix,
PropertySource parent)
|
Method Summary | |
java.lang.String |
getPrefix()
Return the String prefix for this PropertySource. |
java.lang.String |
getProperty(java.lang.String key)
If the property isn't there, return null. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
If the property isn't there, return default. |
java.lang.String |
getPropertySafely(java.lang.String key)
|
PropertySource |
getSubsetPropertySource(java.lang.String keyPrefix)
Return a PropertySource that contains the subset of these properties based on the prefix. |
private boolean |
isKeyForSubset(java.lang.String key)
|
private java.lang.String |
makeKey(java.lang.String key)
|
java.util.Iterator |
propertyIterator()
Return an iterator of property keys. |
private java.lang.String |
removePrefix(java.lang.String key)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Add or change the value of a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private PropertySource parent
private java.lang.String prefix
Constructor Detail |
protected SubsetPropertySource(java.lang.String prefix, PropertySource parent)
Method Detail |
private java.lang.String makeKey(java.lang.String key)
private boolean isKeyForSubset(java.lang.String key)
private java.lang.String removePrefix(java.lang.String key)
public java.lang.String getProperty(java.lang.String key)
PropertySource
getProperty
in interface PropertySource
public java.lang.String getProperty(java.lang.String key, java.lang.String def)
PropertySource
getProperty
in interface PropertySource
public java.lang.String getPropertySafely(java.lang.String key)
getPropertySafely
in interface PropertySource
public java.util.Iterator propertyIterator()
PropertySource
propertyIterator
in interface PropertySource
public java.lang.String getPrefix()
PropertySource
getPrefix
in interface PropertySource
public PropertySource getSubsetPropertySource(java.lang.String keyPrefix)
PropertySource
getSubsetPropertySource
in interface PropertySource
public void setProperty(java.lang.String key, java.lang.String value)
PropertySource
setProperty
in interface PropertySource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |