diff options
author | Jonathan Bauer | 2015-08-21 16:39:18 +0200 |
---|---|---|
committer | Jonathan Bauer | 2015-08-21 16:39:18 +0200 |
commit | 063e4df5e0cbc8a0f22e12c199fd404a3ca4db65 (patch) | |
tree | bb22525dfda4d44d25841ecd04dfe2cde6b8b16f /dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java | |
parent | [client] setImageOwner ThriftActions'ed (diff) | |
download | tutor-module-063e4df5e0cbc8a0f22e12c199fd404a3ca4db65.tar.gz tutor-module-063e4df5e0cbc8a0f22e12c199fd404a3ca4db65.tar.xz tutor-module-063e4df5e0cbc8a0f22e12c199fd404a3ca4db65.zip |
[client] more ThriftActions & minor bugfix (saving button enabled even if no OS was preselected TODO fix properly)
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java index 63558197..f2e1fb94 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java @@ -76,14 +76,17 @@ public class ThriftActions { * @param imageBaseId image's id we are writing meta information of * @param meta actual meta information as ImageBaseWrite */ - public static void updateImageBase(final Frame frame, final String imageBaseId, final ImageBaseWrite meta) { + public static boolean updateImageBase(final Frame frame, final String imageBaseId, final ImageBaseWrite meta) { try { ThriftManager.getSatClient().updateImageBase(Session.getSatelliteToken(), imageBaseId, meta); } catch (TException e) { ThriftError.showMessage(frame, LOGGER, e, "Konnte Metadaten des Images nicht übertragen"); + return false; } + return true; } + /** * GUI-BLOCKING * Pushes the given permission map as custom permission for the given imageBaseId @@ -142,6 +145,7 @@ public class ThriftActions { } return ti; } + /** * GUI-BLOCKING * Starts uploading the given diskFile using the transferInformation and hashGen @@ -202,7 +206,7 @@ public class ThriftActions { * @param transferInformation * @param versionInfo */ - public static void updateImageVersion(final Frame frame, + public static boolean updateImageVersion(final Frame frame, final String versionId, final ImageVersionWrite versionInfo){ try { ThriftManager.getSatClient().updateImageVersion(Session.getSatelliteToken(), @@ -211,9 +215,9 @@ public class ThriftActions { } catch (TException e) { Gui.showMessageBox(frame, "Konnte neue Version nicht erstellen!", MessageType.ERROR, LOGGER, e); - return; + return false; } - Gui.showMessageBox(frame, "Neue Version erfolgreich erstellt", MessageType.INFO, LOGGER, null); + return true; } /* ******************************************************************************* * @@ -229,6 +233,7 @@ public class ThriftActions { public interface DownloadCallback { void downloadInitialized(boolean success); } + /** * NON-BLOCKING * Initializes the download of the given imageVersionId saving it to the given |