StringBuilder result = new StringBuilder("\nThe current restores information : \n");
result.append("\tWorkspace restore with id ").append(info.getBackupId()).append(":\n");
BackupConfigBean configBean = info.getBackupConfig();
result.append("\t\tbackup folder : ").append(configBean.getBackupDir()).append("\n");
result.append("\t\trepository name : ").append(info.getRepositoryName()).append("\n");
result.append("\t\tworkspace name : ").append(info.getWorkspaceName()).append("\n");
result.append("\t\tbackup type : ");
result.append(
configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental" : "full only")
.append("\n");
result.append("\t\trestore state : ").append(getRestoreState(info.getState())).append("\n");
result.append("\t\tstarted time : ").append(info.getStartedTime()).append("\n");
result.append(info.getFinishedTime().equals("") ? "\n"
: "\t\tfinished time : " + info.getFinishedTime() + "\n\n");
return result.toString();
}
else
{
return failureProcessing(response);
}
}
else
{
String sURL =
path + HTTPBackupAgent.Constants.BASE_URL
+ HTTPBackupAgent.Constants.OperationType.CURRENT_RESTORE_INFO_ON_REPOSITORY + "/"
+ repositoryName;
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 IllegalStateException("Can not get DetailedInfo from responce.", e);
}
StringBuilder result = new StringBuilder("\nThe current restores information : \n");
result.append("\tRepository restore with id ").append(info.getBackupId()).append(":\n");
BackupConfigBean configBean = info.getBackupConfig();
result.append("\t\tbackup folder : ").append(configBean.getBackupDir()).append("\n");
result.append("\t\trepository name : ").append(info.getRepositoryName()).append("\n");
result.append("\t\tbackup type : ");
result.append(
configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental" : "full only")
.append("\n");
result.append("\t\trestore state : ").append(getRepositoryRestoreState(info.getState()))
.append("\n");
result.append("\t\tstarted time : ").append(info.getStartedTime()).append("\n");
result.append(info.getFinishedTime().equals("") ? "\n"