jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Fulford" <matt.fulf...@pfiks.com>
Subject RE: Import UUID Behavior
Date Thu, 01 Nov 2007 11:37:40 GMT
Hi Stefan,

> -----Original Message-----
> From: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com]
> Sent: 01 November 2007 10:33
> To: users@jackrabbit.apache.org
> Subject: Re: Import UUID Behavior
> 
> hi matt
> 
> On 11/1/07, Matthew Fulford <matt.fulford@pfiks.com> wrote:
> > Hi,
> > I'm developing a utility that can perform export and import tasks on
> > content repositories, the main purposes being backup/restore and
> > migrating content from dev>staging>production.
> >
> > The export task exports a node called Content (mix:referenceable) at
the
> > repository root using system view, and the import task imports the
> > Content node from the exported XML file into the root node. The
import
> > task uses ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
and
> > everything seems to be working as expected.
> >
> > My question is: what if the Content node already exists but has a
> > different UUID to the incoming Content node? Will the existing node
> > still be removed by the import prior to adding the incoming version?
> 
> no, since they have different UUID's and the specified behaviour is
> based on equality of UUID's. so, if the oarent node allows same name
> siblings
> you'll end up with 2 Content nodes; otherwise you'll get an exception.
> 

Ok, so I need to delete the Content node first if it already exists, as
the parent node (root - nt:unstructured) does allow same name siblings.

> >
> > Also, out of interest, is item UUID generation based on anything
> > specific or is it random? Will a node called Content at the root
always
> > have the same UUID?
> 
> no, UUID generation is random.
> 
> cheers
> stefan
> 
> >
> > Thanks,
> > Matt
> >

Thanks for the info.
Matt

Mime
View raw message