chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CMIS-453) TCK WebService binding: filter in session context affects properties returned in createDocument()
Date Fri, 21 Oct 2011 09:16:32 GMT

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

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

I don't consider this a bug. The Folder interface provides two createDocument() methods. One
gives you fine grained control over how do you want to create the document and what do you
want to get back. The other createDocument() method is a convenience method with fewer input
parameters. It uses the default operation context and that's the right choice in many use
cases.
The spec actually says that createDocument() only returns the new object id when the Web Services
binding is used. But that's a level below the OpenCMIS client API. We can make our own rules
here. 

Regarding the filter: OpenCMIS always adds the object id, the base type id and the type id
to the filter. These three properties are required to assemble the appropriate Java object.

                
> TCK WebService binding: filter in session context affects properties returned in createDocument()
> -------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-453
>                 URL: https://issues.apache.org/jira/browse/CMIS-453
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.5.0
>            Reporter: James Li
>            Priority: Minor
>
> Write code like below:
>   Set<String> filterNames = new HashSet<String>();
>   filterNames.add("cmis:name");
>   session.getDefaultContext().setFilter(filterNames);
>   then call folder.createDocument(), returns a document with four properties(three are
added by api I think).
> Per spec, there is no filter specified in createDocument(), I would think it should return
all properties. Seems api calls getObject() during createDocument(), while there is a filter
in getObject().
> Is this a bug?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message