summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java34
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 ba45fc79..f7238b03 100644
--- a/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java
+++ b/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java
@@ -106,12 +106,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" };
@@ -132,8 +126,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();
@@ -144,6 +150,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
@@ -430,7 +442,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
@@ -470,7 +482,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();
@@ -532,12 +544,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