chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-776) ObjectType#getExtensions() can't handle List<CmisExtensionElement> when using browser binding
Date Tue, 01 Apr 2014 12:08:18 GMT

     [ https://issues.apache.org/jira/browse/CMIS-776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Müller resolved CMIS-776.
---------------------------------

    Resolution: Won't Fix
      Assignee: Florian Müller

The problem is that the extension names are the same. That is, the resulting JOSN object would
have to have to the same key more than once. Although that would be valid JSON, not many JSON
parsers would be able to handle that. Most parsers map the JOSN object to a map/dictionary/associative
array that require a unique key.

Changing the OpenCMIS server JSON handling would be a huge effort because the JSON parser
and writer have to be adapted and all JSON related code have to be changed -- just to support
a format that most client cannot handle.


> ObjectType#getExtensions() can't handle List<CmisExtensionElement> when using browser
binding
> ---------------------------------------------------------------------------------------------
>
>                 Key: CMIS-776
>                 URL: https://issues.apache.org/jira/browse/CMIS-776
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 0.10.0
>            Reporter: Sergey Shcherbovich
>            Assignee: Florian Müller
>
> We need to transfer List<CmisExtensionElement> with several CmisExtensionElement
elements.
> Xxml-based bindigs (e.g. AtomPub) handles List<CmisExtensionElement> like:
> {noformat}
> <e1:mandatoryAspects xmlns:e1="myNamespace">
>     <e1:mandatoryAspect>P:sys:localized</e1:mandatoryAspect>
>     <e1:mandatoryAspect>P:cm:generalclassifiable</e1:mandatoryAspect>	  
 
>     <e1:mandatoryAspect>P:cm:author</e1:mandatoryAspect>
> </e1:mandatoryAspects>
> {noformat}
> it can handle and transfer multiple entries with same CmisExtensionElement.getName().
> But present JSON-based bindig implementation can't transfer multiple entries with same
key (JSONObject uses CmisExtensionElement.getName as a key):
> {noformat}
> "mandatoryAspects": {
> 	"mandatoryAspect":"P:cm:author"
> }
> {noformat}
> Assuming issue is around here:
> {code:title=org.apache.chemistry.opencmis.commons.impl.JSONConverter.convertExtensionList}
>         for (CmisExtensionElement ext : extensionList) {
>             if (ext == null) {
>                 continue;
>             }
>             if (ext.getChildren() != null && !ext.getChildren().isEmpty()) {
>                 result.put(ext.getName(), convertExtensionList(ext.getChildren()));
>             } else {
>                 result.put(ext.getName(), ext.getValue()); // line 2647
>             }
>         }
> {code}
> Out software uses both bindings to service repository. But we can't transfer List<CmisExtensionElement>
objects correctly. We use 0.10.0 library.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message