net.sf.taverna.raven.appconfig.bootstrap
Class Bootstrap

java.lang.Object
  extended by net.sf.taverna.raven.appconfig.bootstrap.Bootstrap

public class Bootstrap
extends java.lang.Object


Field Summary
static java.lang.String APPLICATION
           
static java.util.Properties properties
           
static java.net.URL[] remoteRepositories
           
static java.lang.String TAVERNA_CACHE
           
static java.lang.String VERSION
           
 
Constructor Summary
Bootstrap()
           
 
Method Summary
static void addSystemArtifact(java.lang.String groupID, java.lang.String artifactID, java.lang.String versionID)
           
static void addSystemLoaderArtifacts()
           
static java.lang.reflect.Method createLoaderMethod(java.util.List<java.net.URL> localUrls, java.util.List<java.net.URL> remoteUrls)
           
static java.lang.Class createWorkbenchClass(java.lang.String ravenVersion, java.lang.reflect.Method loaderMethod)
           
static java.util.Properties findProperties()
          Returns a copy of the raven.properties, which are overridden by any System.properties.
static void findUserDir()
          Find and create if neccessary the user's application directory, according to operating system standards.
static void getLoaderUrls(java.util.List<java.net.URL> localUrls, java.util.List<java.net.URL> remoteUrls)
           
static java.lang.String getLoaderVersion()
           
static java.net.URL getSplashScreenURL()
           
static void invokeWorkbench(java.lang.String[] args, java.lang.Class workbenchClass)
           
static void main(java.lang.String[] args)
          Deprecated. 
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

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

APPLICATION

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

properties

public static java.util.Properties properties

TAVERNA_CACHE

public static java.lang.String TAVERNA_CACHE

remoteRepositories

public static java.net.URL[] remoteRepositories
Constructor Detail

Bootstrap

public Bootstrap()
Method Detail

main

@Deprecated
public static void main(java.lang.String[] args)
                 throws java.net.MalformedURLException,
                        java.lang.ClassNotFoundException,
                        java.lang.SecurityException,
                        java.lang.NoSuchMethodException,
                        java.lang.IllegalArgumentException,
                        java.lang.IllegalAccessException,
                        java.lang.reflect.InvocationTargetException
Deprecated. 

Throws:
java.net.MalformedURLException
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

addSystemLoaderArtifacts

public static void addSystemLoaderArtifacts()
                                     throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

addSystemArtifact

public static void addSystemArtifact(java.lang.String groupID,
                                     java.lang.String artifactID,
                                     java.lang.String versionID)
                              throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

findProperties

public static java.util.Properties findProperties()
Returns a copy of the raven.properties, which are overridden by any System.properties.

Returns:
the properties

invokeWorkbench

public static void invokeWorkbench(java.lang.String[] args,
                                   java.lang.Class workbenchClass)
                            throws java.lang.IllegalAccessException,
                                   java.lang.NoSuchMethodException
Throws:
java.lang.IllegalAccessException
java.lang.NoSuchMethodException

createWorkbenchClass

public static java.lang.Class createWorkbenchClass(java.lang.String ravenVersion,
                                                   java.lang.reflect.Method loaderMethod)
                                            throws java.net.MalformedURLException,
                                                   java.lang.IllegalAccessException
Throws:
java.net.MalformedURLException
java.lang.IllegalAccessException

getSplashScreenURL

public static java.net.URL getSplashScreenURL()
                                       throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

getLoaderUrls

public static void getLoaderUrls(java.util.List<java.net.URL> localUrls,
                                 java.util.List<java.net.URL> remoteUrls)
                          throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

createLoaderMethod

public static java.lang.reflect.Method createLoaderMethod(java.util.List<java.net.URL> localUrls,
                                                          java.util.List<java.net.URL> remoteUrls)
                                                   throws java.lang.ClassNotFoundException,
                                                          java.lang.NoSuchMethodException
Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException

findUserDir

public static void findUserDir()
Find and create if neccessary the user's application directory, according to operating system standards. The resolved directory is then stored in the system property taverna.home

If the system property taverna.home already exists, the directory specified by that path will be used instead and created if needed.

If any exception occurs (such as out of diskspace), taverna.home will be unset.

On Windows, this will typically be something like:

        C:\Document and settings\MyUsername\Application Data\MyApplication
 
while on Mac OS X it will be something like:
        /Users/MyUsername/Library/Application Support/MyApplication
 
All other OS'es are assumed to be UNIX-alike, returning something like:
        /user/myusername/.myapplication
 

If the directory does not already exist, it will be created. It will also create the 'conf' directory within it if it doesn't exist.


getLoaderVersion

public static java.lang.String getLoaderVersion()