diff options
author | unknown | 2014-05-17 17:48:02 +0200 |
---|---|---|
committer | unknown | 2014-05-17 17:48:02 +0200 |
commit | dd96e8d4543ad8887af1cb2d8877f9f8fb830fa1 (patch) | |
tree | f5aa67beb61638103f0667384bee18c82f5a50c4 /Dozentenmodul | |
parent | asdfdsgdfgdfh (diff) | |
parent | nix (diff) | |
download | tutor-module-dd96e8d4543ad8887af1cb2d8877f9f8fb830fa1.tar.gz tutor-module-dd96e8d4543ad8887af1cb2d8877f9f8fb830fa1.tar.xz tutor-module-dd96e8d4543ad8887af1cb2d8877f9f8fb830fa1.zip |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
fdghf
Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class
Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class
Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class
Dozentenmodul/src/gui/image/DeleteImage_GUI.java
Diffstat (limited to 'Dozentenmodul')
71 files changed, 131 insertions, 146 deletions
diff --git a/Dozentenmodul/bin/Models/person.class b/Dozentenmodul/bin/Models/person.class Binary files differindex 89dfc798..cd28d135 100644 --- a/Dozentenmodul/bin/Models/person.class +++ b/Dozentenmodul/bin/Models/person.class diff --git a/Dozentenmodul/bin/ftp/UploadTask.class b/Dozentenmodul/bin/ftp/UploadTask.class Binary files differindex 2b62ba67..101ff93b 100644 --- a/Dozentenmodul/bin/ftp/UploadTask.class +++ b/Dozentenmodul/bin/ftp/UploadTask.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class Binary files differindex 3bfdeb6a..43b41609 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 f64d26ea..502e9387 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 b2ba6c76..cea4adc4 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 6f793527..33f96306 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 505a0886..e6bf572b 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 e2be756c..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$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class Binary files differindex b8a6fad4..bc570ca9 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class Binary files differindex 001d50ef..2aab4d53 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class Binary files differindex d345024c..765b22bf 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class Binary files differindex aac529c9..dbc4fc9f 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class Binary files differindex 457d19d5..2153646f 100644 --- a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class +++ b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class Binary files differindex 3a0bf56a..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$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class Binary files differdeleted file mode 100644 index 1c355932..00000000 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class Binary files differdeleted file mode 100644 index 8fa15b3e..00000000 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class Binary files differindex 77e1a9bf..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$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class Binary files differdeleted file mode 100644 index a319bbbd..00000000 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class Binary files differindex 64d6d21e..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$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class Binary files differdeleted file mode 100644 index dc94e716..00000000 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class Binary files differindex 6311839a..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 0f948630..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 37d3827f..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 50bac1aa..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 d25020ec..91b73e2a 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class Binary files differindex ab46596e..4e2296e7 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$1.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class Binary files differindex 5d4f34b1..569827ad 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$10.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class Binary files differindex 94f25f6e..e827afb1 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$2.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class Binary files differindex ac807987..31a514d3 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$3.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class Binary files differindex 725c8726..852d5e14 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$4.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class Binary files differindex 8a3d58a4..9f6b64d0 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$5.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class Binary files differindex 0a07460d..045661b3 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$6.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class Binary files differindex 22272f1d..8da2716a 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$7.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class Binary files differindex 989819df..d411f9ab 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$8.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class Binary files differindex fba829d8..3dc0bd94 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI$9.class diff --git a/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class Binary files differindex ba1ed4b3..3b5e5f77 100644 --- a/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class diff --git a/Dozentenmodul/bin/models/person.class b/Dozentenmodul/bin/models/person.class Binary files differindex 89dfc798..cd28d135 100644 --- a/Dozentenmodul/bin/models/person.class +++ b/Dozentenmodul/bin/models/person.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/Models/person.java b/Dozentenmodul/src/Models/person.java index 64b84465..fdb5e18a 100644 --- a/Dozentenmodul/src/Models/person.java +++ b/Dozentenmodul/src/Models/person.java @@ -11,13 +11,12 @@ public class person{ private String Hochschule; private String EMail; private String Tel; - private String Fakultät; + private String Fakultaet; private boolean ischecked; //public static person verantowrtlicher=new person(); - public static person ersteller=new person(); public static person verantwortlicher=new person(); @@ -58,11 +57,11 @@ public class person{ public void setTel(String tel) { Tel = tel; } - public String getFakultät() { - return Fakultät; + public String getFakultaet() { + return Fakultaet; } - public void setFakultät(String fakultät) { - Fakultät = fakultät; + public void setFakultaet(String fakultaet) { + Fakultaet = fakultaet; } public boolean isIschecked() { return ischecked; diff --git a/Dozentenmodul/src/ftp/UploadTask.java b/Dozentenmodul/src/ftp/UploadTask.java index 2dbeff8d..06d76dc8 100644 --- a/Dozentenmodul/src/ftp/UploadTask.java +++ b/Dozentenmodul/src/ftp/UploadTask.java @@ -49,6 +49,7 @@ public class UploadTask extends SwingWorker<Void, Void> { FileInputStream inputStream = new FileInputStream(uploadFile); byte[] buffer = new byte[BUFFER_SIZE]; int bytesRead = -1; + int i=0; long totalBytesRead = 0; int percentCompleted = 0; long fileSize = uploadFile.length(); @@ -57,7 +58,7 @@ public class UploadTask extends SwingWorker<Void, Void> { final double NANOS_PER_SECOND = 1000000000.0; final double BYTES_PER_MIB = 1024*1024; while ((bytesRead = inputStream.read(buffer)) != -1 && isCancelled()==false) { - util.writeFileBytes(buffer, 0, bytesRead); + util.writeFileBytes(buffer, 0, bytesRead); totalBytesRead += bytesRead; percentCompleted = (int) (totalBytesRead * 100 / fileSize); double speed = NANOS_PER_SECOND / BYTES_PER_MIB * totalBytesRead / (System.nanoTime() - start + 1); diff --git a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java index 2f88e339..6d68db49 100644 --- a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java +++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java @@ -73,8 +73,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>( @@ -203,8 +203,12 @@ public class DeleteImage_GUI extends JFrame { lblErweiterteSuche.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { + // oeffnet das Fenster Extended GUI con.closeThriftConnection(); + + // Öffnet das Fenster Extended GUI + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } @@ -252,8 +256,12 @@ public class DeleteImage_GUI extends JFrame { lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { + // oeffnet das Hauuetmenue con.closeThriftConnection(); + + // Öffnet das Hauütmenü + DeleteImage_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -423,7 +431,7 @@ public class DeleteImage_GUI extends JFrame { // if (client.deleteImageServer(imageid // ,imageversion)) { - con.closeThriftConnection(); + DeleteImage_GUI di = new DeleteImage_GUI(); @@ -499,8 +507,13 @@ public class DeleteImage_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { + // oeffnet das Hauptmen\u00FC con.closeThriftConnection(); + + // Öffnet das Hauptmenü + + 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 cef78545..3addca31 100644 --- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -53,7 +53,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; @@ -224,7 +224,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); @@ -264,7 +264,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(); @@ -291,7 +291,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 f36a4c5d..3adb426a 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -36,6 +36,7 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import models.Image; import models.Links; +import models.SessionData; import models.person; import org.apache.thrift.TException; import server.Server.Client; @@ -56,8 +57,7 @@ public class FTPCreateUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - //String host = "141.79.128.121"; - String host = "141.79.128.102"; + String host = SessionData.session.getServerAdress(); int port = 21; server.User user; String filename = ""; @@ -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); } @@ -405,6 +406,7 @@ public class FTPCreateUploader_GUI extends JFrame implements btnUploadStarten.setText("Bitte warten"); try { + System.out.println("Test"); user = client.getFtpUser(); System.out.println("FTP name" + user.userName); System.out.println("FTP path" + user.path); @@ -426,6 +428,8 @@ public class FTPCreateUploader_GUI extends JFrame implements + person.verantwortlicher.getHochschule() + "_" + person.verantwortlicher.getUsername() + "_" + Image.image.getImagename() + ".vmdk"); + System.out.println("Uploading to host: "+host); + task = new UploadTask(host, port, user.userName, user.password, user.path+"temp/", uploadFile); @@ -510,7 +514,7 @@ public class FTPCreateUploader_GUI extends JFrame implements person.verantwortlicher.getHochschule(), person.verantwortlicher.getEMail(), person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät(), + person.verantwortlicher.getFakultaet(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu(), "temp/" + Image.image.getNewName(),false,Image.image.getFilesize()); diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 671b2170..97a29849 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -34,6 +34,7 @@ import javax.swing.JTextPane; import javax.swing.JSeparator; import models.Image; import models.Links; +import models.SessionData; import org.apache.thrift.TException; import server.Server.Client; @@ -55,7 +56,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener JLabel downspeed; User user; JProgressBar progressBar; - String host = "141.79.128.102"; + String host = SessionData.session.getServerAdress(); int port = 21; String downloadFile = ""; static String arg = ""; @@ -69,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"); @@ -86,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(); @@ -354,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(); @@ -367,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 3c17a3e5..99fc034b 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -36,6 +36,7 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import models.Image; import models.Links; +import models.SessionData; import models.person; import org.apache.thrift.TException; import server.Server.Client; @@ -55,7 +56,7 @@ public class FTPEditUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - String host = "141.79.128.102"; + String host = SessionData.session.getServerAdress(); int port = 21; server.User user; String filename = ""; @@ -72,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"); @@ -112,6 +113,7 @@ public class FTPEditUploader_GUI extends JFrame implements } task.cancel(true); } + con.closeThriftConnection(); System.exit(0); }// end window closing }); @@ -333,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 75320b58..b6249be0 100644 --- a/Dozentenmodul/src/gui/intro/Login_GUI.java +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -12,8 +12,6 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.IOException; -import java.util.UUID; - import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; @@ -31,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; @@ -91,7 +90,7 @@ public class Login_GUI extends JFrame { // Fenster darf nicht vergrößert werden setResizable(false); - + try { // Setzt das Look and Feel auf System UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); @@ -209,22 +208,19 @@ 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 + ", mein Token für den Satelliten " + result.authToken); - /* - // show received information - JOptionPane.showMessageDialog(null, "Freiburg liefert:" - + "\nSession-ID = " + result.sessionId + "\nToken = " - + result.authToken + "\nSatellit = " - + result.serverAddress, "Rückgabewerte aus Freiburg", - JOptionPane.INFORMATION_MESSAGE); - */ - if (login == true) { /* * @@ -243,8 +239,7 @@ public class Login_GUI extends JFrame { .getAuthToken()); String hochschule = user.eMail.substring( - user.eMail.indexOf("@") + 1, - user.eMail.indexOf(".", user.eMail.indexOf("@"))); + user.eMail.indexOf("@") + 1); person.verantwortlicher.setUsername(lblusername.getText() .substring(0, lblusername.getText().indexOf("@"))); @@ -252,53 +247,10 @@ public class Login_GUI extends JFrame { person.verantwortlicher.setVorname(user.firstName); person.verantwortlicher.setEMail(user.eMail); person.verantwortlicher.setHochschule(hochschule); - - /* - // show processed information - JOptionPane - .showMessageDialog( - null, - "--Werte aus Session--" - + "\nHochschule = " - + user.eMail.substring( - user.eMail.indexOf("@") + 1, - user.eMail - .indexOf( - ".", - user.eMail - .indexOf("@"))) - + "\nUsername = " - + lblusername.getText().substring( - 0, - lblusername.getText() - .indexOf("@")) - + "\nName = " - + user.lastName - + "\nVorname = " - + user.firstName - + "\nE-Mail = " - + user.eMail - + "\n\n--Werte aus gespeichertem Objekt ausgelesen--" - + "\nHochschule = " - + person.verantwortlicher - .getHochschule() - + "\nUsername = " - + person.verantwortlicher - .getUsername() - + "\nName = " - + person.verantwortlicher.getName() - + "\nVorname = " - + person.verantwortlicher - .getVorname() - + "\nE-Mail = " - + person.verantwortlicher - .getEMail(), - "Werte vergleichen", - JOptionPane.INFORMATION_MESSAGE); - */ - + try { - //Lege config File an und entscheide welches Fenster als nächstes geöffnet wird + // Lege config File an und entscheide welches Fenster + // als nächstes geöffnet wird Wini ini = new Wini( new File( "C:\\Users\\" diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java index 7d3d9cae..41254bea 100644 --- a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -7,7 +7,6 @@ import java.awt.FlowLayout; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -57,18 +56,6 @@ public class MainMenue_GUI extends JFrame { JRadioButton rdbtnLectureSearch; private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - MainMenue_GUI dialog = new MainMenue_GUI(); - dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - }// end main /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index 62cebb22..ac923dca 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(); @@ -397,7 +398,7 @@ public class CreateLectureLink_GUI extends JFrame { person.verantwortlicher.getHochschule(), person.verantwortlicher.getEMail(), person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät()); + person.verantwortlicher.getFakultaet()); JOptionPane .showMessageDialog( null, @@ -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..97fdcdda 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); } }); @@ -394,7 +395,7 @@ public class EditLectureLink_GUI extends JFrame { person.verantwortlicher.getHochschule(), person.verantwortlicher.getEMail(), person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät(), + person.verantwortlicher.getFakultaet(), Lecture.lecture.getid()); JOptionPane @@ -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/models/person.java b/Dozentenmodul/src/models/person.java index 64b84465..fdb5e18a 100644 --- a/Dozentenmodul/src/models/person.java +++ b/Dozentenmodul/src/models/person.java @@ -11,13 +11,12 @@ public class person{ private String Hochschule; private String EMail; private String Tel; - private String Fakultät; + private String Fakultaet; private boolean ischecked; //public static person verantowrtlicher=new person(); - public static person ersteller=new person(); public static person verantwortlicher=new person(); @@ -58,11 +57,11 @@ public class person{ public void setTel(String tel) { Tel = tel; } - public String getFakultät() { - return Fakultät; + public String getFakultaet() { + return Fakultaet; } - public void setFakultät(String fakultät) { - Fakultät = fakultät; + public void setFakultaet(String fakultaet) { + Fakultaet = fakultaet; } public boolean isIschecked() { return ischecked; 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."); |