diff options
author | Tobias Spitzer | 2014-05-15 11:17:06 +0200 |
---|---|---|
committer | Tobias Spitzer | 2014-05-15 11:17:06 +0200 |
commit | 32dff35f3cf3a74f62b64105fd57f7da0e2027dc (patch) | |
tree | f60fa38f526b7d1167342335c2cfa0c393a84466 /Dozentenmodul | |
parent | Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff) | |
download | tutor-module-32dff35f3cf3a74f62b64105fd57f7da0e2027dc.tar.gz tutor-module-32dff35f3cf3a74f62b64105fd57f7da0e2027dc.tar.xz tutor-module-32dff35f3cf3a74f62b64105fd57f7da0e2027dc.zip |
Es wird nur noch eine Verbindung zum bwLehrpoolSuite Server geöffnet.
Diffstat (limited to 'Dozentenmodul')
44 files changed, 93 insertions, 57 deletions
diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class Binary files differindex 567fc96b..09814b8a 100644 --- a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class Binary files differindex 6617ad6e..e3f2472b 100644 --- a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class Binary files differindex 1a5a0fe5..4acbdfaf 100644 --- a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class Binary files differindex b2656782..042234c9 100644 --- a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class Binary files differindex 94acbae9..23d60d2f 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class Binary files differindex 0081eba4..03680a6f 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class Binary files differindex e20cfac9..21e46d35 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class Binary files differindex c9ed851b..214beaa8 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class Binary files differindex 22538b35..cc06860f 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class Binary files differindex 704bd616..02cb7abd 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class Binary files differindex 2053e90e..6267c626 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class Binary files differindex a39211bb..45ca0eae 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class Binary files differindex 74aaef08..04c8b107 100644 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class Binary files differindex aa1b5a70..a846427a 100644 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class Binary files differindex 910cc1d1..bde5917c 100644 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class Binary files differindex 196208c4..58a8dce5 100644 --- a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class Binary files differindex cdf3cad7..81f1d246 100644 --- a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class Binary files differindex 5d6c601d..61318fe0 100644 --- a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class Binary files differindex 7207fba7..9fabf945 100644 --- a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class Binary files differindex 64a6e9c9..c98d437a 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class Binary files differindex 24a37378..6c550b56 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class Binary files differindex 88e9e10c..033c3dda 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class Binary files differindex 95a953f3..245edb20 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class Binary files differindex d7bc6bab..13b9fe67 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class Binary files differindex 780e5fd1..3f9d2221 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class Binary files differindex 6ecad17e..570e91d4 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class Binary files differindex 6db87dc2..8d8f8918 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class Binary files differindex aff3176d..91b73e2a 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI.class diff --git a/Dozentenmodul/bin/thrift/ThriftConnection.class b/Dozentenmodul/bin/thrift/ThriftConnection.class Binary files differindex 40003a69..290acaad 100644 --- a/Dozentenmodul/bin/thrift/ThriftConnection.class +++ b/Dozentenmodul/bin/thrift/ThriftConnection.class diff --git a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java index 79e37076..9fc4110d 100644 --- a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java +++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java @@ -70,8 +70,8 @@ public class DeleteImage_GUI extends JFrame { JTabbedPane tabbedPane; String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; - ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + ThriftConnection con=new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -201,7 +201,7 @@ public class DeleteImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -250,7 +250,7 @@ public class DeleteImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauütmenü - con.closeThriftConnection(); + DeleteImage_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -420,7 +420,7 @@ public class DeleteImage_GUI extends JFrame { // if (client.deleteImageServer(imageid // ,imageversion)) { - con.closeThriftConnection(); + DeleteImage_GUI di = new DeleteImage_GUI(); @@ -497,7 +497,7 @@ public class DeleteImage_GUI extends JFrame { okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java index 49a97051..a3c21ddf 100644 --- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -50,7 +50,7 @@ public class EditImageAllgemein_GUI extends JFrame { private JTextField EMail; private JTextField imagename; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); private JPanel panel_2; private JLabel lblNewLabel; private JTextPane txtpnBitteWhlenSie; @@ -221,7 +221,7 @@ public class EditImageAllgemein_GUI extends JFrame { public void mouseClicked(MouseEvent arg0) { // Durch den Klick auf Button Hauptmenpü wird dieses Fenster // unsichtbar und das Hauptmenü sichtbar - con.closeThriftConnection(); + EditImageAllgemein_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -261,7 +261,7 @@ public class EditImageAllgemein_GUI extends JFrame { // Setzen der Eingabe im Model, dadurch bleiben die // Daten bei einem erneuten Aufruf verfügbar // Image.image.setImagename(imagename.getText()); - con.closeThriftConnection(); + SearchEditImage_GUI se = new SearchEditImage_GUI(); se.setVisible(true); dispose(); @@ -288,7 +288,7 @@ public class EditImageAllgemein_GUI extends JFrame { Image.image.setImagename(imagename.getText()); System.out.println("Changing name to:" + imagename.getText()+ "\nNewName is: "+Image.image.getNewName()); - con.closeThriftConnection(); + EditImageTechnisch_GUI ea = new EditImageTechnisch_GUI(); ea.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index 8c14fa01..0643728f 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -73,8 +73,8 @@ public class FTPCreateUploader_GUI extends JFrame implements double speed; long bytesread; boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); + ThriftConnection con = new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); JButton finishButton = new JButton("Fertigstellen"); JButton btnUploadStarten = new JButton("Upload auf Server starten"); JButton btnZurck = new JButton("Zur\u00FCck"); @@ -115,6 +115,7 @@ public class FTPCreateUploader_GUI extends JFrame implements } task.cancel(true); } + con.closeThriftConnection(); System.exit(0); }// end window closing }); @@ -332,7 +333,7 @@ public class FTPCreateUploader_GUI extends JFrame implements if (taskrun == true) { try { client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); + } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -349,7 +350,7 @@ public class FTPCreateUploader_GUI extends JFrame implements btnZurck.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); - thrift.closeThriftConnection(); + CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); m.setVisible(true); } diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 1deb6cff..97a29849 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -70,8 +70,8 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener long bytesread; JLabel labelZeit; boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); + ThriftConnection con = new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); JButton btnZurck = new JButton("Zur\u00FCck"); JButton btnDownloadStarten = new JButton("Download starten"); JButton btnMainMenu = new JButton("Hauptmen\u00FC"); @@ -87,7 +87,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener if (taskrun == true) { try { client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); + con.closeThriftConnection(); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -355,7 +355,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener "Debug-Message", JOptionPane.ERROR_MESSAGE); } } - thrift.closeThriftConnection(); + SearchEditImage_GUI se = new SearchEditImage_GUI(); se.setVisible(true); dispose(); @@ -368,7 +368,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener btnMainMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - thrift.closeThriftConnection(); + MainMenue_GUI mm = new MainMenue_GUI(); mm.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index 6b2e0d66..99fc034b 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -73,8 +73,8 @@ public class FTPEditUploader_GUI extends JFrame implements long bytesread; boolean taskrun = false; int progress = 0; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); + ThriftConnection con = new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); JButton btnUploadStarten = new JButton("Upload auf Server starten"); JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); JButton finishButton = new JButton("Fertigstellen"); @@ -113,6 +113,7 @@ public class FTPEditUploader_GUI extends JFrame implements } task.cancel(true); } + con.closeThriftConnection(); System.exit(0); }// end window closing }); @@ -334,7 +335,7 @@ public class FTPEditUploader_GUI extends JFrame implements } task.cancel(true); } - thrift.closeThriftConnection(); + } }); btnZurck.addActionListener(new ActionListener() { diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java index b6ea90b4..ec1ceb8e 100644 --- a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -70,7 +70,7 @@ public class SearchEditImage_GUI extends JFrame { String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -191,7 +191,7 @@ public class SearchEditImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -240,7 +240,7 @@ public class SearchEditImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauütmenü - con.closeThriftConnection(); + SearchEditImage_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -376,7 +376,7 @@ public class SearchEditImage_GUI extends JFrame { SearchEditImage_GUI.this.setVisible(false); FTPDownloader_GUI down = new FTPDownloader_GUI(); down.setVisible(true); - con.closeThriftConnection(); + } else { JOptionPane.showMessageDialog(null, @@ -398,7 +398,7 @@ public class SearchEditImage_GUI extends JFrame { okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); @@ -412,7 +412,7 @@ public class SearchEditImage_GUI extends JFrame { JButton cancelButton = new JButton("Weiter"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - con.closeThriftConnection(); + // check if user is in correct tab if (tabbedPane.getSelectedIndex() == 0) { @@ -434,7 +434,7 @@ public class SearchEditImage_GUI extends JFrame { 8).toString(); Image.image.setVersion(imageversion); - con.closeThriftConnection(); + EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); ea.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/image/SearchImage_GUI.java b/Dozentenmodul/src/gui/image/SearchImage_GUI.java index 8fc7d164..73f0b9bb 100644 --- a/Dozentenmodul/src/gui/image/SearchImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchImage_GUI.java @@ -70,7 +70,7 @@ public class SearchImage_GUI extends JFrame { String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -191,7 +191,7 @@ public class SearchImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -240,7 +240,7 @@ public class SearchImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauütmenü - con.closeThriftConnection(); + SearchImage_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -376,7 +376,7 @@ public class SearchImage_GUI extends JFrame { SearchImage_GUI.this.setVisible(false); FTPDownloader_GUI down = new FTPDownloader_GUI(); down.setVisible(true); - con.closeThriftConnection(); + } else { JOptionPane.showMessageDialog(null, @@ -398,7 +398,7 @@ public class SearchImage_GUI extends JFrame { okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java index b30a33a7..b6249be0 100644 --- a/Dozentenmodul/src/gui/intro/Login_GUI.java +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -29,6 +29,7 @@ import org.apache.thrift.TException; import org.ini4j.Wini; import thrift.MasterThriftConnection; import thrift.ImageServer.Client; +import thrift.ThriftConnection; import thrift.UserInfo; import config.config_file; import javax.swing.SwingConstants; @@ -207,7 +208,13 @@ public class Login_GUI extends JFrame { SessionData.session.setSessionID(result.sessionId); SessionData.session.setServerAdress(result.serverAddress); System.out.println("Satellit-Adresse: " + result.serverAddress); - + + //set connection to bwLehrpoolSuiteServer + ThriftConnection bwthrift=new ThriftConnection(); + server.Server.Client bwClient=bwthrift.getThriftConnection(); + models.Client.clientcon.setClient(bwClient); + + System.out .println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " + result.sessionId @@ -240,7 +247,7 @@ public class Login_GUI extends JFrame { person.verantwortlicher.setVorname(user.firstName); person.verantwortlicher.setEMail(user.eMail); person.verantwortlicher.setHochschule(hochschule); - + try { // Lege config File an und entscheide welches Fenster // als nächstes geöffnet wird diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index 62cebb22..610df2f3 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -68,7 +68,7 @@ public class CreateLectureLink_GUI extends JFrame { String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); /** * Launch the application. @@ -90,6 +90,7 @@ public class CreateLectureLink_GUI extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { + con.closeThriftConnection(); System.exit(0); } @@ -349,7 +350,7 @@ public class CreateLectureLink_GUI extends JFrame { JButton cancelButton = new JButton("Zur\u00FCck"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - con.closeThriftConnection(); + CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI(); eVAG.setVisible(true); dispose(); @@ -420,7 +421,7 @@ public class CreateLectureLink_GUI extends JFrame { e1.getCause()+"\n"+e1.getMessage(), "Debug-Message", JOptionPane.ERROR_MESSAGE); } - con.closeThriftConnection(); + dispose(); } else { diff --git a/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java b/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java index da30680c..33192436 100644 --- a/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java @@ -69,7 +69,7 @@ public class DeleteLecture_GUI extends JFrame { "Gültigkeitsdatum", "Aktiv", "Letzte Benutzung", "Verantwortlicher", "Image", "Schlagwort", "ID" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -195,7 +195,7 @@ public class DeleteLecture_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -210,7 +210,7 @@ public class DeleteLecture_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + DeleteLecture_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -350,7 +350,7 @@ public class DeleteLecture_GUI extends JFrame { if(client.deleteLecture(lectureID, person.verantwortlicher.getHochschule(),person.verantwortlicher.getUsername())){ System.out.println("Löschen erfolgreich"); //delete successful - con.closeThriftConnection(); + DeleteLecture_GUI dl = new DeleteLecture_GUI(); dl.setVisible(true); dispose(); @@ -386,7 +386,7 @@ public class DeleteLecture_GUI extends JFrame { btnBack.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index fbbc56f3..b0f30cd9 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -66,8 +66,8 @@ public class EditLectureLink_GUI extends JFrame { private JTextField textFieldName; String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); + ThriftConnection con = new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); /** * Launch the application. @@ -89,6 +89,7 @@ public class EditLectureLink_GUI extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { + con.closeThriftConnection(); System.exit(0); } }); @@ -417,7 +418,8 @@ public class EditLectureLink_GUI extends JFrame { JOptionPane.INFORMATION_MESSAGE); } - thrift.closeThriftConnection(); + + MainMenue_GUI m = new MainMenue_GUI(); m.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java index 7ca24016..6ce8897a 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -72,7 +72,7 @@ public class EditLectureSearch_GUI extends JFrame { "Gültigkeitsdatum", "Aktiv", "Letzte Benutzung", "Verantwortlicher", "Image", "Schlagwort", "ID" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -196,7 +196,7 @@ public class EditLectureSearch_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -211,7 +211,7 @@ public class EditLectureSearch_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + EditLectureSearch_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -339,7 +339,7 @@ public class EditLectureSearch_GUI extends JFrame { btnBack.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); @@ -427,7 +427,7 @@ public class EditLectureSearch_GUI extends JFrame { Lecture.lecture.setActive(false); } - con.closeThriftConnection(); + // EditImageAllgemein_GUI ea=new // EditImageAllgemein_GUI(); EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); diff --git a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java index f54b048a..d686f5f9 100644 --- a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java @@ -68,7 +68,7 @@ public class SearchLecture_GUI extends JFrame { "Gültigkeitsdatum", "Aktiv", "Letzte Benutzung", "Verantwortlicher", "Image", "Schlagwort", "ID" }; ThriftConnection con = new ThriftConnection(); - Client client = con.getThriftConnection(); + Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0); final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( @@ -192,7 +192,7 @@ public class SearchLecture_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Fenster Extended GUI - con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -207,7 +207,7 @@ public class SearchLecture_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + SearchLecture_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -335,7 +335,7 @@ public class SearchLecture_GUI extends JFrame { btnBack.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Öffnet das Hauptmenü - con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/models/Client.java b/Dozentenmodul/src/models/Client.java new file mode 100644 index 00000000..6dc587f1 --- /dev/null +++ b/Dozentenmodul/src/models/Client.java @@ -0,0 +1,19 @@ +package models; + +public class Client { + + private server.Server.Client client; + + public static Client clientcon=new Client(); + + public server.Server.Client getClient() { + return client; + } + + public void setClient(server.Server.Client client) { + this.client = client; + } + + + +} diff --git a/Dozentenmodul/src/thrift/ThriftConnection.java b/Dozentenmodul/src/thrift/ThriftConnection.java index 7652fbe7..dcd441bc 100644 --- a/Dozentenmodul/src/thrift/ThriftConnection.java +++ b/Dozentenmodul/src/thrift/ThriftConnection.java @@ -17,7 +17,11 @@ public class ThriftConnection { private String satAddress = ""+SessionData.session.getServerAdress(); final TTransport transport = new TSocket(satAddress, 9090); - //final TTransport transport = new TSocket("141.79.128.102", 9090); + + public ThriftConnection() { + // TODO Auto-generated constructor stub + } + public Client getThriftConnection() { @@ -34,6 +38,7 @@ public class ThriftConnection { } final TProtocol protocol = new TBinaryProtocol(transport); + final Server.Client client = new Server.Client(protocol); System.out.println("Verbindung zu "+satAddress+" wurde aufgebaut."); |