public class DefaultElementHandlerBundle extends Object implements GenericElementHandlerBundle
GenericElementHandlerBundle implementation.
This implementation uses a map to keep element handlers.
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_TYPE |
| Constructor and Description |
|---|
DefaultElementHandlerBundle() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Map<String,GenericElementHandler>> |
getElementHandlers()
Returns the map of element handlers.
|
GenericElementHandler |
getHandler(String elementName,
String exporterKey)
Uses the handler map to locate a handler for the element name
and exporter key.
|
String |
getNamespace()
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.
|
public static final String EXCEPTION_MESSAGE_KEY_HANDLERS_NOT_FOUND_FOR_TYPE
public GenericElementHandler getHandler(String elementName, String exporterKey)
getHandler in interface GenericElementHandlerBundleelementName - the element type nameexporterKey - the exporter keyJRRuntimeException - if no handler is foundpublic String getNamespace()
GenericElementHandlerBundlegetNamespace in interface GenericElementHandlerBundlepublic void setNamespace(String namespace)
namespace - the namespacegetNamespace()public Map<String,Map<String,GenericElementHandler>> getElementHandlers()
public void setElementHandlers(Map<String,Map<String,GenericElementHandler>> elementHandlers)
The map needs to be a two level map, the first one indexed by element names and the second level indexed by exporter keys.
elementHandlers - the map of element handlersCopyright © 2017. All rights reserved.