1 6 7 package com.sun.enterprise.config.backup.status; 8 9 import java.util.Date ; 10 import com.sun.enterprise.config.backup.BackupException; 11 import com.sun.enterprise.config.backup.utils.BackupHelper; 12 import com.sun.enterprise.config.backup.utils.FactoryHelper; 13 14 19 public class SnapShotStatus extends Status { 20 21 22 23 private String _absSnapShotFileName; 25 26 28 30 32 33 private long _snapShotFileSize; 34 35 36 public SnapShotStatus() { 37 } 38 39 public SnapShotStatus(boolean init) throws BackupException { 40 super(true); 41 if(init) { 42 init(); 43 } 44 } 45 private void init() throws BackupException { 46 setAbsoluteSnapShotFileName(getAbsoluteName(getCreationTimeStamp())); 50 } 51 52 public String getOperation() { 53 return "snapshot"; 54 } 55 56 61 62 67 68 protected String thisToString() { 69 return "SnapShotFileName= " + _absSnapShotFileName; 70 } 71 72 public String getAbsoluteSnapShotFileName() { 73 return _absSnapShotFileName; 74 } 75 76 private void setAbsoluteSnapShotFileName(String name) { 77 _absSnapShotFileName = name; 78 } 79 80 private String getAbsoluteName(long ts) { 81 return BackupHelper.getAbsoluteSnapshotFileName(ts); 82 } 83 84 public String [] getDirectoriesToBackup() { 85 return FactoryHelper.getEnv().getDirectoriesToBackup(); 86 } 87 88 } 89 | Popular Tags |