Hi Mano,
I have tested that with OpenCMIS 0.2 and the multi-value property update works.
What doesn't work, however, is the single-value property update. DateTime
properties have to be of type GregorianCalendar and not Date. You should get an
exception.
Which Alfresco version and which binding are you using?
Cheers,
Florian
On 13/12/2010 11:03, Mano Swerts wrote:
> Hi Florian,
>
> Yes the property is updatable and it doesn't require a check-out. Like I
> stated below, it does work when using the *setPropertyMultivalue*
> method. I provide a List<BigInteger> to the method which does not
> contain null values. Other single value properties however can be null,
> so we'd like to use the Map approach for all properties to be consistent.
>
> This is my description of the property in my alfresco model XML:
>
> <propertyname="park:documentCreationDate">
> <type>d:datetime</type>
> </property>
> <propertyname="park:userAssignmentStaffNumbers">
> <type>d:int</type>
> <multiple>true</multiple>
> </property>
>
> This is a simplified snippet from the code:
>
> List<BigInteger> staffNumbers = new ArrayList<BigInteger>();
> staffNumbers.add(new BigInteger("123"));
>
> Map<String, Object> properties = new HashMap<String, Object>();
> properties.put("park:documentCreationDate", newDate()); //Single value
> property works
> properties.put("park:userAssignmentStaffNumbers", staffNumbers);
>
> // works:
> document.setPropertyMultivalue("park:userAssignmentStaffNumbers",
> staffNumbers);
> document.updateProperties(properties);
>
> I hope this helps.
>
> Kind regards,
>
> Mano Swerts
>
>
> On 13 Dec 2010, at 11:38, Florian Müller wrote:
>
>> Hi Mano,
>>
>> Could you provide a few more details?
>> Is the property updatable? Is the document checked out? Does the type
>> require a check-out before update? Do you provide a List<> of
>> homogenous values without null values? What is the data type of the
>> property?
>>
>> Property values are checked by OpenCMIS before they are send to the
>> repository. If they don't comply with the CMIS spec or don't match the
>> object type, OpenCMIS throws an exception. But in a few cases it drops
>> the value without warning.
>>
>>
>> Cheers,
>>
>> Florian
>>
>>
>> On 13/12/2010 08:52, Mano Swerts wrote:
>>> Hi all,
>>>
>>> I am trying to update a
>>> org.apache.chemistry.opencmis.client.api.Document using the
>>> updateProperties(Map<String, ?>) method.
>>> This works fine, except for multi value properties. They don't get
>>> updated and remain null.
>>>
>>> It works when I use the method setPropertyMultivalue(String, List),
>>> but I don't want to use this method because It doesn't except null
>>> values.
>>>
>>> I am working with version OpenCMIS version 0.1.0.
>>>
>>> Thanks in advance.
>>>
>>> Kind regards,
>>>
>>> Mano Swerts
>>>
>>>
>>> _________________________________________________
>>>
>>> We published a new company movie featuring YOU!
>>> See http://www.aca-it.be/movie
>>> _________________________________________________
>>>
>>>
>