jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: IOHandler for extended node type
Date Fri, 22 Jun 2007 09:05:43 GMT
hi

i'm not sure, whether i understand your problem.

> I have extended nt:file to custom node and created custom child node along
> with default jcr:content which  is of type nt:unstructured. 

> Now i need to use WebDav interface for accessing these nodes, the only
> solution i think of is to have a custom IO handler which will delegate the
> imports and exports correctly. I am already able to create custom node which
> is of type nt:file, but unable to create custom child node which is of type
> nt:unstructured. 

the nt:file nodetype only allows for a single child-node which must
have the name 'jcr:content' an can be of any nodetype. you won't be
able to create any other (custom) node below a node of type nt:file.

> Can somebody suggest or provide a code snippet to go about this.

take a look at the DefaultHandler as an example of the IOHandler
interface. you may extend it for you own needs and

-> define your custom node type as 'defaultNodetype' field instead
    of the default (nt:file)
-> provide your own implementation of the interface methods in order
    to deal with the requirements of you custom node type.

as an example please take a look at XmlHandler.

hope that helps.
angela

Mime
View raw message