Enterprise Information Portal APIs

com.ibm.mm.viewer
Class CMBDocumentEngineCallbacks

java.lang.Object
  |
  +--com.ibm.mm.viewer.CMBDocumentEngineCallbacks

public abstract class CMBDocumentEngineCallbacks
extends java.lang.Object

This class defines callback methods that allow document engines to retrieve additional resources related to a document. An instance of this class is given to a document engine when it is initialized.

Since:
7.1
See Also:
CMBDocumentEngine

Constructor Summary
CMBDocumentEngineCallbacks()
           
 
Method Summary
abstract  java.io.InputStream getAnnotation(java.lang.Object hDocument, int annotationNumber)
          Retrieves an additional annotation blob for documents that store each annotation in a separate blob.
abstract  java.io.InputStream getForm(java.lang.Object hDocument, java.lang.String formName)
          Retrieves a background image for a page.
 int getFormSize(java.lang.Object hDocument, java.lang.String formName)
          Retrieves the form size.
abstract  java.io.InputStream getPart(java.lang.Object hDocument, int partNumber, java.lang.StringBuffer outMimeType)
          Retrieves an additional part of a multi-part document.
 int getPartSize(java.lang.Object hDocument, int partNumber)
          Retrieves the size of the part specified by the part number.
abstract  java.io.InputStream getResources(java.lang.Object hDocument)
          Retrieves the resources for a document.
abstract  void trace(java.lang.String message)
          Writes a trace message.
abstract  boolean traceEnabled()
          Returns true if tracing is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMBDocumentEngineCallbacks

public CMBDocumentEngineCallbacks()
Method Detail

getForm

public abstract java.io.InputStream getForm(java.lang.Object hDocument,
                                            java.lang.String formName)
Retrieves a background image for a page.
Parameters:
hDocument - engine's handle to document
formName - the name of the form

getFormSize

public int getFormSize(java.lang.Object hDocument,
                       java.lang.String formName)
Retrieves the form size.
Parameters:
hDocument - engine's handle to document
formName - the name of the form

getPart

public abstract java.io.InputStream getPart(java.lang.Object hDocument,
                                            int partNumber,
                                            java.lang.StringBuffer outMimeType)
Retrieves an additional part of a multi-part document.
Parameters:
hDocument - engine's handle to document
partNumber - the index of the part (zero is the first part)
outMimeType - out parameter in which the mime type of the part is returned. can be null if caller is not interested in the mime type of the part
Returns:
InputStream to the part requested or null if that part doesnt exist

getPartSize

public int getPartSize(java.lang.Object hDocument,
                       int partNumber)
Retrieves the size of the part specified by the part number.
Parameters:
hDocument - engine's handle to document
partNumber - the index of the part (zero is the first part)
Returns:
int the part size or 0 if size is unknown.

getAnnotation

public abstract java.io.InputStream getAnnotation(java.lang.Object hDocument,
                                                  int annotationNumber)
Retrieves an additional annotation blob for documents that store each annotation in a separate blob.
Parameters:
hDocument - engine's handle to document
annotationNumber - the index of the annotation (zero is the first annotation)
Returns:
InputStream to the annotation blob or null if that annotation doesnt exist

getResources

public abstract java.io.InputStream getResources(java.lang.Object hDocument)
Retrieves the resources for a document. Resources are usually background images for the pages of the document, stored separately from the document and shared across multiple documents.
Parameters:
hDocument - engine's handle to document
Returns:
InputStream to the resources for the document

traceEnabled

public abstract boolean traceEnabled()
Returns true if tracing is enabled.

trace

public abstract void trace(java.lang.String message)
Writes a trace message.
Parameters:
message - the message to be logged in the trace

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.