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

## net.sf.jasperreports.extensions
Class ExtensionsEnvironment

    java.lang.Object
      net.sf.jasperreports.extensions.ExtensionsEnvironment

    public final class ExtensionsEnvironment

extends java.lang.Object

A class that provides means of setting and accessing `ExtensionsRegistry` instances.

Version:
  $Id: ExtensionsEnvironment.java 3659 2010-03-31 10:20:49Z shertage $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  `getExtensionsRegistry()`

Field Summary
`protected static java.lang.Object` | `NULL_CACHE_KEY`
`static java.lang.String` | `PROPERTY_EXTENSIONS_REGISTRY_CLASS` A property that provides the default `ExtensionsRegistry` implementation class.

Method Summary
`static java.lang.Object` | `getExtensionsCacheKey()` Returns an object that can be used as cache key for extension-related caches.
`static ExtensionsRegistry` | `getExtensionsRegistry()` Returns the extensions registry to be used in the current context.
`static ExtensionsRegistry` | `getSystemExtensionsRegistry()` Returns the system default extensions registry object.
`static ExtensionsRegistry` | `getThreadExtensionsRegistry()` Returns the thread extensions registry, if any.
`static void` | `resetThreadExtensionsRegistry()` Resets (to null) the thread extensions registry.
`static void` | `setSystemExtensionsRegistry(ExtensionsRegistry extensionsRegistry)` Sets the system default extensions registry.
`static void` | `setThreadExtensionsRegistry(ExtensionsRegistry extensionsRegistry)` Sets the thread extensions registry.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NULL_CACHE_KEY

    protected static final java.lang.Object NULL_CACHE_KEY

### PROPERTY_EXTENSIONS_REGISTRY_CLASS

    public static final java.lang.String PROPERTY_EXTENSIONS_REGISTRY_CLASS

  A property that provides the default `ExtensionsRegistry` implementation class.

  This property is only read at initialization time, therefore changing the property value at a later time will have no effect.

  See Also:
    Constant Field Values

Method Detail

### getSystemExtensionsRegistry

    public static ExtensionsRegistry getSystemExtensionsRegistry()

  Returns the system default extensions registry object.

  This is either the one instantiated based on `PROPERTY_EXTENSIONS_REGISTRY_CLASS`, or the one set by `setSystemExtensionsRegistry(ExtensionsRegistry)`.

  Returns:
    the system default extensions registry object

### setSystemExtensionsRegistry

    public static void setSystemExtensionsRegistry(ExtensionsRegistry extensionsRegistry)

  Sets the system default extensions registry.

  Parameters:
    `extensionsRegistry` - the extensions registry

### getThreadExtensionsRegistry

    public static ExtensionsRegistry getThreadExtensionsRegistry()

  Returns the thread extensions registry, if any.

  Returns:
    the thread extensions registry

### setThreadExtensionsRegistry

    public static void setThreadExtensionsRegistry(ExtensionsRegistry extensionsRegistry)

  Sets the thread extensions registry.

  Parameters:
    `extensionsRegistry` -
  See Also:
    `getExtensionsRegistry()`

### resetThreadExtensionsRegistry

    public static void resetThreadExtensionsRegistry()

  Resets (to null) the thread extensions registry.

  See Also:
    `setThreadExtensionsRegistry(ExtensionsRegistry)`

### getExtensionsRegistry

    public static ExtensionsRegistry getExtensionsRegistry()

  Returns the extensions registry to be used in the current context.

  The method returns the thread extensions registry (as returned by `getThreadExtensionsRegistry()`) if it exists, and the system registry (as returned by `getSystemExtensionsRegistry()`) otherwise.

  Returns:
    the context extensions registry

### getExtensionsCacheKey

    public static java.lang.Object getExtensionsCacheKey()

  Returns an object that can be used as cache key for extension-related caches.

  Returns:
    an extension-related cache key

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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com