The spec allows cmis:contentStreamFileName to be read-write but I think it 
would be inconsistent. It's probably an oversight since the Updatability is set 
for all properties except for this one. It doesn't not even say it is 
repository specific - it's just missing.

The file name and the MIME type are set together with the content in the 
contentStream structure when a document is created or content is updated.
If a client sets the file name in contentStream and sets 
cmis:contentStreamFileName during document creation, which one is authoritative?

cmis:contentStreamMimeType is read-only. So, why should 
cmis:contentStreamFileName be read-write?
And the other way round: If there is a reason to make 
cmis:contentStreamFileName read-write then cmis:contentStreamMimeType should 
also be read-write.

Most repositories I have seen so far set cmis:contentStreamFileName to 
read-only.
The change is more about clarity than spec compliance. 


Florian



On 10/05/2011 16:22, Jens Hübel wrote:
> Hmmm,
> 
> looking at section 2.1.4.3.3 Property Definitions line 1357, I really don't 
> see that updatability is enforced as read-only.
> 
> @Florian: Florian, I think you pointed out that the original implementation 
> does not behave correctly. Can you refer to the spec? Or did I misunderstand 
> and changed the wrong place?
> 
> Jens
> 
> 
> -----Original Message-----
> From: Florent Guillaume [mailto:f...@nuxeo.com]
> Sent: Dienstag, 10. Mai 2011 16:37
> To: j...@apache.org
> Cc: dev@chemistry.apache.org
> Subject: Re: svn commit: r1098638 - 
> /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
> 
> Why?
> 
> On Mon, May 2, 2011 at 6:04 PM,<j...@apache.org>  wrote:
>> Author: jens
>> Date: Mon May  2 16:04:49 2011
>> New Revision: 1098638
>>
>> URL: http://svn.apache.org/viewvc?rev=1098638&view=rev
>> Log:
>> make cmis:contentStreamFileName read-only for InMemory
>>
>> Modified:
>>     
>> chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
>>
>> Modified: 
>> chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
>> URL: 
>> http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java?rev=1098638&r1=1098637&r2=1098638&view=diff
>> ==============================================================================
>> --- 
>> chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
>>  (original)
>> +++ 
>> chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
>>  Mon May  2 16:04:49 2011
>> @@ -194,6 +194,7 @@ public class DocumentTypeCreationHelper
>>
>>          propS = 
>> PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_FILE_NAME,
>>                  "CMIS Content Stream File Name Property");
>> +        propS.setUpdatability(Updatability.READONLY);
>>          propertyDefinitions.put(propS.getId(), propS);
>>
>>          propId = 
>> PropertyCreationHelper.createIdDefinition(PropertyIds.CONTENT_STREAM_ID, 
>> "CMIS Stream Id Property");
>>
>>
>>
> 
> 
> 

Reply via email to