On 8/31/10 2:28 AM, Felix Meschberger wrote:
> Hi,
> 
> On 30.08.2010 18:03, Justin Edelson (JIRA) wrote:
>>
>>      [ 
>> https://issues.apache.org/jira/browse/SLING-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>>  ]
>>
>> Justin Edelson resolved SLING-1705.
>> -----------------------------------
>>
>>     Resolution: Fixed
>>
>> added multi-valued check in r990833.
> 
> Thanks. I missed that one here.
> 
>>
>> it might be interesting to set the length to the number of items in the 
>> multi-valued property, but I didn't do that.
> 
> That would certainly be a valid option, yes. Maybe then we should also
> set some indicator in the metadata of a property-based resource that
> this is a multi- or single-value property ?? not sure...

Created an issue for this, for a future API version. On second thought,
we shouldn't just repurpose getContentLength() for this. It'd be confusing.

Justin

> 
> Regards
> Felix
> 
>>
>>> Proactively set length of jcr:data property for nt:file node resources
>>> ----------------------------------------------------------------------
>>>
>>>                 Key: SLING-1705
>>>                 URL: https://issues.apache.org/jira/browse/SLING-1705
>>>             Project: Sling
>>>          Issue Type: Improvement
>>>          Components: JCR
>>>    Affects Versions: JCR Resource 2.0.6
>>>            Reporter: Felix Meschberger
>>>            Assignee: Felix Meschberger
>>>             Fix For: JCR Resource 2.0.8
>>>
>>>
>>> A resource wrapping a node of type nt:file provides access to the 
>>> jcr:content/jcr:data by an adapter to the InputStream. In this case, the 
>>> Property.getLength() value of the jcr:content/jcr:data property can be 
>>> considered the content length of the resource and should be set in the 
>>> ResourceMetadata accordingly.
>>> Currently (as of SLING-288) the content length metadata property is only 
>>> set when the resource is adapted to an InputStream.
>>> Same holds for Property-based resources.
>>

Reply via email to