diff options
| author | Tobias Spitzer | 2014-05-23 07:45:15 +0200 |
|---|---|---|
| committer | Tobias Spitzer | 2014-05-23 07:45:15 +0200 |
| commit | 6719008d289cd08a0effbf931842b7213cbdffe1 (patch) | |
| tree | 13298b7ec6dcc76a9b379070e8f79b18c7d2307e | |
| parent | d (diff) | |
| parent | Ausgabe Serverseitgi wieviele Threads laufen sollen (diff) | |
| download | tutor-module-6719008d289cd08a0effbf931842b7213cbdffe1.tar.gz tutor-module-6719008d289cd08a0effbf931842b7213cbdffe1.tar.xz tutor-module-6719008d289cd08a0effbf931842b7213cbdffe1.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tutor-module
84 files changed, 247 insertions, 303 deletions
diff --git a/Dozentenmodul/bin/Models/Image.class b/Dozentenmodul/bin/Models/Image.class Binary files differindex 59b34fab..0167c7c5 100644 --- a/Dozentenmodul/bin/Models/Image.class +++ b/Dozentenmodul/bin/Models/Image.class diff --git a/Dozentenmodul/bin/Models/Lecture.class b/Dozentenmodul/bin/Models/Lecture.class Binary files differindex a0cb753d..31755bcf 100644 --- a/Dozentenmodul/bin/Models/Lecture.class +++ b/Dozentenmodul/bin/Models/Lecture.class diff --git a/Dozentenmodul/bin/Models/person.class b/Dozentenmodul/bin/Models/person.class Binary files differindex 36fa9761..ef2a89eb 100644 --- a/Dozentenmodul/bin/Models/person.class +++ b/Dozentenmodul/bin/Models/person.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class Binary files differindex 1d67fe3e..519d3b0f 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class Binary files differindex 9fc35b48..2283207b 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class Binary files differindex 4aedd907..722ecdf2 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class Binary files differindex 2c9cd712..739451cd 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class Binary files differindex 82d24993..6cd45653 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class Binary files differindex 4ca2208c..d40f6d68 100644 --- a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class Binary files differindex 353bafa4..f591fa7e 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class Binary files differindex 23d60d2f..14f49298 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 03680a6f..65f6eba8 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 21e46d35..5aa7bc75 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 214beaa8..225b1b06 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 cc06860f..41c5b0cc 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 e6bf572b..abaa79bc 100644 --- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_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 04c8b107..ef0dedf1 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 a846427a..3e960f4f 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 bde5917c..f8767194 100644 --- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class Binary files differindex 74425fa4..aebbf028 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class Binary files differindex c9eec04e..d599dabe 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$3.class Binary files differindex 07430748..9949e5fe 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$4.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class Binary files differindex 8c0f7192..41208104 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$5.class Binary files differindex af115764..33cf65cb 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$6.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class Binary files differindex fc4f734d..b74a9bf2 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$7.class Binary files differindex 730cfbe9..88c5fdfe 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 120af287..b55da9f2 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 f5971a3c..1b6063c8 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class Binary files differindex e1f554c7..799a2aab 100644 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class Binary files differindex dbfc1944..8b5da380 100644 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class Binary files differindex 12d4c61f..3577fd18 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class Binary files differindex 51b3d910..db82c341 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class Binary files differindex ceea662a..49b37d40 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class Binary files differindex 67922a25..aeea08eb 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class Binary files differindex 11cda571..8446b2d1 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$5.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class Binary files differindex 0759ddca..60c57e03 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI$6.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class Binary files differindex 8f480656..5fcc981a 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class Binary files differindex 0c7b67a0..6a5bcf01 100644 --- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class +++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class Binary files differindex 09461d3a..4a021966 100644 --- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class +++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class Binary files differindex 59b84bd3..c9f61e8d 100644 --- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class +++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class Binary files differindex ddd0274d..75c03435 100644 --- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class +++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class Binary files differindex e8fd3516..62618f9e 100644 --- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class Binary files differindex c0f8c1c4..6d2d2df7 100644 --- a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$1.class diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class Binary files differindex 68c602c3..51e86415 100644 --- a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$2.class diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class Binary files differindex a84d1ea3..c5d4f8cf 100644 --- a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class diff --git a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class Binary files differindex 3eeb8494..1490e214 100644 --- a/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class diff --git a/Dozentenmodul/bin/models/Image.class b/Dozentenmodul/bin/models/Image.class Binary files differindex 59b34fab..0167c7c5 100644 --- a/Dozentenmodul/bin/models/Image.class +++ b/Dozentenmodul/bin/models/Image.class diff --git a/Dozentenmodul/bin/models/Lecture.class b/Dozentenmodul/bin/models/Lecture.class Binary files differindex a0cb753d..31755bcf 100644 --- a/Dozentenmodul/bin/models/Lecture.class +++ b/Dozentenmodul/bin/models/Lecture.class diff --git a/Dozentenmodul/bin/models/person.class b/Dozentenmodul/bin/models/person.class Binary files differindex 36fa9761..ef2a89eb 100644 --- a/Dozentenmodul/bin/models/person.class +++ b/Dozentenmodul/bin/models/person.class diff --git a/Dozentenmodul/bin/models/user.class b/Dozentenmodul/bin/models/user.class Binary files differindex af67dd13..cd274e48 100644 --- a/Dozentenmodul/bin/models/user.class +++ b/Dozentenmodul/bin/models/user.class diff --git a/Dozentenmodul/bin/thrift/MasterThriftConnection.class b/Dozentenmodul/bin/thrift/MasterThriftConnection.class Binary files differindex 9b587dd3..8229138f 100644 --- a/Dozentenmodul/bin/thrift/MasterThriftConnection.class +++ b/Dozentenmodul/bin/thrift/MasterThriftConnection.class diff --git a/Dozentenmodul/src/Models/Image.java b/Dozentenmodul/src/Models/Image.java index 0b3c936e..e08ed5a2 100644 --- a/Dozentenmodul/src/Models/Image.java +++ b/Dozentenmodul/src/Models/Image.java @@ -1,9 +1,9 @@ package models; public class Image { + private String ImageId; private String version; - private String imagename; private String newName; private String imagepath; @@ -12,7 +12,6 @@ public class Image { private int ram; private int cpu; private long filesize; - public static Image image =new Image(); diff --git a/Dozentenmodul/src/Models/Lecture.java b/Dozentenmodul/src/Models/Lecture.java index 6b7e6fa1..eae05ec5 100644 --- a/Dozentenmodul/src/Models/Lecture.java +++ b/Dozentenmodul/src/Models/Lecture.java @@ -4,7 +4,6 @@ import java.util.Date; public class Lecture { - private String name; private String newName; private String shortDesc; @@ -14,8 +13,6 @@ public class Lecture { private boolean active; private String id; private String linkedImagename; - - public static Lecture lecture =new Lecture(); diff --git a/Dozentenmodul/src/Models/person.java b/Dozentenmodul/src/Models/person.java index 67b6b84e..0f14af51 100644 --- a/Dozentenmodul/src/Models/person.java +++ b/Dozentenmodul/src/Models/person.java @@ -3,9 +3,7 @@ package models; public class person{ - private String username; - private String Name; private String Vorname; private String Hochschule; @@ -13,11 +11,8 @@ public class person{ private String Tel; private String Fakultaet; private boolean ischecked; - - //public static person verantowrtlicher=new person(); public static person verantwortlicher=new person(); - public String getUsername() { return username; } diff --git a/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java index 308ff3b7..45331b21 100644 --- a/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java @@ -8,7 +8,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; @@ -53,18 +52,7 @@ public class CreateImageTechnisch_GUI extends JFrame { JRadioButton rdbtnInternetNein; private final ButtonGroup buttonGrouplicense = new ButtonGroup(); private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - CreateImageTechnisch_GUI dialog = new CreateImageTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } + /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java index 72ee98fa..ca5408ae 100644 --- a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java +++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java @@ -25,7 +25,6 @@ import java.util.Iterator; import java.util.List; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -50,11 +49,9 @@ import javax.swing.event.ChangeListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; - import models.Links; import models.person; import org.apache.thrift.TException; - import server.Server.Client; import thrift.ThriftConnection; import javax.swing.ListSelectionModel; @@ -91,19 +88,6 @@ public class DeleteImage_GUI extends JFrame { modelMyImages); /** - * Launch the application. - */ - public static void main(String[] args) { - try { - DeleteImage_GUI dialog = new DeleteImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** * Create the dialog. */ public DeleteImage_GUI() { diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index 3adb426a..b1394c0e 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -3,7 +3,6 @@ package gui.image; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.EventQueue; import java.awt.FlowLayout; import java.awt.Font; import java.awt.SystemColor; @@ -41,7 +40,6 @@ import models.person; import org.apache.thrift.TException; import server.Server.Client; import thrift.ThriftConnection; -//import util.XMLCreator; import ftp.UploadTask; import gui.intro.MainMenue_GUI; import javax.swing.JMenuItem; @@ -80,22 +78,7 @@ public class FTPCreateUploader_GUI extends JFrame implements JButton btnZurck = new JButton("Zur\u00FCck"); int progress = 0; // progress of upload - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPCreateUploader_GUI frame = new FTPCreateUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - + /** * Create the frame. */ diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index 99fc034b..05846e25 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -3,7 +3,6 @@ package gui.image; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.EventQueue; import java.awt.FlowLayout; import java.awt.Font; import java.awt.SystemColor; @@ -80,22 +79,7 @@ public class FTPEditUploader_GUI extends JFrame implements JButton finishButton = new JButton("Fertigstellen"); JButton btnZurck = new JButton("Zur\u00FCck"); - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPEditUploader_GUI frame = new FTPEditUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - + /** * Create the frame. */ diff --git a/Dozentenmodul/src/gui/image/SearchImage_GUI.java b/Dozentenmodul/src/gui/image/SearchImage_GUI.java index f9c3811b..80274087 100644 --- a/Dozentenmodul/src/gui/image/SearchImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchImage_GUI.java @@ -48,10 +48,7 @@ import javax.swing.table.TableRowSorter; import models.Image; import models.Links; import models.person; -//import models.person; - import org.apache.thrift.TException; - import server.Server.Client; import thrift.ThriftConnection; diff --git a/Dozentenmodul/src/gui/image/SearchMethodLecture_GUI.java b/Dozentenmodul/src/gui/image/SearchMethodLecture_GUI.java index 67472c17..ac9fb96f 100644 --- a/Dozentenmodul/src/gui/image/SearchMethodLecture_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchMethodLecture_GUI.java @@ -15,10 +15,8 @@ import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.IOException; - import javax.swing.ButtonGroup; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -33,7 +31,6 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; - import models.Links; @SuppressWarnings("serial") @@ -45,18 +42,7 @@ public class SearchMethodLecture_GUI extends JFrame { JRadioButton rdbtnSearchByLecture; private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchMethodLecture_GUI dialog = new SearchMethodLecture_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } + /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java index 4d610587..7e8f2ffd 100644 --- a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -28,7 +28,6 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -import java.net.URL; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JCheckBox; @@ -44,8 +43,6 @@ public class VmWareLink_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; - //String uriWindows="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; - //String uriLinux="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; JCheckBox chckbxNewCheckBox; private JButton btnWindows; diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java index 21d84e2a..8c937204 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java @@ -1,7 +1,6 @@ package gui.lecture; import gui.intro.MainMenue_GUI; - import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -15,7 +14,6 @@ import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -39,7 +37,6 @@ import java.awt.ScrollPane; import java.io.IOException; import java.util.Calendar; import java.util.Date; - import com.toedter.calendar.JDateChooser; import javax.swing.JRadioButton; @@ -65,18 +62,6 @@ public class CreateLectureAllgemein_GUI extends JFrame { boolean isDateOrderCorrect, isDateMaxLifeTimeCorrect, isAllInformationReady = false; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - CreateLectureAllgemein_GUI dialog = new CreateLectureAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index ff19ed13..af5a75ea 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -1,7 +1,6 @@ package gui.lecture; import gui.intro.MainMenue_GUI; - import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -24,7 +23,6 @@ import java.util.Iterator; import java.util.List; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -70,19 +68,7 @@ public class CreateLectureLink_GUI extends JFrame { ThriftConnection con = new ThriftConnection(); Client client = models.Client.clientcon.getClient(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - CreateLectureLink_GUI dialog = new CreateLectureLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - + /** * Create the dialog. */ diff --git a/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java b/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java index ae228c1e..dd58ec60 100644 --- a/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/DeleteLecture_GUI.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.Iterator; import java.util.List; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -44,7 +43,6 @@ import javax.swing.event.ChangeListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; - import models.Links; import models.person; import org.apache.thrift.TException; @@ -78,19 +76,7 @@ public class DeleteLecture_GUI extends JFrame { modelMyLectures); private JButton button; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditLectureSearch_GUI dialog = new EditLectureSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - + /** * Create the dialog. */ diff --git a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java index 67f86a13..27355602 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java @@ -15,9 +15,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; - import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -31,7 +29,6 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; - import models.Image; import models.Lecture; import models.Links; @@ -39,7 +36,6 @@ import models.person; import javax.swing.JTextArea; import java.awt.ScrollPane; import java.io.IOException; - import com.toedter.calendar.JDateChooser; import javax.swing.JRadioButton; import javax.swing.ButtonGroup; @@ -61,18 +57,7 @@ public class EditLectureAllgemein_GUI extends JFrame { JDateChooser dateChooserstart; JRadioButton radioButtonno; private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditLectureAllgemein_GUI dialog = new EditLectureAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } + /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index f995d70d..4e5641f1 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -2,7 +2,6 @@ package gui.lecture; import gui.intro.MainMenue_GUI; import java.awt.Color; -import java.awt.Desktop; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; @@ -24,7 +23,6 @@ import java.util.Iterator; import java.util.List; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -70,19 +68,7 @@ public class EditLectureLink_GUI extends JFrame { ThriftConnection con = new ThriftConnection(); Client client = models.Client.clientcon.getClient(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditLectureLink_GUI dialog = new EditLectureLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - + /** * Create the dialog. */ diff --git a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java index 7bd42034..68b0ad13 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -22,7 +22,6 @@ import java.text.SimpleDateFormat; import java.util.Iterator; import java.util.List; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -88,19 +87,7 @@ public class EditLectureSearch_GUI extends JFrame { final TableRowSorter<TableModel> rowSorterMyLectures = new TableRowSorter<TableModel>( modelMyLectures); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditLectureSearch_GUI dialog = new EditLectureSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - + /** * Create the dialog. */ diff --git a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java index 8d605ef3..45413401 100644 --- a/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java +++ b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java @@ -3,7 +3,6 @@ package gui.lecture; import gui.image.CreateImageAllgemein_GUI; import gui.image.FTPCreateUploader_GUI; - import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; @@ -11,13 +10,9 @@ import java.awt.SystemColor; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -31,9 +26,7 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; - import models.Links; - import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.IOException; @@ -45,19 +38,7 @@ public class ExtendedSearchForImages_GUI extends JFrame { String[] result; private JTextField textField; private JTextField textField_1; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - ExtendedSearchForImages_GUI dialog = new ExtendedSearchForImages_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - - } catch (Exception e) { - e.printStackTrace(); - } - } + /** * Create the dialog. diff --git a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java index 18eb411a..19497a65 100644 --- a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java +++ b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.Iterator; import java.util.List; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -43,7 +42,6 @@ import javax.swing.event.ChangeListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; - import models.Links; import models.person; import org.apache.thrift.TException; @@ -84,18 +82,6 @@ public class SearchLecture_GUI extends JFrame { final TableRowSorter<TableModel> rowSorterMyLectures = new TableRowSorter<TableModel>( modelMyLectures); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EditLectureSearch_GUI dialog = new EditLectureSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } /** * Create the dialog. diff --git a/Dozentenmodul/src/models/Client.java b/Dozentenmodul/src/models/Client.java index 6dc587f1..42eccdec 100644 --- a/Dozentenmodul/src/models/Client.java +++ b/Dozentenmodul/src/models/Client.java @@ -3,7 +3,6 @@ package models; public class Client { private server.Server.Client client; - public static Client clientcon=new Client(); public server.Server.Client getClient() { diff --git a/Dozentenmodul/src/models/Image.java b/Dozentenmodul/src/models/Image.java index 0b3c936e..e08ed5a2 100644 --- a/Dozentenmodul/src/models/Image.java +++ b/Dozentenmodul/src/models/Image.java @@ -1,9 +1,9 @@ package models; public class Image { + private String ImageId; private String version; - private String imagename; private String newName; private String imagepath; @@ -12,7 +12,6 @@ public class Image { private int ram; private int cpu; private long filesize; - public static Image image =new Image(); diff --git a/Dozentenmodul/src/models/Lecture.java b/Dozentenmodul/src/models/Lecture.java index 6b7e6fa1..eae05ec5 100644 --- a/Dozentenmodul/src/models/Lecture.java +++ b/Dozentenmodul/src/models/Lecture.java @@ -4,7 +4,6 @@ import java.util.Date; public class Lecture { - private String name; private String newName; private String shortDesc; @@ -14,8 +13,6 @@ public class Lecture { private boolean active; private String id; private String linkedImagename; - - public static Lecture lecture =new Lecture(); diff --git a/Dozentenmodul/src/models/person.java b/Dozentenmodul/src/models/person.java index 67b6b84e..0f14af51 100644 --- a/Dozentenmodul/src/models/person.java +++ b/Dozentenmodul/src/models/person.java @@ -3,9 +3,7 @@ package models; public class person{ - private String username; - private String Name; private String Vorname; private String Hochschule; @@ -13,11 +11,8 @@ public class person{ private String Tel; private String Fakultaet; private boolean ischecked; - - //public static person verantowrtlicher=new person(); public static person verantwortlicher=new person(); - public String getUsername() { return username; } diff --git a/Dozentenmodul/src/models/user.java b/Dozentenmodul/src/models/user.java index be64937f..9aa958a4 100644 --- a/Dozentenmodul/src/models/user.java +++ b/Dozentenmodul/src/models/user.java @@ -4,6 +4,7 @@ public class user { private String userName; private String Password; + public String getUserName() { return userName; } diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java index 760b8bd0..11a27368 100644 --- a/Dozentenmodul/src/thrift/MasterThriftConnection.java +++ b/Dozentenmodul/src/thrift/MasterThriftConnection.java @@ -15,6 +15,8 @@ import thrift.ImageServer.Client; public class MasterThriftConnection { public static final String MASTERSERVERIP="132.230.4.16"; + //public static final String MASTERSERVERIP="127.0.0.1"; + final TTransport transport = new TSocket(MASTERSERVERIP, 9090); public Client getMasterThriftConnection() diff --git a/Dozentenmodulserver/bin/server/BinaryListener.class b/Dozentenmodulserver/bin/server/BinaryListener.class Binary files differindex 4a135f2d..3518f758 100644 --- a/Dozentenmodulserver/bin/server/BinaryListener.class +++ b/Dozentenmodulserver/bin/server/BinaryListener.class diff --git a/Dozentenmodulserver/bin/server/ServerHandler.class b/Dozentenmodulserver/bin/server/ServerHandler.class Binary files differindex 0f7cee59..d0b004ab 100644 --- a/Dozentenmodulserver/bin/server/ServerHandler.class +++ b/Dozentenmodulserver/bin/server/ServerHandler.class diff --git a/Dozentenmodulserver/bin/server/startServer.class b/Dozentenmodulserver/bin/server/startServer.class Binary files differindex baa1a480..3cea3ec6 100644 --- a/Dozentenmodulserver/bin/server/startServer.class +++ b/Dozentenmodulserver/bin/server/startServer.class diff --git a/Dozentenmodulserver/bin/util/XMLCreator.class b/Dozentenmodulserver/bin/util/XMLCreator.class Binary files differindex cfdf6004..0c9c6d45 100644 --- a/Dozentenmodulserver/bin/util/XMLCreator.class +++ b/Dozentenmodulserver/bin/util/XMLCreator.class diff --git a/Dozentenmodulserver/src/server/BinaryListener.java b/Dozentenmodulserver/src/server/BinaryListener.java index a48b381e..ffeb9bd5 100644 --- a/Dozentenmodulserver/src/server/BinaryListener.java +++ b/Dozentenmodulserver/src/server/BinaryListener.java @@ -3,33 +3,46 @@ package server; import java.util.Date; import org.apache.log4j.Logger; +import org.apache.thrift.protocol.TProtocolFactory; import org.apache.thrift.server.TServer; -import org.apache.thrift.server.TServer.Args; -import org.apache.thrift.server.TSimpleServer; +import org.apache.thrift.server.TThreadPoolServer.Args; +import org.apache.thrift.server.TThreadPoolServer; import org.apache.thrift.transport.TServerSocket; import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TTransportException; -public class BinaryListener implements Runnable -{ - private static Logger log = Logger.getLogger( BinaryListener.class ); +public class BinaryListener implements Runnable { + private static Logger log = Logger.getLogger(BinaryListener.class); + + private final int MINWORKERTHREADS = 20; // keine ahnung ob das passt... + private final int MAXWORKERTHREADS = 80; // ebenso @Override - public void run() - { + public void run() { final ServerHandler handler = new ServerHandler(); - final Server.Processor<ServerHandler> processor = new Server.Processor<ServerHandler>( handler ); + final Server.Processor<ServerHandler> processor = new Server.Processor<ServerHandler>( + handler); final TServerTransport transport; + final TProtocolFactory protFactory = new TBinaryProtocolSafe.Factory( + true, true); try { - transport = new TServerSocket( 9090 ); - log.info(new Date()+" - Connected to Port 9090"); - } catch ( TTransportException e ) { - log.fatal( new Date() +" - Could not listen on port 9090" ); + transport = new TServerSocket(9090); + log.info(new Date() + " - Connected to Port 9090"); + + } catch (TTransportException e) { + log.fatal(new Date() + " - Could not listen on port 9090"); return; } - TServer server = new TSimpleServer( new Args( transport ).processor( processor ) ); - log.info(new Date() +" - Started running BinaryListener"); + TServer server = new TThreadPoolServer(new Args(transport) + .protocolFactory(protFactory).processor(processor) + .minWorkerThreads(MINWORKERTHREADS) + .maxWorkerThreads(MAXWORKERTHREADS)); + + log.info(new Date() + " - Started running BinaryListener"); + log.info(new Date() + " - MINWORKERTHREADS=" + MINWORKERTHREADS + + " and MAXWORKERTHREADS=" + MAXWORKERTHREADS + "\n"); server.serve(); + } - + } diff --git a/Dozentenmodulserver/src/server/Image.java b/Dozentenmodulserver/src/server/Image.java index 34c2b45c..e82aca0f 100644 --- a/Dozentenmodulserver/src/server/Image.java +++ b/Dozentenmodulserver/src/server/Image.java @@ -43,7 +43,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)-6); private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.STRING, (short)-7); private static final org.apache.thrift.protocol.TField USER_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userData", org.apache.thrift.protocol.TType.STRING, (short)-8); - + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ImageStandardSchemeFactory()); diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index 0cafd182..dad9b1a8 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -8,10 +8,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -import java.sql.Connection; -import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -26,9 +23,11 @@ import org.apache.thrift.TException; import sql.SQL; import util.XMLCreator; + + public class ServerHandler implements Server.Iface { static SQL sql = new SQL(); - + private static Logger log = Logger.getLogger(ServerHandler.class); @Override @@ -38,15 +37,12 @@ public class ServerHandler implements Server.Iface { user.setUserName(UUID.randomUUID().toString().substring(0, 8)); user.setPassword(getEncodedSha1Sum(UUID.randomUUID().toString() .substring(0, 8))); - if(Configuration.config.getAbsolute_path().endsWith("/")) - { + if (Configuration.config.getAbsolute_path().endsWith("/")) { user.setPath(Configuration.config.getAbsolute_path()); + } else { + user.setPath(Configuration.config.getAbsolute_path() + "/"); } - else{ - user.setPath(Configuration.config.getAbsolute_path()+"/"); - } - - + // check if folder temp exists if (folderTempExists() == true) { sql.writeFTPUser(user.getUserName(), user.getPassword()); @@ -59,15 +55,11 @@ public class ServerHandler implements Server.Iface { public boolean folderTempExists() { // check if folder temp exists, otherwise create it - Path path=null; - if(Configuration.config.getAbsolute_path().endsWith("/")) - { - path = Paths - .get(Configuration.config.getAbsolute_path() + "temp"); - } - else{ - path = Paths - .get(Configuration.config.getAbsolute_path() + "/temp"); + Path path = null; + if (Configuration.config.getAbsolute_path().endsWith("/")) { + path = Paths.get(Configuration.config.getAbsolute_path() + "temp"); + } else { + path = Paths.get(Configuration.config.getAbsolute_path() + "/temp"); } if (Files.exists(path) == true) { @@ -83,9 +75,9 @@ public class ServerHandler implements Server.Iface { + "'"); return false; } else { - //set permissions + // set permissions try { - Runtime.getRuntime().exec("chmod 777 "+path); + Runtime.getRuntime().exec("chmod 777 " + path); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -117,7 +109,7 @@ public class ServerHandler implements Server.Iface { @Override public String getPathOfImage(String image_id, String version) - throws TException { + throws TException { log.info(new Date() + " - successfully returned PathOfImage: " + sql.getPathOfImage(image_id, version)); return sql.getPathOfImage(image_id, version); @@ -136,8 +128,8 @@ public class ServerHandler implements Server.Iface { String pk_person = sql.setPerson(login, lastname, firstname, Mail, new Date(), pk_institution); - sql.setImageData(pk_person, license, internet, cpu, ram, - imagename, imagePath, isTemplate, filesize); + sql.setImageData(pk_person, license, internet, cpu, ram, imagename, + imagePath, isTemplate, filesize); log.info(new Date() + " - written VLdata"); // TODO Auto-generated method stub @@ -146,7 +138,7 @@ public class ServerHandler implements Server.Iface { @Override public List<Image> getImageList() throws TException { - return sql.getImageList(); + return sql.getImageList(); } @@ -178,11 +170,11 @@ public class ServerHandler implements Server.Iface { map = sql.getImageIDandVersion(imagename); - pk_image=map.get("GUID"); - imageversion=Integer.parseInt(map.get("version")); + pk_image = map.get("GUID"); + imageversion = Integer.parseInt(map.get("version")); sql.setLectureData(pk_person, pk_image, imageversion, name, desc, shortdesc, startDate, endDate, isActive); - XMLCreator xml = new XMLCreator(sql.getConnection(),name); + XMLCreator xml = new XMLCreator(sql.getConnection(), name); try { xml.create(name); log.info(new Date() + " - XML created."); @@ -201,6 +193,7 @@ public class ServerHandler implements Server.Iface { @Override public boolean startFileCopy(String filename) throws TException { + //copy file from folder temp to folder prod String file = Configuration.config.getAbsolute_path() + "temp/" + filename; File tmpFile = new File(file); @@ -209,17 +202,13 @@ public class ServerHandler implements Server.Iface { + " - Trying to move file to '/srv/openslx/nfs/prod/" + tmpFile.getName() + "'"); try { - - // der übergebene Filename ist falsch - hier muss der generierte - // name geholt werden, nicht der ursprüngliche name. wo wird dieser - // eingelesen? - FileUtils.moveFile(tmpFile, new File(Configuration.config.getAbsolute_path() + "prod/" + filename)); - int ret = sql.UpdateImagePath(filename); - log.info(new Date() + " - update " + ret); - log.info(new Date() + " - file moved"); + // int ret = sql.UpdateImagePath(filename); + if (sql.UpdateImagePath(filename) == 0) { + log.info(new Date() + " - file moved and database updated."); + } } catch (IOException e) { // TODO Auto-generated catch block @@ -232,8 +221,8 @@ public class ServerHandler implements Server.Iface { @Override public Map<String, String> getImageData(String imageid, String imageversion) throws TException { - log.info(new Date() + " - returning ImageData: " + sql.getImageData(imageid, imageversion).size() - + "items."); + log.info(new Date() + " - returning ImageData: " + + sql.getImageData(imageid, imageversion).size() + "items."); return sql.getImageData(imageid, imageversion); } @@ -242,8 +231,8 @@ public class ServerHandler implements Server.Iface { String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize) throws TException { - sql.UpdateImageData(name, newName, image_path, license, internet, - cpu, ram, id, version, isTemplate, filesize); + sql.UpdateImageData(name, newName, image_path, license, internet, cpu, + ram, id, version, isTemplate, filesize); return false; } @@ -257,9 +246,12 @@ public class ServerHandler implements Server.Iface { @Override public List<Lecture> getLectureList() throws TException { - log.info(new Date() + " - returning LectureList: " + getLectureList().size() - + " items."); + + log.info(new Date().toString() + " - returning LectureList: " + + sql.getLectureList().size() + " items."); return sql.getLectureList(); + + } @Override @@ -272,12 +264,12 @@ public class ServerHandler implements Server.Iface { int imageversion = 0; Map<String, String> image = sql.getImageIDandVersion(imagename); - pk_image=image.get("GUID"); - imageversion=Integer.parseInt(image.get("version")); - sql.updateLectureData(pk_image, imageversion, lastname, newName, - desc, shortdesc, startDate, endDate, isActive, id); - - XMLCreator xml = new XMLCreator(sql.getConnection(),newName); + pk_image = image.get("GUID"); + imageversion = Integer.parseInt(image.get("version")); + sql.updateLectureData(pk_image, imageversion, lastname, newName, desc, + shortdesc, startDate, endDate, isActive, id); + + XMLCreator xml = new XMLCreator(sql.getConnection(), newName); try { xml.create(newName); } catch (SQLException | ParserConfigurationException @@ -302,7 +294,7 @@ public class ServerHandler implements Server.Iface { + stringFile); try { - // File wird von Server gelöscht + // File wird von Server gel�scht FileUtils.forceDelete(tmpFile); return true; @@ -332,10 +324,12 @@ public class ServerHandler implements Server.Iface { Map<String, String> map = new HashMap<String, String>(); map = sql.getDeleteXMLData(id); try { - - String path = Configuration.config.getAbsolute_path() + "temp/" - + map.get("date").substring(0, map.get("date").length() - 2) + "_" + hs + "_" - + user + "_" + map.get("name") + ".xml"; + + String path = Configuration.config.getAbsolute_path() + + "temp/" + + map.get("date") + .substring(0, map.get("date").length() - 2) + "_" + + hs + "_" + user + "_" + map.get("name") + ".xml"; File xmlFile = new File(path); FileUtils.forceDelete(xmlFile); } catch (IOException e) { diff --git a/Dozentenmodulserver/src/server/TBinaryProtocolSafe.java b/Dozentenmodulserver/src/server/TBinaryProtocolSafe.java new file mode 100644 index 00000000..843b58b1 --- /dev/null +++ b/Dozentenmodulserver/src/server/TBinaryProtocolSafe.java @@ -0,0 +1,123 @@ +package server; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; + +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TMessage; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.protocol.TProtocolFactory; +import org.apache.thrift.transport.TTransport; + +/** + * Binary protocol implementation for thrift. + * Will not read messages bigger than 12MiB. + * + */ +public class TBinaryProtocolSafe extends TBinaryProtocol +{ + /** + * Factory + */ + @SuppressWarnings( "serial" ) + public static class Factory implements TProtocolFactory + { + + protected boolean strictRead_ = false; + protected boolean strictWrite_ = true; + + public Factory() + { + this( false, true ); + } + + public Factory(boolean strictRead, boolean strictWrite) + { + strictRead_ = strictRead; + strictWrite_ = strictWrite; + } + + public TProtocol getProtocol( TTransport trans ) + { + return new TBinaryProtocolSafe( trans, strictRead_, strictWrite_ ); + } + } + + private static final int maxLen = 12 * 1024 * 1024; // 12 MiB + + /** + * Constructor + */ + public TBinaryProtocolSafe(TTransport trans) + { + this( trans, false, true ); + } + + public TBinaryProtocolSafe(TTransport trans, boolean strictRead, boolean strictWrite) + { + super( trans ); + strictRead_ = strictRead; + strictWrite_ = strictWrite; + } + + /** + * Reading methods. + */ + + public TMessage readMessageBegin() throws TException + { + int size = readI32(); + if ( size > maxLen ) + throw new TProtocolException( TProtocolException.SIZE_LIMIT, "Payload too big." ); + if ( size < 0 ) { + int version = size & VERSION_MASK; + if ( version != VERSION_1 ) { + throw new TProtocolException( TProtocolException.BAD_VERSION, "Bad version in readMessageBegin" ); + } + return new TMessage( readString(), (byte) ( size & 0x000000ff ), readI32() ); + } else { + if ( strictRead_ ) { + throw new TProtocolException( TProtocolException.BAD_VERSION, "Missing version in readMessageBegin, old client?" ); + } + return new TMessage( readStringBody( size ), readByte(), readI32() ); + } + } + + public String readString() throws TException + { + int size = readI32(); + if ( size > maxLen ) + throw new TProtocolException( TProtocolException.SIZE_LIMIT, "Payload too big." ); + if ( trans_.getBytesRemainingInBuffer() >= size ) { + try { + String s = new String( trans_.getBuffer(), trans_.getBufferPosition(), size, "UTF-8" ); + trans_.consumeBuffer( size ); + return s; + } catch ( UnsupportedEncodingException e ) { + throw new TException( "JVM DOES NOT SUPPORT UTF-8" ); + } + } + + return readStringBody( size ); + } + + public ByteBuffer readBinary() throws TException + { + int size = readI32(); + if ( size > maxLen ) + throw new TProtocolException( TProtocolException.SIZE_LIMIT, "Payload too big." ); + if ( trans_.getBytesRemainingInBuffer() >= size ) { + ByteBuffer bb = ByteBuffer.wrap( trans_.getBuffer(), trans_.getBufferPosition(), size ); + trans_.consumeBuffer( size ); + return bb; + } + + byte[] buf = new byte[ size ]; + trans_.readAll( buf, 0, size ); + return ByteBuffer.wrap( buf ); + } + +} + diff --git a/Dozentenmodulserver/src/server/startServer.java b/Dozentenmodulserver/src/server/startServer.java index 949b3538..a5509d04 100644 --- a/Dozentenmodulserver/src/server/startServer.java +++ b/Dozentenmodulserver/src/server/startServer.java @@ -16,6 +16,13 @@ import org.ini4j.Wini; import server.BinaryListener; +import org.apache.thrift.protocol.TProtocolFactory; +import org.apache.thrift.server.TServer; +import org.apache.thrift.server.TThreadPoolServer; +import org.apache.thrift.transport.TServerSocket; +import org.apache.thrift.transport.TServerTransport; +import org.apache.thrift.transport.TTransportException; +import org.apache.thrift.server.TThreadPoolServer.Args; public class startServer { /** @@ -28,6 +35,27 @@ public class startServer { public static void main(String[] args) { + + + + //final ImageServerHandler handler = new ImageServerHandler(); + //final ImageServer.Processor<ImageServerHandler> processor = new ImageServer.Processor<ImageServerHandler>(handler); + + /* + try{ + TServerTransport serverTransport = new TServerSocket(9090); + //TServer server = new TSimpleServer(new Args(serverTransport).processor(processor)); + TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor)); + server.serve(); + } catch (Exception e){ + e.printStackTrace(); + } + */ + + //deprecated + + + //get Configuration try { Wini ini=new Wini(new File("Server_Config.ini")); @@ -43,14 +71,15 @@ public class startServer { e1.printStackTrace(); } //Start Server + BasicConfigurator.configure(); - log.info( new Date() + " - starting Application\n" ); + log.info("***** "+ new Date() + " - starting Application *****" ); Thread t; t = new Thread(new BinaryListener()); servers.add(t); t.start(); //information - log.info( new Date()+" - new thread created. Now "+servers.size()+" thread(s).\n" ); + //log.info( new Date()+" - new thread created. Now "+servers.size()+" thread(s).\n" ); // Run more servers // ... // Wait for all servers to die @@ -66,7 +95,7 @@ public class startServer { } } log.info( new Date()+" - all Servers shut down, exiting...\n" ); - + } } |
