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.
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);
It's Ok, i was mistaken on the "setvalues"
Issue can be closed.
thank you for quick answer ^^
Comment #3 on issue 6 by floria...@gmail.com: 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
(No comment was entered for this change.)