Class GenericElementHandlerEnviroment
- java.lang.Object
-
- net.sf.jasperreports.engine.export.GenericElementHandlerEnviroment
-
public final class GenericElementHandlerEnviroment extends Object
A class that provides access togeneric element handlers
.Generic element handler bundles are registered as JasperReports extensions of type
GenericElementHandlerBundle
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_HANDLERS_NOT_FOUND_FOR_NAMESPACE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<GenericElementHandlerBundle>
getBundles()
GenericElementHandler
getElementHandler(JRGenericElementType type, String exporterKey)
Returns a handler for a generic print element type and an exporter key.static GenericElementHandlerEnviroment
getInstance(JasperReportsContext jasperReportsContext)
protected List<GenericElementHandlerBundle>
loadBundles()
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_NAMESPACE
public static final String EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static GenericElementHandlerEnviroment getInstance(JasperReportsContext jasperReportsContext)
-
getElementHandler
public GenericElementHandler getElementHandler(JRGenericElementType type, String exporterKey)
Returns a handler for a generic print element type and an exporter key.The method first locates a
handler bundle
that matches the type namespace, and then usesGenericElementHandlerBundle.getHandler(String, String)
to resolve an export handler.- Parameters:
type
- the generic element typeexporterKey
- the exporter key- Returns:
- a generic print element handler
- Throws:
JRRuntimeException
- if a handler does not exist for the combination of element type and exporter key
-
getBundles
protected List<GenericElementHandlerBundle> getBundles()
-
loadBundles
protected List<GenericElementHandlerBundle> loadBundles()
-
-