uk.co.silentsoftware.datastore
Class Config

java.lang.Object
  extended by uk.co.silentsoftware.datastore.Config

public class Config
extends java.lang.Object

Wrapper class over a RecordStore for holding FollowMe's config


Field Summary
static int BACKGROUND_COLOR_INDEX
          The index into the record store for the background colour
static int FOREGROUND_COLOR_INDEX
          The index into the record store for the foreground colour
static int GPS_DEVICE_NAME_INDEX
          The index into the record store for the GPS device name
static int LAST_LOCATION_INDEX
          The index into the record store for the last target
 
Constructor Summary
Config()
           
 
Method Summary
static void close()
          Closes the record store
static java.lang.String getProperty(int name)
          Retrieves a property from the record store, e.g.
static java.lang.String getRoot()
           
static boolean isOpen()
          Returns the record store's open state
static void open()
          Opens the record store for access
static void setProperty(int name, java.lang.String value)
          Retrieves a property into the record store, e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GPS_DEVICE_NAME_INDEX

public static final int GPS_DEVICE_NAME_INDEX
The index into the record store for the GPS device name

See Also:
Constant Field Values

LAST_LOCATION_INDEX

public static final int LAST_LOCATION_INDEX
The index into the record store for the last target

See Also:
Constant Field Values

FOREGROUND_COLOR_INDEX

public static final int FOREGROUND_COLOR_INDEX
The index into the record store for the foreground colour

See Also:
Constant Field Values

BACKGROUND_COLOR_INDEX

public static final int BACKGROUND_COLOR_INDEX
The index into the record store for the background colour

See Also:
Constant Field Values
Constructor Detail

Config

public Config()
Method Detail

open

public static void open()
                 throws java.lang.Exception
Opens the record store for access

Throws:
java.lang.Exception

isOpen

public static boolean isOpen()
Returns the record store's open state

Returns:

close

public static void close()
Closes the record store


getProperty

public static java.lang.String getProperty(int name)
                                    throws java.lang.Exception
Retrieves a property from the record store, e.g. last connected GPS name. Uses the final int keys defined in this class

Parameters:
name -
Returns:
Throws:
java.lang.Exception

setProperty

public static void setProperty(int name,
                               java.lang.String value)
                        throws java.lang.Exception
Retrieves a property into the record store, e.g. last connected GPS name. Uses the final int keys defined in this class

Parameters:
name -
value -
Throws:
java.lang.Exception

getRoot

public static java.lang.String getRoot()