org.andromda.core.engine
Class Engine

java.lang.Object
  extended by org.andromda.core.engine.Engine

public final class Engine
extends Object

The engine of AndroMDA. Handles the configuration of AndroMDA and loading/processing of models by plugins. Basically a wrapper around the ModelProcessor that takes a configuration file in order to configure AndroMDA.

Author:
Chad Brandon, Bob Fields
See Also:
ModelProcessor

Method Summary
 void initialize(Configuration configuration)
          Initializes Engine (discovers all plugins, etc) with the given configuration.
 ModelValidationMessage[] loadModelsIfNecessary(Configuration configuration)
          Checks to see if any of the models in the given configuration should be loaded (based on whether or not they've been modified), and if so, performs the load.
static Engine newInstance()
          Create a new Engine instance.
 ModelValidationMessage[] run(Configuration configuration, boolean lastModifiedCheck, String historyDir)
          Runs Engine with the given configuration.
 void shutdown()
          Shuts down this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static Engine newInstance()
Create a new Engine instance.

Returns:
the new instance of Engine.

initialize

public void initialize(Configuration configuration)
Initializes Engine (discovers all plugins, etc) with the given configuration. This configuration is overridden (if changed) when calling run(Configuration, boolean, String).

Parameters:
configuration -

loadModelsIfNecessary

public ModelValidationMessage[] loadModelsIfNecessary(Configuration configuration)
Checks to see if any of the models in the given configuration should be loaded (based on whether or not they've been modified), and if so, performs the load. This way the models are loaded for the next run of the model processor.

Parameters:
configuration - the AndroMDA configuration the contains the repositories containing the models to load.
Returns:
messages from modelProcessor.loadIfNecessary

run

public ModelValidationMessage[] run(Configuration configuration,
                                    boolean lastModifiedCheck,
                                    String historyDir)
Runs Engine with the given configuration.

Parameters:
configuration - the String that contains the configuration contents for configuring Engine.
lastModifiedCheck - Check for model modifications after last generation
historyDir - Overrides model lastModifiedCheck globally
Returns:
the new instance of Engine.

shutdown

public void shutdown()
Shuts down this instance.



Copyright © 2003-2012 AndroMDA.org. All Rights Reserved.