Search in sources :

Example 11 with CmisObject

use of org.apache.chemistry.opencmis.client.api.CmisObject in project camel by apache.

the class CMISTestSupport method getDocumentContentAsString.

protected String getDocumentContentAsString(String nodeId) throws Exception {
    CmisObject cmisObject = retrieveCMISObjectByIdFromServer(nodeId);
    Document doc = (Document) cmisObject;
    InputStream inputStream = doc.getContentStream().getStream();
    return readFromStream(inputStream);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) CmisObject(org.apache.chemistry.opencmis.client.api.CmisObject) Document(org.apache.chemistry.opencmis.client.api.Document)

Aggregations

CmisObject (org.apache.chemistry.opencmis.client.api.CmisObject)11 Exchange (org.apache.camel.Exchange)5 Test (org.junit.Test)5 Document (org.apache.chemistry.opencmis.client.api.Document)4 Folder (org.apache.chemistry.opencmis.client.api.Folder)4 InputStream (java.io.InputStream)2 ContentStream (org.apache.chemistry.opencmis.commons.data.ContentStream)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 Message (org.apache.camel.Message)1 OperationContext (org.apache.chemistry.opencmis.client.api.OperationContext)1 Session (org.apache.chemistry.opencmis.client.api.Session)1