Package net.sf.jasperreports.engine.part
Class PartComponentsEnvironment
- java.lang.Object
-
- net.sf.jasperreports.engine.part.PartComponentsEnvironment
-
public final class PartComponentsEnvironment extends java.lang.ObjectA class that provides access tocomponent bundles.Component bundles are registered as JasperReports extensions of type
PartComponentsBundlevia the central extension framework (seeExtensionsEnvironment).- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_PART_COMPONENTS_BUNDLE_NOT_REGISTERED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,PartComponentsBundle>findBundles()PartComponentsBundlegetBundle(java.lang.String namespace)Returns a component bundle that corresponds to a namespace.java.util.Collection<PartComponentsBundle>getBundles()Returns the set of all component bundles present in the registry.protected java.util.Map<java.lang.String,PartComponentsBundle>getCachedBundles()static PartComponentsEnvironmentgetInstance(JasperReportsContext jasperReportsContext)PartComponentManagergetManager(ComponentKey componentKey)Returns a component manager that corresponds to a particular component type key.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_PART_COMPONENTS_BUNDLE_NOT_REGISTERED
public static final java.lang.String EXCEPTION_MESSAGE_KEY_PART_COMPONENTS_BUNDLE_NOT_REGISTERED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static PartComponentsEnvironment getInstance(JasperReportsContext jasperReportsContext)
-
getBundles
public java.util.Collection<PartComponentsBundle> 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,PartComponentsBundle> getCachedBundles()
-
findBundles
protected java.util.Map<java.lang.String,PartComponentsBundle> findBundles()
-
getBundle
public PartComponentsBundle 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 PartComponentManager 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
-
-