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

All Known Subinterfaces:
IDataExtractionTask, 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 cancel()
          Cancels the task.
 void cancel(java.lang.Object signal)
          Cancels the task with a signal.
 void close()
          close the task, relese any resources.
 java.util.Map getAppContext()
          returns the context objects for the task
 IReportEngine getEngine()
          returns the report engine object
 java.util.List getErrors()
          Gets all errors.
 int getID()
          returns an identifier for the task.
 java.util.Locale getLocale()
          returns the locale for running the task
 java.lang.String getParameterDisplayText(java.lang.String name)
          Gets parameter display text by parameter name.
 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
 com.ibm.icu.util.ULocale getULocale()
          returns the locale for running the task
 void setAppContext(java.util.Map context)
          sets the task context
 void setDataSource(org.eclipse.birt.core.archive.IDocArchiveReader dataSource)
          set the data source used by the engine task.
 void setLocale(java.util.Locale locale)
          sets the task locale
 void setLocale(com.ibm.icu.util.ULocale locale)
          sets the task locale
 void setParameter(java.lang.String name, java.lang.Object value, java.lang.String displayText)
          Sets parameter value and display text.
 void setParameterDisplayText(java.lang.String name, java.lang.String displayText)
          Sets display text of a parameter with specified name.
 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

setLocale

public void setLocale(com.ibm.icu.util.ULocale 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

getULocale

public com.ibm.icu.util.ULocale getULocale()
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 IReportEngine 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

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value,
                         java.lang.String displayText)
Sets parameter value and display text.

Parameters:
name - parameter name.
value - value.
displayText - display text.

getParameterDisplayText

public java.lang.String getParameterDisplayText(java.lang.String name)
Gets parameter display text by parameter name.

Parameters:
name - parameter name.
Returns:
display text.

setParameterDisplayText

public void setParameterDisplayText(java.lang.String name,
                                    java.lang.String displayText)
Sets display text of a parameter with specified name.

Parameters:
name - name of the parameter.
displayText - display text to set.

cancel

public void cancel()
Cancels the task.


cancel

public void cancel(java.lang.Object signal)
Cancels the task with a signal. The signal will be notified when the task finishes the cancel.


close

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


setDataSource

public void setDataSource(org.eclipse.birt.core.archive.IDocArchiveReader dataSource)
set the data source used by the engine task. The dataSource is opend and closed by this task.

Parameters:
dataSource - data source archive.

getErrors

public java.util.List getErrors()
Gets all errors.

Returns:
the errors list.


Copyright © 2005 Actuate Corp. All rights reserved.