public class ReadDocumentElementContent extends AbstractOperation<RemoteContentInputStreamDescriptor>
Operation
that returns a session data key
to an input
stream containing the content of a ContentDocumentElementType
given its id.Constructor and Description |
---|
ReadDocumentElementContent(com.lexmark.saperion.document.DocumentReferenceType documentId,
com.lexmark.saperion.document.DocumentElementReferenceType documentElementId)
This creates a new
operation that initiates streaming of document
content:
It opens the documents stream - or streams in case its chunked - on the server side and registers them as
closable at the current session. |
Modifier and Type | Method and Description |
---|---|
void |
afterInvoke(Object result,
Connection connection)
This method will be called on the client side e.g.
|
RemoteContentInputStreamDescriptor |
invoke()
The method that will be called on the server side.
|
getResult, toArrayList, toString
beforeInvoke, getClientToken, mapException
public ReadDocumentElementContent(com.lexmark.saperion.document.DocumentReferenceType documentId, com.lexmark.saperion.document.DocumentElementReferenceType documentElementId)
operation
that initiates streaming of document
content:
It opens the documents stream - or streams in case its chunked - on the server side and registers them as
closable at the current session. It then returns a RemoteContentInputStreamDescriptor
from which a
remote stream can be created.
If the given id belongs to a document element with the type
DocumentNodeType.LINK
or
DocumentNodeType.STRUCTURE
that is not a chunked document
element an empty input stream will be returned.documentId
- The id of the document the element to read from belongs to. Must not be null.documentElementId
- The id of the document element to read from. Must not be null.public RemoteContentInputStreamDescriptor invoke() throws SaBasicException
Operation
SaBasicException
- exception when invoking this operationpublic void afterInvoke(Object result, Connection connection)
Operation
afterInvoke
in interface Operation<RemoteContentInputStreamDescriptor>
afterInvoke
in class AbstractOperation<RemoteContentInputStreamDescriptor>
result
- The result of invoke obtained by the rmi-callCopyright © 2016 SAPERION AG. All rights reserved.