org.eclipse.birt.report.engine.api
Interface IEngineTask

All Known Subinterfaces:
IDataExtractionTask, IDataPreviewTask, IGetParameterDefinitionTask, IRenderTask, IRunAndRenderTask, IRunTask

public interface IEngineTask

defines common features for an engine task. A task captures a set of operations that engine performs to get a unit of work done.


Method Summary
 void addScriptableJavaObject(java.lang.String jsName, java.lang.Object obj)
          defines an additional Java object that is exposed to BIRT scripting at a per-task level
 void close()
          close the task, relese any resources.
 java.util.Map getAppContext()
          returns the context objects for the task
 ReportEngine getEngine()
          returns the report engine object
 int getID()
          returns an identifier for the task.
 java.util.Locale getLocale()
          returns the locale for running the task
 java.lang.Object getParameterValue(java.lang.String name)
          returns the value of a parameter.
 java.util.HashMap getParameterValues()
          returns the parameter name/value collection
 IReportRunnable getReportRunnable()
          returns the runnable report design object
 void setAppContext(java.util.Map context)
          sets the task context
 void setLocale(java.util.Locale locale)
          sets the task locale
 void setParameterValue(java.lang.String name, java.lang.Object value)
          sets one parameter value
 void setParameterValues(java.util.Map params)
          set all parameter valuess
 boolean validateParameters()
           
 

Method Detail

setLocale

public void setLocale(java.util.Locale locale)
sets the task locale

Parameters:
locale - the task locale

setAppContext

public void setAppContext(java.util.Map context)
sets the task context

Parameters:
context - - task contexts in a map. The map contains name-value pairs

getLocale

public java.util.Locale getLocale()
returns the locale for running the task

Returns:
the locale for running the task

getAppContext

public java.util.Map getAppContext()
returns the context objects for the task

Returns:
the task contexts

getEngine

public ReportEngine getEngine()
returns the report engine object

Returns:
the engine object

addScriptableJavaObject

public void addScriptableJavaObject(java.lang.String jsName,
                                    java.lang.Object obj)
defines an additional Java object that is exposed to BIRT scripting at a per-task level

Parameters:
jsName - the name that the object is referenced in JavaScript
obj - the Java object that is wrapped and scripted

getID

public int getID()
returns an identifier for the task. The identifier can be used to identify the task, especially when writing logs in a multi-threaded environment.

Returns:
an identifier for the task.

getReportRunnable

public IReportRunnable getReportRunnable()
returns the runnable report design object

Returns:
the runnable report design object

setParameterValues

public void setParameterValues(java.util.Map params)
set all parameter valuess

Parameters:
params - a hash map with all parameters

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.Object value)
sets one parameter value

Parameters:
name - parameter name
value - parameter value

getParameterValues

public java.util.HashMap getParameterValues()
returns the parameter name/value collection

Returns:
the parameter names/values in a hash map

getParameterValue

public java.lang.Object getParameterValue(java.lang.String name)
returns the value of a parameter.

Returns:
the parameter value.

validateParameters

public boolean validateParameters()
Returns:
whether the parameter validation succeeds

close

public void close()
close the task, relese any resources.



Copyright © 2005 Actuate Corp. All rights reserved.