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

Document.getContentStream() does not work with EMC Documentum

    XMLWordPrintableJSON

Details

    Description

      First timer to JIRA here so please forgive any oversights on my part.

      When getContentStream gets called, it passes a NULL value for the renditionFilter field on the URL which causes EMC's code to throw a NullPointerException. If an asterisk is passed instead, the EMC code returns URLs successfully and allows for successful retrieval of the content.

      From AbstractAtomPubService.java:

      public String loadLink(String repositoryId, String id, String rel, String type) {
      String link = getLink(repositoryId, id, rel, type);
      if (link == null)

      { getObjectInternal(repositoryId, IdentifierType.ID, id, ReturnVersion.THIS, null, null, null, NULL, null, null, null); link = getLink(repositoryId, id, rel, type); }

      return link;
      }

      The above code results in a URL that looks something like this and returns a 500 response:

      http://server:port/cmis/resources/repositories/repo1/objects/0901ba9d8029b1ac?filter=&includeAllowableActions=&includePolicyIds=&includeRelationships=&includeACL=&renditionFilter=

      One simple tweak and the GET results in a 200 response as expected:

      http://epdamdmmk1.fmr.com:12100/cmis/resources/repositories/dctfepsdev1/objects/0901ba9d8029b1ac?filter=&includeAllowableActions=&includePolicyIds=&includeRelationships=&includeACL=&renditionFilter=*

      The easy fix would be to change the call to getObjectInternal to:

      getObjectInternal(repositoryId, IdentifierType.ID, id, ReturnVersion.THIS, null, null, null, "*", null, null, null);

      Even better would be to retrieve the specified value for renditionFilter on the session context. However, BindingSession objects do not appear to share the OperationContext which is set on the SessionImpl object and which is used by the Session.getObject() call.

      Attachments

        Issue Links

          Activity

            People

              fmui Florian Müller
              keeskc Kristopher Kees
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: