ccl.util
Class SysEnv

java.lang.Object
  |
  +--ccl.util.SysEnv

public class SysEnv
extends java.lang.Object

Reads the file pointed to by value of the JVM option SYS_ENV as set of name value pairs (as per java.util.Properties class). Keep all the envoirnment variables that you need Jacob to know in this file. See usage of the three public interface exposed by the class. Eg. to access $(HOME) in Jacob have entry HOME=/users/me in the properties file Before you can use this class, don't forget to initialize it.


Field Summary
static java.lang.String S_SYS_ENV
          System property name used to read a file which contains environment variables and their values.
 
Constructor Summary
SysEnv()
           
 
Method Summary
static java.lang.String evalEnvVariable(java.lang.String buffer)
          Replaces all env.
static void initialize()
          Reads the properties files passed as parameter to JVM
static void initialize(java.lang.String sPropFileName_)
          Reads the properties files passed as parameter to JVM
static boolean isEnvEvalReqd(java.lang.String buffer)
          Tests whether the string buffer contains any envoirnment variable: syntax $(VAR_NAME)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_SYS_ENV

public static final java.lang.String S_SYS_ENV
System property name used to read a file which contains environment variables and their values.

See Also:
Constant Field Values
Constructor Detail

SysEnv

public SysEnv()
Method Detail

initialize

public static void initialize()
Reads the properties files passed as parameter to JVM


initialize

public static void initialize(java.lang.String sPropFileName_)
Reads the properties files passed as parameter to JVM


isEnvEvalReqd

public static boolean isEnvEvalReqd(java.lang.String buffer)
Tests whether the string buffer contains any envoirnment variable: syntax $(VAR_NAME)


evalEnvVariable

public static java.lang.String evalEnvVariable(java.lang.String buffer)
Replaces all env. variables ( $(VAR_NAME) ) with value from the SYS_ENV file, if not found $(VAR_NAME) is replaced by empty space.