com.partnersoft.v3x.util
Class ConfigStore

java.lang.Object
  extended by com.partnersoft.v3x.util.ConfigStore

public class ConfigStore
extends java.lang.Object

Standard store object for configuration. By default, loads from current directory.


Constructor Summary
ConfigStore()
           
 
Method Summary
static ConfigStore configStoreSingleton()
           
static java.lang.Object loadFromClasspath(java.lang.String path)
           
static java.lang.Object loadFromFile(java.lang.String path)
           
 java.lang.Object loadObject(java.lang.String path)
          Logs loading to the system log; otherwise same as superclass.
 java.lang.Object loadOrDie(java.lang.String path)
          Tries to load the given object; if fails dies with a standard "missing config file" error.
 void setLookup(LookupDatabase newLookup)
           
static ConfigStore singleton()
           
 void storeObject(java.lang.String path, java.lang.Object victim)
          Logs loading to the system log; otherwise same as superclass.
 void storeOrDie(java.lang.String path, java.lang.Object victim)
          Tries to load the given object; if fails dies with a standard "save config file" error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigStore

public ConfigStore()
Method Detail

singleton

public static ConfigStore singleton()

configStoreSingleton

public static ConfigStore configStoreSingleton()

loadFromFile

public static java.lang.Object loadFromFile(java.lang.String path)

loadFromClasspath

public static java.lang.Object loadFromClasspath(java.lang.String path)

loadObject

public java.lang.Object loadObject(java.lang.String path)
Logs loading to the system log; otherwise same as superclass.


storeObject

public void storeObject(java.lang.String path,
                        java.lang.Object victim)
                 throws StoreException
Logs loading to the system log; otherwise same as superclass.

Throws:
StoreException

setLookup

public void setLookup(LookupDatabase newLookup)

loadOrDie

public java.lang.Object loadOrDie(java.lang.String path)
Tries to load the given object; if fails dies with a standard "missing config file" error.


storeOrDie

public void storeOrDie(java.lang.String path,
                       java.lang.Object victim)
Tries to load the given object; if fails dies with a standard "save config file" error.