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: Import UUID Behavior
Date Thu, 01 Nov 2007 10:32:30 GMT
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.

>
> 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
>

Mime
View raw message