|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.tkuhn.util.prefs.PrefsMetaInfo
public class PrefsMetaInfo
An implementation of MetaInfo using Preferences itself for storage of meta information.
| Field Summary |
|---|
| Fields inherited from interface de.tkuhn.util.prefs.MetaInfo |
|---|
KEY_ICONRES, KEY_LONGDESC, KEY_NAME, KEY_SHORTDESC, KEY_TYPE, KEY_USEREDIT, TYPE_boolean, TYPE_byteArray, TYPE_double, TYPE_float, TYPE_int, TYPE_long, TYPE_string, TYPE_undefined |
| Constructor Summary | |
|---|---|
PrefsMetaInfo(java.util.prefs.Preferences metaNode)
Creates a new instance of PrefsMetaInfo |
|
| Method Summary | |
|---|---|
java.lang.String |
getMappingInfo(java.lang.String key,
java.lang.String infoKey,
java.lang.String defaultInfo)
Retrieve a piece of Information stored about the mapping identified by its key inside the node this MetaInfo describes mapped to the infoKey. |
java.lang.String |
getNodeInfo(java.lang.String infoKey,
java.lang.String defaultInfo)
Retrieve a piece of Information stored about the node described by this MetaInfo under the given key. |
int |
getType(java.lang.String key)
Get the type of the value mapped with the given key. |
boolean |
isUserEditable(java.lang.String key)
Check if the value of the mapping with the given key is editable by users or by admins only. |
void |
setMappingInfo(java.lang.String key,
java.lang.String infoKey,
java.lang.String info)
Store a piece of Information about the mapping identified by its key inside the node described by this MetaInfo. |
void |
setNodeInfo(java.lang.String infoKey,
java.lang.String info)
Store a piece of Information about the node described by this MetaInfo under the given key. |
void |
setType(java.lang.String key,
int type)
Set the type of the value mapped with the given key. |
void |
setUserEditable(java.lang.String key,
boolean editable)
Set if the value of the mapping with the given key should be editable by users or by admins only. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrefsMetaInfo(java.util.prefs.Preferences metaNode)
metaNode - the Preferences node where meta information is stored.| Method Detail |
|---|
public java.lang.String getMappingInfo(java.lang.String key,
java.lang.String infoKey,
java.lang.String defaultInfo)
getMappingInfo in interface MetaInfokey - the key of the mapping data was stored aboutinfoKey - the key the data was mapped todefaultInfo - the default to be returned on missing data
public java.lang.String getNodeInfo(java.lang.String infoKey,
java.lang.String defaultInfo)
getNodeInfo in interface MetaInfoinfoKey - the key the data was mapped todefaultInfo - the default to be returned on missing data
public int getType(java.lang.String key)
getType in interface MetaInfokey - the key of the mapping
public boolean isUserEditable(java.lang.String key)
isUserEditable in interface MetaInfokey - the key of the mapping
public void setMappingInfo(java.lang.String key,
java.lang.String infoKey,
java.lang.String info)
setMappingInfo in interface MetaInfokey - the key of the mapping to store data aboutinfoKey - key to map the data withinfo - the data to be mapped
public void setNodeInfo(java.lang.String infoKey,
java.lang.String info)
setNodeInfo in interface MetaInfoinfoKey - the key to map the data withinfo - the data to be mapped
public void setType(java.lang.String key,
int type)
setType in interface MetaInfokey - the key of the mappingtype - the new type of the mapping. Should be one of the predefined
types.
public void setUserEditable(java.lang.String key,
boolean editable)
setUserEditable in interface MetaInfokey - the key of the mappingeditable - the new state: true: users may edit false: admins onlypublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||