public interface

DocumentAccessProvider

com.priint.comet.renderer.io.DocumentAccessProvider
Known Indirect Subclasses

Class Overview

DocumentAccessProvider interface

Purpose of DocumentAccessProvider implementations is to handle all aspects of accessing document data in the client application and make it available to renderer processing the document referred by this DocumentAccessProvider.

Summary

Nested Classes
class DocumentAccessProvider.Checkout  
class DocumentAccessProvider.DocumentAccessProviderBuilder  
Public Methods
abstract void afterClose(OpenedDocument document, long fileSystemPropagationDelayMillis, long fileSystemPropagationProbeMillis)

Cleans up after document processing has finished

Called, after a document has been closed by the renderer.

abstract void beforeOpen(Configuration configuration)

Prepares the document for processing with a renderer

Called before document is opened by a renderer.

abstract static DocumentAccessProvider.DocumentAccessProviderBuilder builder()
abstract String getConnectionName()
abstract Options getDocumentOptions()

Gets the default options to add, when an operation is applied to a document utilizing this DocumentAccessProvider

abstract Class<? extends DocumentType> getDocumentType()

Gets the type of the document referred by this DocumentAccessProvider

Gets the type of the document referred by this DocumentAccessProvider, e.g.

abstract String getDocumentUID()

Gets the document UID

Gets the document UID as passed to the renderer.

Public Methods

public abstract void afterClose (OpenedDocument document, long fileSystemPropagationDelayMillis, long fileSystemPropagationProbeMillis)

Cleans up after document processing has finished

Called, after a document has been closed by the renderer.
This method should execute cleanup tasks, after document processing has finished, e.g.

  • remove temporary files
  • download file data from a network drive

Parameters
document document that has just been closed
fileSystemPropagationDelayMillis how long (in millis) should this procedure wait at most for files to become available to it
fileSystemPropagationProbeMillis how often (in millis) should any IO operations be retried
Throws
RendererException if cleaning up after closing fails

public abstract void beforeOpen (Configuration configuration)

Prepares the document for processing with a renderer

Called before document is opened by a renderer.
This method should prepare a document for processing with a renderer, e.g.

  • copy the document file to a temporary file
  • read data from a InputStream and write to a regular file
  • upload file to a network drive accessible for the renderer
or similar.

Parameters
configuration global configuration stating (among others) what file system delays should be taken into account when preparing a document for opening.
Throws
RendererException if preparing the document fails. If any exception is thrown during beforeOpen, rendering this document is aborted.

public static abstract DocumentAccessProvider.DocumentAccessProviderBuilder builder ()

public abstract String getConnectionName ()

public abstract Options getDocumentOptions ()

Gets the default options to add, when an operation is applied to a document utilizing this DocumentAccessProvider

Returns
  • default options to add, when an operation is applied to a document utilizing this DocumentAccessProvider

public abstract Class<? extends DocumentType> getDocumentType ()

Gets the type of the document referred by this DocumentAccessProvider

Gets the type of the document referred by this DocumentAccessProvider, e.g. com.priint.comet.renderer.pdf.W2MLDocumentType.class The type is required to determine an appropriate renderer implementation to process this document.

public abstract String getDocumentUID ()

Gets the document UID

Gets the document UID as passed to the renderer.

The UID must allow the renderer to uniquely identify the document. Valid UIDs include

  • a file system path resolvable for the renderer
  • an URI denoting a file or other resource
  • any other ID, which is unique in the renderer context

Returns
  • unique ID of the document