|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmanager.PropertyManager
public class PropertyManager
A class to handle properties.
| Field Summary | |
|---|---|
static java.lang.String |
LANGUAGE
|
static java.lang.String |
LOCAL_MP3_DIRECTORY
|
static java.lang.String |
MAP_IMAGE
|
static java.lang.String |
MAP_SOURCE
|
static java.lang.String |
MODE
|
static java.lang.String |
MP3_SERVER
|
static java.lang.String |
PLAYLIST_NAME
|
static java.lang.String |
RANDOMIZE_UNIT_ITEMS
|
static java.lang.String |
REMOTE_SERVER
|
| Constructor Summary | |
|---|---|
PropertyManager()
|
|
| Method Summary | |
|---|---|
void |
getPropertiesFromString(java.lang.String str)
Parses properties from a string and store them in the PropertyManager |
java.lang.String |
getProperty(java.lang.String key)
Returns the value of a property |
void |
initProperties()
Initializes the PropertyManager. |
Properties |
loadPropertiesFromResource(java.lang.String resource)
Loads properties from a given resource within the jar file |
void |
resetProperties()
Restores default properties |
void |
saveProperties()
Saves properties to RMS |
void |
saveResourcesToRMS()
Saves resources (MAP Image and MAP Source) to RMS |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value of a given property |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MAP_SOURCE
public static final java.lang.String MAP_IMAGE
public static final java.lang.String MP3_SERVER
public static final java.lang.String REMOTE_SERVER
public static final java.lang.String LOCAL_MP3_DIRECTORY
public static final java.lang.String PLAYLIST_NAME
public static final java.lang.String MODE
public static final java.lang.String LANGUAGE
public static final java.lang.String RANDOMIZE_UNIT_ITEMS
| Constructor Detail |
|---|
public PropertyManager()
| Method Detail |
|---|
public void initProperties()
throws javax.microedition.rms.RecordStoreException
"conf.properties" are loaded.
Properties are encoded as key value pairs in the property object.
(e.g.: key: "map", value: "gztan.png"). Binary resources like the data
mapping-file of items to units (=mapsource) or the graphical
representation of the items (=mapimage) are stored in a seperate
recordstore. Once the default values have been loaded, they are stored
to the RMS.
javax.microedition.rms.RecordStoreException - throwed if MIDlet cannot access RMS
public void resetProperties()
throws javax.microedition.rms.RecordStoreException
javax.microedition.rms.RecordStoreException - throwed when access to RMS fails
public void saveProperties()
throws javax.microedition.rms.RecordStoreException
javax.microedition.rms.RecordStoreException - throwed when access to RMS failspublic java.lang.String getProperty(java.lang.String key)
key - the key of the property
public void setProperty(java.lang.String key,
java.lang.String value)
key - the key of the propertyvalue - the value of the propertypublic Properties loadPropertiesFromResource(java.lang.String resource)
resource - the resource where to load the properties from
public void getPropertiesFromString(java.lang.String str)
str - the string where to parse properties from
public void saveResourcesToRMS()
throws javax.microedition.rms.RecordStoreException
javax.microedition.rms.RecordStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||