SMILA 1.0 API documentation

org.eclipse.smila.utils.workspace
Class WorkspaceHelper

java.lang.Object
  extended by org.eclipse.smila.utils.workspace.WorkspaceHelper

public final class WorkspaceHelper
extends java.lang.Object

Helper class to create bundle working directories in a single location. Use system property "org.eclipse.smila.utils.workspace.root" to specify location of SMILA workspace. Default is SMILA.work in eclipse install location.

Author:
Juergen Schumacher (empolis GmbH)

Method Summary
static java.io.File createWorkingDir(java.lang.String bundleName)
          Create a working directory for the given bundle in the SMILA workspace.
static java.io.File createWorkingDir(java.lang.String bundleName, java.lang.String dirName)
          Create a working subdirectory for the given bundle in the SMILA workspace.
static java.io.File createWorkingDirByBundle(Bundle bundle)
          Creates the working dir.
static boolean existsWorkingDir(java.lang.String bundleName, java.lang.String dirName)
          Checks if the working subdirectory exists for the given bundle in the SMILA workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createWorkingDirByBundle

public static java.io.File createWorkingDirByBundle(Bundle bundle)
                                             throws java.io.IOException
Creates the working dir.

Parameters:
bundle - the bundle
Returns:
the file
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

createWorkingDir

public static java.io.File createWorkingDir(java.lang.String bundleName)
                                     throws java.io.IOException
Create a working directory for the given bundle in the SMILA workspace.

Parameters:
bundleName - bundle name
Returns:
working direcory.
Throws:
java.io.IOException - creation error.

createWorkingDir

public static java.io.File createWorkingDir(java.lang.String bundleName,
                                            java.lang.String dirName)
                                     throws java.io.IOException
Create a working subdirectory for the given bundle in the SMILA workspace.

Parameters:
bundleName - bundle name
dirName - name of subdirectory.
Returns:
working direcory.
Throws:
java.io.IOException - creation error.

existsWorkingDir

public static boolean existsWorkingDir(java.lang.String bundleName,
                                       java.lang.String dirName)
                                throws java.io.IOException
Checks if the working subdirectory exists for the given bundle in the SMILA workspace. The bundle workspace is created if it does not exist, the subdirectory is NOT created!

Parameters:
bundleName - bundle name
dirName - name of subdirectory
Returns:
true if the subdirectory exists, false otherwise
Throws:
java.io.IOException - if any error occurs

SMILA 1.0 API documentation