com.ptc.wvs.client.pview
Class PViewUtilitiesWindchill

java.lang.Object
  extended bycom.ptc.wvs.client.pview.PViewUtilitiesWindchill

public class PViewUtilitiesWindchill
extends Object


Field Summary
static boolean debug
           
private static FileAccess fa
           
private static String UNIX_HOME
           
private static com.ptc.wvs.client.beans.viewerResource vr
           
private static String WINDOWS_TEMP
           
 
Constructor Summary
PViewUtilitiesWindchill()
           
 
Method Summary
static void delete(File file)
           
static Boolean exists(File file)
           
static String getDefaultDirectory()
          Returns the system temporary directory
static String getEnv(String name)
           
static FileOutputStream getFileOutputStream(File file)
           
static String getLocalizedMessage(String resourceBundle, String messageKey, Object[] textInserts, Locale locale)
           
static String getPropertyValue(String name)
           
static String getTempDirectory()
          Determines a temporary directory.
static boolean isWindows()
          Determines if currently executing on Windows.
static void loadLibrary(String name)
           
static void mkdir(String directory)
           
static String parseDirectory(String path)
          Ensures that the directory path specificed is valid.
static void setDebug(Boolean flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

WINDOWS_TEMP

private static final String WINDOWS_TEMP
See Also:
Constant Field Values

UNIX_HOME

private static final String UNIX_HOME
See Also:
Constant Field Values

fa

private static FileAccess fa

vr

private static com.ptc.wvs.client.beans.viewerResource vr
Constructor Detail

PViewUtilitiesWindchill

public PViewUtilitiesWindchill()
Method Detail

setDebug

public static void setDebug(Boolean flag)

getPropertyValue

public static String getPropertyValue(String name)

getEnv

public static String getEnv(String name)

loadLibrary

public static void loadLibrary(String name)
                        throws Exception
Throws:
Exception

mkdir

public static void mkdir(String directory)
                  throws Exception
Throws:
Exception

exists

public static Boolean exists(File file)

delete

public static void delete(File file)

getFileOutputStream

public static FileOutputStream getFileOutputStream(File file)
                                            throws IOException
Throws:
IOException

getLocalizedMessage

public static String getLocalizedMessage(String resourceBundle,
                                         String messageKey,
                                         Object[] textInserts,
                                         Locale locale)

getTempDirectory

public static String getTempDirectory()
Determines a temporary directory. If the "workspacePath" preference is set, then that will be returned, otherwise the system temporary directory for the platform will be returned.

Returns:
the temporary directory

parseDirectory

public static String parseDirectory(String path)
Ensures that the directory path specificed is valid. That the correct file system delimiter is applied, and trailing directory levels are removed

Parameters:
path - the directory path
Returns:
a valid directory path

isWindows

public static boolean isWindows()
Determines if currently executing on Windows.

Returns:
true if executing on Windows

getDefaultDirectory

public static String getDefaultDirectory()
Returns the system temporary directory

Returns:
a valid temporary directory