Class DefaultElementHandlerBundle
- java.lang.Object
-
- net.sf.jasperreports.engine.export.DefaultElementHandlerBundle
-
- All Implemented Interfaces:
GenericElementHandlerBundle
public class DefaultElementHandlerBundle extends java.lang.Object implements GenericElementHandlerBundle
The defaultGenericElementHandlerBundleimplementation.This implementation uses a
mapto keep element handlers.- 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_TYPE
-
Constructor Summary
Constructors Constructor Description DefaultElementHandlerBundle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>>getElementHandlers()Returns the map of element handlers.GenericElementHandlergetHandler(java.lang.String elementName, java.lang.String exporterKey)Uses the handler map to locate a handler for the element name and exporter key.java.lang.StringgetNamespace()Returns the namespace of this bundle.voidsetElementHandlers(java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> elementHandlers)Sets the map of element handlers.voidsetNamespace(java.lang.String namespace)Sets the namespace of this bundle.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_TYPE
public static final java.lang.String EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHandler
public GenericElementHandler getHandler(java.lang.String elementName, java.lang.String exporterKey)
Uses the handler map to locate a handler for the element name and exporter key.- Specified by:
getHandlerin interfaceGenericElementHandlerBundle- Parameters:
elementName- the element type nameexporterKey- the exporter key- Returns:
- a generic element handler for the combination
- Throws:
JRRuntimeException- if no handler is found
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:GenericElementHandlerBundleReturns the namespace of this bundle.- Specified by:
getNamespacein interfaceGenericElementHandlerBundle- Returns:
- the bundle namespace
-
setNamespace
public void setNamespace(java.lang.String namespace)
Sets the namespace of this bundle.- Parameters:
namespace- the namespace- See Also:
getNamespace()
-
getElementHandlers
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> getElementHandlers()
Returns the map of element handlers.- Returns:
- the map of element handlers
-
setElementHandlers
public void setElementHandlers(java.util.Map<java.lang.String,java.util.Map<java.lang.String,GenericElementHandler>> elementHandlers)
Sets the map of element handlers.The map needs to be a two level map, the first one indexed by element names and the second level indexed by exporter keys.
- Parameters:
elementHandlers- the map of element handlers
-
-