cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with multiple-properties in OpenCMIS

aweber1nj
Champ in-the-making
Champ in-the-making
I'm trying to set the Adressees for an email I'm importing to Alfresco 4.0.e using OpenCMIS (java).

I'm accumulating the multiple email addresses in an ArrayList<String>.  The only example I could find was by way of an old issue logged where the developer wasn't using the properties Map correctly in the first place (so the response was a little incomplete to solve my issue).

The recommendation in that case was to use Arrays.asList( ).  So that's what I used to set my ArrayList in:
emailProps.put("cm:addressees", Arrays.asList(addressees));

This, unfortunately results in:
java.lang.IllegalArgumentException: Invalid aspect value!
   at org.alfresco.cmis.client.impl.AlfrescoUtils.convertAspectPropertyValue(AlfrescoUtils.java:238)
   at org.alfresco.cmis.client.impl.AlfrescoUtils.createAspectPropertyExtension(AlfrescoUtils.java:205)
   at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:212)


It occurs to me that maybe I'm "trying too hard".  Can I/Should I just pass the java ArrayList (which implements List interface)?

<strong>BTW:</strong> It would be really nice if Alfresco could point out the "offending" property and/or value.  Took me a while just to figure out where it was complaining! Smiley Happy

Thanks in advance for some tips.
-AJ
1 REPLY 1

aweber1nj
Champ in-the-making
Champ in-the-making
OK, I answered my own question.

YES: You can just pass the ArrayList<String> directly as the value for the property in the Map.

Maybe this will help someone else down-the-road.

-AJ