1 23 24 29 30 package com.sun.enterprise.config.backup; 31 32 import java.io.*; 33 import java.util.*; 34 35 import com.sun.enterprise.config.backup.util.ObjectAnalyzer; 36 import com.sun.enterprise.config.backup.util.FileUtils; 37 38 43 44 public class BackupRequest 45 { 46 49 public BackupRequest(String domainsDirName, String domain, String desc) 50 { 51 setDomainsDir(domainsDirName); 52 setDescription(desc); 53 domainName = domain; 54 } 55 56 59 public BackupRequest(String domainsDirName, String domain, String desc, String backupFileName) 60 { 61 this(domainsDirName, domain, desc); 62 setBackupFile(backupFileName); 63 } 64 65 67 public void setTerse(boolean b) 68 { 69 terse = b; 70 } 71 72 74 public void setVerbose(boolean b) 75 { 76 verbose = b; 77 } 78 79 81 public String toString() 82 { 83 return ObjectAnalyzer.toString(this); 84 } 85 86 90 private void setDomainsDir(String name) 91 { 92 domainsDir = FileUtils.safeGetCanonicalFile(new File(name)); 93 } 94 95 97 private void setBackupFile(String name) 98 { 99 backupFile = FileUtils.safeGetCanonicalFile(new File(name)); 100 } 101 102 104 private void setDescription(String desc) 105 { 106 description = desc; 107 } 108 109 113 final static String [] excludeDirs = {Constants.BACKUP_DIR + "/"}; 114 115 File domainsDir; 116 String domainName; 117 String description; 118 119 File backupFile; 121 122 File domainDir; 124 long timestamp; 125 126 131 File backupDir; 132 boolean terse = false; 133 boolean verbose = false; 134 } 135 136 | Popular Tags |