Class TextStylingRegistry
java.lang.Object
fr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
fr.opensagres.xdocreport.document.registry.TextStylingRegistry
public class TextStylingRegistry
extends fr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
Text styling registry to register
IDocumentHandler and transform some content from syntax (HTML, MediaWiki,
etc) to another syntax (docx, odt, etc) by using text styling transformer registered in the
TextStylingTransformerRegistry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDocumentHandler(String documentKind, String elementId, fr.opensagres.xdocreport.template.IContext context, String entryName) Create an instance of document handler for the given document kind.protected voidstatic TextStylingRegistryprotected booleantransform(String initialContent, String syntaxKind, boolean syntaxWithDirective, String documentKind, String elementId, fr.opensagres.xdocreport.template.IContext context, String entryName) Transform the given content written with the given syntaxKind (HTML, MediaWiki, etc) to another syntax defined by the document kind (docx, odt).Methods inherited from class fr.opensagres.xdocreport.core.registry.AbstractRegistry
dispose, initialize, initializeIfNeeded, onEndInitialization, onStartInitialization
-
Constructor Details
-
TextStylingRegistry
public TextStylingRegistry()
-
-
Method Details
-
getRegistry
-
registerInstance
- Specified by:
registerInstancein classfr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
-
doDispose
protected void doDispose()- Specified by:
doDisposein classfr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
-
transform
public ITransformResult transform(String initialContent, String syntaxKind, boolean syntaxWithDirective, String documentKind, String elementId, fr.opensagres.xdocreport.template.IContext context, String entryName) Transform the given content written with the given syntaxKind (HTML, MediaWiki, etc) to another syntax defined by the document kind (docx, odt).- Parameters:
content- the content to transform.syntaxKind- the syntax of the content.syntaxWithDirective- true if there is directive in the content and false otherwise.documentKind- the syntax to obtain after the transformation.- Returns:
-
createDocumentHandler
public IDocumentHandler createDocumentHandler(String documentKind, String elementId, fr.opensagres.xdocreport.template.IContext context, String entryName) Create an instance of document handler for the given document kind.- Parameters:
documentKind-- Returns:
-