From graffito-dev-return-624-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Wed Oct 26 12:33:35 2005 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 71693 invoked from network); 26 Oct 2005 12:33:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Oct 2005 12:33:35 -0000 Received: (qmail 74103 invoked by uid 500); 26 Oct 2005 12:33:35 -0000 Mailing-List: contact graffito-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-dev@incubator.apache.org Received: (qmail 74089 invoked by uid 99); 26 Oct 2005 12:33:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2005 05:33:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [82.99.145.99] (HELO aura.cz) (82.99.145.99) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2005 05:33:32 -0700 Received: (qmail 9374 invoked from network); 26 Oct 2005 12:33:11 -0000 Received: from markoc.uvoz.aura.cz (HELO [192.168.1.183]) ([192.168.1.183]) (envelope-sender ) by aura.cz (qmail-ldap-1.03) with SMTP for ; 26 Oct 2005 12:33:11 -0000 Message-ID: <435F7692.2000007@aura.cz> Date: Wed, 26 Oct 2005 14:29:06 +0200 From: Martin Koci User-Agent: Thunderbird 1.4.1 (X11/20051006) MIME-Version: 1.0 To: graffito-dev@incubator.apache.org Subject: Re: Content Version support in Graffito References: <3b728ee90510201220l26b3d35eodc73bb506e7a2a4c@mail.gmail.com> <435BF102.5040204@aura.cz> <435F68E7.4040505@aura.cz> <3b728ee90510260516u193d296cq322d7db59b2591a6@mail.gmail.com> In-Reply-To: <3b728ee90510260516u193d296cq322d7db59b2591a6@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Christophe Lombart wrote: > On 10/26/05, Martin Koci wrote: > >> Previous method getVersionLabels() was mistake, because there is no >> 'latest' version in JCR. Because version are stored as direct acyclic >> graph there is no information which version is the 'newest'. >> > > With simple tests, the newest is not the version provided by > node.getBaseVersion() or VersionHistory.getRootVersion() > > I'm reviewing your code and I have some questions and remarks : > > 1.In the methods checkout, checkin, getVersionLabels, addVersionLabel > : why the object versionableEntity is defined as an argument, it is > not used in the method impl. > versionableEntity can be used to some checks like "this object is not stored on path". > I would like to use one of the following solution: > * either use only the path > * or either use only the object (if this one contains the UUID or the > path). This imply a small refactoring on the others persistenceManager > methods (as you suggested a couple of days before). > I think JCR is 'path-oriented' (or UUID-oriented) more then object-oriented. Operations are performed on paths not objects. So i think general API must always accept path or UUID but can contain method operating on mapped object: /** *@throws if object has no path or UUID mapping */ checkin(Object entity) throws NotIdentifiableObjectException > 2.checkin : Why to split the version number into a String[]. I think a > simple string arg is more open : checkin(String absPath, Object > versionableEntity, String versionLabel) > Because one version can have more labels. For example in my application one binary content of document has version labels '1.1' and 'B.1' > 3. Following the jackrabbit mailing list, extra version properties > (user, comments, ...) has to be added into the matching node. > > Yes, but not in my app. I solved it with domain object Version which stores additional information of each version. > christophe > > >