public class HTMLExporter extends Object
This object represents the process of converting a composite data or MIME item from
an NSF note (usually via NSFNote
). It provides access to the HTML processor's
configuration options (via options(String...)
) as well as triggers for handling
of inline images and attachments.
Modifier and Type | Class and Description |
---|---|
static interface |
HTMLExporter.DoclinkHandler |
static interface |
HTMLExporter.InlineAttachmentHandler
When the converter comes across a rich text link, it will call an attached
InlineAttachmentHandler to convert the URL of the HTML anchor.
|
static interface |
HTMLExporter.InlineImageHandler
When the converter comes across an embedded image, it will call an attached
InlineImageHandler to handle the image data and return an anchor href.
|
Constructor and Description |
---|
HTMLExporter(NSFNote note,
String itemName) |
Modifier and Type | Method and Description |
---|---|
HTMLExporter |
doclinkHandler(HTMLExporter.DoclinkHandler doclinkHandler)
Sets the
HTMLExporter.DoclinkHandler to be triggered when processing encounters |
String |
export()
Process the item to convert it to HTML with the specified options and handlers.
|
HTMLExporter |
inlineAttachmentHandler(HTMLExporter.InlineAttachmentHandler inlineAttachmentHandler)
Sets the
HTMLExporter.InlineAttachmentHandler to be triggered when processing encounters
an inline file attachment in the rich text. |
HTMLExporter |
inlineImageHandler(HTMLExporter.InlineImageHandler inlineImageHandler)
Sets the
HTMLExporter.InlineImageHandler to be triggered when processing encounters
an inline image in the rich text. |
HTMLExporter |
options(String... htmlOptions)
Sets the HTMLOptions for the exporter.
|
static void |
setLogLevel(int logLevel) |
public static void setLogLevel(int logLevel)
public HTMLExporter options(String... htmlOptions)
HTMLSetHTMLOptions
in the Notes C
API reference for a description. For example:
String html = note.createHTMLExporter("Body") .options( "AutoClass=2", "RowAtATimeTableAlt=2", "SectionAlt=1", "XMLCompatibleHTML=1" ) .export();
htmlOptions
- The HTML exporter configuration stringspublic HTMLExporter inlineAttachmentHandler(HTMLExporter.InlineAttachmentHandler inlineAttachmentHandler)
HTMLExporter.InlineAttachmentHandler
to be triggered when processing encounters
an inline file attachment in the rich text.inlineAttachmentHandler
- The handler to set, or null
to unset an existing
handlerpublic HTMLExporter inlineImageHandler(HTMLExporter.InlineImageHandler inlineImageHandler)
HTMLExporter.InlineImageHandler
to be triggered when processing encounters
an inline image in the rich text.inlineImageHandler
- The handler to set, or null
to unset an existing
handlerpublic HTMLExporter doclinkHandler(HTMLExporter.DoclinkHandler doclinkHandler)
HTMLExporter.DoclinkHandler
to be triggered when processing encountersdoclinkHandler
- the handler to set, or null to unset an existing
handler
public String export() throws DominoException
DominoException
- if one of the underlying API functions throws an exceptionCopyright © 2014–2018. All rights reserved.