|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.extensions.DefaultExtensionsRegistry
public class DefaultExtensionsRegistry
The default extension registry
implementation.
The implementation builds an extension registry by scanning the context
classloader for resources named jasperreports_extension.properties
.
Each such resource is loaded as a properties file, and properties that start
with net.sf.jasperreports.extension.registry.factory.
are identified.
Each such property should have as value the name of a
ExtensionsRegistryFactory
implementation. The registry factory class is
instantiated, and
ExtensionsRegistryFactory.createRegistry(String, JRPropertiesMap)
is called on it, using the propery suffix as registry ID and passing the
properties map. The registry factory can collect properties that apply to the
specific registry by using a property prefix obtain by appending the registry ID
to "net.sf.jasperreports.extension.
".
If instantiating an extension registry results in an exception, the registry is skipped and an error message is logged.
Field Summary | |
---|---|
static java.lang.String |
EXTENSION_RESOURCE_NAME
The name of property file resources that are used to load JasperReports extensions. |
static java.lang.String |
PROPERTY_REGISTRY_FACTORY_PREFIX
The property prefix of extension registry factories. |
static java.lang.String |
PROPERTY_REGISTRY_PREFIX
A prefix that can be used to provide registry-specific properties, by appending the registry ID and a fixed property suffix to it. |
Constructor Summary | |
---|---|
DefaultExtensionsRegistry()
|
Method Summary | ||
---|---|---|
protected java.util.Map<java.net.URL,java.util.List<ExtensionsRegistry>> |
getClassLoaderRegistries(java.lang.ClassLoader classLoader)
|
|
|
getExtensions(java.lang.Class<T> extensionType)
Returns a list of extension objects for a specific extension type. |
|
protected java.util.List<ExtensionsRegistry> |
getRegistries()
|
|
protected ExtensionsRegistry |
instantiateRegistry(JRPropertiesMap props,
java.lang.String registryId,
java.lang.String factoryClass)
|
|
protected java.util.List<ClassLoaderResource> |
loadExtensionPropertyResources()
|
|
protected java.util.List<ExtensionsRegistry> |
loadRegistries()
|
|
protected java.util.List<ExtensionsRegistry> |
loadRegistries(java.net.URL url)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXTENSION_RESOURCE_NAME
public static final java.lang.String PROPERTY_REGISTRY_FACTORY_PREFIX
public static final java.lang.String PROPERTY_REGISTRY_PREFIX
Constructor Detail |
---|
public DefaultExtensionsRegistry()
Method Detail |
---|
public <T> java.util.List<T> getExtensions(java.lang.Class<T> extensionType)
ExtensionsRegistry
getExtensions
in interface ExtensionsRegistry
T
- generic extension typeextensionType
- the extension type
protected java.util.List<ExtensionsRegistry> getRegistries()
protected java.util.List<ExtensionsRegistry> loadRegistries()
protected java.util.List<ClassLoaderResource> loadExtensionPropertyResources()
protected java.util.Map<java.net.URL,java.util.List<ExtensionsRegistry>> getClassLoaderRegistries(java.lang.ClassLoader classLoader)
protected java.util.List<ExtensionsRegistry> loadRegistries(java.net.URL url)
protected ExtensionsRegistry instantiateRegistry(JRPropertiesMap props, java.lang.String registryId, java.lang.String factoryClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |