|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.settings.impl.GenericSettingsImpl
public abstract class GenericSettingsImpl
Generic implementation the Settings interface.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CATEGORY_NAME
The name of the default category (i.e."") which is also representing null as value for category. |
| Constructor Summary | |
|---|---|
GenericSettingsImpl()
Initialize the new instance with default values. |
|
GenericSettingsImpl(java.lang.String aName)
Create a new instance with the specified name. |
|
| Method Summary | |
|---|---|
void |
defaultSettings(ReadOnlySettings newValue)
|
boolean |
getCaseSensitive()
Returns true, if the search for category and key names is case sensitive. |
java.lang.String[] |
getCategoryNames()
Returns an array of all currently known categories. |
ReadOnlySettings |
getDefaults()
Gets the defaults that are looked up, if a setting can't be found in the main settings object. |
java.lang.String[] |
getKeyNamesOf(java.lang.String categoryName)
Returns all currently known key names in the category with the specified name. |
java.lang.String[] |
getKeyNamesOfDefaultCategory()
Returns all currently known key names in the default category. |
java.lang.String |
getName()
Returns the name of the settings object as a whole. |
java.lang.String |
getSettingsNameOf(java.lang.String keyName)
Returns the name of the name of the settings where the specified key is found in the default category. |
java.lang.String |
getSettingsNameOf(java.lang.String categoryName,
java.lang.String keyName)
Returns the name of the name of the settings where the specified category and key are found. |
java.lang.String |
getValueOf(java.lang.String keyName)
Returns the value of keyName in the default category. |
java.lang.String |
getValueOf(java.lang.String categoryName,
java.lang.String keyName)
Returns the value of keyName in the specified category. |
void |
removeCategory(java.lang.String categoryName)
Removes the category with the specified name and all its key/value pairs. |
void |
removeDefaultCategory()
Removes the default category and all its key/value pairs. |
void |
removeKey(java.lang.String keyName)
Removes the key and its associated value from the default category. |
void |
removeKey(java.lang.String categoryName,
java.lang.String keyName)
Removes the key and its associated value from the specified category. |
void |
setCaseSensitive(boolean isCaseSensitive)
Sets whether or not the internal search for category names and key names must be case sensitive. |
void |
setDefaults(ReadOnlySettings defaults)
Sets defaults that must be looked up, if a setting can't be found in the main settings object. |
void |
setName(java.lang.String aName)
Sets the name of the settings object as a whole. |
void |
setValueOf(java.lang.String keyName,
java.lang.String value)
Sets the value of given key in the default category. |
void |
setValueOf(java.lang.String categoryName,
java.lang.String keyName,
java.lang.String value)
Sets the value of given key in the specified category. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_CATEGORY_NAME
| Constructor Detail |
|---|
public GenericSettingsImpl()
public GenericSettingsImpl(java.lang.String aName)
| Method Detail |
|---|
public void defaultSettings(ReadOnlySettings newValue)
public java.lang.String getValueOf(java.lang.String categoryName,
java.lang.String keyName)
getValueOf in interface ReadOnlySettingscategoryName - The name of the category (null means the default category)keyName - The name of a key inside the category
public java.lang.String getValueOf(java.lang.String keyName)
getValueOf in interface ReadOnlySettingskeyName - The name of a key inside the default category
public void setValueOf(java.lang.String categoryName,
java.lang.String keyName,
java.lang.String value)
setValueOf in interface SettingscategoryName - The name of the category (null means the default category)keyName - The name of the key the value should be assigned to.value - The value to be assigned to the key
public void setValueOf(java.lang.String keyName,
java.lang.String value)
setValueOf in interface SettingskeyName - The name of the key the value should be assigned to.value - The value to be assigned to the keypublic java.lang.String[] getCategoryNames()
getCategoryNames in interface ReadOnlySettingspublic java.lang.String[] getKeyNamesOf(java.lang.String categoryName)
getKeyNamesOf in interface ReadOnlySettingscategoryName - The name of the category the keys are wanted frompublic java.lang.String[] getKeyNamesOfDefaultCategory()
getKeyNamesOfDefaultCategory in interface ReadOnlySettings
public void removeKey(java.lang.String categoryName,
java.lang.String keyName)
removeKey in interface SettingscategoryName - The name of the category the key should be removed fromkeyName - The name of the key to removepublic void removeKey(java.lang.String keyName)
removeKey in interface SettingskeyName - The name of the key to removepublic void removeCategory(java.lang.String categoryName)
removeCategory in interface SettingscategoryName - The name of the category to removedpublic void removeDefaultCategory()
removeDefaultCategory in interface Settings
public java.lang.String getSettingsNameOf(java.lang.String categoryName,
java.lang.String keyName)
getSettingsNameOf in interface ReadOnlySettingscategoryName - The name of the category (null means the default category)keyName - The name of a key inside the category
public java.lang.String getSettingsNameOf(java.lang.String keyName)
getSettingsNameOf in interface ReadOnlySettingskeyName - The name of a key inside the default category
public java.lang.String getName()
getName in interface ReadOnlySettingspublic void setName(java.lang.String aName)
setName in interface ReadOnlySettingspublic boolean getCaseSensitive()
getCaseSensitive in interface CaseSensitivitypublic void setCaseSensitive(boolean isCaseSensitive)
setCaseSensitive in interface CaseSensitivityisCaseSensitive - The new value that determins if names are compared case sensitive or notpublic ReadOnlySettings getDefaults()
getDefaults in interface ReadOnlySettingspublic void setDefaults(ReadOnlySettings defaults)
setDefaults in interface ReadOnlySettingsdefaults - A settings object with default values or null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||