Class ComponentsEnvironment
- java.lang.Object
-
- net.sf.jasperreports.engine.component.ComponentsEnvironment
-
public final class ComponentsEnvironment extends Object
A class that provides access tocomponent bundles
.Component bundles are registered as JasperReports extensions of type
ComponentsBundle
via the central extension framework (seeExtensionsEnvironment
).- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_COMPONENT_MANAGER_NOT_FOUND
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<ComponentsBundle>
findBundles()
Collection<ComponentsBundle>
getBundles()
Returns the set of all component bundles present in the registry.protected List<ComponentsBundle>
getCachedBundles()
String
getComponentName(Class<? extends Component> componentType)
static ComponentsEnvironment
getInstance(JasperReportsContext jasperReportsContext)
ComponentManager
getManager(Class<? extends Component> componentType)
Returns a component manager that corresponds to a particular component type.ComponentManager
getManager(Component component)
Returns a component manager that corresponds to a particular component.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_COMPONENT_MANAGER_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_COMPONENT_MANAGER_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static ComponentsEnvironment getInstance(JasperReportsContext jasperReportsContext)
-
getBundles
public Collection<ComponentsBundle> getBundles()
Returns the set of all component bundles present in the registry.- Returns:
- the set of component bundles
-
getCachedBundles
protected List<ComponentsBundle> getCachedBundles()
-
findBundles
protected List<ComponentsBundle> findBundles()
-
getManager
public ComponentManager getManager(Component component)
Returns a component manager that corresponds to a particular component.- Parameters:
component
- the component- Returns:
- the manager for the component type
- Throws:
JRRuntimeException
- if the registry does not contain the specified component
-
getManager
public ComponentManager getManager(Class<? extends Component> componentType)
Returns a component manager that corresponds to a particular component type.- Parameters:
componentType
- the component type- Returns:
- the manager for the component type
- Throws:
JRRuntimeException
- if the registry does not contain the specified component
-
-