Package org.fugerit.java.doc.base.facade
Class DocHandlerFacade
java.lang.Object
org.fugerit.java.doc.base.facade.DocHandlerFacade
- All Implemented Interfaces:
Serializable
DocHandlerFacade
Starting from version 0.2.X registration of type handlers changes :
Now is possible to register a type handler both for type (ex. pdf) or key (ex. pdf-fop, pdf-itext, pdf-box)
- Author:
- fugerit
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddirect(Reader xml, String type, OutputStream os) voidfindHandler(String id) findHandlerRequired(String handlerId) Handler lookup by id, throws a ConfigRuntimeException if not found.voidhandlers()org.fugerit.java.core.util.collection.ListMapStringKey<DocTypeHandler>listHandlersForType(String type) voidvoidregisterHandler(DocTypeHandler handler) voidregisterHandler(DocTypeHandler handler, boolean registerForType, boolean errorOnDuplicate) voidregisterHandlerAndId(String id, DocTypeHandler handler) voidregisterHandlerAndId(String id, DocTypeHandler handler, boolean allowDuplicatedId)
-
Field Details
-
DEFAULT_REGISTER_FOR_TYPE
public static final boolean DEFAULT_REGISTER_FOR_TYPE- See Also:
-
DEFAULT_ERROR_ON_DUPLICATE
public static final boolean DEFAULT_ERROR_ON_DUPLICATE- See Also:
-
-
Constructor Details
-
DocHandlerFacade
public DocHandlerFacade()
-
-
Method Details
-
registerHandler
public void registerHandler(DocTypeHandler handler, boolean registerForType, boolean errorOnDuplicate) throws Exception - Throws:
Exception
-
registerHandlerAndId
- Throws:
Exception
-
registerHandlerAndId
public void registerHandlerAndId(String id, DocTypeHandler handler, boolean allowDuplicatedId) throws Exception - Throws:
Exception
-
registerHandler
- Throws:
Exception
-
findHandlerRequired
Handler lookup by id, throws a ConfigRuntimeException if not found.- Parameters:
handlerId- the id of the handler- Returns:
- the handler throws ConfigRuntimeException if the handler is not found
-
handle
- Throws:
Exception
-
direct
- Throws:
Exception
-
direct
- Throws:
Exception
-
findHandler
-
listHandlersForType
public org.fugerit.java.core.util.collection.ListMapStringKey<DocTypeHandler> listHandlersForType(String type) -
handlers
-
logHandlersInfo
public void logHandlersInfo()
-