fr.opensagres.xdocreport.document.registry
Class TextStylingRegistry

java.lang.Object
  extended by fr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
      extended by fr.opensagres.xdocreport.document.registry.TextStylingRegistry

public class TextStylingRegistry
extends 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
TextStylingRegistry()
           
 
Method Summary
 IDocumentHandler createDocumentHandler(String documentKind, String elementId, IContext context, String entryName)
          Create an instance of document handler for the given document kind.
protected  void doDispose()
           
static TextStylingRegistry getRegistry()
           
protected  boolean registerInstance(ITextStylingDocumentHandlerFactoryDiscovery discovery)
          Register the instance in the registry.
 ITransformResult transform(String initialContent, String syntaxKind, boolean syntaxWithDirective, String documentKind, String elementId, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextStylingRegistry

public TextStylingRegistry()
Method Detail

getRegistry

public static TextStylingRegistry getRegistry()

registerInstance

protected boolean registerInstance(ITextStylingDocumentHandlerFactoryDiscovery discovery)
Description copied from class: AbstractRegistry
Register the instance in the registry.

Specified by:
registerInstance in class AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
Returns:
true if instance cannot be registered and false otherwise.

doDispose

protected void doDispose()
Specified by:
doDispose in class AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>

transform

public ITransformResult transform(String initialContent,
                                  String syntaxKind,
                                  boolean syntaxWithDirective,
                                  String documentKind,
                                  String elementId,
                                  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,
                                              IContext context,
                                              String entryName)
Create an instance of document handler for the given document kind.

Parameters:
documentKind -
Returns:


Copyright © 2013. All rights reserved.