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 Details

    • TextStylingRegistry

      public TextStylingRegistry()
  • Method Details

    • getRegistry

      public static TextStylingRegistry getRegistry()
    • registerInstance

      protected boolean registerInstance(ITextStylingDocumentHandlerFactoryDiscovery discovery)
      Specified by:
      registerInstance in class fr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
    • doDispose

      protected void doDispose()
      Specified by:
      doDispose in class fr.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: