com.joanju.common
Class JoanjuConfigDir

java.lang.Object
  extended by com.joanju.common.JoanjuConfigDir

public class JoanjuConfigDir
extends java.lang.Object

Provides services for working with configuration files for Joanju products and libraries.

The configuration directory is found this way:

  1. By looking at the system property set with Java startup:
    -Djoanju.configdir
  2. By looking for joanjuconfig in the context directory, which might be your "./" working directory. When running in a servlet container like Tomcat, this is the Callgraph installation directory itself.
  3. By looking for the directory joanjuconfig in the home directory.


Constructor Summary
JoanjuConfigDir()
           
 
Method Summary
static java.io.File getConfigDir()
          This returns the joanjuconfig directory, which might be null.
static java.io.File getConfigFile(java.lang.String filename)
          Find a config file in the joanjuconfig directory, might return null.
static void setConfigDir(java.io.File f)
          The application may perform an assignment of the configuration directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoanjuConfigDir

public JoanjuConfigDir()
Method Detail

getConfigDir

public static java.io.File getConfigDir()
This returns the joanjuconfig directory, which might be null.


getConfigFile

public static java.io.File getConfigFile(java.lang.String filename)
Find a config file in the joanjuconfig directory, might return null.


setConfigDir

public static void setConfigDir(java.io.File f)
The application may perform an assignment of the configuration directory. Typically, this should only ever be done once, except perhaps in test environments.



Copyright © 2008 Joanju Software. All Rights Reserved.