11-02-2012 05:52 PM
public InputStream getDocumentThumbnail(String documentId) throws Exception {
OperationContext context = this.cmisSession.createOperationContext();
context.setRenditionFilterString("cmis:thumbnail");
CmisObject targetDocument = this.cmisSession.getObject(documentId, context);
List<Rendition> renditions = targetDocument.getRenditions();
String streamId = null;
InputStream inputStream = null;
for (Rendition rendition : renditions) {
streamId = rendition.getStreamId();
}
if (streamId != null) {
CmisObject cmisObject = this.cmisSession.getObject(streamId);
ContentStream stream = ((Document) cmisObject).getContentStream();
if (stream != null) {
inputStream = stream.getStream();
}
}
return inputStream;
}
11-02-2012 07:36 PM
11-02-2012 09:09 PM
11-03-2012 01:06 PM
12-03-2012 09:52 AM
07-12-2013 08:36 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.