org.devaki.nextobjects.util
Class NOPreferences

java.lang.Object
  extended byorg.devaki.nextobjects.util.NOPreferences

public class NOPreferences
extends java.lang.Object

This class containts all properties load-dump plus some usefull functions

Author:
eflorent

Field Summary
static java.lang.String APP_HOME
          Directory of nextObjects
static java.util.Vector TORQUE_DB
          List of supported database engines
static java.util.Vector TORQUE_TYPES
          List of supported datatypes
 
Constructor Summary
NOPreferences()
          Construct a 'NOPreference' object.
 
Method Summary
static java.util.Properties getAppProperties()
          Get all the properties
static java.lang.String getProperty(java.lang.String pKey)
          Give a reference to the app Properties.
 void loadProperties()
          Load preferences from the 'NO_PREFS' properties file
 void loadTorqueType()
          Load torque types.
static void saveProperties()
          Save preferences to the 'NO_PREFS' properties file
static void setProperty(java.lang.String pKey, java.lang.String pValue)
          Set property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_HOME

public static java.lang.String APP_HOME
Directory of nextObjects


TORQUE_DB

public static final java.util.Vector TORQUE_DB
List of supported database engines


TORQUE_TYPES

public static final java.util.Vector TORQUE_TYPES
List of supported datatypes

Constructor Detail

NOPreferences

public NOPreferences()
Construct a 'NOPreference' object. Initialized with default hardcoded value it create the property file. Then it load the file at each start. This class is also responsible for saving the preferences and also fill in vectors TORQUE_DB and TORQUE_TYPES

Method Detail

loadTorqueType

public void loadTorqueType()
Load torque types.


loadProperties

public void loadProperties()
Load preferences from the 'NO_PREFS' properties file


saveProperties

public static void saveProperties()
Save preferences to the 'NO_PREFS' properties file


getProperty

public static java.lang.String getProperty(java.lang.String pKey)
Give a reference to the app Properties.

Returns:
the java.util.properties for this app

getAppProperties

public static java.util.Properties getAppProperties()
Get all the properties

Returns:
the properties

setProperty

public static void setProperty(java.lang.String pKey,
                               java.lang.String pValue)
Set property

Parameters:
pKey - the key
pValue - the value


Copyright © 2002-2004 devaki.org. All Rights Reserved.