public class DocumentHelper extends Object
DocumentConversion| Constructor and Description |
|---|
DocumentHelper(DocumentConversion docConversionService)
Sets the service object.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getDocument(String documentId)
Retrieves a document from the store with the given id
GET /v1/documents/{document_id}.
|
DocumentCollection |
getDocumentCollection(Map<String,Object> docListParams)
Gets a collection of all existing documents with optional query parameters for filtering results.
|
Document |
uploadDocument(File document)
Uploads the document to the store with the given media type
POST /v1/documents.
|
Document |
uploadDocument(File document,
String mediaType)
Uploads the document to the store with the given media type
POST /v1/documents.
|
public DocumentHelper(DocumentConversion docConversionService)
docConversionService - the doc conversion servicepublic InputStream getDocument(String documentId)
documentId - id of the document to be retrievedDocumentConversion.getDocument(String)public Document uploadDocument(File document)
document - the document to be uploadedDocumentConversion.uploadDocument(File)public Document uploadDocument(File document, String mediaType)
document - the document to be uploadedmediaType - the Internet media type for the fileDocumentConversion.uploadDocument(File, String)public DocumentCollection getDocumentCollection(Map<String,Object> docListParams)
docListParams - The parameters to be used in the documents list service call.
The parameters - token, limit, name, since and media_type are optional
DocumentConversion.getDocumentCollection(Map)Copyright © 2015. All rights reserved.