Class DefaultElementHandlerBundle
java.lang.Object
net.sf.jasperreports.engine.export.DefaultElementHandlerBundle
- All Implemented Interfaces:
GenericElementHandlerBundle
The default
GenericElementHandlerBundle
implementation.
This implementation uses a map
to keep element handlers.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the map of element handlers.getHandler
(String elementName, String exporterKey) Uses the handler map to locate a handler for the element name and exporter key.Returns the namespace of this bundle.void
setElementHandlers
(Map<String, Map<String, GenericElementHandler>> elementHandlers) Sets the map of element handlers.void
setNamespace
(String namespace) Sets the namespace of this bundle.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_TYPE
- See Also:
-
-
Constructor Details
-
DefaultElementHandlerBundle
public DefaultElementHandlerBundle()
-
-
Method Details
-
getHandler
Uses the handler map to locate a handler for the element name and exporter key.- Specified by:
getHandler
in 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
Description copied from interface:GenericElementHandlerBundle
Returns the namespace of this bundle.- Specified by:
getNamespace
in interfaceGenericElementHandlerBundle
- Returns:
- the bundle namespace
-
setNamespace
Sets the namespace of this bundle.- Parameters:
namespace
- the namespace- See Also:
-
getElementHandlers
Returns the map of element handlers.- Returns:
- the map of element handlers
-
setElementHandlers
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
-