Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.engine.api.script
Interface IReportContext

    public interface IReportContext

An interface used to share information between the event methods in scripting. Gives access to report parameters and configuration values. Also provides a way for the report developer to register and retrieve custom properties.

Method Summary
`void` | `deleteGlobalVariable(java.lang.String name)` Remove an object from runtime scope.
`void` | `deletePersistentGlobalVariable(java.lang.String name)` Remove an object from report document scope.
`java.lang.Object` | `evaluate(java.lang.String script)`
`java.util.Map` | `getAppContext()` Get the application context
`ReportDesignHandle` | `getDesignHandle()` get the report design handle.
`java.lang.Object` | `getGlobalVariable(java.lang.String name)` Retireve an object from runtime scope.
`java.lang.Object` | `getHttpServletRequest()` Get the http servlet request object
`java.util.Locale` | `getLocale()`
`java.lang.String` | `getMessage(java.lang.String key)` Finds user-defined messages for the current thread's locale.
`java.lang.String` | `getMessage(java.lang.String key, java.util.Locale locale)` Finds user-defined messages for the given locale.
`java.lang.String` | `getMessage(java.lang.String key, java.util.Locale locale, java.lang.Object[] params)` Finds user-defined messages for the given locale using parameters
`java.lang.String` | `getMessage(java.lang.String key, java.lang.Object[] params)` Finds user-defined messages for the current thread's locale using parameters
`java.lang.String` | `getOutputFormat()`
`java.lang.String` | `getParameterDisplayText(java.lang.String name)`
`java.lang.Object` | `getParameterValue(java.lang.String name)`
`java.lang.Object` | `getPersistentGlobalVariable(java.lang.String name)` Retireve an object from report document scope.
`IRenderOption` | `getRenderOption()` get the render options used to render the report.
`IReportRunnable` | `getReportRunnable()` return the report runnable used to create/render this report
`java.net.URL` | `getResource(java.lang.String resourceName)`
`int` | `getTaskType()` Get the type of the current task.
`com.ibm.icu.util.TimeZone` | `getTimeZone()` Get time zone informations.
`void` | `setGlobalVariable(java.lang.String name, java.lang.Object obj)` Add the object to runtime scope.
`void` | `setParameterDisplayText(java.lang.String name, java.lang.String value)`
`void` | `setParameterValue(java.lang.String name, java.lang.Object value)`
`void` | `setPersistentGlobalVariable(java.lang.String name, java.io.Serializable obj)` Add the object to report document scope.

Method Detail

### getReportRunnable

    IReportRunnable getReportRunnable()

  return the report runnable used to create/render this report

  Returns:

### getParameterValue

    java.lang.Object getParameterValue(java.lang.String name)

  Parameters:
    `name` -
  Returns:

### setParameterValue

    void setParameterValue(java.lang.String name,
                           java.lang.Object value)

  Parameters:
    `name` -
    `value` -

### getParameterDisplayText

    java.lang.String getParameterDisplayText(java.lang.String name)

  Parameters:
    `name` -
  Returns:

### setParameterDisplayText

    void setParameterDisplayText(java.lang.String name,
                                 java.lang.String value)

  Parameters:
    `name` -
    `value` -

### getLocale

    java.util.Locale getLocale()

  Returns:

### getTimeZone

    com.ibm.icu.util.TimeZone getTimeZone()

  Get time zone informations.

  Returns:

### getOutputFormat

    java.lang.String getOutputFormat()

  Returns:

### getRenderOption

    IRenderOption getRenderOption()

  get the render options used to render the report.

  Returns:

### getAppContext

    java.util.Map getAppContext()

  Get the application context

### getHttpServletRequest

    java.lang.Object getHttpServletRequest()

  Get the http servlet request object

### setGlobalVariable

    void setGlobalVariable(java.lang.String name,
                           java.lang.Object obj)

  Add the object to runtime scope. This object can only be retrieved in the same phase, i.e. it is not persisted between generation and presentation.

### deleteGlobalVariable

    void deleteGlobalVariable(java.lang.String name)

  Remove an object from runtime scope.

### getGlobalVariable

    java.lang.Object getGlobalVariable(java.lang.String name)

  Retireve an object from runtime scope.

### setPersistentGlobalVariable

    void setPersistentGlobalVariable(java.lang.String name,
                                     java.io.Serializable obj)

  Add the object to report document scope. This object can be retrieved later. It is persisted between phases, i.e. between generation and presentation.

### deletePersistentGlobalVariable

    void deletePersistentGlobalVariable(java.lang.String name)

  Remove an object from report document scope.

### getPersistentGlobalVariable

    java.lang.Object getPersistentGlobalVariable(java.lang.String name)

  Retireve an object from report document scope.

### getMessage

    java.lang.String getMessage(java.lang.String key)

  Finds user-defined messages for the current thread's locale.

  Parameters:
    `key` - resource key of the user-defined message.
  Returns:
    the corresponding locale-dependent messages. Return `null` if resoueceKey is blank.

### getMessage

    java.lang.String getMessage(java.lang.String key,
                                java.util.Locale locale)

  Finds user-defined messages for the given locale.

  First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.

  Parameters:
    `key` - resource key of the user defined message.
    `locale` - locale of message, if the input `locale` is `null`, the locale for the current thread will be used instead.
  Returns:
    the corresponding locale-dependent messages. Return `null` if resoueceKey is blank.

### getMessage

    java.lang.String getMessage(java.lang.String key,
                                java.lang.Object[] params)

  Finds user-defined messages for the current thread's locale using parameters

  Parameters:
    `key` - resource key of the user-defined message.
    `params` - string arguments used to format error messages
  Returns:
    the corresponding locale-dependent messages. Return `null` if resoueceKey is blank.

### getMessage

    java.lang.String getMessage(java.lang.String key,
                                java.util.Locale locale,
                                java.lang.Object[] params)

  Finds user-defined messages for the given locale using parameters

  First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.

  Parameters:
    `key` - resource key of the user defined message.
    `locale` - locale of message, if the input `locale` is `null`, the locale for the current thread will be used instead.
    `params` - string arguments used to format error messages
  Returns:
    the corresponding locale-dependent messages. Return `null` if resoueceKey is blank.

### getTaskType

    int getTaskType()

  Get the type of the current task.

  Returns:
    task type including:
    - 0 for GetParameterDefinition Task
    - 1 for Run Task
    - 2 for Render Task
    - 3 for Run and Render Task
    - 4 for DataExtraction Task
    - -1 default value for unknown task

### getDesignHandle

    ReportDesignHandle getDesignHandle()

  get the report design handle.

  Returns:
    report design handle

### getResource

    java.net.URL getResource(java.lang.String resourceName)

### evaluate

    java.lang.Object evaluate(java.lang.String script)
                              throws BirtException

  Throws:
    `BirtException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.