You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florian Müller (JIRA)" <ji...@apache.org> on 2018/03/30 15:53:00 UTC

[jira] [Commented] (CMIS-1058) loadLink method of AbstractAtomPubService.java hardcodes the value of filter to "cmis:objectID"

    [ https://issues.apache.org/jira/browse/CMIS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420638#comment-16420638 ] 

Florian Müller commented on CMIS-1058:
--------------------------------------

This is not an invalid URL. It calls getObject() on the document with the smallest possible filter by only selecting the cmis:objectId property. The call is required to get the link to the version-history collection. The filter is intentionally small to keep the response from the server small and the processing time on the server short. There in is no point in selecting any other property because the properties are not processed on the client side. Only the version-history collection link is extracted.

All repositories MUST be able to process a getObject() call with a filter that only consist of cmis:objectId.

> loadLink method of AbstractAtomPubService.java hardcodes the value of filter to "cmis:objectID"
> -----------------------------------------------------------------------------------------------
>
>                 Key: CMIS-1058
>                 URL: https://issues.apache.org/jira/browse/CMIS-1058
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client-bindings
>    Affects Versions: OpenCMIS 1.1.0
>            Reporter: Saurabh Kumar
>            Priority: Major
>         Attachments: InkedSourceCodeScreenshot_LI.jpg
>
>
> Java File: AbstractAtomPubService.java
> package: org.apache.chemistry.opencmis.client.bindings.spi.atompub
> Jar name: chemistry-opencmis-client-bindings
>  
> loadLink method of the above java class hardcodes the value of filter to "cmis:objectId". Please refer attached screenshot (InkedSourceCodeScreenshot_LI.jpg). In previous versions of jar its value was null.
> Is it possible that instead of hardcoding its value, can this be taken from userContext as _context.getFilterString()??_
> With its value hardcoded, we get a link as the following:
> [http://<server-name>:<port-number>/as_cmis/atom/<Repo-ID>/id?id=<documentId>&filter=|http://kedarm12.lab.opentext.com:8080/as_cmis/atom/DFLT-JOUWR-1/id?id=113878&filter=] [cmis%3AobjectId|http://kedarm12.lab.opentext.com:8080/as_cmis/atom/DFLT-JOUWR-1/id?id=113878&filter=cmis%3AobjectId]
> The above url doesn't work for us as it is an invalid URL. The below one works where we replace the filter with its value from context as below:
> [http://<server-name>:<port-number>/as_cmis/atom/<Repo-ID>/id?id=<documentId>&filter=<_context.getFilterString()_|http://kedarm12.lab.opentext.com:8080/as_cmis/atom/DFLT-JOUWR-1/id?id=113878&filter=]>.
>  
> Please let me know the thought process behind hard-coding the value of filter as "cmis:objectId".
>  
> Call Stack:
> org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getAllVersions:298
> org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getAllVersions:313
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.VersioningServiceImpl.getAllVersions:267
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.loadLink:209



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)