nl.uva.vlet
Class GlobalConfig

java.lang.Object
  extended by nl.uva.vlet.GlobalConfig

public class GlobalConfig
extends java.lang.Object

Class to hold global (static) configuration parameters. This class is outside Global so that pre-initialization configuration can be done (In the case of applet startup). This class is meant for applet/application configuration management. First set the global configuration by calling GlobalConfig.method(); then call Global.init() Further configuration is done by the Global class. TODO: move more configuration properties to this class


Field Summary
static java.lang.String default_user_vletrc_dirname
          Default userspace configuration directory.
static java.lang.String default_vletrc_filename
          Default userspace configuration directory.
static java.lang.String VLET_BINDIR_PROP
           
static java.lang.String VLET_DOCDIR_PROP
           
static java.lang.String VLET_INSTALL
           
static java.lang.String VLET_INSTALL_PROP
           
static java.lang.String VLET_LIBDIR_PROP
           
static java.lang.String VLET_SYSCONFDIR_PROP
           
 
Constructor Summary
GlobalConfig()
           
 
Method Summary
static VRL getBaseLocation()
          Returns (code) base location of 'this' class or Applet URL.
static VRL getInstallationConfigDir()
           
static java.lang.String getSystemEnv(java.lang.String name)
          Alternative for System.getenv() when running as an applet.
static java.lang.String getSystemProperty(java.lang.String key)
          Alternative for System.getProperty() when running as an applet.
static VRL getUserHomeLocation()
           
static boolean isApplet()
           
static void setCodeBase(java.net.URL codeBase)
           
static void setIsApplet(boolean value)
           
static void setUserHomeLocation(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VLET_INSTALL_PROP

public static final java.lang.String VLET_INSTALL_PROP
See Also:
Constant Field Values

VLET_LIBDIR_PROP

public static final java.lang.String VLET_LIBDIR_PROP
See Also:
Constant Field Values

VLET_BINDIR_PROP

public static final java.lang.String VLET_BINDIR_PROP
See Also:
Constant Field Values

VLET_DOCDIR_PROP

public static final java.lang.String VLET_DOCDIR_PROP
See Also:
Constant Field Values

default_user_vletrc_dirname

public static final java.lang.String default_user_vletrc_dirname
Default userspace configuration directory.

See Also:
Constant Field Values

default_vletrc_filename

public static final java.lang.String default_vletrc_filename
Default userspace configuration directory.

See Also:
Constant Field Values

VLET_INSTALL

public static final java.lang.String VLET_INSTALL
See Also:
Constant Field Values

VLET_SYSCONFDIR_PROP

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

GlobalConfig

public GlobalConfig()
Method Detail

setIsApplet

public static void setIsApplet(boolean value)

isApplet

public static boolean isApplet()

getSystemProperty

public static java.lang.String getSystemProperty(java.lang.String key)
Alternative for System.getProperty() when running as an applet. This is to check properties before calling Global.init();


getSystemEnv

public static java.lang.String getSystemEnv(java.lang.String name)
Alternative for System.getenv() when running as an applet.


getBaseLocation

public static VRL getBaseLocation()
Returns (code) base location of 'this' class or Applet URL. Might not be the actuall installation location.

Returns:

setCodeBase

public static void setCodeBase(java.net.URL codeBase)

getInstallationConfigDir

public static VRL getInstallationConfigDir()

getUserHomeLocation

public static VRL getUserHomeLocation()

setUserHomeLocation

public static void setUserHomeLocation(java.net.URL url)
                                throws VlException
Throws:
VlException