[ 
https://issues.apache.org/jira/browse/CMIS-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891114#action_12891114
 ] 

Florian Müller commented on CMIS-240:
-------------------------------------

This is for convenience. 

The list that is returned by getProperties() contains not only the property 
values but also the data type, display name, query name, etc. of each property. 
If it would just a return a Map<String, ?> the application would have to fetch 
this information from the type system. That would be an often repeated pattern 
that can be covered by the framework.

updateProperties(), on the other hand, only requires the id and the value of 
the properties that should be updated. Creating complete Property<?> objects 
for this is very inconvenient for applications. Creating a Map<String, ?> is 
easy.

There should be no need to convert the output of getProperties() into something 
that updateProperties() accepts. Most of the standard properties a read-only, 
anyway. Usually the application knows which properties have to be updated. Only 
set those in the Map.


> getProperties vs. updateProperties
> ----------------------------------
>
>                 Key: CMIS-240
>                 URL: https://issues.apache.org/jira/browse/CMIS-240
>             Project: Chemistry
>          Issue Type: Wish
>            Reporter: Stephan Klevenz
>             Fix For: 0.2.0-incubating
>
>
> The method CmisObject.getProperties() returns List<Property<?>> but for 
> setting properties with CmisObject.updateProperties(Map<String,?> properties) 
> I need another type Map<String,?>.  Why are there two different types and how 
> to convert one type into another? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to