public void run() {
progressDialog.startDialog("Downloading your credentials", "", 0, 0, null, null);
}
});
StorageObject encryptedCredentialsObject = null;
try {
credentials = null;
StorageService service = getStorageService();
encryptedCredentialsObject = service.getObject(
bucketName[0], credentialObjectKey[0]);
} catch (ServiceException e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressDialog.stopDialog();
}
});
String errorMessage = "<html><center>Unable to find your credentials online"
+ "<br><br>Please check your passphrase and password</center></html>";
log.error(errorMessage, e);
ErrorDialog.showDialog(myself, hyperlinkListener, errorMessage, null);
return;
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressDialog.updateDialog("Decrypting your credentials", null, 0);
}
});
try {
if (targetS3.isSelected()) {
myself.credentials = AWSCredentials.load(password,
new BufferedInputStream(encryptedCredentialsObject.getDataInputStream()));
} else {
myself.credentials = GSCredentials.load(password,
new BufferedInputStream(encryptedCredentialsObject.getDataInputStream()));
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressDialog.stopDialog();