net.sf.jasperreports.engine.export

## Class DefaultElementHandlerBundle

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

- All Implemented Interfaces:
    GenericElementHandlerBundle

      public class DefaultElementHandlerBundle
      extends java.lang.Object
      implements GenericElementHandlerBundle

  The default `GenericElementHandlerBundle` implementation.

  This implementation uses a `map` to keep element handlers.

  Version:
    $Id: DefaultElementHandlerBundle.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultElementHandlerBundle()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>>` | `getElementHandlers()` Returns the map of element handlers.
    `GenericElementHandler` | `getHandler(java.lang.String elementName, java.lang.String exporterKey)` Uses the handler map to locate a handler for the element name and exporter key.
    `java.lang.String` | `getNamespace()` Returns the namespace of this bundle.
    `void` | `setElementHandlers(java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> elementHandlers)` Sets the map of element handlers.
    `void` | `setNamespace(java.lang.String namespace)` Sets the namespace of this bundle.

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

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

- - ### Constructor Detail

    - #### DefaultElementHandlerBundle

          public DefaultElementHandlerBundle()

  - ### Method Detail

    - #### getHandler

          public GenericElementHandler getHandler(java.lang.String elementName,
                                         java.lang.String exporterKey)

      Uses the handler map to locate a handler for the element name and exporter key.
      Specified by:
        `getHandler` in interface `GenericElementHandlerBundle`
      Parameters:
        `elementName` - the element type name
        `exporterKey` - the exporter key
      Returns:
        a generic element handler for the combination
      Throws:
        `JRRuntimeException` - if no handler is found

    - #### getNamespace

          public java.lang.String getNamespace()

      Description copied from interface: `GenericElementHandlerBundle`
      Returns the namespace of this bundle.
      Specified by:
        `getNamespace` in interface `GenericElementHandlerBundle`
      Returns:
        the bundle namespace

    - #### setNamespace

          public void setNamespace(java.lang.String namespace)

      Sets the namespace of this bundle.
      Parameters:
        `namespace` - the namespace
      See Also:
        `getNamespace()`

    - #### getElementHandlers

          public java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> getElementHandlers()

      Returns the map of element handlers.
      Returns:
        the map of element handlers

    - #### setElementHandlers

          public void setElementHandlers(java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> elementHandlers)

      Sets the map of element handlers.

      The map needs to be a two level map, the first one indexed by element names and the second level indexed by exporter keys.

      Parameters:
        `elementHandlers` - the map of element handlers

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com