All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ccl.util.SysEnv

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

public class SysEnv
extends 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.

Version:
$Id: SysEnv.java,v 1.7 1999/12/06 14:40:46 clemens Exp clemens $
Author:
Paddy Ramanathan 1999-06-03 Maintained also by Chr. Clemens Lee

Variable Index

 o _propApplicationEnv
 o C_ENV_END_MARKER
 o C_ENV_MARKER
FIX-ME should this be system dependent, now set to Unix compatible with make $(ENV)
 o S_SYS_ENV

Constructor Index

 o SysEnv()

Method Index

 o evalEnvVariable(String)
Replaces all env.
 o getActualVal(String)
 o getStartPos(String)
 o getVariable(String, int)
 o initialize()
Reads the properties files passed as parameter to JVM
 o initialize(String)
Reads the properties files passed as parameter to JVM
 o isEnvEvalReqd(String)
Tests whether the string buffer contains any envoirnment variable: syntax $(VAR_NAME)
 o replace(String, String, int, int)

Variables

 o S_SYS_ENV
 public static final String S_SYS_ENV
 o C_ENV_MARKER
 private static final char C_ENV_MARKER
FIX-ME should this be system dependent, now set to Unix compatible with make $(ENV)

 o C_ENV_END_MARKER
 private static final char C_ENV_END_MARKER
 o _propApplicationEnv
 private static Properties _propApplicationEnv

Constructors

 o SysEnv
 public SysEnv()

Methods

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

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

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

 o evalEnvVariable
 public static String evalEnvVariable(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.

 o getStartPos
 private static int getStartPos(String buffer)
 o getVariable
 private static String getVariable(String buffer,
                                   int start) throws Exception
 o getActualVal
 private static String getActualVal(String val)
 o replace
 private static String replace(String buffer,
                               String actualval,
                               int start,
                               int end)

All Packages  Class Hierarchy  This Package  Previous  Next  Index