Package com.jadice.web.export.server
Interface Exporter
- All Known Subinterfaces:
JPSExporter
public interface Exporter
A representation of an exporter, that writes the output to an
Example
OutputStream
.
Exporter
may be used to generate an export based on a collection of pages.
The most common way to access an Exporter
instance is, by using the
ExporterFactory
. The ExporterFactory
defines some static methods to create
instances of commonly used Exporter
instances.
Example
Document sourceDocument = // ... initialized somewhere else OutputStream output = // ... the designated output Exporter psExporter = ExporterFactory.createPostscriptExporter(); final Lock lock = sourceDocument.getPages().getReadWriteLock().getReadLock(); lock.lock(); try { // add all pages of a given document to the exporter psExporter.getSourcePages().addAll(sourceDocument.getPages()); } finally { lock.unlock(); } exporter.export(output); output.close();
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addExportStatusListener
(ExportStatusListener exportStatusListener) void
export
(OutputStream output) Perform the export.void
export
(org.jadice.util.base.Provider<OutputStream, IOException> output) Perform the export.org.jadice.util.glazedlists.EventList
<Page> AEventList
withpages
that shall be printed.boolean
Determines, whether the givenExporter
instance is available.default void
default void
setRenderControlsInventory
(com.levigo.jadice.document.render.RenderControlsInventory renderControlsInventory)
-
Field Details
-
statusListeners
-
-
Method Details
-
isAvailable
boolean isAvailable()Determines, whether the givenExporter
instance is available. In some cases and on some systems not everyExporter
is available due to numerous restrictions like different implementations of the JavaVM.- Returns:
true
if theExporter
instance is available and can be used.
-
getSourcePages
org.jadice.util.glazedlists.EventList<Page> getSourcePages()AEventList
withpages
that shall be printed.The contents of this
EventList
are the sourcepages
that will be printed.- Returns:
- never
null
. A mutableEventList
ofpages
-
export
Perform the export.- Parameters:
output
-- Throws:
Exception
-
export
Perform the export.- Parameters:
output
-- Throws:
Exception
-
addExportStatusListener
-
onExportFailed
default void onExportFailed() -
setRenderControlsInventory
default void setRenderControlsInventory(com.levigo.jadice.document.render.RenderControlsInventory renderControlsInventory)
-