Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


waggle.common.modules.document
Interface XDocumentModule.Server

All Superinterfaces:
XAPIInterface, XAPIInterface.Server
Enclosing interface:
XDocumentModule

public static interface XDocumentModule.Server
extends XAPIInterface.Server

Server interface for the Documents Module API.


Nested Class Summary

 

Nested classes/interfaces inherited from interface waggle.core.api.XAPIInterface
XAPIInterface.Client, XAPIInterface.Server

 

Method Summary
 XDocumentInfo createDocument(XObjectID conversationID, String name, XAPIInputStream inputStream, String mimeType, long length)
          Create a new Document from an InputStream.
 XDocumentInfo createDocumentAttachment(XObjectID documentID, String name, XAPIInputStream inputStream, String mimeType, long length)
          Create a new Document attachment from an InputStream.
 XDocumentInfo createDocumentAttachmentString(XObjectID documentID, String name, String contentString, String mimeType)
          Create a new Document attachment from an InputStream.
 XDocumentInfo createDocumentString(XObjectID conversationID, String name, String contentString, String mimeType)
          Create a new Document from a String.
 void createVersion(XObjectID contentID, XAPIInputStream inputStream, String mimeType, long length)
          Create a new Version for a Content object.
 void createVersionString(XObjectID contentID, String string, String mimeType)
          Create a new Version for a Content object.
 XSearchResultsInfo findSimilar(XObjectID contentID, XDocumentSearchOrder orderBy)
          Find Similar content.
 InputStream getContent(XObjectID contentID)
          Read the content for a Content object.
 InputStream getContentRange(XObjectID contentID, long start, long end)
          Read the content for a Content object.
 XContentStringInfo getContentString(XObjectID contentID)
          Read the content for a Content object.
 XDocumentInfo getDocument(XObjectID contentID)
          Get a Document information.
 InputStream getPage(XObjectID contentID, int pageNumber)
          Read a page image for a Content object.
 InputStream getRendition(XObjectID contentID)
          Read the PDF rendition for a Content object.
 InputStream getThumbnail(XObjectID contentID)
          Read the thumbnail image for a Content object.
 XVersionInfo getVersion(XObjectID contentID)
          Return an ordered list of a Document's Versions.
 List<XVersionInfo> getVersions(XObjectID contentID)
          Return an ordered list of a Document's Versions.
 void lockDocument(XObjectID contentID, long lockMS)
          Lock a Document to the current User for some number of milliseconds.
 void removeDocument(XObjectID documentID)
          Remove a Document.
 void removeVersion(XObjectID versionID)
          Remove a Version.
 void unlockDocument(XObjectID contentID)
          Unlock on a Document.
 void unremoveDocument(XObjectID documentID)
          Un-remove a Document.
 void unremoveVersion(XObjectID versionID)
          Un-remove a Version.
 void updateVersion(XObjectID versionID, XUpdater updater)
          Update a Version.

 

Method Detail

createDocument

XDocumentInfo createDocument(XObjectID conversationID,
                             String name,
                             XAPIInputStream inputStream,
                             String mimeType,
                             long length)
Create a new Document from an InputStream.
Parameters:
conversationID - The Conversation.
name - The name.
inputStream - The InputStream containing the content.
mimeType - The mimetype of the content.
length - The length of the content.
Returns:
a XDocumentInfo DTO.

createDocumentString

XDocumentInfo createDocumentString(XObjectID conversationID,
                                   String name,
                                   String contentString,
                                   String mimeType)
Create a new Document from a String.
Parameters:
conversationID - The Conversation.
name - The name.
contentString - The string containing the content.
mimeType - The mimetype of the content.
Returns:
a XDocumentInfo DTO.

createDocumentAttachment

XDocumentInfo createDocumentAttachment(XObjectID documentID,
                                       String name,
                                       XAPIInputStream inputStream,
                                       String mimeType,
                                       long length)
Create a new Document attachment from an InputStream.
Parameters:
documentID - The Document.
name - The name.
inputStream - The InputStream containing the content.
mimeType - The mimetype of the content.
length - The length of the content.
Returns:
a XDocumentInfo DTO.

createDocumentAttachmentString

XDocumentInfo createDocumentAttachmentString(XObjectID documentID,
                                             String name,
                                             String contentString,
                                             String mimeType)
Create a new Document attachment from an InputStream.
Parameters:
documentID - The Document.
name - The name.
contentString - The string containing the content.
mimeType - The mimetype of the content.
Returns:
a XDocumentInfo DTO.

getDocument

XDocumentInfo getDocument(XObjectID contentID)
Get a Document information.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
A XDocumentInfo DTO.

lockDocument

void lockDocument(XObjectID contentID,
                  long lockMS)
Lock a Document to the current User for some number of milliseconds.
Parameters:
contentID - The Content. Can be either a Document or Version.
lockMS - The number of milliseconds the document will remain in the locked state.

unlockDocument

void unlockDocument(XObjectID contentID)
Unlock on a Document. Must be locked to the current User.
Parameters:
contentID - The Content. Can be either a Document or Version.

removeDocument

void removeDocument(XObjectID documentID)
Remove a Document.
Parameters:
documentID - The Document.

unremoveDocument

void unremoveDocument(XObjectID documentID)
Un-remove a Document. (Must have Manager role.)
Parameters:
documentID - The Document.

getVersion

XVersionInfo getVersion(XObjectID contentID)
Return an ordered list of a Document's Versions.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
The Content info.

getVersions

List<XVersionInfo> getVersions(XObjectID contentID)
Return an ordered list of a Document's Versions.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
The Content infos.

updateVersion

void updateVersion(XObjectID versionID,
                   XUpdater updater)
Update a Version.
Parameters:
versionID - The Version.
updater - The fields to be updated.

removeVersion

void removeVersion(XObjectID versionID)
Remove a Version.
Parameters:
versionID - The Version.

unremoveVersion

void unremoveVersion(XObjectID versionID)
Un-remove a Version.
Parameters:
versionID - The Version.

createVersion

void createVersion(XObjectID contentID,
                   XAPIInputStream inputStream,
                   String mimeType,
                   long length)
Create a new Version for a Content object. This will add a new Version to the specified Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
inputStream - The input stream.
mimeType - The mimeType.
length - The length.

createVersionString

void createVersionString(XObjectID contentID,
                         String string,
                         String mimeType)
Create a new Version for a Content object. This will add a new Version to the specified Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
string - The string.
mimeType - The mimeType.

getContent

InputStream getContent(XObjectID contentID)
Read the content for a Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
An InputStream from which to read the content, null if there is no content associated with the object.

getContentRange

InputStream getContentRange(XObjectID contentID,
                            long start,
                            long end)
Read the content for a Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
start - The starting position (zero-based, inclusive).
end - The ending position (zero-based, inclusive).
Returns:
An InputStream from which to read the content, null if there is no content associated with the object.

getContentString

XContentStringInfo getContentString(XObjectID contentID)
Read the content for a Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
An InputStream from which to read the content, null if there is no content associated with the object.

getRendition

InputStream getRendition(XObjectID contentID)
Read the PDF rendition for a Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
Returns:
An InputStream from which to read the PDF rendition, null if the rendition doesn't exist.

getThumbnail

InputStream getThumbnail(XObjectID contentID)
Read the thumbnail image for a Content object.
Parameters:
contentID - The Content object.
Returns:
An InputStream from which to read the thumbnail image, null if the thumbnail doesn't exist.

getPage

InputStream getPage(XObjectID contentID,
                    int pageNumber)
Read a page image for a Content object.
Parameters:
contentID - The Content. Can be either a Document or Version.
pageNumber - The page number.
Returns:
An InputStream from which to read the page image, null if the page image doesn't exist.

findSimilar

XSearchResultsInfo findSimilar(XObjectID contentID,
                               XDocumentSearchOrder orderBy)
Find Similar content.
Parameters:
contentID - The Content. Can be either a Document or Version. The Content for which you want to find similar content.
orderBy - Optional; you can specify the sort order for results. If null, results will be returned most-relevant first.
Returns:
Info about the Artifacts matching the "Find Similar" search.

Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.