Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 8250 invoked from network); 24 Jul 2008 17:35:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jul 2008 17:35:36 -0000 Received: (qmail 2162 invoked by uid 500); 24 Jul 2008 17:35:35 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 2142 invoked by uid 500); 24 Jul 2008 17:35:35 -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 2131 invoked by uid 99); 24 Jul 2008 17:35:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2008 10:35:35 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.e.harris@gmail.com designates 209.85.134.187 as permitted sender) Received: from [209.85.134.187] (HELO mu-out-0910.google.com) (209.85.134.187) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2008 17:34:41 +0000 Received: by mu-out-0910.google.com with SMTP id w8so2154534mue.1 for ; Thu, 24 Jul 2008 10:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=lTUP2gmKyT+4MJm36HQnObRLpbBzjz3gZzLKYCNz1kU=; b=A7SigQjvjbYC+O9WLmdqzGtNl50K1pD4wF2kZw53gonomPykCCRSzOTaTGoDQwKtbL 6QA+GZTpfqZRwaSCLoDVpwy5ftHXaQr6kg9DFcV984fAGLeMxHZS6BMonGdXIG1fR2ZZ eIzMLP3q1GRRKh7Mkyog9B14HkkaCBjEzlUuA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=qTRtQsCvvRxun4e5Bhl8wkan2AI7ATCBxxuduM8okeQ5twcZGHecpb4XbEF5ZVr+I3 qzCgTDgMzESIRKSiFNy4sujYHlQ9lcC8obObKeYHaLAhuckkbV+cI9OUEqn58cpiTBwx BNI8Co+Syqur8IT79Gf6j+nVCNpimICackgE8= Received: by 10.103.250.11 with SMTP id c11mr272424mus.23.1216920905237; Thu, 24 Jul 2008 10:35:05 -0700 (PDT) Received: by 10.103.22.2 with HTTP; Thu, 24 Jul 2008 10:35:05 -0700 (PDT) Message-ID: <82670ba40807241035n1a05c43dyd3de1870042f6138@mail.gmail.com> Date: Thu, 24 Jul 2008 13:35:05 -0400 From: "Michael Harris" To: users@jackrabbit.apache.org Subject: Re: versioning a file In-Reply-To: <82670ba40807240810i57133b2cn9b5f9a1f7e582da3@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4381_16199652.1216920905242" References: <82670ba40807240810i57133b2cn9b5f9a1f7e582da3@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4381_16199652.1216920905242 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline when a node is versioned, what happens to child nodes? Are they versioned to? If you want to modify a child node, would you checkout the parent or the child? So nt:file node has a child node nt:resource. The content of the file is stored as a property of that resource. To version the file, do you checkout the nt:file or the nt:resource? On Thu, Jul 24, 2008 at 11:10 AM, Michael Harris wrote: > hey all, > > so i can create file > > Node fileNode = parentFolder.addNode(file.getName(), "nt:file"); > > // make the file versionable and lockable > fileNode.addMixin("mix:versionable"); > > // create the mandatory child node - jcr:content > Node resNode = fileNode.addNode("jcr:content", "nt:resource"); > > I added the middle line to make the file versionable. but when I try to > getVersionHistory on the file I get an exception > > > javax.jcr.UnsupportedRepositoryOperationException: Unable to perform > versioning operation on non versionable node: /files/testVersionFile > at > org.apache.jackrabbit.core.NodeImpl.checkVersionable(NodeImpl.java:3215) > > > any ideas? Can I add the mix:versionable type to nt:file? If not, how > does one version a file? > > -- > --------------------- > Michael Harris > -- --------------------- Michael Harris ------=_Part_4381_16199652.1216920905242--