jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Changing the primary type of a node?
Date Wed, 06 Jun 2007 09:28:45 GMT
On 6/6/07, Tako Schotanus <quintesse@gmail.com> wrote:
> On 6/6/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> >
> > On 6/5/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> > > Hi
> > >
> > > Is it possible to change the primary type of a node
> > programmatically?  Or is
> > > the only option is to create a new node with the new primary type, and
> > > transfer the contents?
> >
> > currently there's no easy programmatic way of changing the primary type
> > of a node. jcr 2.0 (jsr-283) will include a new method
> > Node.setPrimaryType(String)
>
>
> Any idea how that is going to work?
> The types must be compatible somehow?

there are basically the same requirements as for the Node.addMixin()
and .removeMixin() methods as those change the effective type of a node.

the resulting effective node type must be compliant with the node type
constraints defined on its parent.

cheers
stefan

>
> Cheers,
>  -Tako
>

Mime
View raw message