Package org.talend.transform.runtime.api

# Class RuntimeFactoryHelper

java.lang.Object
org.talend.transform.runtime.api.RuntimeFactoryHelper

public class RuntimeFactoryHelper extends Object
Utility methods used by `RuntimeFactory`. Exposing them as a separate class so that we can unit test them.

## Constructor Summary

Constructors
Constructor
Description
`RuntimeFactoryHelper()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`copyFolder(File src, File dest)`
Copy a folder and all its contents to another.
`static File`
`createTempConfigurationArea(File installDir)`
This runtime may be executed concurrently by several processes sharing the same user ID.
`static File`
`createTempDir(String dirName)`
Create a temporary folder.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RuntimeFactoryHelper

public RuntimeFactoryHelper()

## Method Details

### createTempConfigurationArea

public static File createTempConfigurationArea(File installDir) throws IOException
This runtime may be executed concurrently by several processes sharing the same user ID. This creates potential conflicts on the Eclipse configuration area that is used by Eclipse to store internal stuff.

Here we create a temporary folder with a copy of the configuration folder and files.

Returns:
  the location of the temporary configuration area
Throws:
  `IOException` - if temporary folder cannot be created

### createTempDir

public static File createTempDir(String dirName) throws IOException
Create a temporary folder.

Parameters:
  `dirName` - the folder name
Returns:
  the new folder created
Throws:
  `IOException`

### copyFolder

public static void copyFolder(File src, File dest) throws IOException
Copy a folder and all its contents to another. This class is part of the API which has minimal dependencies. We don't want to add commons.io or oaklandsw.util dependency.

Parameters:
  `src` - the src folder
  `dest` - the destination folder
Throws:
  `IOException` - if copy fails