Class GenericElementHandlerEnviroment
- java.lang.Object
-
- net.sf.jasperreports.engine.export.GenericElementHandlerEnviroment
-
public final class GenericElementHandlerEnviroment extends java.lang.ObjectA class that provides access togeneric element handlers.Generic element handler bundles are registered as JasperReports extensions of type
GenericElementHandlerBundlevia 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_HANDLERS_NOT_FOUND_FOR_NAMESPACE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,GenericElementHandlerBundle>getBundles()GenericElementHandlergetElementHandler(JRGenericElementType type, java.lang.String exporterKey)Returns a handler for a generic print element type and an exporter key.static GenericElementHandlerEnviromentgetInstance(JasperReportsContext jasperReportsContext)protected java.util.Map<java.lang.String,GenericElementHandlerBundle>loadBundles()
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_NAMESPACE
public static final java.lang.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, java.lang.String exporterKey)
Returns a handler for a generic print element type and an exporter key.The method first locates a
handler bundlethat 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 java.util.Map<java.lang.String,GenericElementHandlerBundle> getBundles()
-
loadBundles
protected java.util.Map<java.lang.String,GenericElementHandlerBundle> loadBundles()
-
-