public class RmiClientDocumentService extends AbstractRmiClientService implements DocumentService
DocumentService
provides document functionality by delegating to a remote saperion system via RMI.connection
Constructor and Description |
---|
RmiClientDocumentService(Connection connection) |
Modifier and Type | Method and Description |
---|---|
com.lexmark.saperion.document.DocumentStoreInformationType |
createDocument(com.lexmark.saperion.document.DocumentDefinitionReferenceType definition,
Map<String,Object> indexData,
com.lexmark.saperion.document.DocumentElementType rootElement)
This method stores a new document with the given data in the backend.
|
com.lexmark.saperion.document.DocumentRevisionReferenceType |
getLatestRevisionId(com.lexmark.saperion.document.DocumentReferenceType documentId)
This method returns the id of the latest revision of the document given by its id.
|
com.lexmark.saperion.document.DocumentRevisionType |
loadDocument(com.lexmark.saperion.document.DocumentReferenceType documentId,
com.lexmark.saperion.document.LoadKindEnumeration loadKind)
Loads the latest
document revision with the given
document id . |
com.lexmark.saperion.document.DocumentRevisionType |
loadDocument(com.lexmark.saperion.document.DocumentRevisionReferenceType revisionId,
com.lexmark.saperion.document.LoadKindEnumeration loadKind)
Loads a complete
document revision given its
revision id . |
InputStream |
readDocumentElementContent(com.lexmark.saperion.document.DocumentReferenceType documentId,
com.lexmark.saperion.document.DocumentElementReferenceType documentElementId)
Opens the content of the document element identified by the given id for reading and returns an
input stream for that data. |
List<com.lexmark.saperion.document.DocumentRevisionReferenceType> |
searchDocuments(com.lexmark.saperion.document.DocumentDefinitionReferenceType definitionName,
QueryExpression<Boolean> filter)
Loads all documents for which the given filter holds
|
com.lexmark.saperion.document.DocumentRevisionType |
searchUniqueDocument(com.lexmark.saperion.document.DocumentDefinitionReferenceType definitionName,
QueryExpression<Boolean> filter,
com.lexmark.saperion.document.LoadKindEnumeration loadKind)
Loads the unique document for which the given filter holds.
|
mapSystemException
public RmiClientDocumentService(Connection connection)
public com.lexmark.saperion.document.DocumentRevisionReferenceType getLatestRevisionId(com.lexmark.saperion.document.DocumentReferenceType documentId) throws SaBasicException
DocumentService
getLatestRevisionId
in interface DocumentService
documentId
- the id of the document to get the latest revision id forSaBasicException
public com.lexmark.saperion.document.DocumentRevisionType loadDocument(com.lexmark.saperion.document.DocumentRevisionReferenceType revisionId, com.lexmark.saperion.document.LoadKindEnumeration loadKind) throws SaBasicException
DocumentService
document revision
given its
revision id
.loadDocument
in interface DocumentService
revisionId
- the revision id of the document to loadSaBasicException
public com.lexmark.saperion.document.DocumentRevisionType loadDocument(com.lexmark.saperion.document.DocumentReferenceType documentId, com.lexmark.saperion.document.LoadKindEnumeration loadKind) throws SaBasicException
DocumentService
document revision
with the given
document id
.loadDocument
in interface DocumentService
documentId
- the id of the documentSaBasicException
public com.lexmark.saperion.document.DocumentRevisionType searchUniqueDocument(com.lexmark.saperion.document.DocumentDefinitionReferenceType definitionName, QueryExpression<Boolean> filter, com.lexmark.saperion.document.LoadKindEnumeration loadKind) throws SaBasicException
DocumentService
searchUniqueDocument
in interface DocumentService
definitionName
- reference to the document definition to search in.filter
- a QueryExpression
of type boolean that uniquely identifies the documentSaBasicException
public List<com.lexmark.saperion.document.DocumentRevisionReferenceType> searchDocuments(com.lexmark.saperion.document.DocumentDefinitionReferenceType definitionName, QueryExpression<Boolean> filter) throws SaBasicException
DocumentService
searchDocuments
in interface DocumentService
definitionName
- the document definition to search in.filter
- a QueryExpression
of type boolean that is true for all wanted documentsrevision ids
of documents that match the given filterSaBasicException
public InputStream readDocumentElementContent(com.lexmark.saperion.document.DocumentReferenceType documentId, com.lexmark.saperion.document.DocumentElementReferenceType documentElementId) throws SaBasicException
DocumentService
input stream
for that data. If the element is chunked the resulting stream will stream
over all the chunks.readDocumentElementContent
in interface DocumentService
documentId
- the id of the document the element to read belongs todocumentElementId
- the id of the document element to read frominput stream
for the content of the given document elementSaBasicException
public com.lexmark.saperion.document.DocumentStoreInformationType createDocument(com.lexmark.saperion.document.DocumentDefinitionReferenceType definition, Map<String,Object> indexData, com.lexmark.saperion.document.DocumentElementType rootElement) throws SaBasicException
DocumentService
createDocument
in interface DocumentService
definition
- a reference to the definition to store the document inindexData
- the index data the document will hold.rootElement
- the documents root elementSaBasicException
Copyright © 2016 SAPERION AG. All rights reserved.