Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.util

Class PoseidonUtils

com.gentleware.poseidon.util.PoseidonUtils

public final class PoseidonUtils


Utils contains some utility routines.


 Attribute Summary
public static final String  OS_DARWIN
 
public static String  OS_MACOS
 
private static String  _configDir
Poseidon's configuration directory, cached because costly to determine  
private static File  _installationDir
Poseidon's installation directory, cached because costly to determine  
static String[]  packageList
 
arrow_up
 

 Constructor Summary
private   PoseidonUtils()
This class has static methods only. 
arrow_up
 

 Method Summary
public static boolean   checkProjectSaved()
Checks if the current project is saved. 
public static void   compareXmiByLine(String xmi1, String xmi2)
 
public static void   compareXmiFilesByLine(String filename1, String filename2)
 
private static void   compareXmiFilesByLineInternal(Reader reader1, Reader reader2)
 
public static Project   createEmptyProject(String fileFilterString)
Creates a new project, without asking wether we want to save anything  
public static Project   createEmptyProject(boolean createModel, String fileFilterString)
 
public static LockChecker   createPoseidonDefaultLockChecker()
Creates the Poseidon default lock checker  
public static void   deadLockPreventionBegin()
 
public static void   deadlockPreventionEnd()
 
public static void   getComponentVersionInfo(StringBuffer sb, String packageName)
 
public static String   getConfigDir()
 
public static File   getInstallationDirectory()
 
public static List   getKeyFilenames(File dir)
 
public static String   getTempDir()
Returns the directory that Poseidon should use for storing temporary files. 
public static String   getVersionInfo()
 
public static boolean   isIdenticalClass(Class testedClass, Class originalClass)
Tests whether the first given class is identical to the second one. 
public static boolean   isNetbeansPlugin()
Checks wether Poseidon is running as a Netbeans (or Forte / SOS) plugin  
public static boolean   isWebStart()
Check if we are running under WebStart  
public static void   logVersionInfo()
 
public static void   setOsSpecifics()
 
public static void   showURL(String url)
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 46
gentleware-imported-package-statement-line-number 5
 

 Attribute Detail

OS_DARWIN

public static String OS_DARWIN

arrow_up


OS_MACOS

public static String OS_MACOS

arrow_up


_configDir

private static String _configDir

Poseidon's configuration directory, cached because costly to determine  
arrow_up


_installationDir

private static File _installationDir

Poseidon's installation directory, cached because costly to determine  
arrow_up


packageList

static String[] packageList

arrow_up
 Constructor Detail

PoseidonUtils

private com.gentleware.poseidon.util.PoseidonUtils PoseidonUtils()


This class has static methods only. It is not meant to be instantiated.  
Returns:
arrow_up
 Method Detail

checkProjectSaved

public static boolean checkProjectSaved()


Checks if the current project is saved. If unsaved, asks the user if it should be saved, if so saves it.  
Returns:
true if the current project was unchanged, has been succesfully saved or it's okay to loose changes.
arrow_up


compareXmiByLine

public static void compareXmiByLine(String xmi1, String xmi2)

Parameters:
xmi1 -
xmi2 -
arrow_up


compareXmiFilesByLine

public static void compareXmiFilesByLine(String filename1, String filename2)

Parameters:
filename1 -
filename2 -
arrow_up


compareXmiFilesByLineInternal

private static void compareXmiFilesByLineInternal(Reader reader1, Reader reader2)

Parameters:
reader1 -
reader2 -
arrow_up


createEmptyProject

public static Project createEmptyProject(String fileFilterString)


Creates a new project, without asking wether we want to save anything  
Parameters:
fileFilterString -
Returns:
arrow_up


createEmptyProject

public static Project createEmptyProject(boolean createModel, String fileFilterString)

Parameters:
createModel -
fileFilterString -
Returns:
arrow_up


createPoseidonDefaultLockChecker

public static LockChecker createPoseidonDefaultLockChecker()


Creates the Poseidon default lock checker  
Returns:
arrow_up


deadLockPreventionBegin

public static void deadLockPreventionBegin()

arrow_up


deadlockPreventionEnd

public static void deadlockPreventionEnd()

arrow_up


getComponentVersionInfo

public static void getComponentVersionInfo(StringBuffer sb, String packageName)

Parameters:
sb -
packageName -
arrow_up


getConfigDir

public static String getConfigDir()

Returns:
the configuration directory of the currently running poseidon edition
arrow_up


getInstallationDirectory

public static File getInstallationDirectory()

Returns:
The installation directory of Poseidon. This will now also work if Poseidon runs via WebStart.
arrow_up


getKeyFilenames

public static List getKeyFilenames(File dir)

Parameters:
dir -
Returns:
a list of all file in the given directory that end with ".key". Does not recurse into subdirectories.
arrow_up


getTempDir

public static String getTempDir()


Returns the directory that Poseidon should use for storing temporary files. If none is set, the system's temp dir is used. If this isn't available either a default directory is used depending on the current os.  
Returns:
The path to the temporary directory as string.
arrow_up


getVersionInfo

public static String getVersionInfo()

Returns:
arrow_up


isIdenticalClass

public static boolean isIdenticalClass(Class testedClass, Class originalClass)


Tests whether the first given class is identical to the second one. It has to be exactly the same class or the direct implementation of an interface. This method will work for classes and interfaces.  
Parameters:
testedClass - The class to be tested. It can be a real class or an interface.
originalClass - THe class to tested against. This can be an interface or class.
Returns:
True, if the tested class is identical to the original one, otherwise false.
arrow_up


isNetbeansPlugin

public static boolean isNetbeansPlugin()


Checks wether Poseidon is running as a Netbeans (or Forte / SOS) plugin  
Returns:
arrow_up


isWebStart

public static boolean isWebStart()


Check if we are running under WebStart  
Returns:
true if /lib/poseidonCore.jar cannot be found
arrow_up


logVersionInfo

public static void logVersionInfo()

arrow_up


setOsSpecifics

public static void setOsSpecifics()

arrow_up


showURL

public static void showURL(String url)

Parameters:
url -
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.