Package org.eclipse.m2m.atl.core.service

# Class LauncherService

java.lang.Object
org.eclipse.m2m.atl.core.service.LauncherService

public final class LauncherService extends Object
The LauncherService utility class provides a generic way to launch a transformation using the ATL Core API. To parameterize launch accurately, use directly the `ILauncher` implementations.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`REFINING_TRACE_METAMODEL`
The refining trace metamodel name, as defined by the compiler.
`static final String`
`REFINING_TRACE_MODEL`
The refining trace model name, as defined by the compiler.

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`getBooleanOption(Object value, boolean defaultValue)`
Returns the boolean value of the given input, or the defaultValue if null.
`static String`
`getRefinedModelName(String modelName)`
Returns the refined model name.
`static Object`
`launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, ILauncher launcher, Map<String,String> inModels, Map<String,String> inoutModels, Map<String,String> outModels, Map<String,String> paths, Map<String,Object> options, Map<String,InputStream> libraries, InputStream... modules)`
Launches a transformation using the given parameters.
`static Object`
`launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, ILauncher launcher, Map<String,ModelFactory> modelFactories, Map<String,IExtractor> extractors, Map<String,IInjector> injectors, Map<String,String> inModels, Map<String,String> inoutModels, Map<String,String> outModels, Map<String,String> paths, Map<String,Object> options, Map<String,InputStream> libraries, InputStream... modules)`
Launches a transformation using the given parameters.

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

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

## Field Details

### REFINING_TRACE_METAMODEL

public static final String REFINING_TRACE_METAMODEL
The refining trace metamodel name, as defined by the compiler.

See Also:
  - Constant Field Values

### REFINING_TRACE_MODEL

public static final String REFINING_TRACE_MODEL
The refining trace model name, as defined by the compiler.

See Also:
  - Constant Field Values

## Method Details

### launch

public static Object launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, ILauncher launcher, Map<String,String> inModels, Map<String,String> inoutModels, Map<String,String> outModels, Map<String,String> paths, Map<String,Object> options, Map<String,InputStream> libraries, InputStream... modules) throws ATLCoreException
Launches a transformation using the given parameters. Process the injections, extractions.

Parameters:
  `mode` - the launching mode
  `monitor` - the progress monitor
  `launcher` - the `ILauncher`
  `inModels` - a map defining the source models names: [model name, reference model name]
  `inoutModels` - a map defining the inout models names: [model name, reference model name]
  `outModels` - a map defining the target models names: [model name, reference model name]
  `paths` - a map defining the location of each model name: [model name, model location]
  `options` - a map of transformation options: [key, value]
  `libraries` - a map of libraries modules: [library name, module]
  `modules` - a list of modules to superimpose. The first module overrides the next ones.
Returns:
  the transformation result
Throws:
  `ATLCoreException`

### launch

public static Object launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, ILauncher launcher, Map<String,ModelFactory> modelFactories, Map<String,IExtractor> extractors, Map<String,IInjector> injectors, Map<String,String> inModels, Map<String,String> inoutModels, Map<String,String> outModels, Map<String,String> paths, Map<String,Object> options, Map<String,InputStream> libraries, InputStream... modules) throws ATLCoreException
Launches a transformation using the given parameters. Process the injections, extractions.

Parameters:
  `mode` - the launching mode
  `monitor` - the progress monitor
  `launcher` - the `ILauncher`
  `modelFactories` - a map defining which `ModelFactory` to use, for each model name
  `extractors` - a map defining which `IExtractor` to use, for each model name
  `injectors` - a map defining which `IInjector` to use, for each model name
  `inModels` - a map defining the source models names: [model name, reference model name]
  `inoutModels` - a map defining the inout models names: [model name, reference model name]
  `outModels` - a map defining the target models names: [model name, reference model name]
  `paths` - a map defining the location of each model name: [model name, model location]
  `options` - a map of transformation options: [key, value]
  `libraries` - a map of libraries modules: [library name, module]
  `modules` - a list of modules to superimpose. The first module overrides the next ones.
Returns:
  the transformation result
Throws:
  `ATLCoreException`

### getRefinedModelName

public static String getRefinedModelName(String modelName)
Returns the refined model name.

Parameters:
  `modelName` - the inital model name
Returns:
  the refined model name

### getBooleanOption

public static boolean getBooleanOption(Object value, boolean defaultValue)
Returns the boolean value of the given input, or the defaultValue if null.

Parameters:
  `value` - the input value
  `defaultValue` - the default boolean value to return in case of null
Returns:
  the boolean value of the given input, or the defaultValue if null