Class DocxRenderer.Builder
- java.lang.Object
-
- com.vladsch.flexmark.util.data.DataSet
-
- com.vladsch.flexmark.util.data.MutableDataSet
-
- com.vladsch.flexmark.util.builder.BuilderBase<DocxRenderer.Builder>
-
- com.vladsch.flexmark.docx.converter.DocxRenderer.Builder
-
- All Implemented Interfaces:
RendererBuilder
,DataHolder
,MutableDataHolder
,MutableDataSetter
- Enclosing class:
- DocxRenderer
public static class DocxRenderer.Builder extends BuilderBase<DocxRenderer.Builder> implements RendererBuilder
Builder for configuring anDocxRenderer
. See methods for default configuration.
-
-
Field Summary
-
Fields inherited from interface com.vladsch.flexmark.util.data.DataHolder
NULL
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(DataHolder options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocxRenderer.Builder
attributeProviderFactory(AttributeProviderFactory attributeProviderFactory)
Add an attribute provider for adding/changing HTML attributes to the rendered tags.DocxRenderer
build()
DocxRenderer.Builder
contentResolverFactory(UriContentResolverFactory contentResolverFactory)
Add a factory for resolving URI to contentDocxRenderer.Builder
htmlIdGeneratorFactory(HeaderIdGeneratorFactory htmlIdGeneratorFactory)
Add a factory for generating the header id attribute from the header's textDocxRenderer.Builder
linkResolverFactory(LinkResolverFactory linkResolverFactory)
Add a factory for resolving links in markdown to URI used in renderingprotected boolean
loadExtension(Extension extension)
Load extension if it is validDocxRenderer.Builder
nodeFormatterFactory(NodeDocxRendererFactory nodeDocxRendererFactory)
Add a factory for resolving link text to URIprotected void
preloadExtension(Extension extension)
Preload operation for extension, perform any data config and other operation needed for loading extensionprotected void
removeApiPoint(java.lang.Object apiPoint)
Remove apiPoint from state information-
Methods inherited from class com.vladsch.flexmark.util.builder.BuilderBase
addExtensionApiPoint, extensions, get, loadExtensions, removeExtensions, set, set
-
Methods inherited from class com.vladsch.flexmark.util.data.MutableDataSet
clear, getOrCompute, merge, remove, setAll, setFrom, setIn, toDataSet, toImmutable, toMutable
-
Methods inherited from class com.vladsch.flexmark.util.data.DataSet
aggregate, aggregate, aggregateActions, contains, equals, getAll, getKeys, hashCode, registerDataKeyAggregator, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.util.data.DataHolder
contains, getAll, getKeys, toDataSet, toImmutable, toMutable
-
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(@Nullable DataHolder options)
-
-
Method Detail
-
removeApiPoint
protected void removeApiPoint(@NotNull java.lang.Object apiPoint)
Description copied from class:BuilderBase
Remove apiPoint from state information- Specified by:
removeApiPoint
in classBuilderBase<DocxRenderer.Builder>
- Parameters:
apiPoint
- api point object
-
preloadExtension
protected void preloadExtension(@NotNull Extension extension)
Description copied from class:BuilderBase
Preload operation for extension, perform any data config and other operation needed for loading extension- Specified by:
preloadExtension
in classBuilderBase<DocxRenderer.Builder>
- Parameters:
extension
- to preload
-
loadExtension
protected boolean loadExtension(@NotNull Extension extension)
Description copied from class:BuilderBase
Load extension if it is valid- Specified by:
loadExtension
in classBuilderBase<DocxRenderer.Builder>
- Parameters:
extension
- to load- Returns:
- true if extension was loaded
-
build
@NotNull public DocxRenderer build()
- Specified by:
build
in classBuilderBase<DocxRenderer.Builder>
- Returns:
- the configured
DocxRenderer
-
nodeFormatterFactory
public DocxRenderer.Builder nodeFormatterFactory(NodeDocxRendererFactory nodeDocxRendererFactory)
Add a factory for resolving link text to URIIf multiple node renderers for the same node type are created, the one from the factory that was added first "wins". (This is how the rendering for core node types can be overridden; the default rendering comes last.)
- Parameters:
nodeDocxRendererFactory
- the factory for creating a node renderer- Returns:
this
-
linkResolverFactory
@NotNull public DocxRenderer.Builder linkResolverFactory(@NotNull LinkResolverFactory linkResolverFactory)
Add a factory for resolving links in markdown to URI used in rendering- Specified by:
linkResolverFactory
in interfaceRendererBuilder
- Parameters:
linkResolverFactory
- the factory for creating a node renderer- Returns:
this
-
contentResolverFactory
@NotNull public DocxRenderer.Builder contentResolverFactory(@NotNull UriContentResolverFactory contentResolverFactory)
Add a factory for resolving URI to content- Specified by:
contentResolverFactory
in interfaceRendererBuilder
- Parameters:
contentResolverFactory
- the factory for creating a node renderer- Returns:
this
-
attributeProviderFactory
@NotNull public DocxRenderer.Builder attributeProviderFactory(@NotNull AttributeProviderFactory attributeProviderFactory)
Add an attribute provider for adding/changing HTML attributes to the rendered tags.- Specified by:
attributeProviderFactory
in interfaceRendererBuilder
- Parameters:
attributeProviderFactory
- the attribute provider factory to add- Returns:
this
-
htmlIdGeneratorFactory
@NotNull public DocxRenderer.Builder htmlIdGeneratorFactory(@NotNull HeaderIdGeneratorFactory htmlIdGeneratorFactory)
Add a factory for generating the header id attribute from the header's text- Specified by:
htmlIdGeneratorFactory
in interfaceRendererBuilder
- Parameters:
htmlIdGeneratorFactory
- the factory for generating header tag id attributes- Returns:
this
-
-