diff options
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java')
-rw-r--r-- | dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java b/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java index 1810f0b1..fea3ae42 100644 --- a/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java +++ b/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java @@ -105,12 +105,6 @@ public class FTPSearchDownloader_GUI extends JFrame implements */ public FTPSearchDownloader_GUI(Component formerGUI) { - try { - client.setTokenForSession(SessionData.session.getAuthToken()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } final Object[] options = { "Beenden", "Abbrechen" }; @@ -131,8 +125,20 @@ public class FTPSearchDownloader_GUI extends JFrame implements if (choice == 0) { try { - client.DeleteFtpUser(user.userName); + client.DeleteFtpUser(user.userName,SessionData.session.getAuthToken()); + try { + client.setSessionInvalid(SessionData.session.getAuthToken()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } con.closeThriftConnection(); + try { + client.setSessionInvalid(SessionData.session.getAuthToken()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -143,6 +149,12 @@ public class FTPSearchDownloader_GUI extends JFrame implements }// end if choice } else { // no download running, close window + try { + client.setSessionInvalid(SessionData.session.getAuthToken()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } System.exit(0); }// end if taskrun }// end window closing @@ -429,7 +441,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements isAborted = true; // set flag try { - client.DeleteFtpUser(user.userName); + client.DeleteFtpUser(user.userName,SessionData.session.getAuthToken()); LOGGER.info("Deleted FTP user."); } catch (TException e1) { // TODO Auto-generated catch block @@ -469,7 +481,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements if (choice == 0) { task.cancel(true); try { - client.DeleteFtpUser(user.userName); + client.DeleteFtpUser(user.userName,SessionData.session.getAuthToken()); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -531,12 +543,12 @@ public class FTPSearchDownloader_GUI extends JFrame implements // Klick btnDownloadStarten.setText("Bitte warten"); try { - user = client.getFtpUser(); + user = client.getFtpUser(SessionData.session.getAuthToken()); downloadFile = user.path + "/" + client.getPathOfImage(Image.image.getImageId(), - Image.image.getVersion()); + Image.image.getVersion(),SessionData.session.getAuthToken()); } catch (TException e) { // TODO Auto-generated catch block |