This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 95981 - [Refactoring-review-TCA] Make BackupFacility pluggable
Summary: [Refactoring-review-TCA] Make BackupFacility pluggable
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks: 89605
  Show dependency tree
 
Reported: 2007-02-19 23:39 UTC by Miloslav Metelka
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2007-02-19 23:39:27 UTC
It is advised to make BackupFacility plugable for 6.0

Review wiki page: http://wiki.netbeans.org/wiki/view/RefactoringAPIReview
Comment 1 Jan Becicka 2007-02-21 07:59:43 UTC
Current implementations is following. BackupFacility is pluggable abstract
class, with default implementation. Backup mathod returns Handle, which can be
later used for restore.

public abstract class BackupFacility {
    public abstract Handle backup(FileObject... file) throws IOException;
    public final Handle backup(Collection<? extends FileObject> fileObjects)
{throws IOException {...}
    public abstract void clear();
    
    public static BackupFacility getDefault() {..}
    public interface Handle {
        void restore() throws IOException;
    }
}


Checking in
api/test/unit/src/org/netbeans/modules/refactoring/spi/BackupFacilityTest.java;
/cvs/refactoring/api/test/unit/src/org/netbeans/modules/refactoring/spi/BackupFacilityTest.java,v
 <--  BackupFacilityTest.java
new revision: 1.3; previous revision: 1.2
done
Checking in
java/src/org/netbeans/modules/refactoring/java/plugins/RetoucheCommit.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/RetoucheCommit.java,v
 <--  RetoucheCommit.java
new revision: 1.2; previous revision: 1.1
done
Checking in api/src/org/netbeans/modules/refactoring/plugins/FileDeletePlugin.java;
/cvs/refactoring/api/src/org/netbeans/modules/refactoring/plugins/FileDeletePlugin.java,v
 <--  FileDeletePlugin.java
new revision: 1.5; previous revision: 1.4
done
Checking in api/src/org/netbeans/modules/refactoring/spi/BackupFacility.java;
/cvs/refactoring/api/src/org/netbeans/modules/refactoring/spi/BackupFacility.java,v
 <--  BackupFacility.java
new revision: 1.7; previous revision: 1.6
done