net.sf.jasperreports.engine.export

## Class GenericElementHandlerEnviroment

- java.lang.Object
- - net.sf.jasperreports.engine.export.GenericElementHandlerEnviroment

-     public final class GenericElementHandlerEnviroment
      extends java.lang.Object

  A class that provides access to `generic element handlers`.

  Generic element handler bundles are registered as JasperReports extensions of type `GenericElementHandlerBundle` via the central extension framework (see `ExtensionsEnvironment`).

  Version:
    $Id: GenericElementHandlerEnviroment.java 6863 2014-02-06 09:59:27Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.Map<java.lang.String,GenericElementHandlerBundle>` | `getBundles()`
    `GenericElementHandler` | `getElementHandler(JRGenericElementType type, java.lang.String exporterKey)` Returns a handler for a generic print element type and an exporter key.
    `static GenericElementHandler` | `getHandler(JRGenericElementType type, java.lang.String exporterKey)` Deprecated. Replaced by `getElementHandler(JRGenericElementType, String)`.
    `protected static java.util.Map<java.lang.String,GenericElementHandlerBundle>` | `getHandlerBundles()` Deprecated. Replaced by `getBundles()`.
    `static GenericElementHandlerEnviroment` | `getInstance(JasperReportsContext jasperReportsContext)`
    `protected java.util.Map<java.lang.String,GenericElementHandlerBundle>` | `loadBundles()`
    `protected static java.util.Map<java.lang.String,GenericElementHandlerBundle>` | `loadHandlerBundles()` Deprecated. Replaced by `loadBundles()`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static GenericElementHandlerEnviroment getInstance(JasperReportsContext jasperReportsContext)

    - #### getElementHandler

          public GenericElementHandler getElementHandler(JRGenericElementType type,
                                                java.lang.String exporterKey)

      Returns a handler for a generic print element type and an exporter key.

      The method first locates a `handler bundle` that matches the type namespace, and then uses `GenericElementHandlerBundle.getHandler(String, String)` to resolve an export handler.

      Parameters:
        `type` - the generic element type
        `exporterKey` - the exporter key
      Returns:
        a generic print element handler
      Throws:
        `JRRuntimeException` - if a handler does not exist for the combination of element type and exporter key

    - #### getBundles

          protected java.util.Map<java.lang.String,GenericElementHandlerBundle> getBundles()

    - #### loadBundles

          protected java.util.Map<java.lang.String,GenericElementHandlerBundle> loadBundles()

    - #### getHandler

          public static GenericElementHandler getHandler(JRGenericElementType type,
                                         java.lang.String exporterKey)

      Deprecated. Replaced by `getElementHandler(JRGenericElementType, String)`.

    - #### getHandlerBundles

          protected static java.util.Map<java.lang.String,GenericElementHandlerBundle> getHandlerBundles()

      Deprecated. Replaced by `getBundles()`.

    - #### loadHandlerBundles

          protected static java.util.Map<java.lang.String,GenericElementHandlerBundle> loadHandlerBundles()

      Deprecated. Replaced by `loadBundles()`.

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com