jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: OCM and Proprety.getLength() question
Date Thu, 10 Apr 2008 08:02:50 GMT
Hi Alex,


Yes it is not supported rigth now but I understand your needs.
I like your solution 3. Maybe we make a try to have generic "JCR expressions".
If you want to contribute, please create a new Jira issue.


Thanks,
Christophe

On Thu, Apr 10, 2008 at 2:05 AM, Alex Pakka <a.exceeder@gmail.com> wrote:
> Hi,
>
>  I have a question: you can map jcrType = "nt:file" to your own POJO and have
>  @Bean for the "nt:resource". It works just fine and files are stored
>  properly. Now on more than one occasion I have to set Content-Length for
>  this file. It seems to be there is no way to map Property.getLength() of
>  the "jcr:data" to any field in your own Bean, neither directly nor through
>  the type converters. Was it a small overlook in design or an intended
>  limitation? What would be the best workaround approach here?
>
>  1. Have your own int @Field with content length. The problem is, my files
>  are read from the socket through the legacy protocol and the length is not
>  always known beforehand. This solution will force me to pump the content to
>  the local disk first, slowing down the system.
>
>  2. Use POJOs where possible and store jcr:content as a Node (a bit ugly)
>
>  3. Patch @Field, FieldDescriptor and fix SimpleFieldsHelper's
>  retrieveSimpleField() to understand something like @Field(
>  jcrName="jcr:data.length")? For this one I would like to contribute the
>  code.
>
>  I started playing with Jackrabbit a week ago and was surprised how good it
>  is. Unit tests are of great help, especially for OCM, given the lack of
>  documentation. Thanks everyone on the project!
>
>  Alex Pakka
>

Mime
View raw message