diff options
| author | Jonathan Bauer | 2015-08-24 16:46:26 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-08-24 16:46:26 +0200 |
| commit | 4cd45500beb76606c77da7b813760a45fb2d346d (patch) | |
| tree | 64fc51d908660118e83c489b230eed614eba6a40 | |
| parent | [client] Make font scaling and proxy discovery configurable (no GUI yet) (diff) | |
| download | tutor-module-4cd45500beb76606c77da7b813760a45fb2d346d.tar.gz tutor-module-4cd45500beb76606c77da7b813760a45fb2d346d.tar.xz tutor-module-4cd45500beb76606c77da7b813760a45fb2d346d.zip | |
[client] ThriftActions updateLecture
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java | 46 |
1 files changed, 30 insertions, 16 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 9e2c5f09..192f8138 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java @@ -411,22 +411,7 @@ public class ThriftActions { } }); } - /** - * @param frame - * @param imageBaseId - * @param callback - */ - // sync - public static Map<String, ImagePermissions> getImagePermissions(final Frame frame, final String imageBaseId) { - Map<String, ImagePermissions> permissionMap = null; - try { - permissionMap = ThriftManager.getSatClient().getImagePermissions(Session.getSatelliteToken(), imageBaseId); - } catch (TException e) { - ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Lesen der Metadaten"); - } - return permissionMap; - } // async public static void getImagePermissions(final Frame frame, final String imageBaseId, final ImageMetaCallback callback) { QuickTimer.scheduleOnce(new Task() { @@ -445,7 +430,16 @@ public class ThriftActions { } }); } - + // sync + public static Map<String, ImagePermissions> getImagePermissions(final Frame frame, final String imageBaseId) { + Map<String, ImagePermissions> permissionMap = null; + try { + permissionMap = ThriftManager.getSatClient().getImagePermissions(Session.getSatelliteToken(), imageBaseId); + } catch (TException e) { + ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Lesen der Metadaten"); + } + return permissionMap; + } /** * GUI-BLOCKING * Sets the owner of the given lectureId to newOwner @@ -643,6 +637,26 @@ public class ThriftActions { } return lecture; } + + /** + * GUI-BLOCKING + * Updates the lecture with given lectureId to the given lecture + * + * @param frame to show user feedback on + * @param lectureId lecture's is to update + * @param lecture LectureWrite data to update the lecture with + * @return + */ + public static boolean updateLecture(final Frame frame, final String lectureId, final LectureWrite lectureWrite) { + try { + ThriftManager.getSatClient().updateLecture(Session.getSatelliteToken(), + lectureId, lectureWrite); + } catch (TException e) { + ThriftError.showMessage(frame, LOGGER, e, "Fehler beim Updaten der Veranstaltung"); + return false; + } + return true; + } /** * GUI-BLOCKING * @param frame |
