Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 42934 invoked from network); 16 Feb 2008 18:01:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2008 18:01:34 -0000 Received: (qmail 42150 invoked by uid 500); 16 Feb 2008 18:01:27 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 42130 invoked by uid 500); 16 Feb 2008 18:01:27 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 42121 invoked by uid 99); 16 Feb 2008 18:01:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2008 10:01:27 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [207.97.245.135] (HELO smtp135.iad.emailsrvr.com) (207.97.245.135) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2008 18:00:42 +0000 Received: from relay3.r3.iad.emailsrvr.com (localhost [127.0.0.1]) by relay3.r3.iad.emailsrvr.com (SMTP Server) with ESMTP id 7894144C01B for ; Sat, 16 Feb 2008 13:01:02 -0500 (EST) Received: by relay3.r3.iad.emailsrvr.com (Authenticated sender: dbrosius-AT-baybroadband.net) with ESMTP id 59D8244C0E1 for ; Sat, 16 Feb 2008 13:01:02 -0500 (EST) Message-ID: <002f01c870c5$e98eb090$6501a8c0@MeBigFatGuy> From: "Dave Brosius" To: References: <45870.192.168.1.71.1203100592.webmail@192.168.1.71> <510143ac0802160243n24a104aev99deb92cc0efedec@mail.gmail.com> <003701c870a0$8a7b16e0$6501a8c0@MeBigFatGuy> <510143ac0802160603s373dfb93u924c8ac79fbe4907@mail.gmail.com> Subject: Re: non versioned attributes on versioned nodes? Date: Sat, 16 Feb 2008 13:01:10 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Virus-Checked: Checked by ClamAV on apache.org Thank you, that worked fine. One question of curiosity is, when you walk a VersionHistory and get a version. The properties set (when done between checkin and checkout ops) for a node, don't actually live on the version object but on a child of the version. It appears in my testing that there is only one child of a version History, even tho it is accessed thru iterator. Am I correct in understanding that there is only going to be one child of the Version object (under normal checkin/checkout) usage? ----- Original Message ----- From: "Jukka Zitting" To: Sent: Saturday, February 16, 2008 9:03 AM Subject: Re: non versioned attributes on versioned nodes? > Hi, > > On Feb 16, 2008 3:33 PM, Dave Brosius wrote: >> I have achieved partial success storing audit info in a child node's >> stream >> property. As this stream is a serialized object, it is easy to append >> audit >> information to it. > > Ah, OK. A binary property is a good place for a serialized object. > >> One associated problem, is that sometimes i receive a UUID of the parent >> document object to perform operations on, and sometimes i receive a UUID >> of >> a version of that parent document (by design). In either case, i want to >> add >> audit information regarding this operation. The problem is the audit >> object >> is hanging off the parent document, not the version, and so if passed a >> UUID >> of a version, i need to find the owning document and then navigate to the >> child audit object. >> [...] >> how to I go from the Version to the Node? > > You could do something like this: > > Node node = session.getNodeByUUID(...); > if (node.isNodeType("nt:version")) { > node = session.getNodeByUUID( > node.getProperty("jcr:frozenNode/jcr:frozenUuid").getString()); > } > > Note that the version storage can contain version histories of nodes > that do not exist in the workspace you are accessing. > > BR, > > Jukka Zitting