fr.opensagres.xdocreport.document.registry
Class TextStylingRegistry
java.lang.Object
fr.opensagres.xdocreport.core.registry.AbstractRegistry<ITextStylingDocumentHandlerFactoryDiscovery>
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
.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextStylingRegistry
public TextStylingRegistry()
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.