|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.beans.CMBDocumentServices
The CMBDocumentServices bean provides services to render, convert, and manipulate the pages of one or more documents. It takes a CMBItem for a document and creates a CMBDocument object representing the document. Methods on CMBDocument then allow for conversion of the document or pages of the document. CMBDocumentServices manages pluggable engines which interpret the documents and render or convert the pages.
To use CMBDocumentServices:
Summary of properties and events:
imported properties traceEnabled, defaulting off, will not veto exported properties none standalone properties conversionProperties, dataManagement, documents, engineProperties, preferredFormats, preferredPageFormats interested in events CMBDocumentRequestEvent - to perform functions PropertyChangeEvent - to import traceEnabled source of events CMBDocumentReplyEvent - to reply the request CMBExceptionEvent - to post exception CMBTraceEvent - to let logger traceSupported Conversions
The following tables summarize the conversion supported by default (using the supplied conversion engines). Additional conversion capabilities can be plugged in using by creating classes that extend CMBDocumentEngine and registering them with CMBDocumentServices using setEngineProperties():
On Windows NT:
MIME Type | Engine | Paginated | With
Annotations |
Converted To |
application/afp | CMBODDocumentEngine | Yes1 | No | text/html |
application/afp | CMBODDocumentEngine | No | No | application/afp2 |
application/lin
application/ondemand line |
CMBODDocumentEngine | No | No | text/plain3 |
image/tiff
image/tif image/gif image/jpeg text/plain application/vnd.ibm.modcap |
CMBMSTechDocumentEngine | Yes | Yes | image/gif
image/jpeg |
text/enriched text/plain text/richtext text/rtf image/gif image/jpeg image/bmp image/pcx text/html application/vnd.lotus-1-2-3 application/vnd.ms-excel application/wordperfect5.1 application/msword application/vnd.lotus-wordpro |
CMBMSTechInsoEngine | Yes | Yes | image/gif or image/jpeg |
text/url | CMBJavaDocumentEngine | No | No | text/html4 |
On AIX:
MIME Type | Engine | Paginated | With
Annotations |
Converted To |
application/afp | CMBODDocumentEngine | No | No | application/afp2 |
image/tiff
image/tif image/gif image/jpeg text/plain application/vnd.ibm.modcap |
CMBMSTechDocumentEngine | Yes | Yes | image/gif
image/jpeg |
image/gif
image/jpeg |
CMBJavaDocumentEngine | No | No | image/jpeg |
text/url | CMBJavaDocumentEngine | No | No | text/html |
Notes:
Specifying Conversion Preferences
There are three properties on CMBDocumentServices that are used together to determine the type of conversion that will occur for each document type:
Engine Properties
Individual document conversion engines may have special properties. These can be specified using the EngineProperties property. See the reference for each of the document engine classes for details on the specific properties supported by each engine.
The default value for EngineProperties:
ENGINES = 4 ENGINE1_CLASSNAME = com.ibm.mm.viewer.CMBODDocumentEngine ENGINE2_CLASSNAME = com.ibm.mm.viewer.mstech.CMBMSTechDocumentEngine ENGINE3_CLASSNAME = com.ibm.mm.viewer.inso.CMBMSTechInsoEngine ENGINE4_CLASSNAME = com.ibm.mm.viewer.CMBJavaDocumentEngine
ENGINES = 3 ENGINE1_CLASSNAME = com.ibm.mm.viewer.CMBODDocumentEngine ENGINE2_CLASSNAME = com.ibm.mm.viewer.mstech.CMBMSTechDocumentEngine ENGINE3_CLASSNAME = com.ibm.mm.viewer.CMBJavaDocumentEngine
getEngineProperties
to get the default properties, then add values to the Properties object returned, and
use setEngineProperties
to update the properties. Otherwise, your settings
will override the defaults.
Engine properties must be updated before using any other methods in CMBDocumentServices for the properties to take effect.
CMBODDocumentEngine
,
CMBJavaDocumentEngine
, Serialized FormConstructor Summary | |
CMBDocumentServices()
Constructor. |
Method Summary | |
void |
addCMBDocumentReplyListener(CMBDocumentReplyListener listener)
Register a listener of CMBDocumentReplyEvents. |
void |
addCMBExceptionListener(CMBExceptionListener listener)
Register a listener of CMBExceptionEvents. |
void |
addCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent registration method. |
void |
dropAllDocuments()
Terminates processing of all documents by document services. |
void |
dropDocument(CMBDocument document)
Terminates processing of a document by document services. |
CMBAnnotationServices |
getAnnotationServices()
Returns the instance of CMBAnnotationServices. |
java.util.Properties |
getConversionProperties()
Returns the conversion properties. |
CMBDataManagement |
getDataManagement()
Returns the data management bean associated with this document services. |
CMBDocumentReplyEvent |
getDocumentReplyEvent()
Returns the last document reply event fired. |
CMBDocument[] |
getDocuments()
Returns the list of documents being processed. |
java.util.Properties |
getEngineProperties()
Returns the engine properties. |
CMBExceptionEvent |
getExceptionEvent()
Returns the last exception event fired. |
java.lang.String[] |
getPreferredFormats()
Returns the preferred formats for converted documents. |
java.lang.String[] |
getPreferredPageFormats()
Returns the preferred page formats for converted pages of documents. |
CMBStreamingDocServices |
getStreamingDocServices()
Returns the instance of CMBStreamingDocServices. |
boolean |
getTraceEnabled()
Returns true if tracing is enabled. |
CMBTraceEvent |
getTraceEvent()
Returns the last trace event fired. |
CMBDocument |
loadDocument(CMBItem item)
Initiates processing of a document by document services. |
void |
onCMBDocumentRequest(CMBDocumentRequestEvent evt)
Handles document request events. |
void |
removeCMBDocumentReplyListener(CMBDocumentReplyListener listener)
Unregister a listener of CMBDocumentReplyEvents. |
void |
removeCMBExceptionListener(CMBExceptionListener listener)
Unregister a listener of CMBExceptionEvents. |
void |
removeCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent unregistration method. |
void |
setConversionProperties(java.util.Properties properties)
Sets the conversion properties. |
void |
setDataManagement(CMBDataManagement dataManagement)
Sets the data management bean associated with this document services. |
void |
setEngineProperties(java.util.Properties engineProperties)
Sets the engine properties. |
void |
setPreferredFormats(java.lang.String[] formats)
Sets the preferred formats for converted documents, in the order of most preferred to least preferred. |
void |
setPreferredPageFormats(java.lang.String[] pageFormats)
Sets the preferred page formats for converted pages of documents, in the order of most preferred to least preferred. |
void |
setTraceEnabled(boolean traceEnabled)
Sets tracing on the bean. |
void |
terminate()
Terminates all the engines used by document services. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMBDocumentServices()
Method Detail |
public CMBDataManagement getDataManagement()
public void setDataManagement(CMBDataManagement dataManagement)
dataManagement
- an instance of CMBDataManagementpublic java.util.Properties getEngineProperties()
setEngineProperties(Properties)
public void setEngineProperties(java.util.Properties engineProperties)
engineProperties
- a Properties object defining the document engines to load and their
initialization properties. The properties have the following names:
getEngineProperties()
to get
the current engine properties, and add properties using properties.put()
.public CMBDocument[] getDocuments()
public java.lang.String[] getPreferredFormats()
public void setPreferredFormats(java.lang.String[] formats)
formats
- the MIME types for the preferred formats.public java.lang.String[] getPreferredPageFormats()
public void setPreferredPageFormats(java.lang.String[] pageFormats)
formats
- the MIME types for the preferred formats.public java.util.Properties getConversionProperties()
setConversionProperties(Properties)
public void setConversionProperties(java.util.Properties properties)
public boolean getTraceEnabled()
public void setTraceEnabled(boolean traceEnabled)
traceEnabled
- if true, tracing is enabled on the bean.public CMBDocument loadDocument(CMBItem item) throws CMBException, CMBItemNotExistException, CMBNoConnectionException, CMBItemNotSetException, CMBNoContentException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.Exception
item
- the CMBItem representing the document to be processed.public void dropDocument(CMBDocument document)
document
- the CMBDocument instance for the document being terminated. Any calls
to methods on the document will fail after this call.public void dropAllDocuments()
public void terminate()
public void onCMBDocumentRequest(CMBDocumentRequestEvent evt)
onCMBDocumentRequest
in interface CMBDocumentRequestListener
public void addCMBTraceListener(CMBTraceListener listener)
listener
- listener to be registeredpublic void removeCMBTraceListener(CMBTraceListener listener)
listener
- listener to be unregisteredpublic void addCMBDocumentReplyListener(CMBDocumentReplyListener listener)
listener
- listener to be registered.public void removeCMBDocumentReplyListener(CMBDocumentReplyListener listener)
listener
- listener to be unregistered.public void addCMBExceptionListener(CMBExceptionListener listener)
listener
- listener to be registered.public void removeCMBExceptionListener(CMBExceptionListener listener)
listener
- listener to be unregistered.public CMBDocumentReplyEvent getDocumentReplyEvent()
public CMBTraceEvent getTraceEvent()
public CMBExceptionEvent getExceptionEvent()
public CMBStreamingDocServices getStreamingDocServices()
public CMBAnnotationServices getAnnotationServices()
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |