"/" + backupId;
BackupAgentResponse response = transport.executeGET(sURL);
if (response.getStatus() == Response.Status.OK.getStatusCode()) {
DetailedInfo info;
try {
info = (DetailedInfo) getObject(DetailedInfo.class, response.getResponseData());
} catch (Exception e) {
throw new RuntimeException("Can not get DetailedInfo from responce.", e);
}
if (info.getType() == DetailedInfo.COMPLETED) {
String result = "\nThe completed (ready to restore) backup information : \n";
BackupConfigBean configBean = info.getBackupConfig();
result += ("\t\tbackup id : " + info.getBackupId() + "\n"
+ "\t\tbackup folder : " + configBean.getBackupDir() + "\n"
+ "\t\trepository name : " + info.getRepositoryName() + "\n"
+ "\t\tworkspace name : " + info.getWorkspaceName() + "\n"
+ "\t\tbackup type : " + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal" : "full only") + "\n"
+ "\t\tstarted time : " + info.getStartedTime() + "\n"
+ (info.getFinishedTime().equals("") ? "\n" :
"\t\tfinished time : " + info.getFinishedTime() + "\n\n"));
return result;
} else {
String result = "\nThe current backup information : \n";
BackupConfigBean configBean = info.getBackupConfig();
result += ("\t\tbackup id : " + info.getBackupId() + "\n"
+ "\t\tbackup folder : " + configBean.getBackupDir() + "\n"
+ "\t\trepository name : " + info.getRepositoryName() + "\n"
+ "\t\tworkspace name : " + info.getWorkspaceName() + "\n"
+ "\t\tbackup type : " + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal" : "full only") + "\n"
+ "\t\tfull backup state : " + getState(info.getState())) + "\n"
+ (info.getBackupType() == BackupManager.FULL_BACKUP_ONLY ? "" :
"\t\tincremental backup state : " + "working" + "\n")
+ "\t\tstarted time : " + info.getStartedTime() + "\n"
+ (info.getFinishedTime().equals("") ? "\n" :
"\t\tfinished time : " + info.getFinishedTime() + "\n\n");
return result;
}
} else {
return failureProcessing(response);