KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > status > RestoreStatus


1 /*
2  * BackupStatus.java
3  *
4  * Created on December 13, 2000, 6:52 AM
5  */

6
7 package com.sun.enterprise.config.backup.status;
8
9 import com.sun.enterprise.config.backup.BackupException;
10 import com.sun.enterprise.config.backup.utils.BackupHelper;
11 import com.sun.enterprise.config.backup.utils.LocalStringsHelper;
12
13 /**
14  *
15  * @author sridatta
16  */

17 public class RestoreStatus extends Status {
18     
19     /**
20      * This file is used to undo restore operation
21      */

22     private String JavaDoc _snapshotBackupFile;
23     private String JavaDoc _backupFileName;
24     private String JavaDoc _absoluteBackupFileName;
25     
26     /** Creates a new instance of BackupStatus */
27     public RestoreStatus() {
28     }
29     
30      public RestoreStatus(String JavaDoc name) throws BackupException {
31          super(true);
32        _absoluteBackupFileName = name;
33     }
34
35     public String JavaDoc getOperation() {
36         return "restore";
37     }
38     
39     public String JavaDoc thisToString() {
40         return "Backup File= " + _absoluteBackupFileName;
41     }
42     
43     public static RestoreStatus createFailedRestoreStatus(String JavaDoc msg, String JavaDoc file) {
44         RestoreStatus rs = new RestoreStatus();
45         BackupHelper.setExceptionInStatus(rs, new BackupException(
46                 msg,
47                 LocalStringsHelper.getString(msg,file)));
48         return rs;
49     }
50 }
51
Popular Tags