net.sf.jasperreports.engine.component

## Class ComponentsEnvironment

- java.lang.Object
- - net.sf.jasperreports.engine.component.ComponentsEnvironment

-     public final class ComponentsEnvironment
      extends java.lang.Object

  A class that provides access to `component bundles`.

  Component bundles are registered as JasperReports extensions of type `ComponentsBundle` via the central extension framework (see `ExtensionsEnvironment`).

  Version:
    $Id: ComponentsEnvironment.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,ComponentsBundle>` | `findBundles()`
    `protected static java.util.Map<java.lang.String,ComponentsBundle>` | `findComponentBundles()` Deprecated. Replaced by `findBundles()`.
    `ComponentsBundle` | `getBundle(java.lang.String namespace)` Returns a component bundle that corresponds to a namespace.
    `java.util.Collection<ComponentsBundle>` | `getBundles()` Returns the set of all component bundles present in the registry.
    `protected java.util.Map<java.lang.String,ComponentsBundle>` | `getCachedBundles()`
    `protected static java.util.Map<java.lang.String,ComponentsBundle>` | `getCachedComponentBundles()` Deprecated. Replaced by `getCachedBundles()`.
    `static java.util.Collection<ComponentsBundle>` | `getComponentBundles()` Deprecated. Replaced by `getBundles()`.
    `static ComponentManager` | `getComponentManager(ComponentKey componentKey)` Deprecated. Replaced by `getManager(ComponentKey)`.
    `static ComponentsBundle` | `getComponentsBundle(java.lang.String namespace)` Deprecated. Replaced by `getBundle(String)`.
    `static ComponentsEnvironment` | `getInstance(JasperReportsContext jasperReportsContext)`
    `ComponentManager` | `getManager(ComponentKey componentKey)` Returns a component manager that corresponds to a particular component type key.

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

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

- - ### Method Detail

    - #### getInstance

          public static ComponentsEnvironment getInstance(JasperReportsContext jasperReportsContext)

    - #### getBundles

          public java.util.Collection<ComponentsBundle> getBundles()

      Returns the set of all component bundles present in the registry.
      Returns:
        the set of component bundles

    - #### getCachedBundles

          protected java.util.Map<java.lang.String,ComponentsBundle> getCachedBundles()

    - #### findBundles

          protected java.util.Map<java.lang.String,ComponentsBundle> findBundles()

    - #### getBundle

          public ComponentsBundle getBundle(java.lang.String namespace)

      Returns a component bundle that corresponds to a namespace.
      Parameters:
        `namespace` - a component bundle namespace
      Returns:
        the corresponding component bundle
      Throws:
        `JRRuntimeException` - if no bundle corresponding to the namespace is found in the registry

    - #### getManager

          public ComponentManager getManager(ComponentKey componentKey)

      Returns a component manager that corresponds to a particular component type key.
      Parameters:
        `componentKey` - the component type key
      Returns:
        the manager for the component type
      Throws:
        `JRRuntimeException` - if the registry does not contain the specified component type

    - #### getComponentBundles

          public static java.util.Collection<ComponentsBundle> getComponentBundles()

      Deprecated. Replaced by `getBundles()`.

    - #### getCachedComponentBundles

          protected static java.util.Map<java.lang.String,ComponentsBundle> getCachedComponentBundles()

      Deprecated. Replaced by `getCachedBundles()`.

    - #### findComponentBundles

          protected static java.util.Map<java.lang.String,ComponentsBundle> findComponentBundles()

      Deprecated. Replaced by `findBundles()`.

    - #### getComponentsBundle

          public static ComponentsBundle getComponentsBundle(java.lang.String namespace)

      Deprecated. Replaced by `getBundle(String)`.

    - #### getComponentManager

          public static ComponentManager getComponentManager(ComponentKey componentKey)

      Deprecated. Replaced by `getManager(ComponentKey)`.

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com