1 6 7 package com.sun.enterprise.config.backup; 8 9 import java.io.Serializable ; 10 import java.util.ArrayList ; 11 12 16 public class BackupHistory implements Serializable , EnvironmentConstants { 17 18 private final HistoryEntry[] _historyEntries; 19 private final String _historyFileName; 20 21 public BackupHistory(String fileName) { 22 _historyEntries = null; 23 _historyFileName = fileName; 24 } 25 26 public BackupHistory(HistoryEntry[] historyEntries, String fileName) { 27 _historyEntries = historyEntries; 28 _historyFileName = fileName; 29 30 } 31 32 public HistoryEntry[] getHistoryEntries() { 33 return _historyEntries; 34 } 35 36 public int size() { 37 if(_historyEntries == null) return 0; 38 return _historyEntries.length; 39 } 40 41 public String getBackupHistoryFile() { 42 return _historyFileName; 43 } 44 45 public String toString() { 46 String res = ""; 47 if(_historyEntries == null) return res; 48 49 for(int i = 0; i < _historyEntries.length; i++ ) { 50 if(res != "") { 51 res+=DefaultConstants.NEWLINE_CHARACTER; 52 } 53 res += _historyEntries[i]; 54 } 55 return res; 56 } 57 } | Popular Tags |