org.jostraca
Class Tools

java.lang.Object
  extended byorg.jostraca.Tools

public class Tools
extends java.lang.Object

General system tools used by Jostraca.


Field Summary
static java.lang.String CHECK_AT_HOME_FILE_NAME
           
static java.lang.String FILE_EXT_dotClass
           
static java.lang.String FILE_EXT_dotJava
           
 
Constructor Summary
Tools()
           
 
Method Summary
static java.io.File findRelativeSystemPath(java.lang.String pHomeRelativePath)
           
static java.io.File makeJavaClassPath(java.io.File pJavaSourcePath)
           
static java.lang.String normaliseTemplatePropertySet(PropertySet pPropertySet)
           
static void produceJostracaLocation(PropertySet pPropertySet, java.io.File pConfigFile)
          Special handling for jostraca.Location.
static java.lang.String resolvePath(java.lang.String pJostracaLocation, java.lang.String pFileName)
          Resolve path to a system file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHECK_AT_HOME_FILE_NAME

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

FILE_EXT_dotJava

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

FILE_EXT_dotClass

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

Tools

public Tools()
Method Detail

resolvePath

public static final java.lang.String resolvePath(java.lang.String pJostracaLocation,
                                                 java.lang.String pFileName)
Resolve path to a system file. If file can be accessed without modification to file name, return it else search in jostraca.Location folder. If cannot be found in jostraca.Location folder, just return file name.

Parameters:
pJostracaLocation - Used to build path to file.
pFileName - Name of file to find.

produceJostracaLocation

public static void produceJostracaLocation(PropertySet pPropertySet,
                                           java.io.File pConfigFile)
Special handling for jostraca.Location. jostraca.Location is the root for all system files (writer formats, etc.). The following rules are applied to determine the absolute path to jostraca.Location Append jostraca.Location to config file folder path. If this folder exists, use it. (this allows jostraca.Losocation = .. in the standard config) Otherwise try jostraca.Location as an absolute path.

Parameters:
pPropertySet - Config file PropertySet.
pConfigFile - config file

findRelativeSystemPath

public static final java.io.File findRelativeSystemPath(java.lang.String pHomeRelativePath)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

makeJavaClassPath

public static java.io.File makeJavaClassPath(java.io.File pJavaSourcePath)

normaliseTemplatePropertySet

public static java.lang.String normaliseTemplatePropertySet(PropertySet pPropertySet)


Copyright © 2000-2002 Richard Rodger