mk.fsgrep.util
Class AppProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by mk.fsgrep.util.AppProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class AppProperties
extends java.util.Properties

Read default application configuration from a file. First read the config file in the user's home directory (global config). Then read the file in the current directory (local config). This the local config file overrides settings in the global config file.

Author:
Murali Krishnan
See Also:
Serialized Form

Field Summary
static java.lang.String APP_DIR
           
static java.lang.String FILENAME_PROPS
           
static java.lang.String USER_HOME
           
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
protected AppProperties(java.lang.String filename)
           
 
Method Summary
protected static void ensureAppDir()
           
protected  java.io.File getSource()
           
protected  void initialize(java.lang.String filename)
           
static AppProperties readDefaults()
           
 void save()
           
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

USER_HOME

public static final java.lang.String USER_HOME

APP_DIR

public static final java.lang.String APP_DIR

FILENAME_PROPS

public static final java.lang.String FILENAME_PROPS
See Also:
Constant Field Values
Constructor Detail

AppProperties

protected AppProperties(java.lang.String filename)
Method Detail

ensureAppDir

protected static void ensureAppDir()

readDefaults

public static AppProperties readDefaults()

getSource

protected java.io.File getSource()

initialize

protected void initialize(java.lang.String filename)

save

public void save()


Copyright © 2009. All Rights Reserved.