public class ResourceBundlePropertyIO extends AbstractPropertyIO
ResourceBundle.getBundle method. ResourceBundle.getBundle(String),
ResourceBundle.getBundle(String, Locale),
Serialized Form| Constructor and Description |
|---|
ResourceBundlePropertyIO(String bundleName)
Constructor, using the default locale.
|
ResourceBundlePropertyIO(String bundleName,
Locale locale)
Convertion rules for bundleName is:
If the resource starts with '/' it is removed.
All '/' is replaced by '.'.
A message is logged if any alterations of the resourceName is performed.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBundleName()
Gets the bundle name
|
Locale |
getLocale()
Gets the locale.
|
String |
getName()
A short descriptive name of the Property IO.
|
Properties |
getProperties()
Gets all the name,value pair in a Properties class instance.
|
String |
getSource()
A detailed description of the source of the property data.
|
void |
setValue(String propertyName,
String value)
Sets the name,value as String in the IO.
|
void |
validate()
Fails validatation if:
Bundle name is null.
Bundle name is empty.
Unable to load properties.
|
backup, getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, getValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, reload, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritablepublic ResourceBundlePropertyIO(String bundleName, Locale locale)
bundleName - the name of the bundle.locale - the locale instance, if null than default is used.Locale.getDefault()public ResourceBundlePropertyIO(String bundleName)
bundleName - the bundle nameLocale.getDefault()public String getBundleName()
public Locale getLocale()
public String getName()
PropertyIOpublic String getSource()
PropertyIOpublic void setValue(String propertyName, String value) throws PropertyIOException
PropertyIOpropertyName - the name of the propertyvalue - the string value of the property.PropertyIOException - if the IO is readonly or failed to write the value.public void validate()
throws PropertyIOException
PropertyIOExceptionpublic Properties getProperties()
PropertyIOProperties