コード例 #1
0
 public BackupInfo getBackupInfo(String name, boolean isLocal) {
   UriBuilder builder = client.uriBuilder(BACKUP_INFO_URL);
   addQueryParam(builder, "backupname", name);
   if (isLocal) {
     addQueryParam(builder, "isLocal", isLocal);
   }
   return client.getURI(BackupInfo.class, builder.build());
 }
コード例 #2
0
  public BackupUploadStatus uploadBackupStatus(String name) {
    BackupUploadStatus status = null;
    UriBuilder builder = client.uriBuilder(BACKUP_UPLOAD_URL);
    addQueryParam(builder, "tag", name);

    try {
      status = client.getURI(BackupUploadStatus.class, builder.build());
    } catch (Exception e) {
      status = new BackupUploadStatus();
    }

    return status;
  }
コード例 #3
0
  public BackupRestoreStatus getRestoreStatus(String name, boolean isLocal) {
    BackupRestoreStatus status = null;
    UriBuilder builder = client.uriBuilder(RESTORE_STATUS_URL);
    addQueryParam(builder, "backupname", name);
    addQueryParam(builder, "isLocal", isLocal);

    try {
      status = client.getURI(BackupRestoreStatus.class, builder.build());
    } catch (Exception e) {
      status = new BackupRestoreStatus();
      status.setStatus(BackupRestoreStatus.Status.DOWNLOAD_FAILED);
      status.setDetails(e.getMessage());
    }

    return status;
  }
コード例 #4
0
 public BackupSet getBackup(String name) {
   UriBuilder builder = client.uriBuilder(BACKUP_URL + "backup");
   addQueryParam(builder, "tag", name);
   return client.getURI(BackupSet.class, builder.build());
 }