Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
OpenCMIS 1.0.0
-
None
-
None
Description
A direct request for a rendition stream returns null:
ContentStream contentStream = cmisSession.getContentStream(objectId, originalId, null, null); // contentStream is null here
Used binding: AtomPub
I am not sure if I understand the AtomPub binding with its links well enough but for me it seems the link cache is cold and the client wants to heat it up by getting the main document. This is done by getting the object by id with rendition filter "cmis:none". I guess this rendition filter is the reason there is no "alternate" link found in link cache which could be used to actually request the content stream.
If you heat up the cache manually by getting the main document including renditions first it works:
OperationContext opCtx = OperationContextUtils.createMinimumOperationContext(); opCtx.setRenditionFilterString("*"); ObjectId objectId = cmisSession.createObjectId(coid); Document document = (Document) cmisSession.getObject(objectId, opCtx); ContentStream contentStream = cmisSession.getContentStream(objectId, originalId, null, null);
Also getting the contentStream via document object works:
OperationContext opCtx = OperationContextUtils.createMinimumOperationContext();
opCtx.setRenditionFilterString("*");
ObjectId objectId = cmisSession.createObjectId(coid);
Document document = (Document) cmisSession.getObject(objectId, opCtx);
ContentStream contentStream = document.getContentStream(originalId);