public interface Renderer
For example, an HTML Renderer renders a LibraryObject as HTML; an XML Renderer renders a LibraryObject as XML. The rendered representation is read-only and non-persistent. It is accessed as an InputStream or a Reader.
Any LibraryObject can be rendered. Typically, the rendered representation is some combination of attribute values and static bytes or characters, according to the Renderer's algorithm. For Documents, the rendered representation may also include content.
Not every LibraryObject can be rendered by every Renderer. For example, a FolderItemRenderer might only be able to render Folders. A Renderer will throw an exception if requested to render a LibraryObject that it cannot handle.
Renderers must provide a constructor with the following signature:
Renderer(S_LibrarySession) throws IfsException
.
Modifier and Type | Method and Description |
---|---|
Reader |
renderAsReader(S_LibraryObject lo,
Hashtable options)
Renders the specified LibraryObject as a Reader.
|
InputStream |
renderAsStream(S_LibraryObject lo,
Hashtable options)
Renders the specified LibraryObject as an InputStream.
|
InputStream renderAsStream(S_LibraryObject lo, Hashtable options) throws IfsException
lo
- the object to be renderedoptions
- any Renderer-specific optionsIfsException
- (IFS-12401) if the operation failsReader renderAsReader(S_LibraryObject lo, Hashtable options) throws IfsException
lo
- the object to be renderedoptions
- any Renderer-specific optionsIfsException
- (IFS-12402) if the operation failsCopyright © 2023. All rights reserved.