chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shcherbovich (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CMIS-776) ObjectType#getExtensions() can't handle List<CmisExtensionElement> when using browser binding
Date Tue, 01 Apr 2014 11:36:15 GMT
Sergey Shcherbovich created CMIS-776:
----------------------------------------

             Summary: 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


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