Issue 6 in alfresco-opencmis-extension: multivalued property is not taken into account for create/update

30 views
Skip to first unread message

alfresco-opencmis-exte...@codespot.com

unread,
Oct 31, 2011, 8:28:21 AM10/31/11
to alfresco-open...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 6 by informat...@eaureunion.fr: multivalued property is not taken
into account for create/update
http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/issues/detail?id=6

What steps will reproduce the problem?
1.create an aspect with multivalued property
2.try to update with command like :
property.setValues(Arrays.asList("value1", "value2"));
3.

What is the expected output? What do you see instead?
expected : document created with aspect
instead :
Exception in thread "main" java.lang.IllegalArgumentException: Invalid
ascpect value!
at
org.alfresco.cmis.client.impl.AlfrescoAspectsUtils.convertAspectPropertyValue(AlfrescoAspectsUtils.java:235)
at
org.alfresco.cmis.client.impl.AlfrescoAspectsUtils.createAspectPropertyExtension(AlfrescoAspectsUtils.java:207)
at
org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:183)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:650)
at
org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:88)
at
org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:443)

What version of the product are you using? On what operating system?
alfresco-opencmis-extension 0.2
alfresco 4.0.a (debian)
OpenCMIS 0.5.0 (eclipse on windows)

Please provide any additional information below.

alfresco-opencmis-exte...@codespot.com

unread,
Oct 31, 2011, 11:53:00 AM10/31/11
to alfresco-open...@googlegroups.com

Comment #1 on issue 6 by floria...@gmail.com: multivalued property is not

Could you please provide a more complete example?

Document creation should look like this:

Map<String, Object> properties = new HashMap<String, Object>();
properties.put("cmis:objectTypeId", "cmis:document");
properties.put("cmis:name", "myDoc.txt");
properties.put("my:multivalue", Arrays.asList("value1", "value2"));

ContentStream contentStream = ...

Document newDoc = root.createDocument(properties, contentStream,
VersioningState.MAJOR);

alfresco-opencmis-exte...@codespot.com

unread,
Nov 2, 2011, 4:13:51 AM11/2/11
to alfresco-open...@googlegroups.com

Comment #2 on issue 6 by informat...@eaureunion.fr: multivalued property is

It's Ok, i was mistaken on the "setvalues"
Issue can be closed.
thank you for quick answer ^^

alfresco-opencmis-exte...@codespot.com

unread,
Nov 2, 2011, 9:32:56 PM11/2/11
to alfresco-open...@googlegroups.com
Updates:
Status: Invalid

Comment #3 on issue 6 by floria...@gmail.com: multivalued property is not

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages