com.sodius.mdw.core.eval
Interface EvaluationManager


public interface EvaluationManager

Provides entry-point services to launch an evaluation.

Here is a typical use of the evaluation manager :

If a specific project has to be evaluated more than one time in different configurations, or if the templates to be evaluated can be selected dynamically, you can have a finer control on the evaluation process. Here are the steps :

An evaluation process produces an evaluation result, which contains :

This interface is not intended to be implemented by clients.

See Also:
MDWorkbench.getEvaluationManager()

Method Summary
 EvaluationResult evaluate(LaunchConfiguration configuration, ProgressMonitor monitor)
          Launches an evaluation based on the specified launch configuration.
 EvaluationResult evaluate(Project project, Evaluable evaluable, ProgressMonitor monitor)
          Launches an evaluation based on the specified project.
 ContentWriter getContentWriter()
          Returns the registered content writer, used to write on disk a text template output.
 DebugHierarchy loadDebugHierarchy(File file)
          Loads the specified debug hierarchy.
 LaunchConfiguration loadLaunchConfiguration(File file)
          Loads the specified launch configuration.
 Project loadProject(File file)
          Loads the specified project.
 Report loadReport(File file)
          Loads the specified evaluation report.
 void setContentWriter(ContentWriter writer)
          Registers a content writer, used to write on disk a text template output.
 

Method Detail

loadProject

Project loadProject(File file)
                    throws CoreException
Loads the specified project.

Parameters:
file - the file containing a project definition.
Returns:
the loaded project.
Throws:
CoreException - if the file could not be read or if the project contains errors.

loadReport

Report loadReport(File file)
                  throws CoreException
Loads the specified evaluation report.

Parameters:
file - the file containing a report definition.
Returns:
the loaded report.
Throws:
CoreException - if the file could not be read.

loadLaunchConfiguration

LaunchConfiguration loadLaunchConfiguration(File file)
                                            throws CoreException
Loads the specified launch configuration.

Parameters:
file - the file containing a launch configuration.
Returns:
the loaded report.
Throws:
CoreException - if the file could not be read.

loadDebugHierarchy

DebugHierarchy loadDebugHierarchy(File file)
                                  throws CoreException
Loads the specified debug hierarchy.

Parameters:
file - the file containing a debug hierarchy.
Returns:
the loaded debug hierarchy.
Throws:
CoreException - if the file could not be read.

evaluate

EvaluationResult evaluate(LaunchConfiguration configuration,
                          ProgressMonitor monitor)
                          throws CoreException
Launches an evaluation based on the specified launch configuration. First the project referenced in the configuration is loaded and then the evaluation process of the referenced text template or main rule is started.

This is a long running operation that can be monitored through the monitor parameter. A progress monitor may be used to report progress information and to interrupt the evaluation process.

Parameters:
configuration - the configuration which describes the launch parameters.
monitor - the progress monitor used to report progress information and check for cancelation, maybe null.
Returns:
an evaluation result, containing a report and a debug hierarchy.
Throws:
CoreException - if the evaluation fails.

evaluate

EvaluationResult evaluate(Project project,
                          Evaluable evaluable,
                          ProgressMonitor monitor)
                          throws CoreException
Launches an evaluation based on the specified project. The Evaluable imlementation has the full control on what is to be evaluated.

This is a long running operation that can be monitored through the monitor parameter. A progress monitor may be used to report progress information and to interrupt the evaluation process.

Parameters:
project - the project which describes the available templates and scripts.
evaluable - the object whose evaluate method is called.
monitor - the progress monitor used to report progress information and check for cancelation, maybe null.
Returns:
an evaluation result, containing a report and a debug hierarchy.
Throws:
CoreException - if the evaluation fails.

getContentWriter

ContentWriter getContentWriter()
Returns the registered content writer, used to write on disk a text template output.

Returns:
the content writer

setContentWriter

void setContentWriter(ContentWriter writer)
Registers a content writer, used to write on disk a text template output.

Parameters:
writer - the new content writer to use.