Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-1074

getContentStream returns null for renditions if link cache is cold

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • OpenCMIS 1.0.0
    • None
    • opencmis-client
    • 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);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            shomeier Sascha Homeier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: