jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pietsch <mpe...@gmx.de>
Subject Re: Files uploaded by WebDAV not accessible via OCM queries
Date Sun, 14 Dec 2008 21:38:31 GMT
slandelle@excilys.com schrieb:
>> I'm aware of that. That's why I'm asking if the OCM queries rely on that
>> discriminator tag. The main problem is, that the contentManager is not
> able to map a node if it does not contain the discriminator.
>> To put it differently: Is there a way to tell the OCM criterions for the
>> mapping different from the discriminator tag. And finally: Is that possible
>> via annotations?
> Depending on the configuration you provide, OCM will fall back to one
> strategy or another. The problem is that the choice of strategy is not
> always the same, so the patches.
>> My File POJO currently looks like this:
>> @Node(jcrType="nt:file", extend=HierarchyNode.class, discriminator =
>> true) public class File  extends HierarchyNode {
>> @Bean(jcrName="jcr:content") private Resource resource;
>> public Resource getResource() { return resource; }
>> public void setResource(Resource resource) { this.resource = resource; }
>> }
> You can use the jcrType of the @Bean to force the type of your resource.

but this only helps, if i already having a 'File' and accessing its 
getResource() field. It does not help if a query finds the same node.

View raw message