net.sf.jasperreports.extensions
Class SpringExtensionsRegistry

java.lang.Object
  extended by net.sf.jasperreports.extensions.SpringExtensionsRegistry
All Implemented Interfaces:
ExtensionsRegistry

public class SpringExtensionsRegistry
extends java.lang.Object
implements ExtensionsRegistry

An extension registry which works by looking for beans of a specific extension type in a Spring beans factory.

Version:
$Id: SpringExtensionsRegistry.java 4595 2011-09-08 15:55:10Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Constructor Summary
SpringExtensionsRegistry(org.springframework.beans.factory.ListableBeanFactory beanFactory)
          Creates a Spring-based extension registry.
 
Method Summary
protected  java.lang.String[] findExtensionBeanNames(java.lang.Class<?> extensionType)
           
protected  java.lang.String[] getExtensionBeanNames(java.lang.Class<?> extensionType)
           
<T> java.util.List<T>
getExtensions(java.lang.Class<T> extensionType)
          Returns all beans that match the extension class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringExtensionsRegistry

public SpringExtensionsRegistry(org.springframework.beans.factory.ListableBeanFactory beanFactory)
Creates a Spring-based extension registry.

Parameters:
beanFactory - the Spring bean factory
Method Detail

getExtensions

public <T> java.util.List<T> getExtensions(java.lang.Class<T> extensionType)
Returns all beans that match the extension class.

Specified by:
getExtensions in interface ExtensionsRegistry
Type Parameters:
T - generic extension type
Parameters:
extensionType - the extension type
Returns:
a list of extension objects

getExtensionBeanNames

protected java.lang.String[] getExtensionBeanNames(java.lang.Class<?> extensionType)

findExtensionBeanNames

protected java.lang.String[] findExtensionBeanNames(java.lang.Class<?> extensionType)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com