Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 13800 invoked from network); 26 Jun 2006 08:23:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 08:23:53 -0000 Received: (qmail 38516 invoked by uid 500); 26 Jun 2006 08:23:52 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 38367 invoked by uid 500); 26 Jun 2006 08:23:51 -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 38344 invoked by uid 99); 26 Jun 2006 08:23:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 01:23:51 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of stefan.guggisberg@gmail.com designates 64.233.162.205 as permitted sender) Received: from [64.233.162.205] (HELO nz-out-0102.google.com) (64.233.162.205) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 01:23:50 -0700 Received: by nz-out-0102.google.com with SMTP id i1so1657193nzh for ; Mon, 26 Jun 2006 01:23:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YZBjOE3d8KP1erfJI3ai1B7V5/Uxjg29V3zDG+fPomzkHn9YmZfqvlNlM/dJ/+FI/puu/idfmIs/qTX0R8cMa+ZWKgr2Qqjvzug7yOdOW8ZmQD6jLRzZsGlxRnSdfmnmW/k3B3PFZy2cJQBlkpyHLfR1sWmZtRQhOXGzSeVbDdM= Received: by 10.65.191.20 with SMTP id t20mr5702088qbp; Mon, 26 Jun 2006 01:23:29 -0700 (PDT) Received: by 10.64.47.10 with HTTP; Mon, 26 Jun 2006 01:23:29 -0700 (PDT) Message-ID: <90a8d1c00606260123p442e7a02pabee636532257b4d@mail.gmail.com> Date: Mon, 26 Jun 2006 10:23:29 +0200 From: "Stefan Guggisberg" To: dev@jackrabbit.apache.org Subject: Re: Main Entry Point for Backup Tool In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi nicolas, i share tobi's concern regarding the naming of the methods. save and restore are used in other contexts and may cause confusion. some comments regarding the proposed signatures: - i suggest both methods throw IOException and RepositoryException. there's no need for specific SavingException and RestoreException as the context is already clear. - if the methods are goping to be on Repository we'll also need some sort of authentication/authorization. a Credentials parameter would IMO be fine. both methods should also throw AccessDeniedExcpetion. cheers stefan On 6/25/06, Nicolas Toper wrote: > Hi, > > I am updating the RepositoryImpl class. Here is what it looks like (below). > > We have agreed on using In/OutputStream. However, now that I have advanced a > little bit in the code, it raises a problem: I cannot use nio and since it > is huge dataset, I would prefer to use it for performance issue. What do you > think? > > Nicolas > my blog! http://www.deviant-abstraction.net !! > /** > * > * This method restores data from an InputStream. > * > * @param InputStream savedData: InputStream containing the backup (and > its parameters). > * @param File workingFolder: the folder used to unzip all data. > * > * @throws RestoreException. Generic exception during restore operation. > * > * @author: Nicolas Toper > * > */ > public void restore(InputStream savedData, File workingFolder) throws > RestoreException { > > BackupRepository saveRepo = new BackupRepository(this, savedData, > workingFolder); > saveRepo.restore(); > } > > > /** > * > * This method saves from this repository to an OutputStream. > * > * @param outputStream out: Outputstream where the backup should be. > * @param BackupConfig conf: BackupConfig object containing all the > parameters. > * > * @throws SavingException. Generic exception during saving operation. > * > * @author: Nicolas Toper > * > */ > public void save(OutputStream out, BackupConfig conf) throws > SavingException{ > > conf.init(this); > BackupRepository saveRepo = (BackupRepository) conf.getBackup(); > saveRepo.save(out, conf); > } > >