You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by captain1 <ca...@yahoo.co.in> on 2007/06/22 06:47:24 UTC

IOHandler for extended node type

Hello,

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. 

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

thanks,

Captain1
-- 
View this message in context: http://www.nabble.com/IOHandler-for-extended-node-type-tf3962777.html#a11246188
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: IOHandler for extended node type

Posted by Angela Schreiber <an...@day.com>.
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