Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 91552 invoked from network); 16 Sep 2006 19:23:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Sep 2006 19:23:13 -0000 Received: (qmail 95637 invoked by uid 500); 16 Sep 2006 19:23:13 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 95285 invoked by uid 500); 16 Sep 2006 19:23:12 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 95276 invoked by uid 99); 16 Sep 2006 19:23:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Sep 2006 12:23:12 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Sep 2006 12:23:11 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5128E714315 for ; Sat, 16 Sep 2006 19:19:23 +0000 (GMT) Message-ID: <1126801.1158434363329.JavaMail.jira@brutus> Date: Sat, 16 Sep 2006 12:19:23 -0700 (PDT) From: "Nicolas Toper (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-569) WorkspaceImporter Refactoring In-Reply-To: <19442039.1158076525667.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 [ http://issues.apache.org/jira/browse/JCR-569?page=comments#action_12435261 ] Nicolas Toper commented on JCR-569: ----------------------------------- Hi Jukka, I agree on your approach. I have made the update to the code, I will submit a new patch as soon as I find a USB key > WorkspaceImporter Refactoring > ----------------------------- > > Key: JCR-569 > URL: http://issues.apache.org/jira/browse/JCR-569 > Project: Jackrabbit > Issue Type: Improvement > Reporter: Nicolas Toper > Attachments: GenericImporter.patch, SysViewImporter.patch > > > Hi, > As you know, I have run into an issue with the backup tool using the WorkspaceImporter. I ended up copy/pasting large body of code since the current WorkspaceImporter was not flexible enough for my use (in my class called SysViewImporter). This solution was perfectly valid for Google SoC (a lot of time constraints) but unacceptable in the long run for any project (we hate large body of duplicate code :p). > Also, some issues have been raised with this class (i.e. jcr:root importation, allowsSameNameSiblings issue). > Overall I feel this class is circumvoluted and really hard to understand. For instance, the current code contains at most 5 imbricated if and uses a lot of different ways to pass information (stacks, objects set on null). > I tried to refactor my SysViewImporter and the WorkspaceImporter but it implies a new code for the WorkspaceImporter and the SysViewImporter. Here is its skeleton! I first wanted to gather the community feedback before stepping in. I tried moving all "work code" away from the startNode method and reorganise it for readilibility. > Please give me your feedback. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira