diff options
| author | unknown | 2014-04-10 16:50:14 +0200 |
|---|---|---|
| committer | unknown | 2014-04-10 16:50:14 +0200 |
| commit | 236f2e7bf2c9d5cdec6da36140ee7dcac7944998 (patch) | |
| tree | 2de499a71a527c7320b2096c17c5a69d2ea8d288 /Dozentenmodul | |
| parent | bfg (diff) | |
| parent | cdsc (diff) | |
| download | tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.gz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.xz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
Dozentenmodul/src/GUI/SearchImage_GUI.java
Dozentenmodul/src/Models/person.java
Dozentenmodul/src/Models/vm.java
Diffstat (limited to 'Dozentenmodul')
469 files changed, 10399 insertions, 7110 deletions
diff --git a/Dozentenmodul/.classpath b/Dozentenmodul/.classpath index 459c978e..1e2dfca0 100644 --- a/Dozentenmodul/.classpath +++ b/Dozentenmodul/.classpath @@ -17,5 +17,7 @@ <classpathentry combineaccessrules="false" kind="src" path="/bwLehrpoolSuite_Server"/>
<classpathentry kind="lib" path="lib/ini4j-0.5.2-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/libthrift-0.9.1.jar"/>
+ <classpathentry kind="lib" path="/bwLehrpoolSuite_Server/lib/slf4j-api-1.7.5.jar"/>
+ <classpathentry kind="lib" path="lib/slf4j-simple-1.7.6.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/Dozentenmodul/.settings/org.eclipse.core.resources.prefs b/Dozentenmodul/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..61583c81 --- /dev/null +++ b/Dozentenmodul/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/gui/lecture/EditLectureAllgemein_GUI.java=UTF-8 diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class Binary files differdeleted file mode 100644 index 5574d48e..00000000 --- a/Dozentenmodul/bin/GUI/BillOfRights_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class Binary files differdeleted file mode 100644 index 49256cbe..00000000 --- a/Dozentenmodul/bin/GUI/BillOfRights_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class Binary files differdeleted file mode 100644 index a2ae1bca..00000000 --- a/Dozentenmodul/bin/GUI/BillOfRights_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/BillOfRights_GUI.class b/Dozentenmodul/bin/GUI/BillOfRights_GUI.class Binary files differdeleted file mode 100644 index 097d3995..00000000 --- a/Dozentenmodul/bin/GUI/BillOfRights_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 8aac918a..00000000 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index fe3aa20e..00000000 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 04b61bfc..00000000 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 79d48c01..00000000 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class Binary files differdeleted file mode 100644 index b848f2b1..00000000 --- a/Dozentenmodul/bin/GUI/EditImageAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index b17e4eea..00000000 --- a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index ce51d208..00000000 --- a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 4439a63d..00000000 --- a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index ed1c7c14..00000000 --- a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class Binary files differdeleted file mode 100644 index 9d2ce374..00000000 --- a/Dozentenmodul/bin/GUI/EditImageTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 929a1184..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index b87e4c2a..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 210e494d..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 69b2a2a7..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class Binary files differdeleted file mode 100644 index 3aa6d518..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index b7b5fc47..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index b237ee04..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 2f3bc164..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 7237fa6b..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class Binary files differdeleted file mode 100644 index baa9e9f0..00000000 --- a/Dozentenmodul/bin/GUI/EingabeImageTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 4947b5ae..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index 170bc6c8..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 66cf8978..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 168722c4..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class Binary files differdeleted file mode 100644 index cd15c612..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstaltungAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index cb2858d5..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index 672e37c7..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 297810f5..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 17769c26..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class Binary files differdeleted file mode 100644 index ddb5df01..00000000 --- a/Dozentenmodul/bin/GUI/EingabeVeranstatlungTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class b/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class Binary files differdeleted file mode 100644 index 5c5857a5..00000000 --- a/Dozentenmodul/bin/GUI/ExtendedSearch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class Binary files differdeleted file mode 100644 index 244b88e2..00000000 --- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class Binary files differdeleted file mode 100644 index 42a0f970..00000000 --- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class Binary files differdeleted file mode 100644 index 26910efa..00000000 --- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class Binary files differdeleted file mode 100644 index 235576d0..00000000 --- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class Binary files differdeleted file mode 100644 index 9dd8d00c..00000000 --- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class Binary files differdeleted file mode 100644 index 3a3714a5..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class Binary files differdeleted file mode 100644 index 905d3fde..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class Binary files differdeleted file mode 100644 index 4b544121..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class Binary files differdeleted file mode 100644 index c4594204..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class Binary files differdeleted file mode 100644 index 556db5fc..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class b/Dozentenmodul/bin/GUI/FTPUploader_GUI.class Binary files differdeleted file mode 100644 index 64da3d54..00000000 --- a/Dozentenmodul/bin/GUI/FTPUploader_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class Binary files differdeleted file mode 100644 index a0a9eb95..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class Binary files differdeleted file mode 100644 index 59117e1c..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class Binary files differdeleted file mode 100644 index c6115895..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class Binary files differdeleted file mode 100644 index 1c0ad2e0..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class Binary files differdeleted file mode 100644 index a666be6d..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class Binary files differdeleted file mode 100644 index 0b50d8a6..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class b/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class Binary files differdeleted file mode 100644 index 1275514d..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/LinkImage_GUI.class b/Dozentenmodul/bin/GUI/LinkImage_GUI.class Binary files differdeleted file mode 100644 index fdbfbc72..00000000 --- a/Dozentenmodul/bin/GUI/LinkImage_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Login_GUI$1.class b/Dozentenmodul/bin/GUI/Login_GUI$1.class Binary files differdeleted file mode 100644 index 3ba048a4..00000000 --- a/Dozentenmodul/bin/GUI/Login_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Login_GUI$2.class b/Dozentenmodul/bin/GUI/Login_GUI$2.class Binary files differdeleted file mode 100644 index 4c73519c..00000000 --- a/Dozentenmodul/bin/GUI/Login_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Login_GUI$3.class b/Dozentenmodul/bin/GUI/Login_GUI$3.class Binary files differdeleted file mode 100644 index 9d555d1d..00000000 --- a/Dozentenmodul/bin/GUI/Login_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/Login_GUI.class b/Dozentenmodul/bin/GUI/Login_GUI.class Binary files differdeleted file mode 100644 index 621e1e3f..00000000 --- a/Dozentenmodul/bin/GUI/Login_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class Binary files differdeleted file mode 100644 index 5cc49090..00000000 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class Binary files differdeleted file mode 100644 index 9bb444b5..00000000 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class Binary files differdeleted file mode 100644 index e2caddfd..00000000 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class b/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class Binary files differdeleted file mode 100644 index 59a0ff9e..00000000 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/MainMenue_GUI.class b/Dozentenmodul/bin/GUI/MainMenue_GUI.class Binary files differdeleted file mode 100644 index c52b2e1a..00000000 --- a/Dozentenmodul/bin/GUI/MainMenue_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class b/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class Binary files differdeleted file mode 100644 index be572a32..00000000 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class Binary files differdeleted file mode 100644 index b2222872..00000000 --- a/Dozentenmodul/bin/GUI/SearchMethod_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class Binary files differdeleted file mode 100644 index 296d7ebc..00000000 --- a/Dozentenmodul/bin/GUI/SearchMethod_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class Binary files differdeleted file mode 100644 index 4b572444..00000000 --- a/Dozentenmodul/bin/GUI/SearchMethod_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class b/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class Binary files differdeleted file mode 100644 index 64fdeb32..00000000 --- a/Dozentenmodul/bin/GUI/SearchMethod_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class Binary files differdeleted file mode 100644 index 65a75adf..00000000 --- a/Dozentenmodul/bin/GUI/VmWareLink_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class Binary files differdeleted file mode 100644 index 1c73d190..00000000 --- a/Dozentenmodul/bin/GUI/VmWareLink_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class b/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class Binary files differdeleted file mode 100644 index ba568bd7..00000000 --- a/Dozentenmodul/bin/GUI/VmWareLink_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/Image_zu_Veranstaltung_HDD.png b/Dozentenmodul/bin/Image_zu_Veranstaltung_HDD.png Binary files differnew file mode 100644 index 00000000..39b3bac6 --- /dev/null +++ b/Dozentenmodul/bin/Image_zu_Veranstaltung_HDD.png diff --git a/Dozentenmodul/bin/Models/Image.class b/Dozentenmodul/bin/Models/Image.class Binary files differindex fcd1a276..4c70ef81 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 6626b998..a0cb753d 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 8c7815e5..32519c65 100644 --- a/Dozentenmodul/bin/Models/person.class +++ b/Dozentenmodul/bin/Models/person.class diff --git a/Dozentenmodul/bin/Models/vm.class b/Dozentenmodul/bin/Models/vm.class Binary files differdeleted file mode 100644 index 58709544..00000000 --- a/Dozentenmodul/bin/Models/vm.class +++ /dev/null diff --git a/Dozentenmodul/bin/auth/Authentification.class b/Dozentenmodul/bin/auth/Authentification.class Binary files differindex e7a2611d..0d9b3144 100644 --- a/Dozentenmodul/bin/auth/Authentification.class +++ b/Dozentenmodul/bin/auth/Authentification.class diff --git a/Dozentenmodul/bin/ftp/DownloadTask.class b/Dozentenmodul/bin/ftp/DownloadTask.class Binary files differindex 1b153fb7..447a8eb4 100644 --- a/Dozentenmodul/bin/ftp/DownloadTask.class +++ b/Dozentenmodul/bin/ftp/DownloadTask.class diff --git a/Dozentenmodul/bin/ftp/FTPUtility.class b/Dozentenmodul/bin/ftp/FTPUtility.class Binary files differindex f563788c..e0536990 100644 --- a/Dozentenmodul/bin/ftp/FTPUtility.class +++ b/Dozentenmodul/bin/ftp/FTPUtility.class diff --git a/Dozentenmodul/bin/ftp/UploadTask.class b/Dozentenmodul/bin/ftp/UploadTask.class Binary files differindex 12ba0962..32bd6720 100644 --- a/Dozentenmodul/bin/ftp/UploadTask.class +++ b/Dozentenmodul/bin/ftp/UploadTask.class diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class b/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class Binary files differdeleted file mode 100644 index 5574d48e..00000000 --- a/Dozentenmodul/bin/gui/BillOfRights_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class b/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class Binary files differdeleted file mode 100644 index a2ae1bca..00000000 --- a/Dozentenmodul/bin/gui/BillOfRights_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class Binary files differdeleted file mode 100644 index 6139b7dc..00000000 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class Binary files differdeleted file mode 100644 index 1ab047a4..00000000 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class Binary files differdeleted file mode 100644 index 0e845cc7..00000000 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class Binary files differdeleted file mode 100644 index a943d210..00000000 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class b/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class Binary files differdeleted file mode 100644 index a1eb0a54..00000000 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$8.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 8aac918a..00000000 --- a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index fe3aa20e..00000000 --- a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 04b61bfc..00000000 --- a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 79d48c01..00000000 --- a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class Binary files differdeleted file mode 100644 index b848f2b1..00000000 --- a/Dozentenmodul/bin/gui/EditImageAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index b17e4eea..00000000 --- a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index ce51d208..00000000 --- a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 4439a63d..00000000 --- a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index ed1c7c14..00000000 --- a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 929a1184..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index b87e4c2a..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 210e494d..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 69b2a2a7..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class Binary files differdeleted file mode 100644 index 3aa6d518..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index b7b5fc47..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index b237ee04..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 2f3bc164..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 7237fa6b..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class Binary files differdeleted file mode 100644 index baa9e9f0..00000000 --- a/Dozentenmodul/bin/gui/EingabeImageTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class Binary files differdeleted file mode 100644 index 4947b5ae..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class Binary files differdeleted file mode 100644 index 170bc6c8..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class Binary files differdeleted file mode 100644 index 66cf8978..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class Binary files differdeleted file mode 100644 index 168722c4..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class b/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class Binary files differdeleted file mode 100644 index cd15c612..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstaltungAllgemein_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$1.class Binary files differdeleted file mode 100644 index cb2858d5..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class Binary files differdeleted file mode 100644 index 672e37c7..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class Binary files differdeleted file mode 100644 index 297810f5..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class Binary files differdeleted file mode 100644 index 17769c26..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class b/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class Binary files differdeleted file mode 100644 index ddb5df01..00000000 --- a/Dozentenmodul/bin/gui/EingabeVeranstatlungTechnisch_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class Binary files differdeleted file mode 100644 index 14bb24a5..00000000 --- a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class Binary files differdeleted file mode 100644 index dd35be9f..00000000 --- a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class b/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class Binary files differdeleted file mode 100644 index 465fc151..00000000 --- a/Dozentenmodul/bin/gui/ExtendedSearch_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class Binary files differdeleted file mode 100644 index 244b88e2..00000000 --- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class Binary files differdeleted file mode 100644 index 42a0f970..00000000 --- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class Binary files differdeleted file mode 100644 index 26910efa..00000000 --- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class Binary files differdeleted file mode 100644 index 235576d0..00000000 --- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI.class Binary files differdeleted file mode 100644 index 9dd8d00c..00000000 --- a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class Binary files differdeleted file mode 100644 index 4312cd42..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class Binary files differdeleted file mode 100644 index 6834e2ba..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class Binary files differdeleted file mode 100644 index 1614a880..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class Binary files differdeleted file mode 100644 index dbece136..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class Binary files differdeleted file mode 100644 index 875eb9e8..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class Binary files differdeleted file mode 100644 index ffe9b318..00000000 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class Binary files differdeleted file mode 100644 index 3a3714a5..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class Binary files differdeleted file mode 100644 index 905d3fde..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class Binary files differdeleted file mode 100644 index 4b544121..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class Binary files differdeleted file mode 100644 index c4594204..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class Binary files differdeleted file mode 100644 index 556db5fc..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class b/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class Binary files differdeleted file mode 100644 index d6b733e8..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/FTPUploader_GUI.class b/Dozentenmodul/bin/gui/FTPUploader_GUI.class Binary files differdeleted file mode 100644 index 64da3d54..00000000 --- a/Dozentenmodul/bin/gui/FTPUploader_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$1.class b/Dozentenmodul/bin/gui/LinkImage_GUI$1.class Binary files differdeleted file mode 100644 index a0a9eb95..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$2.class b/Dozentenmodul/bin/gui/LinkImage_GUI$2.class Binary files differdeleted file mode 100644 index 59117e1c..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$3.class b/Dozentenmodul/bin/gui/LinkImage_GUI$3.class Binary files differdeleted file mode 100644 index c6115895..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$4.class b/Dozentenmodul/bin/gui/LinkImage_GUI$4.class Binary files differdeleted file mode 100644 index 1c0ad2e0..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$5.class b/Dozentenmodul/bin/gui/LinkImage_GUI$5.class Binary files differdeleted file mode 100644 index a666be6d..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$6.class b/Dozentenmodul/bin/gui/LinkImage_GUI$6.class Binary files differdeleted file mode 100644 index 0b50d8a6..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI$7.class b/Dozentenmodul/bin/gui/LinkImage_GUI$7.class Binary files differdeleted file mode 100644 index 1275514d..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/LinkImage_GUI.class b/Dozentenmodul/bin/gui/LinkImage_GUI.class Binary files differdeleted file mode 100644 index fdbfbc72..00000000 --- a/Dozentenmodul/bin/gui/LinkImage_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/Login_GUI$1.class b/Dozentenmodul/bin/gui/Login_GUI$1.class Binary files differdeleted file mode 100644 index 3ba048a4..00000000 --- a/Dozentenmodul/bin/gui/Login_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/Login_GUI$2.class b/Dozentenmodul/bin/gui/Login_GUI$2.class Binary files differdeleted file mode 100644 index 4c73519c..00000000 --- a/Dozentenmodul/bin/gui/Login_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/Login_GUI$3.class b/Dozentenmodul/bin/gui/Login_GUI$3.class Binary files differdeleted file mode 100644 index 9d555d1d..00000000 --- a/Dozentenmodul/bin/gui/Login_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/Login_GUI.class b/Dozentenmodul/bin/gui/Login_GUI.class Binary files differdeleted file mode 100644 index 621e1e3f..00000000 --- a/Dozentenmodul/bin/gui/Login_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$1.class b/Dozentenmodul/bin/gui/MainMenue_GUI$1.class Binary files differdeleted file mode 100644 index 5cc49090..00000000 --- a/Dozentenmodul/bin/gui/MainMenue_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$2.class b/Dozentenmodul/bin/gui/MainMenue_GUI$2.class Binary files differdeleted file mode 100644 index 9bb444b5..00000000 --- a/Dozentenmodul/bin/gui/MainMenue_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$3.class b/Dozentenmodul/bin/gui/MainMenue_GUI$3.class Binary files differdeleted file mode 100644 index e2caddfd..00000000 --- a/Dozentenmodul/bin/gui/MainMenue_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI$4.class b/Dozentenmodul/bin/gui/MainMenue_GUI$4.class Binary files differdeleted file mode 100644 index 59a0ff9e..00000000 --- a/Dozentenmodul/bin/gui/MainMenue_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/MainMenue_GUI.class b/Dozentenmodul/bin/gui/MainMenue_GUI.class Binary files differdeleted file mode 100644 index c52b2e1a..00000000 --- a/Dozentenmodul/bin/gui/MainMenue_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class Binary files differdeleted file mode 100644 index fd15e92d..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class Binary files differdeleted file mode 100644 index 497574cd..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class Binary files differdeleted file mode 100644 index 440eeb02..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class Binary files differdeleted file mode 100644 index 1d88aaf2..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class Binary files differdeleted file mode 100644 index ae739673..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class Binary files differdeleted file mode 100644 index 030ef361..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class Binary files differdeleted file mode 100644 index 9c94ae89..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class Binary files differdeleted file mode 100644 index eaa57353..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI.class Binary files differdeleted file mode 100644 index 616e48d6..00000000 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$1.class b/Dozentenmodul/bin/gui/SearchImage_GUI$1.class Binary files differdeleted file mode 100644 index be572a32..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$3.class b/Dozentenmodul/bin/gui/SearchImage_GUI$3.class Binary files differdeleted file mode 100644 index 721116df..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$4.class b/Dozentenmodul/bin/gui/SearchImage_GUI$4.class Binary files differdeleted file mode 100644 index 33a3f111..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$5.class b/Dozentenmodul/bin/gui/SearchImage_GUI$5.class Binary files differdeleted file mode 100644 index 6673eef5..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$5.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$6.class b/Dozentenmodul/bin/gui/SearchImage_GUI$6.class Binary files differdeleted file mode 100644 index 1863e40f..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$6.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$7.class b/Dozentenmodul/bin/gui/SearchImage_GUI$7.class Binary files differdeleted file mode 100644 index ef51173a..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$7.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$8.class b/Dozentenmodul/bin/gui/SearchImage_GUI$8.class Binary files differdeleted file mode 100644 index 5e5bfeb5..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$8.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$9.class b/Dozentenmodul/bin/gui/SearchImage_GUI$9.class Binary files differdeleted file mode 100644 index e231bdf7..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI$9.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI.class b/Dozentenmodul/bin/gui/SearchImage_GUI.class Binary files differdeleted file mode 100644 index c676d0a8..00000000 --- a/Dozentenmodul/bin/gui/SearchImage_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class Binary files differdeleted file mode 100644 index b2222872..00000000 --- a/Dozentenmodul/bin/gui/SearchMethod_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class Binary files differdeleted file mode 100644 index 296d7ebc..00000000 --- a/Dozentenmodul/bin/gui/SearchMethod_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class Binary files differdeleted file mode 100644 index 4b572444..00000000 --- a/Dozentenmodul/bin/gui/SearchMethod_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class b/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class Binary files differdeleted file mode 100644 index 64fdeb32..00000000 --- a/Dozentenmodul/bin/gui/SearchMethod_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/SearchMethod_GUI.class b/Dozentenmodul/bin/gui/SearchMethod_GUI.class Binary files differdeleted file mode 100644 index d4f71a85..00000000 --- a/Dozentenmodul/bin/gui/SearchMethod_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class Binary files differdeleted file mode 100644 index 65a75adf..00000000 --- a/Dozentenmodul/bin/gui/VmWareLink_GUI$1.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class Binary files differdeleted file mode 100644 index 1c73d190..00000000 --- a/Dozentenmodul/bin/gui/VmWareLink_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class b/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class Binary files differdeleted file mode 100644 index b30fc786..00000000 --- a/Dozentenmodul/bin/gui/VmWareLink_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/VmWareLink_GUI.class Binary files differdeleted file mode 100644 index 4431fe00..00000000 --- a/Dozentenmodul/bin/gui/VmWareLink_GUI.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class Binary files differnew file mode 100644 index 00000000..d5e68cc7 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class Binary files differnew file mode 100644 index 00000000..be29eec5 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class Binary files differnew file mode 100644 index 00000000..07b78998 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class Binary files differnew file mode 100644 index 00000000..b001474a --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class Binary files differnew file mode 100644 index 00000000..c14c26e5 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI$1.class Binary files differnew file mode 100644 index 00000000..04edeee9 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..a88a21f5 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..1ac1680a --- /dev/null +++ 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 differnew file mode 100644 index 00000000..ac331f22 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..2e49913b --- /dev/null +++ b/Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class Binary files differnew file mode 100644 index 00000000..679fea24 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$1.class diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$2.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class Binary files differindex 214998fb..2d8d670d 100644 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class Binary files differnew file mode 100644 index 00000000..a9efff64 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$3.class diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$4.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class Binary files differindex 9382863b..c3c7d0d4 100644 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$4.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class Binary files differnew file mode 100644 index 00000000..d46ad562 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$5.class diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI$6.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class Binary files differindex 63b957b6..f2192686 100644 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI$6.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class Binary files differnew file mode 100644 index 00000000..10b584a7 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$7.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class Binary files differnew file mode 100644 index 00000000..cb8ea27e --- /dev/null +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI$8.class diff --git a/Dozentenmodul/bin/gui/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class Binary files differindex ad9c8803..4549e05a 100644 --- a/Dozentenmodul/bin/gui/DeleteImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class Binary files differnew file mode 100644 index 00000000..7692bcfb --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$2.class Binary files differnew file mode 100644 index 00000000..d11a8449 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..e28ed09a --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class Binary files differnew file mode 100644 index 00000000..64a79922 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class Binary files differnew file mode 100644 index 00000000..c0b072cf --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class Binary files differnew file mode 100644 index 00000000..216e48c4 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class Binary files differnew file mode 100644 index 00000000..d22c246d --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class Binary files differnew file mode 100644 index 00000000..4edb101c --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class Binary files differnew file mode 100644 index 00000000..b31208f2 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI$4.class diff --git a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class Binary files differindex 9d2ce374..edcd12d8 100644 --- a/Dozentenmodul/bin/gui/EditImageTechnisch_GUI.class +++ b/Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class Binary files differnew file mode 100644 index 00000000..3eded544 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class Binary files differnew file mode 100644 index 00000000..aac75f6d --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class Binary files differnew file mode 100644 index 00000000..4adde720 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..03aeea73 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class Binary files differnew file mode 100644 index 00000000..7ffa5033 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class Binary files differnew file mode 100644 index 00000000..720ce3cd --- /dev/null +++ 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 differnew file mode 100644 index 00000000..496f2158 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..29269bbd --- /dev/null +++ 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 differnew file mode 100644 index 00000000..785ecb6b --- /dev/null +++ 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 differnew file mode 100644 index 00000000..3be2f5f1 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..217b987a --- /dev/null +++ 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 differnew file mode 100644 index 00000000..0b7106e2 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..9b5b4107 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..847b6416 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..cb5888ae --- /dev/null +++ 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 differnew file mode 100644 index 00000000..dca740f2 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..a25d7157 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class Binary files differnew file mode 100644 index 00000000..55d72ee9 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class Binary files differnew file mode 100644 index 00000000..23f71ee1 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..dfb69143 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class Binary files differnew file mode 100644 index 00000000..87c0067c --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class Binary files differindex 4beacc01..8d99419a 100644 --- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class Binary files differnew file mode 100644 index 00000000..d3571c94 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class Binary files differnew file mode 100644 index 00000000..9e30be11 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$1.class diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class Binary files differindex 88ddae37..ff02ba32 100644 --- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$2.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class Binary files differnew file mode 100644 index 00000000..5b3e93a0 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$3.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class Binary files differnew file mode 100644 index 00000000..e0ebd234 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$4.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class Binary files differnew file mode 100644 index 00000000..f0cfc5da --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$5.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class Binary files differnew file mode 100644 index 00000000..b6600cc8 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$6.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class Binary files differnew file mode 100644 index 00000000..772ed400 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$7.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class Binary files differnew file mode 100644 index 00000000..ffde361f --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI$9.class Binary files differnew file mode 100644 index 00000000..e2b34c9a --- /dev/null +++ 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 differnew file mode 100644 index 00000000..264f9d4a --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class Binary files differnew file mode 100644 index 00000000..8dbd7362 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$1.class diff --git a/Dozentenmodul/bin/gui/SearchImage_GUI$2.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$2.class Binary files differindex 3a6ee9ab..7c32f943 100644 --- a/Dozentenmodul/bin/gui/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 differnew file mode 100644 index 00000000..5b8f3f8b --- /dev/null +++ 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 differnew file mode 100644 index 00000000..f842a022 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..2452046f --- /dev/null +++ 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 differnew file mode 100644 index 00000000..eff43b91 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..8b9f3286 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..a5ff7a18 --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$8.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class Binary files differnew file mode 100644 index 00000000..e5ad916e --- /dev/null +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI$9.class diff --git a/Dozentenmodul/bin/GUI/SearchImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class Binary files differindex c676d0a8..fdefc8b5 100644 --- a/Dozentenmodul/bin/GUI/SearchImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class Binary files differnew file mode 100644 index 00000000..6a2f53f1 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$1.class diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI$2.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class Binary files differindex 49256cbe..16bbf49f 100644 --- a/Dozentenmodul/bin/gui/BillOfRights_GUI$2.class +++ b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$2.class diff --git a/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class Binary files differnew file mode 100644 index 00000000..a3ae5059 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI$3.class diff --git a/Dozentenmodul/bin/gui/BillOfRights_GUI.class b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class Binary files differindex 097d3995..9d951522 100644 --- a/Dozentenmodul/bin/gui/BillOfRights_GUI.class +++ b/Dozentenmodul/bin/gui/intro/BillOfRights_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class Binary files differnew file mode 100644 index 00000000..a064efc0 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..9c179a21 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$3.class b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class Binary files differnew file mode 100644 index 00000000..33e222c7 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$3.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class Binary files differnew file mode 100644 index 00000000..0fa234c1 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$5.class b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class Binary files differnew file mode 100644 index 00000000..c09574b4 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/Login_GUI$5.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class Binary files differnew file mode 100644 index 00000000..7f627245 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..59f25618 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..76da6ffd --- /dev/null +++ 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 differnew file mode 100644 index 00000000..d88ea420 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..bb811f7a --- /dev/null +++ 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 differnew file mode 100644 index 00000000..1cf17778 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..f33e263d --- /dev/null +++ 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 differnew file mode 100644 index 00000000..715c30d8 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..10cac7e7 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..a42c1174 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..293c16b6 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..242c673a --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/MainMenue_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class Binary files differnew file mode 100644 index 00000000..60fcb543 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class Binary files differnew file mode 100644 index 00000000..a61250c1 --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class diff --git a/Dozentenmodul/bin/gui/VmWareLink_GUI$3.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class Binary files differindex ba568bd7..bfa90045 100644 --- a/Dozentenmodul/bin/gui/VmWareLink_GUI$3.class +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class Binary files differnew file mode 100644 index 00000000..056f8f8d --- /dev/null +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class Binary files differindex 4431fe00..e74b203f 100644 --- a/Dozentenmodul/bin/GUI/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 differnew file mode 100644 index 00000000..9b994ec4 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..6862545b --- /dev/null +++ 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 differnew file mode 100644 index 00000000..d71d71d5 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..9fe72770 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..09017e11 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..adcc7fd5 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..031b69b7 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..dd70f264 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..22209c73 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..808b6d99 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..c412ac7b --- /dev/null +++ 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 differnew file mode 100644 index 00000000..83d7cf3e --- /dev/null +++ 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 differnew file mode 100644 index 00000000..8ae5f63c --- /dev/null +++ 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 differnew file mode 100644 index 00000000..79f4356c --- /dev/null +++ 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 differnew file mode 100644 index 00000000..b6c8be8f --- /dev/null +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI$3.class diff --git a/Dozentenmodul/bin/gui/ExtendedSearch_GUI.class b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class Binary files differindex 5c5857a5..665f51d1 100644 --- a/Dozentenmodul/bin/gui/ExtendedSearch_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class Binary files differnew file mode 100644 index 00000000..b8590387 --- /dev/null +++ b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$1.class diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class Binary files differnew file mode 100644 index 00000000..975fb7c1 --- /dev/null +++ b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$2.class diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class Binary files differnew file mode 100644 index 00000000..9d4fc780 --- /dev/null +++ b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$3.class diff --git a/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class Binary files differnew file mode 100644 index 00000000..46f15114 --- /dev/null +++ b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI$4.class diff --git a/Dozentenmodul/bin/GUI/SearchMethod_GUI.class b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class Binary files differindex d4f71a85..92a6a519 100644 --- a/Dozentenmodul/bin/GUI/SearchMethod_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/SearchMethodLecture_GUI.class diff --git a/Dozentenmodul/bin/models/Image.class b/Dozentenmodul/bin/models/Image.class Binary files differindex fcd1a276..4c70ef81 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 6626b998..a0cb753d 100644 --- a/Dozentenmodul/bin/models/Lecture.class +++ b/Dozentenmodul/bin/models/Lecture.class diff --git a/Dozentenmodul/bin/models/SessionData.class b/Dozentenmodul/bin/models/SessionData.class Binary files differnew file mode 100644 index 00000000..f0ff4996 --- /dev/null +++ b/Dozentenmodul/bin/models/SessionData.class diff --git a/Dozentenmodul/bin/models/person.class b/Dozentenmodul/bin/models/person.class Binary files differindex 8c7815e5..32519c65 100644 --- a/Dozentenmodul/bin/models/person.class +++ b/Dozentenmodul/bin/models/person.class diff --git a/Dozentenmodul/bin/models/vm.class b/Dozentenmodul/bin/models/vm.class Binary files differdeleted file mode 100644 index 58709544..00000000 --- a/Dozentenmodul/bin/models/vm.class +++ /dev/null diff --git a/Dozentenmodul/bin/org.eclipse.core.resources.prefs b/Dozentenmodul/bin/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..61583c81 --- /dev/null +++ b/Dozentenmodul/bin/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/gui/lecture/EditLectureAllgemein_GUI.java=UTF-8 diff --git a/Dozentenmodul/bin/thrift/AuthenticationError.class b/Dozentenmodul/bin/thrift/AuthenticationError.class Binary files differnew file mode 100644 index 00000000..8f12237d --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationError.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class Binary files differnew file mode 100644 index 00000000..6108caf6 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..ed3b0b62 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class Binary files differnew file mode 100644 index 00000000..2ae1e4f8 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..662f2f37 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class b/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class Binary files differnew file mode 100644 index 00000000..21b0acfc --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class diff --git a/Dozentenmodul/bin/thrift/AuthenticationException.class b/Dozentenmodul/bin/thrift/AuthenticationException.class Binary files differnew file mode 100644 index 00000000..de2ec118 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthenticationException.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationError.class b/Dozentenmodul/bin/thrift/AuthorizationError.class Binary files differnew file mode 100644 index 00000000..b05d13c5 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationError.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class Binary files differnew file mode 100644 index 00000000..978243e1 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..9186486d --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class Binary files differnew file mode 100644 index 00000000..7b0fcbe6 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..40ca68dc --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class b/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class Binary files differnew file mode 100644 index 00000000..ff62ea72 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class diff --git a/Dozentenmodul/bin/thrift/AuthorizationException.class b/Dozentenmodul/bin/thrift/AuthorizationException.class Binary files differnew file mode 100644 index 00000000..9ec46927 --- /dev/null +++ b/Dozentenmodul/bin/thrift/AuthorizationException.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class Binary files differnew file mode 100644 index 00000000..c7f71131 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class Binary files differnew file mode 100644 index 00000000..fb117af1 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class Binary files differnew file mode 100644 index 00000000..43a434ad --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class Binary files differnew file mode 100644 index 00000000..6ebc2ea3 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class Binary files differnew file mode 100644 index 00000000..1d34c1e2 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class Binary files differnew file mode 100644 index 00000000..e28e8f90 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class Binary files differnew file mode 100644 index 00000000..3dadf0b7 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class Binary files differnew file mode 100644 index 00000000..a02237d2 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class Binary files differnew file mode 100644 index 00000000..8bd8bacf --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class Binary files differnew file mode 100644 index 00000000..2b4fe03d --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class Binary files differnew file mode 100644 index 00000000..9dc81f2a --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class Binary files differnew file mode 100644 index 00000000..4b4e0afe --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class Binary files differnew file mode 100644 index 00000000..9bd05794 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class b/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class Binary files differnew file mode 100644 index 00000000..215621f5 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Client.class b/Dozentenmodul/bin/thrift/ImageServer$Client.class Binary files differnew file mode 100644 index 00000000..d8ecb8b8 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Client.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Iface.class b/Dozentenmodul/bin/thrift/ImageServer$Iface.class Binary files differnew file mode 100644 index 00000000..18aec242 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Iface.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class Binary files differnew file mode 100644 index 00000000..1a1f939e --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class Binary files differnew file mode 100644 index 00000000..eba9943e --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class Binary files differnew file mode 100644 index 00000000..a3dd6c8f --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor.class b/Dozentenmodul/bin/thrift/ImageServer$Processor.class Binary files differnew file mode 100644 index 00000000..26f96272 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$Processor.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class Binary files differnew file mode 100644 index 00000000..a8cd4f66 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class Binary files differnew file mode 100644 index 00000000..29e03256 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..d20ee8b2 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class Binary files differnew file mode 100644 index 00000000..58d1374e --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..4429e284 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class Binary files differnew file mode 100644 index 00000000..a92fb3e9 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class Binary files differnew file mode 100644 index 00000000..9fcb0a6e --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class Binary files differnew file mode 100644 index 00000000..b1243414 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..1c507ea2 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class Binary files differnew file mode 100644 index 00000000..4a3edda6 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..c82d6354 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class Binary files differnew file mode 100644 index 00000000..db12a9f8 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class Binary files differnew file mode 100644 index 00000000..ad982267 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class Binary files differnew file mode 100644 index 00000000..9b24fe8f --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..8bac7772 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class Binary files differnew file mode 100644 index 00000000..94eb7a5d --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..13e77c2b --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class Binary files differnew file mode 100644 index 00000000..90aa2fa1 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class Binary files differnew file mode 100644 index 00000000..f306cf9d --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class Binary files differnew file mode 100644 index 00000000..8ce44766 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..9cb117e7 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class Binary files differnew file mode 100644 index 00000000..e9186710 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..1ba83391 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class Binary files differnew file mode 100644 index 00000000..bc1a176b --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class Binary files differnew file mode 100644 index 00000000..af0bbe88 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class Binary files differnew file mode 100644 index 00000000..2c2f59cf --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..6fc626ef --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class Binary files differnew file mode 100644 index 00000000..822afb2c --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..7b2dc61c --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args.class Binary files differnew file mode 100644 index 00000000..72a484fb --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_args.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class Binary files differnew file mode 100644 index 00000000..6af85a25 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class Binary files differnew file mode 100644 index 00000000..311b5c76 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..77ed53ce --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class Binary files differnew file mode 100644 index 00000000..eb11e143 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..95803bc3 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result.class Binary files differnew file mode 100644 index 00000000..eb20bac5 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer$ping_result.class diff --git a/Dozentenmodul/bin/thrift/ImageServer.class b/Dozentenmodul/bin/thrift/ImageServer.class Binary files differnew file mode 100644 index 00000000..414f9a34 --- /dev/null +++ b/Dozentenmodul/bin/thrift/ImageServer.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class Binary files differnew file mode 100644 index 00000000..8336b756 --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..603e663a --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class Binary files differnew file mode 100644 index 00000000..cbce816c --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..0286db6c --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class b/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class Binary files differnew file mode 100644 index 00000000..a93a93a8 --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException.class b/Dozentenmodul/bin/thrift/InvalidTokenException.class Binary files differnew file mode 100644 index 00000000..317b760c --- /dev/null +++ b/Dozentenmodul/bin/thrift/InvalidTokenException.class diff --git a/Dozentenmodul/bin/thrift/MasterThriftConnection.class b/Dozentenmodul/bin/thrift/MasterThriftConnection.class Binary files differnew file mode 100644 index 00000000..dd76a766 --- /dev/null +++ b/Dozentenmodul/bin/thrift/MasterThriftConnection.class diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class Binary files differnew file mode 100644 index 00000000..9b8c9ed9 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..132cbe65 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class Binary files differnew file mode 100644 index 00000000..eaa4e9a6 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..0abd2b91 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/SessionData$_Fields.class b/Dozentenmodul/bin/thrift/SessionData$_Fields.class Binary files differnew file mode 100644 index 00000000..8a9df0f6 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData$_Fields.class diff --git a/Dozentenmodul/bin/thrift/SessionData.class b/Dozentenmodul/bin/thrift/SessionData.class Binary files differnew file mode 100644 index 00000000..f084b247 --- /dev/null +++ b/Dozentenmodul/bin/thrift/SessionData.class diff --git a/Dozentenmodul/bin/thrift/ThriftConnection.class b/Dozentenmodul/bin/thrift/ThriftConnection.class Binary files differindex 25f7f5fe..f378593f 100644 --- a/Dozentenmodul/bin/thrift/ThriftConnection.class +++ b/Dozentenmodul/bin/thrift/ThriftConnection.class diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class Binary files differnew file mode 100644 index 00000000..c4a055f7 --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class Binary files differnew file mode 100644 index 00000000..ff60ded1 --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class Binary files differnew file mode 100644 index 00000000..1d717010 --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class Binary files differnew file mode 100644 index 00000000..adf2a51e --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class diff --git a/Dozentenmodul/bin/thrift/UserInfo$_Fields.class b/Dozentenmodul/bin/thrift/UserInfo$_Fields.class Binary files differnew file mode 100644 index 00000000..3bff9fe0 --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo$_Fields.class diff --git a/Dozentenmodul/bin/thrift/UserInfo.class b/Dozentenmodul/bin/thrift/UserInfo.class Binary files differnew file mode 100644 index 00000000..ed7e6f12 --- /dev/null +++ b/Dozentenmodul/bin/thrift/UserInfo.class diff --git a/Dozentenmodul/bin/thrift/communicate.thrift b/Dozentenmodul/bin/thrift/communicate.thrift deleted file mode 100644 index e69de29b..00000000 --- a/Dozentenmodul/bin/thrift/communicate.thrift +++ /dev/null diff --git a/Dozentenmodul/img/Image_zu_Veranstaltung_HDD.png b/Dozentenmodul/img/Image_zu_Veranstaltung_HDD.png Binary files differnew file mode 100644 index 00000000..39b3bac6 --- /dev/null +++ b/Dozentenmodul/img/Image_zu_Veranstaltung_HDD.png diff --git a/Dozentenmodul/lib/slf4j-simple-1.7.6.jar b/Dozentenmodul/lib/slf4j-simple-1.7.6.jar Binary files differnew file mode 100644 index 00000000..42d03b98 --- /dev/null +++ b/Dozentenmodul/lib/slf4j-simple-1.7.6.jar diff --git a/Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java deleted file mode 100644 index 12678e0e..00000000 --- a/Dozentenmodul/src/GUI/EingabeImageAllgemein_GUI.java +++ /dev/null @@ -1,295 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import javax.swing.JTextField; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import javax.swing.JTextArea; - -import models.Image; -import models.person; - -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -@SuppressWarnings("serial") -public class EingabeImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - - /** - * Create the dialog. - */ - public EingabeImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Fenster auf X - System.exit(0); - } - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEnabled(false); - Vorname.setEditable(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantowrtlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantowrtlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantowrtlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantowrtlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - imagename = new JTextField(); - imagename.setBackground(Color.WHITE); - imagename.setText((String) null); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Hauptmenü - EingabeImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Image.image.setImagename(imagename.getText()); - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüft die Eingabe - if(Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) - { - //Schreibt die Daten in das Model - Image.image.setImagename(imagename.getText()); - EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); - } - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java deleted file mode 100644 index daf46d99..00000000 --- a/Dozentenmodul/src/GUI/EingabeImageTechnisch_GUI.java +++ /dev/null @@ -1,346 +0,0 @@ -package gui;
-
-
-import java.awt.Dimension;
-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;
-import javax.swing.border.EmptyBorder;
-import java.awt.Color;
-import javax.swing.JLabel;
-import java.awt.Font;
-import javax.swing.JTextPane;
-import java.awt.SystemColor;
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import javax.swing.JSeparator;
-import javax.swing.JMenuBar;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import javax.swing.border.TitledBorder;
-import javax.swing.JTextArea;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JRadioButton;
-import javax.swing.ButtonGroup;
-import javax.swing.JSpinner;
-import javax.swing.SpinnerNumberModel;
-
-import models.Image;
-
-@SuppressWarnings("serial")
-public class EingabeImageTechnisch_GUI extends JFrame {
-
- private final JPanel contentPanel = new JPanel();
- String[] result;
- JSpinner spinnerCPU;
- JSpinner spinnerRam;
- JRadioButton rdbtnlicenseJa;
- JRadioButton rdbtnlicenseNein;
- JRadioButton rdbtnInternetJa;
- JRadioButton rdbtnInternetNein;
- private final ButtonGroup buttonGrouplicense = new ButtonGroup();
- private final ButtonGroup buttonGroupInternet = new ButtonGroup();
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- try {
- EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI();
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Create the dialog.
- */
- public EingabeImageTechnisch_GUI() {
- addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent arg0) {
- System.exit(0);
- }
- });
- setResizable(false);
-
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException | InstantiationException
- | IllegalAccessException | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- setTitle("bwLehrpool Suite *Prototyp*");
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int top=(screenSize.height - 722) / 2;
- int left=(screenSize.width - 603) / 2;
- setBounds(left, top, 603, 722);
- //setBounds(100, 100, 603, 722);
- getContentPane().setLayout(null);
- {
- JPanel panel = new JPanel();
- panel.setBackground(SystemColor.menu);
- panel.setBounds(10, 11, 577, 57);
- getContentPane().add(panel);
- panel.setLayout(null);
- {
- JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten");
- lblNewLabel.setBounds(10, 11, 509, 22);
- panel.add(lblNewLabel);
- lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
- }
-
- JTextPane txtpnBitteWhlenSie = new JTextPane();
- txtpnBitteWhlenSie.setEditable(false);
- txtpnBitteWhlenSie.setBackground(SystemColor.menu);
- txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
- txtpnBitteWhlenSie.setBounds(10, 36, 509, 32);
- panel.add(txtpnBitteWhlenSie);
- }
- contentPanel.setBounds(10, 85, 577, 493);
- contentPanel.setBackground(SystemColor.menu);
- contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
- getContentPane().add(contentPanel);
- contentPanel.setLayout(null);
-
- JPanel panel_1 = new JPanel();
- panel_1.setBackground(SystemColor.menu);
- panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panel_1.setBounds(10, 66, 557, 95);
- contentPanel.add(panel_1);
- panel_1.setLayout(null);
-
- JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:");
- lblNewLabel_2.setBounds(10, 30, 250, 20);
- panel_1.add(lblNewLabel_2);
-
- rdbtnlicenseJa = new JRadioButton("Ja");
- rdbtnlicenseJa.setSelected(true);
- buttonGrouplicense.add(rdbtnlicenseJa);
- rdbtnlicenseJa.setBounds(266, 29, 109, 23);
- panel_1.add(rdbtnlicenseJa);
-
- rdbtnlicenseNein = new JRadioButton("Nein");
- buttonGrouplicense.add(rdbtnlicenseNein);
- rdbtnlicenseNein.setBounds(377, 29, 109, 23);
- panel_1.add(rdbtnlicenseNein);
-
- JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:");
- lblInternetIstInnerhalb.setBounds(10, 58, 250, 20);
- panel_1.add(lblInternetIstInnerhalb);
-
- rdbtnInternetJa = new JRadioButton("Ja");
- buttonGroupInternet.add(rdbtnInternetJa);
- rdbtnInternetJa.setBounds(266, 57, 109, 23);
- panel_1.add(rdbtnInternetJa);
-
- rdbtnInternetNein = new JRadioButton("Nein");
- rdbtnInternetNein.setSelected(true);
- buttonGroupInternet.add(rdbtnInternetNein);
- rdbtnInternetNein.setBounds(377, 57, 109, 23);
- panel_1.add(rdbtnInternetNein);
-
- JLabel lblHauptmen = new JLabel("Hauptmen\u00FC");
- lblHauptmen.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
-
- EingabeImageTechnisch_GUI.this.setVisible(false);
- MainMenue_GUI main=new MainMenue_GUI();
- main.setVisible(true);
- }
- });
- lblHauptmen.setForeground(Color.BLUE);
- lblHauptmen.setBounds(10, 11, 61, 14);
- contentPanel.add(lblHauptmen);
-
- JLabel label_1 = new JLabel(">");
- label_1.setBounds(69, 11, 13, 14);
- contentPanel.add(label_1);
-
- JLabel lblVlimage = new JLabel("VL-Image");
- lblVlimage.setForeground(Color.BLUE);
- lblVlimage.setBounds(81, 11, 45, 14);
- contentPanel.add(lblVlimage);
-
- JLabel label_2 = new JLabel(">");
- label_2.setBounds(133, 11, 13, 14);
- contentPanel.add(label_2);
-
- JLabel lblNewLabel_1 = new JLabel("Neu");
- lblNewLabel_1.setBounds(146, 11, 46, 14);
- contentPanel.add(lblNewLabel_1);
-
- JPanel panel_2 = new JPanel();
- panel_2.setLayout(null);
- panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panel_2.setBackground(SystemColor.menu);
- panel_2.setBounds(10, 172, 557, 338);
- contentPanel.add(panel_2);
-
- JTextArea txtrHinweisSolltenSie = new JTextArea();
- txtrHinweisSolltenSie.setBackground(SystemColor.menu);
- txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13));
- txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren.");
- txtrHinweisSolltenSie.setBounds(10, 25, 537, 55);
- panel_2.add(txtrHinweisSolltenSie);
-
- JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:");
- lblNewLabel_3.setBounds(10, 91, 280, 20);
- panel_2.add(lblNewLabel_3);
-
- JLabel lblMindestens = new JLabel("mindestens");
- lblMindestens.setBounds(315, 91, 60, 20);
- panel_2.add(lblMindestens);
-
- spinnerRam = new JSpinner();
- spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1));
- spinnerRam.setBounds(385, 88, 29, 20);
- panel_2.add(spinnerRam);
-
- JLabel lblGbyte = new JLabel("GByte");
- lblGbyte.setBounds(424, 91, 46, 20);
- panel_2.add(lblGbyte);
-
- JTextArea txtrBeispielWindows = new JTextArea();
- txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte");
- txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11));
- txtrBeispielWindows.setBackground(SystemColor.menu);
- txtrBeispielWindows.setBounds(10, 122, 280, 55);
- panel_2.add(txtrBeispielWindows);
-
- JTextArea txtrBeispielWindows_1 = new JTextArea();
- txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern");
- txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11));
- txtrBeispielWindows_1.setBackground(SystemColor.menu);
- txtrBeispielWindows_1.setBounds(10, 222, 280, 55);
- panel_2.add(txtrBeispielWindows_1);
-
- JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:");
- lblWieVieleCpus.setBounds(10, 191, 280, 20);
- panel_2.add(lblWieVieleCpus);
-
- JLabel label_3 = new JLabel("mindestens");
- label_3.setBounds(315, 191, 60, 20);
- panel_2.add(label_3);
-
- spinnerCPU = new JSpinner();
- spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1));
- spinnerCPU.setBounds(385, 188, 29, 20);
- panel_2.add(spinnerCPU);
-
- JLabel lblKerne = new JLabel("Kerne");
- lblKerne.setBounds(424, 191, 46, 20);
- panel_2.add(lblKerne);
- {
- JPanel buttonPane = new JPanel();
- buttonPane.setBounds(0, 640, 597, 33);
- buttonPane.setBackground(SystemColor.menu);
- buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
- getContentPane().add(buttonPane);
- {
- JButton okButton = new JButton("Zur\u00FCck");
- okButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
-
- if(rdbtnInternetJa.isSelected()==true)
- {
- Image.image.setInternet(true);
- }
- else
- {
- Image.image.setInternet(false);
- }
-
- if(rdbtnlicenseJa.isSelected()==true)
- {
- Image.image.setLicensed(true);
- }
- else
- {
- Image.image.setLicensed(false);
- }
- Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue());
- Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue());
-
- EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI();
- sr.setVisible(true);
- dispose();
- }
- });
- okButton.setActionCommand("OK");
- buttonPane.add(okButton);
- getRootPane().setDefaultButton(okButton);
- }
- {
- JButton cancelButton = new JButton("Weiter");
- cancelButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if(rdbtnInternetJa.isSelected()==true)
- {
- Image.image.setInternet(true);
- }
- else
- {
- Image.image.setInternet(false);
- }
-
- if(rdbtnlicenseJa.isSelected()==true)
- {
- Image.image.setLicensed(true);
- }
- else
- {
- Image.image.setLicensed(false);
- }
- Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue());
- Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue());
- FTPUploader_GUI ea=new FTPUploader_GUI();
- ea.setVisible(true);
- dispose();
-
- }
- });
- cancelButton.setActionCommand("Cancel");
- buttonPane.add(cancelButton);
- }
- }
-
- JSeparator separator = new JSeparator();
- separator.setBounds(0, 78, 597, 2);
- getContentPane().add(separator);
-
- JSeparator separator_1 = new JSeparator();
- separator_1.setBounds(0, 627, 597, 2);
- getContentPane().add(separator_1);
-
- JMenuBar menuBar = new JMenuBar();
- setJMenuBar(menuBar);
-
- JMenu mnNewMenu = new JMenu("Suchen");
- menuBar.add(mnNewMenu);
-
- JMenuItem mntmVlSuche = new JMenuItem("VL Suche");
- mnNewMenu.add(mntmVlSuche);
-
- JMenu mnNewMenu_1 = new JMenu("Hilfe");
- menuBar.add(mnNewMenu_1);
-
- JMenuItem mntmFaq = new JMenuItem("FAQ");
- mnNewMenu_1.add(mntmFaq);
-
- JMenuItem mntmOtrs = new JMenuItem("OTRS");
- mnNewMenu_1.add(mntmOtrs);
-
- }
-}
diff --git a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java deleted file mode 100644 index 6f645ac5..00000000 --- a/Dozentenmodul/src/GUI/EingabeVeranstatlungTechnisch_GUI.java +++ /dev/null @@ -1,328 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.ScrollPane; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.Lecture; - - -import com.toedter.calendar.JDateChooser; - -@SuppressWarnings("serial") -public class EingabeVeranstatlungTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField textFieldLaborname; - JRadioButton rdbtnJa; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - JTextArea textAreashort; - JTextArea textArealong; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeVeranstatlungTechnisch_GUI dialog = new EingabeVeranstatlungTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeVeranstatlungTechnisch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Dateneingabe f\u00FCr Veranstaltung"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeVeranstatlungTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("Veranstaltung "); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 74, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(152, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(165, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JLabel lblLabornameanzeigename = new JLabel("Laborname (Anzeigename): *"); - lblLabornameanzeigename.setBounds(10, 57, 250, 14); - contentPanel.add(lblLabornameanzeigename); - - textFieldLaborname = new JTextField(); - textFieldLaborname.setBounds(270, 54, 307, 20); - contentPanel.add(textFieldLaborname); - textFieldLaborname.setColumns(10); - - JLabel lblKurzbeschreibung = new JLabel("Kurzbeschreibung: *"); - lblKurzbeschreibung.setBounds(10, 175, 250, 14); - contentPanel.add(lblKurzbeschreibung); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(270, 175, 307, 137); - contentPanel.add(scrollPane); - - textAreashort = new JTextArea(); - textAreashort.setLineWrap(true); - scrollPane.add(textAreashort); - textAreashort.setBounds(0, 0, 4, 22); - - ScrollPane scrollPane_1 = new ScrollPane(); - scrollPane_1.setBounds(270, 315, 307, 137); - contentPanel.add(scrollPane_1); - - textArealong = new JTextArea(); - textArealong.setLineWrap(true); - textArealong.setBounds(0, 0, 4, 22); - scrollPane_1.add(textArealong); - - JLabel label = new JLabel("Kurzbeschreibung: *"); - label.setBounds(0, 318, 250, 14); - contentPanel.add(label); - - JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *"); - lblGltigkeitsdatum.setBounds(0, 464, 250, 14); - contentPanel.add(lblGltigkeitsdatum); - - JLabel lblVon = new JLabel("von:"); - lblVon.setBounds(270, 461, 30, 20); - contentPanel.add(lblVon); - - dateChooserstart = new JDateChooser(); - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(332, 458, 101, 20); - contentPanel.add(dateChooserstart); - - JLabel lblBis = new JLabel("bis"); - lblBis.setBounds(443, 461, 24, 20); - contentPanel.add(lblBis); - - dateChooserend = new JDateChooser(); - dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); - dateChooserend.setBounds(477, 459, 100, 20); - contentPanel.add(dateChooserend); - - JLabel lblAktiv = new JLabel("Aktiv:"); - lblAktiv.setBounds(0, 492, 250, 14); - contentPanel.add(lblAktiv); - - JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(0, 517, 250, 14); - contentPanel.add(lblimVmchooserSichtbar); - - rdbtnJa = new JRadioButton("Ja"); - rdbtnJa.setSelected(true); - buttonGroup.add(rdbtnJa); - rdbtnJa.setBounds(270, 488, 109, 23); - contentPanel.add(rdbtnJa); - - JRadioButton rdbtnNein = new JRadioButton("Nein"); - buttonGroup.add(rdbtnNein); - rdbtnNein.setBounds(381, 488, 109, 23); - contentPanel.add(rdbtnNein); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setWrapStyleWord(true); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setBounds(10, 82, 567, 59); - contentPanel.add(txtrGebenSieBitte); - //contentPanel.add(textArea); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnJa.isSelected()==true) - { - Lecture.lecture.setActive(true); - } - else - { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(textFieldLaborname.getText()); - Lecture.lecture.setDesc(textArealong.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setShortDesc(textAreashort.getText()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(textFieldLaborname.getText()); - - EingabeVeranstaltungAllgemein_GUI sr=new EingabeVeranstaltungAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(rdbtnJa.isSelected()==true) - { - Lecture.lecture.setActive(true); - } - else - { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(textFieldLaborname.getText()); - Lecture.lecture.setDesc(textArealong.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setShortDesc(textAreashort.getText()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(textFieldLaborname.getText()); - LinkImage_GUI ea=new LinkImage_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu = new JMenu("Suchen"); - menuBar.add(mnNewMenu); - - JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); - mnNewMenu.add(mntmVlSuche); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/GUI/FTPDownloader_GUI.java b/Dozentenmodul/src/GUI/FTPDownloader_GUI.java deleted file mode 100644 index 702b7f67..00000000 --- a/Dozentenmodul/src/GUI/FTPDownloader_GUI.java +++ /dev/null @@ -1,348 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import ftp.DownloadTask; - -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.SystemColor; -import java.awt.Font; -import javax.swing.JTextPane; -import javax.swing.JSeparator; - -import org.apache.thrift.TException; - -import server.Server.Client; -import server.User; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JLabel downspeed; - User user; - JProgressBar progressBar; - String host="141.79.1+ü28.121"; - int port=21; - String username="openslx"; - String password="openslx-ng"; - String downloadPath=""; - String filename=""; - static String arg=""; - DownloadTask task; - JLabel bytesreadlbl; - JLabel lblNewLabel_3; - JLabel labelVerbleibend; - long filesize; - double speed; - long bytesread; - JLabel labelZeit; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); - /** - * Launch the application. - */ - /*public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPDownloader frame = new FTPDownloader(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - }*/ - - /** - * Create the frame. - */ - public FTPDownloader_GUI(String name) { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - dispose(); - } - }); - setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - filename=name; - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - //filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("Speicherort ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel("C:\\"); - lblNewLabel.setBounds(169, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Download starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonDownloadActionPerformed(arg0); - } - }); - - btnDownloadStarten.setBounds(10, 294, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); - progressBar.setStringPainted(true); - - - progressBar.setBounds(10, 158, 577, 30); - contentPanel.add(progressBar); - - JLabel lblDownloadgeschwindigkeit = new JLabel("Downloadgeschwindigkeit:"); - lblDownloadgeschwindigkeit.setBounds(10, 194, 141, 14); - contentPanel.add(lblDownloadgeschwindigkeit); - - downspeed = new JLabel("0"); - downspeed.setBounds(261, 194, 95, 14); - contentPanel.add(downspeed); - - JLabel lblNewLabel_1 = new JLabel("Fertig:"); - lblNewLabel_1.setBounds(10, 244, 46, 14); - contentPanel.add(lblNewLabel_1); - - bytesreadlbl = new JLabel(""); - bytesreadlbl.setBounds(66, 244, 108, 14); - contentPanel.add(bytesreadlbl); - - JLabel lblNewLabel_2 = new JLabel("von:"); - lblNewLabel_2.setBounds(179, 244, 46, 14); - contentPanel.add(lblNewLabel_2); - - lblNewLabel_3 = new JLabel(""); - lblNewLabel_3.setBounds(235, 244, 108, 14); - contentPanel.add(lblNewLabel_3); - - JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); - lblMbVerbleibend.setBounds(10, 269, 71, 14); - contentPanel.add(lblMbVerbleibend); - - labelVerbleibend = new JLabel(""); - labelVerbleibend.setBounds(91, 269, 108, 14); - contentPanel.add(labelVerbleibend); - - JLabel lblGeschtzteVerbleibendeZeit = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - lblGeschtzteVerbleibendeZeit.setBounds(10, 219, 150, 14); - contentPanel.add(lblGeschtzteVerbleibendeZeit); - - labelZeit = new JLabel(""); - labelZeit.setBounds(261, 219, 117, 14); - contentPanel.add(labelZeit); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label = new JLabel("Eingabe Ihrer Daten"); - label.setFont(new Font("Tahoma", Font.BOLD, 18)); - label.setBounds(10, 11, 509, 22); - panel.add(label); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel label_1 = new JLabel("Hauptmen\u00FC"); - label_1.setForeground(Color.BLUE); - label_1.setBounds(20, 88, 61, 20); - contentPanel.add(label_1); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(80, 91, 14, 14); - contentPanel.add(label_2); - - JLabel label_3 = new JLabel("VL-Image"); - label_3.setForeground(Color.BLUE); - label_3.setBounds(91, 88, 46, 20); - contentPanel.add(label_3); - - JLabel label_4 = new JLabel(">"); - label_4.setBounds(139, 91, 14, 14); - contentPanel.add(label_4); - - JLabel label_5 = new JLabel("Neu/Bearbeiten"); - label_5.setBounds(149, 91, 108, 14); - contentPanel.add(label_5); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(-10, 648, 597, 2); - contentPanel.add(separator_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(taskrun==true) - { - task.cancel(true); - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - dispose(); - } - }); - - JButton btnZurck = new JButton("Zur\u00FCck"); - btnZurck.setActionCommand("Cancel"); - buttonPane.add(btnZurck); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - setVisible(true); - - } - - private void buttonDownloadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - //downloadPath=client.getPathOfImage(filename); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task = new DownloadTask(host, port, user.userName, user.password,user.path+filename+".vmdk", lblNewLabel.getText(), this); - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - - - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - downspeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - bytesreadlbl.setText((bytesread/1024/1024)+" MB"); - labelVerbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - lblNewLabel_3.setText((filesize/1024/1024)+" MB"); - - } - - } -}
\ No newline at end of file diff --git a/Dozentenmodul/src/GUI/FTPUploader_GUI.java b/Dozentenmodul/src/GUI/FTPUploader_GUI.java deleted file mode 100644 index 078f8075..00000000 --- a/Dozentenmodul/src/GUI/FTPUploader_GUI.java +++ /dev/null @@ -1,418 +0,0 @@ -package gui;
-
-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;
-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 java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.File;
-
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.JSeparator;
-import javax.swing.JTextPane;
-import javax.swing.SwingConstants;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-import javax.swing.border.EmptyBorder;
-
-import models.Image;
-import models.person;
-
-import org.apache.thrift.TException;
-
-import server.Server.Client;
-import thrift.ThriftConnection;
-import ftp.UploadTask;
-
-
-@SuppressWarnings("serial")
-public class FTPUploader_GUI extends JFrame implements PropertyChangeListener {
-
- @SuppressWarnings("unused")
- private JPanel contentPane;
- private final JPanel contentPanel = new JPanel();
- JLabel lblNewLabel;
- JProgressBar progressBar;
- String host="141.79.128.121";
- int port=21;
- server.User user;
- String filename="";
- File uploadFile;
- static String arg="";
- UploadTask task;
- JLabel UpSpeed;
- JLabel labelfertig;
- JLabel labelfilesize;
- JLabel labelZeit;
- JLabel labelverbleibend;
- long filesize;
- double speed;
- long bytesread;
- boolean taskrun=false;
- ThriftConnection thrift=new ThriftConnection();
- Client client=thrift.getThriftConnection();
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- FTPUploader_GUI frame = new FTPUploader_GUI();
- frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
-
- /**
- * Create the frame.
- */
- public FTPUploader_GUI() {
- addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent arg0) {
- if(taskrun==true)
- {
- try {
-
- client.DeleteFtpUser(user.userName);
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- task.cancel(true);
- }
- }
- });
- setResizable(false);
- //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
-
-
-
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException | InstantiationException
- | IllegalAccessException | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- //filename=name;
- setBackground(Color.WHITE);
- setTitle("Dozentenmodul *Prototyp*");
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int top=(screenSize.height - 722) / 2;
- int left=(screenSize.width - 603) / 2;
- setBounds(left, top, 603, 722);
- //setBounds(100, 100, 603, 250);
- getContentPane().setLayout(new BorderLayout());
- contentPanel.setBackground(SystemColor.menu);
- contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
- getContentPane().add(contentPanel, BorderLayout.CENTER);
- contentPanel.setLayout(null);
- {
- JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen");
- btnSpeicherortAuswhlen.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- JFileChooser fc=new JFileChooser();
- fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
-
- fc.showOpenDialog(getParent());
- File dir=fc.getSelectedFile();
- uploadFile=dir;
- filename=uploadFile.getName();
- lblNewLabel.setText(dir.getAbsolutePath());
- }
- });
-
- btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23);
- btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
- btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
- contentPanel.add(btnSpeicherortAuswhlen);
- }
-
- lblNewLabel = new JLabel("");
- lblNewLabel.setBounds(184, 124, 255, 23);
- contentPanel.add(lblNewLabel);
-
- JButton btnDownloadStarten = new JButton("Upload starten");
- btnDownloadStarten.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- buttonUploadActionPerformed(arg0);
-
- }
- });
-
- btnDownloadStarten.setBounds(10, 330, 141, 23);
- contentPanel.add(btnDownloadStarten);
-
- progressBar = new JProgressBar(0,100);
- progressBar.setStringPainted(true);
-
-
- progressBar.setBounds(10, 158, 577, 30);
- contentPanel.add(progressBar);
-
- JLabel label = new JLabel("Downloadgeschwindigkeit:");
- label.setBounds(10, 199, 141, 14);
- contentPanel.add(label);
-
- JLabel label_1 = new JLabel("Fertig:");
- label_1.setBounds(10, 249, 46, 14);
- contentPanel.add(label_1);
-
- labelfertig = new JLabel("0");
- labelfertig.setBounds(66, 249, 108, 14);
- contentPanel.add(labelfertig);
-
- UpSpeed = new JLabel("0");
- UpSpeed.setBounds(329, 199, 95, 14);
- contentPanel.add(UpSpeed);
-
- JLabel label_4 = new JLabel("von:");
- label_4.setBounds(184, 249, 46, 14);
- contentPanel.add(label_4);
-
- labelfilesize = new JLabel("0");
- labelfilesize.setBounds(240, 249, 108, 14);
- contentPanel.add(labelfilesize);
-
- JLabel label_6 = new JLabel("Verbleibend:");
- label_6.setBounds(10, 274, 71, 14);
- contentPanel.add(label_6);
-
- JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:");
- label_7.setBounds(10, 224, 150, 14);
- contentPanel.add(label_7);
-
- labelZeit = new JLabel("0");
- labelZeit.setBounds(329, 224, 117, 14);
- contentPanel.add(labelZeit);
-
- labelverbleibend = new JLabel("0");
- labelverbleibend.setBounds(91, 274, 108, 14);
- contentPanel.add(labelverbleibend);
-
- JPanel panel = new JPanel();
- panel.setLayout(null);
- panel.setBackground(SystemColor.menu);
- panel.setBounds(10, 11, 577, 57);
- contentPanel.add(panel);
-
- JLabel label_2 = new JLabel("Eingabe Ihrer Daten");
- label_2.setFont(new Font("Tahoma", Font.BOLD, 18));
- label_2.setBounds(10, 11, 509, 22);
- panel.add(label_2);
-
- JTextPane textPane = new JTextPane();
- textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
- textPane.setEditable(false);
- textPane.setBackground(SystemColor.menu);
- textPane.setBounds(10, 36, 509, 32);
- panel.add(textPane);
-
- JSeparator separator = new JSeparator();
- separator.setBounds(0, 79, 597, 2);
- contentPanel.add(separator);
-
- JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC");
- lblNewLabel_1.setForeground(Color.BLUE);
- lblNewLabel_1.setBounds(20, 88, 61, 20);
- contentPanel.add(lblNewLabel_1);
-
- JLabel label_3 = new JLabel(">");
- label_3.setBounds(80, 91, 14, 14);
- contentPanel.add(label_3);
-
- JLabel lblVlimage = new JLabel("VL-Image");
- lblVlimage.setForeground(Color.BLUE);
- lblVlimage.setBounds(91, 88, 46, 20);
- contentPanel.add(lblVlimage);
-
- JLabel label_5 = new JLabel(">");
- label_5.setBounds(139, 91, 14, 14);
- contentPanel.add(label_5);
-
- JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten");
- lblNeubearbeiten.setBounds(149, 91, 108, 14);
- contentPanel.add(lblNeubearbeiten);
-
- JSeparator separator_1 = new JSeparator();
- separator_1.setBounds(0, 627, 597, 2);
- contentPanel.add(separator_1);
-
- JButton btnCopyFileTo = new JButton("Copy File to Prod");
- btnCopyFileTo.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- client.startFileCopy(user.path+"/"+uploadFile.getName());
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- }
- });
- btnCopyFileTo.setBounds(10, 375, 264, 23);
- contentPanel.add(btnCopyFileTo);
- {
- JPanel buttonPane = new JPanel();
- buttonPane.setBackground(UIManager.getColor("Button.background"));
- buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
- getContentPane().add(buttonPane, BorderLayout.SOUTH);
- {
- JButton ButtonReady = new JButton("Abschlie\u00DFen");
- ButtonReady.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- writeData();
- dispose();
- MainMenue_GUI m=new MainMenue_GUI();
- m.setVisible(true);
- if(taskrun==true)
- {
- try {
- client.DeleteFtpUser(user.userName);
- thrift.closeThriftConnection();
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- task.cancel(true);
- }
-
- }
- });
-
- JButton buttonCancel = new JButton("Schlie\u00DFen");
- buttonCancel.setActionCommand("Cancel");
- buttonPane.add(buttonCancel);
- ButtonReady.setActionCommand("Cancel");
- buttonPane.add(ButtonReady);
- }
- }
-
- JMenuBar menuBar = new JMenuBar();
- setJMenuBar(menuBar);
-
- JMenu mnHillfe = new JMenu("Hillfe");
- menuBar.add(mnHillfe);
- setVisible(true);
-
- }
-
- private void buttonUploadActionPerformed(ActionEvent event) {
- // File (or directory) with old name
- // File file = new File(lblNewLabel.getText());
-
- // File (or directory) with new name
- //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk");
- //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk");
-
-
- // Rename file (or directory)
- //boolean success = file.renameTo(file2);
- //if (!success) {
- // File was not successfully renamed
- //System.out.println("Not OK");
- //}
- //else
- //{
- //System.out.println("OK");
- //}
- progressBar.setValue(0);
-
- try {
- user=client.getFtpUser();
- System.out.println("name"+user.userName);
- System.out.println("path"+user.path);
- System.out.println("pass"+user.password);
- } catch (TException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile);
-
- task.addPropertyChangeListener(this);
- task.execute();
- taskrun=true;
-
- //createXML();
- //TransferToSatellit();
-
-
- }
-
- public void propertyChange(PropertyChangeEvent arg0) {
- if ("progress" == arg0.getPropertyName()) {
- int progress = (Integer) arg0.getNewValue();
- progressBar.setValue(progress);
- }
- if("speed"==arg0.getPropertyName()){
- speed=(double)arg0.getNewValue();
- //if(speed<=1){
-
- UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s");
-
- // }else
- //{
- //double MBSpeed=speed/1024;
- //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf(".")));
- //}
-
- }
- if("bytesread"==arg0.getPropertyName())
- {
- bytesread=(long)arg0.getNewValue();
- labelfertig.setText((bytesread/1024/1024)+" MB");
- labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB");
-
-
- labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten");
-
-
- }
- if("filesize"==arg0.getPropertyName())
- {
- filesize=(long)arg0.getNewValue();
- labelfilesize.setText((filesize/1024/1024)+" MB");
-
- }
-
- }
-
- public boolean writeData(){
-
- try {
-
-
-
- client.writeVLdata(Image.image.getImagename(), person.verantowrtlicher.getVorname(), person.verantowrtlicher.getName(), person.verantowrtlicher.getHochschule(), person.verantowrtlicher.getEMail(), person.verantowrtlicher.getTel(), person.verantowrtlicher.getFakultät(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu());
- } catch (TException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return false;
- }
- return true;
-
-
- }
-}
\ No newline at end of file diff --git a/Dozentenmodul/src/GUI/Login_GUI.java b/Dozentenmodul/src/GUI/Login_GUI.java deleted file mode 100644 index cc558261..00000000 --- a/Dozentenmodul/src/GUI/Login_GUI.java +++ /dev/null @@ -1,203 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.EventQueue; -import java.awt.Image; -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 java.io.File; -import java.io.IOException; - -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.person; - -import org.ini4j.Wini; - -import config.config_file; - - -@SuppressWarnings("serial") -public class Login_GUI extends JFrame { - - private JPanel contentPane; - private JTextField username; - private JPasswordField pass; - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - //Prüfe und Erzeuge gegebenfalls Config - config_file cf=new config_file(); - boolean conf=cf.createConfig(); - if(conf==true) - { - //Aufruf und Anzeige des Login Fensters - Login_GUI frame = new Login_GUI(); - frame.setVisible(true); - } - else - { - JOptionPane.showMessageDialog(null, - "Fehler beim erzeugen der Konfigurationsfile", "Message", - JOptionPane.ERROR_MESSAGE); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public Login_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - - //Fenster darf nicht vergrößert werden - setResizable(false); - try { - //Setzt das Look and Feel auf System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Titel des Fensters setzen - setTitle("Dozentenmodul *Prototyp*"); - //Aktion die beim Schließen durchgeführt werden soll - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - //Größe des Fensters definieren - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 400) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 400); - //Erzeugen eines Panels - contentPane = new JPanel(); - //Hintergrund Farbe des Panels setzen - contentPane.setBackground(SystemColor.menu); - //Rahmen des Fensters setzen - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - //Layout setzen - contentPane.setLayout(null); - //Label für das Logo erzeugen - JLabel imgLabel = new JLabel(); - //Größe und Position des Logos festelegen - imgLabel.setBounds(150, 11, 350, 142); - //Pfadangabe des Logos - - ImageIcon icon = new ImageIcon(getClass().getResource("/Logo_bwLehrpool.png"),"Logo"); - //Skalierung des Logos - Image scaled=icon.getImage().getScaledInstance(270, 64, 0); - imgLabel.setIcon(new ImageIcon(scaled)); - //Hinzufügen des Logos in das Fenster - contentPane.add(imgLabel); - - //Erzeugen und Hinzufügen des Labels - JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); - LabelUser.setBounds(150, 164, 134, 20); - contentPane.add(LabelUser); - - //Erzeugen und Hinzufügen des Textfeldes - username = new JTextField(); - username.setBounds(343, 164, 125, 20); - contentPane.add(username); - username.setColumns(10); - - //Erzeugen und Hinzufügen des Labels - JLabel LabelPass = new JLabel("bwIDM-Passwort:"); - LabelPass.setBounds(150, 195, 134, 20); - contentPane.add(LabelPass); - - //Erzeugen, Hinzufügen und definierung der Aktion des Buttons - JButton BtnLogin = new JButton("Login"); - BtnLogin.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt - //Ldap check=new Ldap(); - boolean login=true; - //boolean login=check.LdapAuth(username.getText(), new String(pass.getPassword())); - if(login==true) - { - - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - //Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht zeige diese an - if(ini.get("main", "BillOfRights",boolean.class)==false){ - //Erstellen einer Instanz der Aktionsauswahl - BillOfRights_GUI re=new BillOfRights_GUI(); - re.setVisible(true); - //Schließen des Fensters nach erfolgreichen Login - setVisible(false); - } - else - { - //Prüfe ob die Links zu vmware angezeigt werden sollen - if(ini.get("main", "vmware",boolean.class)==false){ - VmWareLink_GUI vm=new VmWareLink_GUI(); - vm.setVisible(true); - setVisible(false); - } - else - { - person.verantowrtlicher.setName("Spitzer"); - person.verantowrtlicher.setVorname("Tobias"); - person.verantowrtlicher.setEMail("tspitzer@hs-offenburg.de"); - person.verantowrtlicher.setHochschule("HS Offenburg"); - //Öffne das Hauprmenü - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - setVisible(false); - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - else - { - JOptionPane.showMessageDialog(null, - "Login denied!", "Message", - JOptionPane.INFORMATION_MESSAGE); - } - } - }); - BtnLogin.setBounds(343, 244, 125, 23); - contentPane.add(BtnLogin); - - //Erzeugen und Hinzufügen des Passwortfeldes - pass = new JPasswordField(); - pass.setBounds(343, 195, 125, 20); - contentPane.add(pass); - } -} diff --git a/Dozentenmodul/src/GUI/MainMenue_GUI.java b/Dozentenmodul/src/GUI/MainMenue_GUI.java deleted file mode 100644 index 17b94397..00000000 --- a/Dozentenmodul/src/GUI/MainMenue_GUI.java +++ /dev/null @@ -1,338 +0,0 @@ -package gui;
-
-import java.awt.Dimension;
-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;
-import javax.swing.border.EmptyBorder;
-import java.awt.Color;
-import javax.swing.JLabel;
-import java.awt.Font;
-import javax.swing.JTextPane;
-import java.awt.SystemColor;
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import javax.swing.JSeparator;
-import javax.swing.JRadioButton;
-import javax.swing.SwingConstants;
-import javax.swing.ButtonGroup;
-import javax.swing.JMenuBar;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import javax.swing.border.TitledBorder;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.ScrollPane;
-import javax.swing.JTextArea;
-
-@SuppressWarnings("serial")
-public class MainMenue_GUI extends JFrame {
-
- private final JPanel contentPanel = new JPanel();
- String[] result;
- JRadioButton rdbtnImageNew;
- JRadioButton rdbtnImageEdit;
- JRadioButton rdbtnImageSearchDownload;
- JRadioButton rdbtnVeranstaltungNew;
- JRadioButton rdbtnImageDelete;
- 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();
- }
- }
-
- /**
- * Create the dialog.
- */
- public MainMenue_GUI() {
- addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent arg0) {
- System.exit(0);
- }
- });
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException | InstantiationException
- | IllegalAccessException | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- setTitle("bwLehrpool Suite *Prototyp*");
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int top=(screenSize.height - 722) / 2;
- int left=(screenSize.width - 603) / 2;
- setBounds(left, top, 603, 722);
- //setBounds(100, 100, 545, 366);
- getContentPane().setLayout(null);
- {
- JPanel panel = new JPanel();
- panel.setBackground(SystemColor.menu);
- panel.setBounds(10, 11, 567, 69);
- getContentPane().add(panel);
- panel.setLayout(null);
- {
- JLabel lblNewLabel = new JLabel("Hauptmen\u00FC");
- lblNewLabel.setBounds(10, 11, 509, 22);
- panel.add(lblNewLabel);
- lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
- }
-
- JTextPane txtpnBitteWhlenSie = new JTextPane();
- txtpnBitteWhlenSie.setEditable(false);
- txtpnBitteWhlenSie.setBackground(SystemColor.menu);
- txtpnBitteWhlenSie.setText("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion");
- txtpnBitteWhlenSie.setBounds(10, 36, 509, 22);
- panel.add(txtpnBitteWhlenSie);
- }
- contentPanel.setBounds(10, 104, 567, 502);
- contentPanel.setBackground(SystemColor.menu);
-
- contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
- getContentPane().add(contentPanel);
- contentPanel.setLayout(null);
-
- JPanel panelImage = new JPanel();
- panelImage.setBackground(SystemColor.menu);
- panelImage.setBorder(new TitledBorder(null, "VL-Image", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panelImage.setBounds(10, 86, 270, 200);
- contentPanel.add(panelImage);
- panelImage.setLayout(null);
-
- rdbtnImageNew = new JRadioButton("Neu");
- rdbtnImageNew.setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden");
- rdbtnImageNew.setBounds(6, 22, 159, 23);
- panelImage.add(rdbtnImageNew);
- rdbtnImageNew.setSelected(true);
- buttonGroup.add(rdbtnImageNew);
- rdbtnImageNew.setBackground(SystemColor.menu);
-
-
-
- rdbtnImageEdit = new JRadioButton("Bearbeiten");
- rdbtnImageEdit.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden");
- rdbtnImageEdit.setBounds(6, 48, 185, 23);
- panelImage.add(rdbtnImageEdit);
- buttonGroup.add(rdbtnImageEdit);
- rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT);
- rdbtnImageEdit.setBackground(SystemColor.menu);
-
- rdbtnImageDelete = new JRadioButton("L\u00F6schen");
- rdbtnImageDelete.setEnabled(false);
- buttonGroup.add(rdbtnImageDelete);
- rdbtnImageDelete.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden");
- rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT);
- rdbtnImageDelete.setBackground(SystemColor.menu);
- rdbtnImageDelete.setBounds(6, 74, 185, 23);
- panelImage.add(rdbtnImageDelete);
-
- rdbtnImageSearchDownload = new JRadioButton("Suche und Download");
- rdbtnImageSearchDownload.setEnabled(false);
- buttonGroup.add(rdbtnImageSearchDownload);
- rdbtnImageSearchDownload.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden");
- rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT);
- rdbtnImageSearchDownload.setBackground(SystemColor.menu);
- rdbtnImageSearchDownload.setBounds(6, 100, 185, 23);
- panelImage.add(rdbtnImageSearchDownload);
-
- JPanel panelDesc = new JPanel();
- panelDesc.setLayout(null);
- panelDesc.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Erklärung", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panelDesc.setBackground(SystemColor.menu);
- panelDesc.setBounds(290, 86, 270, 200);
- contentPanel.add(panelDesc);
-
- ScrollPane scrollPaneDesc = new ScrollPane();
- scrollPaneDesc.setBounds(5, 15, 260, 180);
- JTextArea txtDesc=new JTextArea();
- txtDesc.setBackground(SystemColor.menu);
- txtDesc.setWrapStyleWord(true);
- txtDesc.setLineWrap(true);
- scrollPaneDesc.add(txtDesc);
- //Pro AUswahl
- txtDesc.setText("Hier steht irgendwann die Beschreibung der einzelnen Punkte\r\n");
- panelDesc.add(scrollPaneDesc);
-
- JPanel panelVeranstaltung = new JPanel();
- panelVeranstaltung.setLayout(null);
- panelVeranstaltung.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panelVeranstaltung.setBackground(SystemColor.menu);
- panelVeranstaltung.setBounds(10, 297, 270, 200);
- contentPanel.add(panelVeranstaltung);
-
- rdbtnVeranstaltungNew = new JRadioButton("Neu");
- buttonGroup.add(rdbtnVeranstaltungNew);
- rdbtnVeranstaltungNew.setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben");
- rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23);
- panelVeranstaltung.add(rdbtnVeranstaltungNew);
- rdbtnVeranstaltungNew.setBackground(SystemColor.menu);
-
- JRadioButton rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten");
- rdbtnVeranstaltungEdit.setEnabled(false);
- rdbtnVeranstaltungEdit.setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen");
- rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23);
- panelVeranstaltung.add(rdbtnVeranstaltungEdit);
- buttonGroup.add(rdbtnVeranstaltungEdit);
- rdbtnVeranstaltungEdit.setBackground(SystemColor.menu);
-
- JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen");
- rdbtnVeranstaltungDelete.setEnabled(false);
- rdbtnVeranstaltungDelete.setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen");
- rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23);
- panelVeranstaltung.add(rdbtnVeranstaltungDelete);
- buttonGroup.add(rdbtnVeranstaltungDelete);
- rdbtnVeranstaltungDelete.setBackground(SystemColor.menu);
-
- JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche");
- rdbtnVeranstaltungSearch.setEnabled(false);
- buttonGroup.add(rdbtnVeranstaltungSearch);
- rdbtnVeranstaltungSearch.setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen");
- rdbtnVeranstaltungSearch.setBackground(SystemColor.menu);
- rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23);
- panelVeranstaltung.add(rdbtnVeranstaltungSearch);
-
- JLabel lblCrumbStart = new JLabel("Startseite");
- lblCrumbStart.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
- Login_GUI lw=new Login_GUI();
- lw.setVisible(true);
- MainMenue_GUI.this.setVisible(false);
- }
- });
- lblCrumbStart.setForeground(Color.BLUE);
- lblCrumbStart.setBounds(10, 0, 52, 14);
- contentPanel.add(lblCrumbStart);
-
- JLabel label = new JLabel(">");
- label.setBounds(60, 0, 13, 14);
- contentPanel.add(label);
-
- JLabel lblRechtshinweis = new JLabel("Rechtshinweis");
- lblRechtshinweis.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- BillOfRights_GUI rb=new BillOfRights_GUI();
- rb.setVisible(true);
- MainMenue_GUI.this.setVisible(false);
- }
- });
- lblRechtshinweis.setForeground(Color.BLUE);
- lblRechtshinweis.setBounds(72, 0, 68, 14);
- contentPanel.add(lblRechtshinweis);
-
- JLabel label_1 = new JLabel(">");
- label_1.setBounds(142, 0, 13, 14);
- contentPanel.add(label_1);
-
- JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC");
- lblNewLabel_1.setBounds(150, 0, 74, 14);
- contentPanel.add(lblNewLabel_1);
-
- JLabel lblNewLabel_2 = new JLabel("*Platzhalter Bild*");
- lblNewLabel_2.setBounds(10, 25, 557, 59);
- contentPanel.add(lblNewLabel_2);
-
- JPanel panelNews = new JPanel();
- panelNews.setLayout(null);
- panelNews.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "News", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- panelNews.setBackground(SystemColor.menu);
- panelNews.setBounds(290, 297, 270, 200);
- contentPanel.add(panelNews);
-
- ScrollPane scrollPaneNews = new ScrollPane();
- scrollPaneNews.setBounds(5, 15, 260, 180);
- JTextArea txtNews=new JTextArea();
- txtNews.setBackground(SystemColor.menu);
- txtNews.setWrapStyleWord(true);
- txtNews.setLineWrap(true);
- txtNews.setText("Hier werden mal die Neuigkeiten stehen");
- scrollPaneNews.add(txtNews);
- panelNews.add(scrollPaneNews);
- {
- JPanel buttonPane = new JPanel();
- buttonPane.setBounds(0, 630, 587, 33);
- buttonPane.setBackground(SystemColor.menu);
- buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
- getContentPane().add(buttonPane);
- {
- JButton cancelButton = new JButton("Weiter");
- cancelButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
-
- if(rdbtnImageNew.isSelected()==true)
- {
- EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI();
- sr.setVisible(true);
- dispose();
- } else if(rdbtnImageEdit.isSelected()==true)
- {
-
- SearchEditImage_GUI si=new SearchEditImage_GUI();
- si.setVisible(true);
- dispose();
- }else if(rdbtnImageSearchDownload.isSelected()==true)
- {
- SearchMethod_GUI sm=new SearchMethod_GUI();
- sm.setVisible(true);
- dispose();
- }else if(rdbtnImageDelete.isSelected()==true)
- {
- DeleteImage_GUI di=new DeleteImage_GUI();
- di.setVisible(true);
- dispose();
- }
- else if(rdbtnVeranstaltungNew.isSelected()==true)
- {
- EingabeVeranstaltungAllgemein_GUI av=new EingabeVeranstaltungAllgemein_GUI();
- av.setVisible(true);
- dispose();
- }
- }
- });
- cancelButton.setActionCommand("Cancel");
- buttonPane.add(cancelButton);
- }
- }
- {
- JSeparator separator = new JSeparator();
- separator.setBounds(0, 617, 587, 2);
- getContentPane().add(separator);
- }
- {
- JSeparator separator = new JSeparator();
- separator.setBounds(0, 91, 587, 2);
- getContentPane().add(separator);
- }
-
- JMenuBar menuBar = new JMenuBar();
- setJMenuBar(menuBar);
-
- JMenu mnNewMenu_1 = new JMenu("Hilfe");
- menuBar.add(mnNewMenu_1);
-
- JMenuItem mntmFaq = new JMenuItem("FAQ");
- mnNewMenu_1.add(mntmFaq);
-
- JMenuItem mntmOtrs = new JMenuItem("OTRS");
- mnNewMenu_1.add(mntmOtrs);
-
-
-
- }
-}
diff --git a/Dozentenmodul/src/GUI/SearchImage_GUI.java b/Dozentenmodul/src/GUI/SearchImage_GUI.java index 4225a295..83e6bc07 100644 --- a/Dozentenmodul/src/GUI/SearchImage_GUI.java +++ b/Dozentenmodul/src/GUI/SearchImage_GUI.java @@ -1,6 +1,11 @@ package gui; +import gui.image.EditImageAllgemein_GUI; +import gui.image.FTPDownloader_GUI; +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_GUI; + import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -188,7 +193,7 @@ public class SearchImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); @@ -354,7 +359,7 @@ public class SearchImage_GUI extends JFrame { btnDownload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); + FTPDownloader_GUI down=new FTPDownloader_GUI(); down.setVisible(true); SearchImage_GUI.this.setVisible(false); } diff --git a/Dozentenmodul/src/Models/Image.java b/Dozentenmodul/src/Models/Image.java index 2a8c4fcd..cdc8264c 100644 --- a/Dozentenmodul/src/Models/Image.java +++ b/Dozentenmodul/src/Models/Image.java @@ -1,6 +1,9 @@ package models; public class Image { + private String ImageId; + private String version; + private String imagename; private String newName; private boolean licensed; @@ -46,4 +49,16 @@ public class Image { public void setNewName(String newName) { this.newName = newName; } + public String getImageId() { + return ImageId; + } + public void setImageId(String imageId) { + ImageId = imageId; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } } diff --git a/Dozentenmodul/src/Models/Lecture.java b/Dozentenmodul/src/Models/Lecture.java index 383bded9..6b7e6fa1 100644 --- a/Dozentenmodul/src/Models/Lecture.java +++ b/Dozentenmodul/src/Models/Lecture.java @@ -6,14 +6,42 @@ public class Lecture { private String name; + private String newName; private String shortDesc; private String desc; private Date startdate; private Date enddate; private boolean active; + private String id; + private String linkedImagename; + public static Lecture lecture =new Lecture(); + + + public String getNewName() { + return newName; + } + public void setNewName(String newName) { + this.newName = newName; + } + + public String getLinkedImagename() { + return linkedImagename; + } + + public void setLinkedImagename(String linkedImagename) { + this.linkedImagename = linkedImagename; + } + + public String getid() { + return id; + } + + public void setid(String id) { + this.id = id; + } public String getName() { return name; } diff --git a/Dozentenmodul/src/Models/person.java b/Dozentenmodul/src/Models/person.java index f4dd5c22..435f3c1d 100644 --- a/Dozentenmodul/src/Models/person.java +++ b/Dozentenmodul/src/Models/person.java @@ -3,6 +3,9 @@ package models; public class person{ + + private String username; + private String Name; private String Vorname; private String Hochschule; @@ -12,9 +15,21 @@ public class person{ private boolean ischecked; + public static person verantowrtlicher=new person(); public static person ersteller=new person(); + + public static person verantwortlicher=new person(); + + + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getName() { return Name; } diff --git a/Dozentenmodul/src/Models/vm.java b/Dozentenmodul/src/Models/vm.java deleted file mode 100644 index 34f9ffaa..00000000 --- a/Dozentenmodul/src/Models/vm.java +++ /dev/null @@ -1,69 +0,0 @@ -package models; - -import java.awt.List; -import java.util.Date; - - -public class vm { - - private String Laborname; - private String shortDesc; - private String longDesc; - private String comment; - private String OS; - private Date begin; - private Date end; - private List software; - - public static vm vl=new vm(); - public String getLaborname() { - return Laborname; - } - public void setLaborname(String laborname) { - Laborname = laborname; - } - public String getShortDesc() { - return shortDesc; - } - public void setShortDesc(String shortDesc) { - this.shortDesc = shortDesc; - } - public String getLongDesc() { - return longDesc; - } - public void setLongDesc(String longDesc) { - this.longDesc = longDesc; - } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } - public String getOS() { - return OS; - } - public void setOS(String oS) { - OS = oS; - } - public Date getBegin() { - return begin; - } - public void setBegin(Date begin) { - this.begin = begin; - } - public Date getEnd() { - return end; - } - public void setEnd(Date end) { - this.end = end; - } - public List getSoftware() { - return software; - } - public void setSoftware(List software) { - this.software = software; - } - - -} diff --git a/Dozentenmodul/src/auth/Authentification.java b/Dozentenmodul/src/auth/Authentification.java index cf1a4b04..41f69502 100644 --- a/Dozentenmodul/src/auth/Authentification.java +++ b/Dozentenmodul/src/auth/Authentification.java @@ -1,5 +1,12 @@ package auth; +import thrift.UserInfo; + public class Authentification { + public boolean auth(String username, String pass) + { + return false; + + } } diff --git a/Dozentenmodul/src/ftp/DownloadTask.java b/Dozentenmodul/src/ftp/DownloadTask.java index 8a643325..83ad2c15 100644 --- a/Dozentenmodul/src/ftp/DownloadTask.java +++ b/Dozentenmodul/src/ftp/DownloadTask.java @@ -1,6 +1,6 @@ package ftp; -import gui.FTPDownloader_GUI; +import gui.image.FTPDownloader_GUI; import java.io.File; import java.io.FileOutputStream; diff --git a/Dozentenmodul/src/ftp/FTPUtility.java b/Dozentenmodul/src/ftp/FTPUtility.java index c62ba07d..7824440a 100644 --- a/Dozentenmodul/src/ftp/FTPUtility.java +++ b/Dozentenmodul/src/ftp/FTPUtility.java @@ -6,6 +6,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.SocketException; import java.security.NoSuchAlgorithmException; + +import models.Image; + import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPReply; @@ -138,9 +141,10 @@ public class FTPUtility { if (!success) { throw new FTPException("Could not set binary file type."); } - - outputStream = ftpClient.storeFileStream(uploadFile.getName()); - // ftpClient.rename(uploadFile.getName(), vm.vl.getLaborname()); + + outputStream = ftpClient.storeFileStream(Image.image.getNewName()); + + //ftpClient.rename(uploadFile.getName(), ); } catch (IOException ex) { throw new FTPException("Error uploading file: " + ex.getMessage()); } diff --git a/Dozentenmodul/src/ftp/UploadTask.java b/Dozentenmodul/src/ftp/UploadTask.java index e5d8a817..67706169 100644 --- a/Dozentenmodul/src/ftp/UploadTask.java +++ b/Dozentenmodul/src/ftp/UploadTask.java @@ -19,7 +19,7 @@ public class UploadTask extends SwingWorker<Void, Void> { private int port; private String username; private String password; - + private String destDir; private File uploadFile; @@ -31,6 +31,7 @@ public class UploadTask extends SwingWorker<Void, Void> { this.password = password; this.destDir = destDir; this.uploadFile = uploadFile; + } /** diff --git a/Dozentenmodul/src/gui/BillOfRights_GUI.java b/Dozentenmodul/src/gui/BillOfRights_GUI.java deleted file mode 100644 index a18ce291..00000000 --- a/Dozentenmodul/src/gui/BillOfRights_GUI.java +++ /dev/null @@ -1,192 +0,0 @@ -package gui; - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -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 java.io.File; -import java.io.IOException; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - - -@SuppressWarnings("serial") -public class BillOfRights_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JButton fwdButton; - JCheckBox chckbxAkzeptieren; - - /** - * Create the dialog. - */ - public BillOfRights_GUI() { - setResizable(false); - - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet das Programm beim Klick auf das X - System.exit(0); - } - }); - try { - //Setzt das Look & Feel auf das System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Fenstertitel - setTitle("bwLehrpool Suite *Prototyp*"); - - //Zentiert das Fenster in der Bildschirmmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 60); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Bitte lesen und best\u00E4tigen Sie folgende rechtliche Hinweise"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 95, 567, 485); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextArea txtrLoremIpsumDolor = new JTextArea(); - txtrLoremIpsumDolor.setWrapStyleWord(true); - txtrLoremIpsumDolor.setLineWrap(true); - txtrLoremIpsumDolor.setEditable(false); - JScrollPane scr=new JScrollPane(txtrLoremIpsumDolor); - scr.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setBounds(0, 0, 567, 477); - txtrLoremIpsumDolor.setText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis. \r\n\r\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. \r\n\r\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus. \r\n\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \r\n\r\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \r\n\r\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. \r\n\r\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo"); - - contentPanel.add(scr); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - fwdButton = new JButton("Weiter"); - fwdButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "BillOfRights",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - VmWareLink_GUI ac=new VmWareLink_GUI(); - ac.setVisible(true); - dispose(); - } - }); - fwdButton.setEnabled(false); - - buttonPane.add(fwdButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 82, 587, 2); - getContentPane().add(separator); - } - - chckbxAkzeptieren = new JCheckBox("Ja, ich akzeptiere die Vereinbarung. Benachrichtigung nicht mehr anzeigen."); - chckbxAkzeptieren.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - //Beim Akzeptieren der Bestätigung wird der Weiter-Button verfügbar gemacht - if(chckbxAkzeptieren.isSelected()==true) - { - - fwdButton.setEnabled(true); - - } - else - { - - } - } - }); - chckbxAkzeptieren.setBackground(SystemColor.menu); - chckbxAkzeptieren.setBounds(10, 587, 567, 23); - getContentPane().add(chckbxAkzeptieren); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - mnNewMenu_1.setHorizontalAlignment(SwingConstants.CENTER); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - - - } -} diff --git a/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java deleted file mode 100644 index 58cab4ec..00000000 --- a/Dozentenmodul/src/gui/EditImageAllgemein_GUI.java +++ /dev/null @@ -1,325 +0,0 @@ -package gui; - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.Map; - -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import models.Image; -import models.person; -import server.Server.Client; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class EditImageAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - private JTextField imagename; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - - /** - * Create the dialog. - */ - public EditImageAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei einem Klick auf das X - System.exit(0); - } - }); - //Verhindert das vergrößern des Fensters - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Fenstertitel - setTitle("bwLehrpool Suite *Prototyp*"); - - //Zentriert das Fenster in der Bildmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - initData(); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 245, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setEditable(false); - Vorname.setEnabled(false); - Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantowrtlicher.getVorname()); - Vorname.setColumns(10); - Vorname.setBounds(145, 245, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 276, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setEnabled(false); - Nachname.setEditable(false); - Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantowrtlicher.getName()); - Nachname.setColumns(10); - Nachname.setBounds(145, 276, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 307, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setEnabled(false); - Hochschule.setEditable(false); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantowrtlicher.getHochschule()); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 307, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 338, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setEnabled(false); - EMail.setEditable(false); - EMail.setBackground(Color.WHITE); - EMail.setText(person.verantowrtlicher.getEMail()); - EMail.setColumns(10); - EMail.setBounds(145, 338, 350, 20); - panel_1.add(EMail); - - JLabel lblImagename = new JLabel("Imagename: *"); - lblImagename.setBackground(SystemColor.menu); - lblImagename.setBounds(10, 31, 125, 20); - panel_1.add(lblImagename); - - imagename = new JTextField(); - imagename.setBackground(Color.WHITE); - imagename.setText(Image.image.getImagename()); - imagename.setColumns(10); - imagename.setBounds(145, 31, 350, 20); - panel_1.add(imagename); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an.\r\nDieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setBounds(145, 62, 350, 110); - panel_1.add(txtrGebenSieBitte); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Durch den Klick auf Button Hauptmenpü wird dieses Fenster unsichtbar und das Hauptmenü sichtbar - EditImageAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Bearbeiten"); - lblNewLabel_1.setBounds(146, 11, 71, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - //Image.image.setImagename(imagename.getText()); - - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüfung ob alle notwendigen Felder ausgefüllt sind - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - System.out.println(imagename.getText()); - Image.image.setNewName(imagename.getText()); - con.closeThriftConnection(); - EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } - - public void initData(){ - try { - System.out.println("initdata1:"+Image.image.getImagename()); - Map<String,String> map=client.getImageData(Image.image.getImagename()); - if(map.get("internet").equals("0")){ - Image.image.setInternet(false); - } - else - { - Image.image.setInternet(true); - } - if(map.get("license").equals("0")){ - Image.image.setLicensed(false); - } - else{ - Image.image.setLicensed(true); - } - Image.image.setRam(Integer.parseInt(map.get("ram"))); - Image.image.setCpu(Integer.parseInt(map.get("cpu"))); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - -} diff --git a/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java deleted file mode 100644 index d8ab833f..00000000 --- a/Dozentenmodul/src/gui/EditImageTechnisch_GUI.java +++ /dev/null @@ -1,364 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.HashMap; -import java.util.Map; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JSpinner; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.SpinnerNumberModel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -import models.Image; - -@SuppressWarnings("serial") -public class EditImageTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JSpinner spinnerCPU; - JSpinner spinnerRam; - JRadioButton rdbtnlicenseJa; - JRadioButton rdbtnlicenseNein; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - private final ButtonGroup buttonGrouplicense = new ButtonGroup(); - private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - - - /** - * Create the dialog. - */ - public EditImageTechnisch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei Klick auf das X - System.exit(0); - } - - }); - //Verhindert das Vergrößern des Fensters - setResizable(false); - - try { - //setzt das Look & Feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Titel des Fensters - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - rdbtnlicenseJa = new JRadioButton("Ja"); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 109, 23); - panel_1.add(rdbtnlicenseJa); - - rdbtnlicenseNein = new JRadioButton("Nein"); - buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 109, 23); - panel_1.add(rdbtnlicenseNein); - if(Image.image.isLicensed()==true){ - rdbtnlicenseJa.setSelected(true); - } - else - { - rdbtnlicenseNein.setSelected(true); - } - - - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - rdbtnInternetJa = new JRadioButton("Ja"); - buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 109, 23); - panel_1.add(rdbtnInternetJa); - - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 109, 23); - panel_1.add(rdbtnInternetNein); - if(Image.image.isInternet()==true){ - rdbtnInternetJa.setSelected(true); - } - else - { - rdbtnInternetNein.setSelected(true); - } - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar - EditImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 172, 557, 338); - contentPanel.add(panel_2); - - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - spinnerRam.setValue(Image.image.getRam()); - panel_2.add(spinnerRam); - - JLabel lblGbyte = new JLabel("GByte"); - lblGbyte.setBounds(424, 91, 46, 20); - panel_2.add(lblGbyte); - - JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); - txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(10, 122, 280, 55); - panel_2.add(txtrBeispielWindows); - - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); - panel_2.add(txtrBeispielWindows_1); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 191, 280, 20); - panel_2.add(lblWieVieleCpus); - - JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 191, 60, 20); - panel_2.add(label_3); - - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); - spinnerCPU.setValue(Image.image.getCpu()); - panel_2.add(spinnerCPU); - - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); - panel_2.add(lblKerne); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Setzt die Imagewerte in das Model - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das vorherige Fenster - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { - Image.image.setInternet(true); - } - else - { - Image.image.setInternet(false); - } - - if(rdbtnlicenseJa.isSelected()==true) - { - Image.image.setLicensed(true); - } - else - { - Image.image.setLicensed(false); - } - //Öffnet das nächste Fenster - FTPEditUploader_GUI ea=new FTPEditUploader_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } - - - - } - diff --git a/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java deleted file mode 100644 index 86052152..00000000 --- a/Dozentenmodul/src/gui/EingabeVeranstaltungAllgemein_GUI.java +++ /dev/null @@ -1,289 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -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; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSeparator; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import models.person; - - -@SuppressWarnings("serial") -public class EingabeVeranstaltungAllgemein_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField Vorname; - private JTextField Nachname; - private JTextField Hochschule; - private JTextField EMail; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeVeranstaltungAllgemein_GUI dialog = new EingabeVeranstaltungAllgemein_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeVeranstaltungAllgemein_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel label = new JLabel("Vorname: *"); - label.setBackground(SystemColor.menu); - label.setBounds(10, 33, 125, 20); - panel_1.add(label); - - Vorname = new JTextField(); - Vorname.setBackground(Color.WHITE); - Vorname.setText((String) null); - Vorname.setColumns(10); - Vorname.setBounds(145, 33, 350, 20); - panel_1.add(Vorname); - - JLabel label_7 = new JLabel("Nachname: *"); - label_7.setBackground(SystemColor.menu); - label_7.setBounds(10, 64, 125, 20); - panel_1.add(label_7); - - Nachname = new JTextField(); - Nachname.setBackground(Color.WHITE); - Nachname.setText((String) null); - Nachname.setColumns(10); - Nachname.setBounds(145, 64, 350, 20); - panel_1.add(Nachname); - - JLabel label_8 = new JLabel("Hochschule: *"); - label_8.setBackground(SystemColor.menu); - label_8.setBounds(10, 95, 125, 20); - panel_1.add(label_8); - - Hochschule = new JTextField(); - Hochschule.setBackground(Color.WHITE); - Hochschule.setText((String) null); - Hochschule.setColumns(10); - Hochschule.setBounds(145, 95, 350, 20); - panel_1.add(Hochschule); - - JLabel label_9 = new JLabel("E-Mail: *"); - label_9.setBackground(SystemColor.menu); - label_9.setBounds(10, 126, 125, 20); - panel_1.add(label_9); - - EMail = new JTextField(); - EMail.setBackground(Color.WHITE); - EMail.setText((String) null); - EMail.setColumns(10); - EMail.setBounds(145, 126, 350, 20); - panel_1.add(EMail); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeVeranstaltungAllgemein_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - person.verantowrtlicher.setVorname(Vorname.getText()); - person.verantowrtlicher.setName(Nachname.getText()); - person.verantowrtlicher.setEMail(EMail.getText()); - - person.verantowrtlicher.setHochschule(Hochschule.getText()); - - - - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) - { - person.verantowrtlicher.setVorname(Vorname.getText()); - person.verantowrtlicher.setName(Nachname.getText()); - person.verantowrtlicher.setEMail(EMail.getText()); - - person.verantowrtlicher.setHochschule(Hochschule.getText()); - - - EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI(); - ea.setVisible(true); - dispose(); - } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); - } - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu = new JMenu("Suchen"); - menuBar.add(mnNewMenu); - - JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); - mnNewMenu.add(mntmVlSuche); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java b/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java deleted file mode 100644 index 6f645ac5..00000000 --- a/Dozentenmodul/src/gui/EingabeVeranstatlungTechnisch_GUI.java +++ /dev/null @@ -1,328 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.ScrollPane; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.Lecture; - - -import com.toedter.calendar.JDateChooser; - -@SuppressWarnings("serial") -public class EingabeVeranstatlungTechnisch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField textFieldLaborname; - JRadioButton rdbtnJa; - JDateChooser dateChooserend; - JDateChooser dateChooserstart; - JTextArea textAreashort; - JTextArea textArealong; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - EingabeVeranstatlungTechnisch_GUI dialog = new EingabeVeranstatlungTechnisch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public EingabeVeranstatlungTechnisch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Dateneingabe f\u00FCr Veranstaltung"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeVeranstatlungTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("Veranstaltung "); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 74, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(152, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(165, 11, 46, 14); - contentPanel.add(lblNewLabel_1); - - JLabel lblLabornameanzeigename = new JLabel("Laborname (Anzeigename): *"); - lblLabornameanzeigename.setBounds(10, 57, 250, 14); - contentPanel.add(lblLabornameanzeigename); - - textFieldLaborname = new JTextField(); - textFieldLaborname.setBounds(270, 54, 307, 20); - contentPanel.add(textFieldLaborname); - textFieldLaborname.setColumns(10); - - JLabel lblKurzbeschreibung = new JLabel("Kurzbeschreibung: *"); - lblKurzbeschreibung.setBounds(10, 175, 250, 14); - contentPanel.add(lblKurzbeschreibung); - - ScrollPane scrollPane = new ScrollPane(); - scrollPane.setBounds(270, 175, 307, 137); - contentPanel.add(scrollPane); - - textAreashort = new JTextArea(); - textAreashort.setLineWrap(true); - scrollPane.add(textAreashort); - textAreashort.setBounds(0, 0, 4, 22); - - ScrollPane scrollPane_1 = new ScrollPane(); - scrollPane_1.setBounds(270, 315, 307, 137); - contentPanel.add(scrollPane_1); - - textArealong = new JTextArea(); - textArealong.setLineWrap(true); - textArealong.setBounds(0, 0, 4, 22); - scrollPane_1.add(textArealong); - - JLabel label = new JLabel("Kurzbeschreibung: *"); - label.setBounds(0, 318, 250, 14); - contentPanel.add(label); - - JLabel lblGltigkeitsdatum = new JLabel("G\u00FCltigkeitsdatum: *"); - lblGltigkeitsdatum.setBounds(0, 464, 250, 14); - contentPanel.add(lblGltigkeitsdatum); - - JLabel lblVon = new JLabel("von:"); - lblVon.setBounds(270, 461, 30, 20); - contentPanel.add(lblVon); - - dateChooserstart = new JDateChooser(); - dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); - dateChooserstart.setBounds(332, 458, 101, 20); - contentPanel.add(dateChooserstart); - - JLabel lblBis = new JLabel("bis"); - lblBis.setBounds(443, 461, 24, 20); - contentPanel.add(lblBis); - - dateChooserend = new JDateChooser(); - dateChooserend.setDateFormatString("dd.MM.yyyy hh:mm:ss"); - dateChooserend.setBounds(477, 459, 100, 20); - contentPanel.add(dateChooserend); - - JLabel lblAktiv = new JLabel("Aktiv:"); - lblAktiv.setBounds(0, 492, 250, 14); - contentPanel.add(lblAktiv); - - JLabel lblimVmchooserSichtbar = new JLabel("(Im VMChooser sichtbar)"); - lblimVmchooserSichtbar.setBounds(0, 517, 250, 14); - contentPanel.add(lblimVmchooserSichtbar); - - rdbtnJa = new JRadioButton("Ja"); - rdbtnJa.setSelected(true); - buttonGroup.add(rdbtnJa); - rdbtnJa.setBounds(270, 488, 109, 23); - contentPanel.add(rdbtnJa); - - JRadioButton rdbtnNein = new JRadioButton("Nein"); - buttonGroup.add(rdbtnNein); - rdbtnNein.setBounds(381, 488, 109, 23); - contentPanel.add(rdbtnNein); - - JTextArea txtrGebenSieBitte = new JTextArea(); - txtrGebenSieBitte.setWrapStyleWord(true); - txtrGebenSieBitte.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); - txtrGebenSieBitte.setLineWrap(true); - txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); - txtrGebenSieBitte.setBackground(SystemColor.menu); - txtrGebenSieBitte.setBounds(10, 82, 567, 59); - contentPanel.add(txtrGebenSieBitte); - //contentPanel.add(textArea); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnJa.isSelected()==true) - { - Lecture.lecture.setActive(true); - } - else - { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(textFieldLaborname.getText()); - Lecture.lecture.setDesc(textArealong.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setShortDesc(textAreashort.getText()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(textFieldLaborname.getText()); - - EingabeVeranstaltungAllgemein_GUI sr=new EingabeVeranstaltungAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(rdbtnJa.isSelected()==true) - { - Lecture.lecture.setActive(true); - } - else - { - Lecture.lecture.setActive(false); - } - - Lecture.lecture.setName(textFieldLaborname.getText()); - Lecture.lecture.setDesc(textArealong.getText()); - Lecture.lecture.setEnddate(dateChooserend.getDate()); - Lecture.lecture.setShortDesc(textAreashort.getText()); - Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(textFieldLaborname.getText()); - LinkImage_GUI ea=new LinkImage_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu = new JMenu("Suchen"); - menuBar.add(mnNewMenu); - - JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); - mnNewMenu.add(mntmVlSuche); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/gui/ExtendedSearch_GUI.java b/Dozentenmodul/src/gui/ExtendedSearch_GUI.java deleted file mode 100644 index ab9693a7..00000000 --- a/Dozentenmodul/src/gui/ExtendedSearch_GUI.java +++ /dev/null @@ -1,233 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -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; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JSeparator; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -@SuppressWarnings("serial") -public class ExtendedSearch_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - private JTextField textField; - private JTextField textField_1; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - ExtendedSearch_GUI dialog = new ExtendedSearch_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public ExtendedSearch_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width -603) / 2; - setBounds(left, top, 603, 722); - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Weitere Suchoptionen"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("beschreibung"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Image-Typ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 11, 557, 95); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image-Typ"); - lblNewLabel_2.setBounds(10, 39, 176, 20); - panel_1.add(lblNewLabel_2); - - JCheckBox chckbxBestehendesImage = new JCheckBox("Bestehendes Image"); - chckbxBestehendesImage.setSelected(true); - chckbxBestehendesImage.setBounds(192, 38, 138, 23); - panel_1.add(chckbxBestehendesImage); - - JCheckBox chckbxRohling = new JCheckBox("Rohling"); - chckbxRohling.setSelected(true); - chckbxRohling.setBounds(332, 38, 97, 23); - panel_1.add(chckbxRohling); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBorder(new TitledBorder(null, "Image-Inhalt", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 117, 557, 95); - contentPanel.add(panel); - - JLabel lblEnthalteneSoftware = new JLabel("Enthaltene Software"); - lblEnthalteneSoftware.setBounds(10, 39, 176, 20); - panel.add(lblEnthalteneSoftware); - - textField = new JTextField(); - textField.setBounds(196, 39, 351, 20); - panel.add(textField); - textField.setColumns(10); - - JLabel lblNewLabel_1 = new JLabel("Bitte mit ; getrennt angeben"); - lblNewLabel_1.setBounds(196, 70, 351, 14); - panel.add(lblNewLabel_1); - - JPanel panel_2 = new JPanel(); - panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Informationen zum Ersteller", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 223, 557, 123); - contentPanel.add(panel_2); - - JLabel lblNachnameDesErstellers = new JLabel("Nachname des Erstellers"); - lblNachnameDesErstellers.setBounds(10, 39, 176, 20); - panel_2.add(lblNachnameDesErstellers); - - textField_1 = new JTextField(); - textField_1.setColumns(10); - textField_1.setBounds(196, 39, 351, 20); - panel_2.add(textField_1); - - JLabel lblHochschuleuniversitt = new JLabel("Hochschule/Universit\u00E4t"); - lblHochschuleuniversitt.setBounds(10, 70, 176, 20); - panel_2.add(lblHochschuleuniversitt); - - JComboBox<String> comboBox = new JComboBox<String>(); - comboBox.setBounds(196, 70, 351, 20); - panel_2.add(comboBox); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("\u00DCbernehmen"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - - FTPUploader_GUI ea=new FTPUploader_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu = new JMenu("Suchen"); - menuBar.add(mnNewMenu); - - JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); - mnNewMenu.add(mntmVlSuche); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/gui/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/FTPDownloader_GUI.java deleted file mode 100644 index 702b7f67..00000000 --- a/Dozentenmodul/src/gui/FTPDownloader_GUI.java +++ /dev/null @@ -1,348 +0,0 @@ -package gui; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Toolkit; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import ftp.DownloadTask; - -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.SystemColor; -import java.awt.Font; -import javax.swing.JTextPane; -import javax.swing.JSeparator; - -import org.apache.thrift.TException; - -import server.Server.Client; -import server.User; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JLabel downspeed; - User user; - JProgressBar progressBar; - String host="141.79.1+ü28.121"; - int port=21; - String username="openslx"; - String password="openslx-ng"; - String downloadPath=""; - String filename=""; - static String arg=""; - DownloadTask task; - JLabel bytesreadlbl; - JLabel lblNewLabel_3; - JLabel labelVerbleibend; - long filesize; - double speed; - long bytesread; - JLabel labelZeit; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); - /** - * Launch the application. - */ - /*public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPDownloader frame = new FTPDownloader(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - }*/ - - /** - * Create the frame. - */ - public FTPDownloader_GUI(String name) { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - dispose(); - } - }); - setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - filename=name; - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - //filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("Speicherort ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel("C:\\"); - lblNewLabel.setBounds(169, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Download starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonDownloadActionPerformed(arg0); - } - }); - - btnDownloadStarten.setBounds(10, 294, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); - progressBar.setStringPainted(true); - - - progressBar.setBounds(10, 158, 577, 30); - contentPanel.add(progressBar); - - JLabel lblDownloadgeschwindigkeit = new JLabel("Downloadgeschwindigkeit:"); - lblDownloadgeschwindigkeit.setBounds(10, 194, 141, 14); - contentPanel.add(lblDownloadgeschwindigkeit); - - downspeed = new JLabel("0"); - downspeed.setBounds(261, 194, 95, 14); - contentPanel.add(downspeed); - - JLabel lblNewLabel_1 = new JLabel("Fertig:"); - lblNewLabel_1.setBounds(10, 244, 46, 14); - contentPanel.add(lblNewLabel_1); - - bytesreadlbl = new JLabel(""); - bytesreadlbl.setBounds(66, 244, 108, 14); - contentPanel.add(bytesreadlbl); - - JLabel lblNewLabel_2 = new JLabel("von:"); - lblNewLabel_2.setBounds(179, 244, 46, 14); - contentPanel.add(lblNewLabel_2); - - lblNewLabel_3 = new JLabel(""); - lblNewLabel_3.setBounds(235, 244, 108, 14); - contentPanel.add(lblNewLabel_3); - - JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); - lblMbVerbleibend.setBounds(10, 269, 71, 14); - contentPanel.add(lblMbVerbleibend); - - labelVerbleibend = new JLabel(""); - labelVerbleibend.setBounds(91, 269, 108, 14); - contentPanel.add(labelVerbleibend); - - JLabel lblGeschtzteVerbleibendeZeit = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - lblGeschtzteVerbleibendeZeit.setBounds(10, 219, 150, 14); - contentPanel.add(lblGeschtzteVerbleibendeZeit); - - labelZeit = new JLabel(""); - labelZeit.setBounds(261, 219, 117, 14); - contentPanel.add(labelZeit); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label = new JLabel("Eingabe Ihrer Daten"); - label.setFont(new Font("Tahoma", Font.BOLD, 18)); - label.setBounds(10, 11, 509, 22); - panel.add(label); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel label_1 = new JLabel("Hauptmen\u00FC"); - label_1.setForeground(Color.BLUE); - label_1.setBounds(20, 88, 61, 20); - contentPanel.add(label_1); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(80, 91, 14, 14); - contentPanel.add(label_2); - - JLabel label_3 = new JLabel("VL-Image"); - label_3.setForeground(Color.BLUE); - label_3.setBounds(91, 88, 46, 20); - contentPanel.add(label_3); - - JLabel label_4 = new JLabel(">"); - label_4.setBounds(139, 91, 14, 14); - contentPanel.add(label_4); - - JLabel label_5 = new JLabel("Neu/Bearbeiten"); - label_5.setBounds(149, 91, 108, 14); - contentPanel.add(label_5); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(-10, 648, 597, 2); - contentPanel.add(separator_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if(taskrun==true) - { - task.cancel(true); - try { - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - dispose(); - } - }); - - JButton btnZurck = new JButton("Zur\u00FCck"); - btnZurck.setActionCommand("Cancel"); - buttonPane.add(btnZurck); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - setVisible(true); - - } - - private void buttonDownloadActionPerformed(ActionEvent event) { - - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - //downloadPath=client.getPathOfImage(filename); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task = new DownloadTask(host, port, user.userName, user.password,user.path+filename+".vmdk", lblNewLabel.getText(), this); - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - } - - public void propertyChange(PropertyChangeEvent arg0) { - - - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - downspeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - bytesreadlbl.setText((bytesread/1024/1024)+" MB"); - labelVerbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - lblNewLabel_3.setText((filesize/1024/1024)+" MB"); - - } - - } -}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/FTPEditUploader_GUI.java deleted file mode 100644 index 0adf2739..00000000 --- a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java +++ /dev/null @@ -1,420 +0,0 @@ -package gui; - -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; -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 java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.person; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; -import ftp.UploadTask; - - -@SuppressWarnings("serial") -public class FTPEditUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JProgressBar progressBar; - String host="141.79.128.121"; - int port=21; - server.User user; - String filename=""; - File uploadFile; - static String arg=""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); - /** - * 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. - */ - public FTPEditUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if(taskrun==true) - { - try { - - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - } - }); - setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - //filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - uploadFile=dir; - filename=uploadFile.getName(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel(""); - lblNewLabel.setBounds(184, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Upload starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnDownloadStarten.setBounds(10, 330, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); - progressBar.setStringPainted(true); - - - progressBar.setBounds(10, 158, 577, 30); - contentPanel.add(progressBar); - - JLabel label = new JLabel("Downloadgeschwindigkeit:"); - label.setBounds(10, 199, 141, 14); - contentPanel.add(label); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(10, 249, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setBounds(66, 249, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setBounds(329, 199, 95, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(184, 249, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setBounds(240, 249, 108, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(10, 274, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(10, 224, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setBounds(329, 224, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setBounds(91, 274, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label_2 = new JLabel("Eingabe Ihrer Daten"); - label_2.setFont(new Font("Tahoma", Font.BOLD, 18)); - label_2.setBounds(10, 11, 509, 22); - panel.add(label_2); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - client.startFileCopy(user.path+"/"+uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(10, 375, 264, 23); - contentPanel.add(btnCopyFileTo); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - JButton ButtonReady = new JButton("Abschlie\u00DFen"); - ButtonReady.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - updateData(); - dispose(); - MainMenue_GUI m=new MainMenue_GUI(); - m.setVisible(true); - - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - thrift.closeThriftConnection(); - } - }); - - JButton buttonCancel = new JButton("Schlie\u00DFen"); - buttonCancel.setActionCommand("Cancel"); - buttonPane.add(buttonCancel); - ButtonReady.setActionCommand("Cancel"); - buttonPane.add(ButtonReady); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - - // Rename file (or directory) - //boolean success = file.renameTo(file2); - //if (!success) { - // File was not successfully renamed - //System.out.println("Not OK"); - //} - //else - //{ - //System.out.println("OK"); - //} - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - System.out.println("name"+user.userName); - System.out.println("path"+user.path); - System.out.println("pass"+user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - //createXML(); - //TransferToSatellit(); - - - } - - public void propertyChange(PropertyChangeEvent arg0) { - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - labelfertig.setText((bytesread/1024/1024)+" MB"); - labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - labelfilesize.setText((filesize/1024/1024)+" MB"); - - } - - } - - public boolean updateData(){ - - try { - - - System.out.println("Start Update"); - client.updateImageData(Image.image.getImagename(),Image.image.getNewName(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - - } -}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/FTPUploader_GUI.java b/Dozentenmodul/src/gui/FTPUploader_GUI.java deleted file mode 100644 index 0bf92b82..00000000 --- a/Dozentenmodul/src/gui/FTPUploader_GUI.java +++ /dev/null @@ -1,418 +0,0 @@ -package gui; - -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; -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 java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; - -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.JSeparator; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.Image; -import models.person; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; -import ftp.UploadTask; - - -@SuppressWarnings("serial") -public class FTPUploader_GUI extends JFrame implements PropertyChangeListener { - - @SuppressWarnings("unused") - private JPanel contentPane; - private final JPanel contentPanel = new JPanel(); - JLabel lblNewLabel; - JProgressBar progressBar; - String host="141.79.128.121"; - int port=21; - server.User user; - String filename=""; - File uploadFile; - static String arg=""; - UploadTask task; - JLabel UpSpeed; - JLabel labelfertig; - JLabel labelfilesize; - JLabel labelZeit; - JLabel labelverbleibend; - long filesize; - double speed; - long bytesread; - boolean taskrun=false; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - FTPUploader_GUI frame = new FTPUploader_GUI(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public FTPUploader_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - if(taskrun==true) - { - try { - - client.DeleteFtpUser(user.userName); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - } - }); - setResizable(false); - //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - //filename=name; - setBackground(Color.WHITE); - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 250); - getContentPane().setLayout(new BorderLayout()); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel, BorderLayout.CENTER); - contentPanel.setLayout(null); - { - JButton btnSpeicherortAuswhlen = new JButton("VMDK ausw\u00E4hlen"); - btnSpeicherortAuswhlen.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - JFileChooser fc=new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_ONLY); - - fc.showOpenDialog(getParent()); - File dir=fc.getSelectedFile(); - uploadFile=dir; - filename=uploadFile.getName(); - lblNewLabel.setText(dir.getAbsolutePath()); - } - }); - - btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23); - btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); - btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT); - contentPanel.add(btnSpeicherortAuswhlen); - } - - lblNewLabel = new JLabel(""); - lblNewLabel.setBounds(184, 124, 255, 23); - contentPanel.add(lblNewLabel); - - JButton btnDownloadStarten = new JButton("Upload starten"); - btnDownloadStarten.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - buttonUploadActionPerformed(arg0); - - } - }); - - btnDownloadStarten.setBounds(10, 330, 141, 23); - contentPanel.add(btnDownloadStarten); - - progressBar = new JProgressBar(0,100); - progressBar.setStringPainted(true); - - - progressBar.setBounds(10, 158, 577, 30); - contentPanel.add(progressBar); - - JLabel label = new JLabel("Downloadgeschwindigkeit:"); - label.setBounds(10, 199, 141, 14); - contentPanel.add(label); - - JLabel label_1 = new JLabel("Fertig:"); - label_1.setBounds(10, 249, 46, 14); - contentPanel.add(label_1); - - labelfertig = new JLabel("0"); - labelfertig.setBounds(66, 249, 108, 14); - contentPanel.add(labelfertig); - - UpSpeed = new JLabel("0"); - UpSpeed.setBounds(329, 199, 95, 14); - contentPanel.add(UpSpeed); - - JLabel label_4 = new JLabel("von:"); - label_4.setBounds(184, 249, 46, 14); - contentPanel.add(label_4); - - labelfilesize = new JLabel("0"); - labelfilesize.setBounds(240, 249, 108, 14); - contentPanel.add(labelfilesize); - - JLabel label_6 = new JLabel("Verbleibend:"); - label_6.setBounds(10, 274, 71, 14); - contentPanel.add(label_6); - - JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); - label_7.setBounds(10, 224, 150, 14); - contentPanel.add(label_7); - - labelZeit = new JLabel("0"); - labelZeit.setBounds(329, 224, 117, 14); - contentPanel.add(labelZeit); - - labelverbleibend = new JLabel("0"); - labelverbleibend.setBounds(91, 274, 108, 14); - contentPanel.add(labelverbleibend); - - JPanel panel = new JPanel(); - panel.setLayout(null); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - contentPanel.add(panel); - - JLabel label_2 = new JLabel("Eingabe Ihrer Daten"); - label_2.setFont(new Font("Tahoma", Font.BOLD, 18)); - label_2.setBounds(10, 11, 509, 22); - panel.add(label_2); - - JTextPane textPane = new JTextPane(); - textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - textPane.setEditable(false); - textPane.setBackground(SystemColor.menu); - textPane.setBounds(10, 36, 509, 32); - panel.add(textPane); - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 79, 597, 2); - contentPanel.add(separator); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setForeground(Color.BLUE); - lblNewLabel_1.setBounds(20, 88, 61, 20); - contentPanel.add(lblNewLabel_1); - - JLabel label_3 = new JLabel(">"); - label_3.setBounds(80, 91, 14, 14); - contentPanel.add(label_3); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(91, 88, 46, 20); - contentPanel.add(lblVlimage); - - JLabel label_5 = new JLabel(">"); - label_5.setBounds(139, 91, 14, 14); - contentPanel.add(label_5); - - JLabel lblNeubearbeiten = new JLabel("Neu/Bearbeiten"); - lblNeubearbeiten.setBounds(149, 91, 108, 14); - contentPanel.add(lblNeubearbeiten); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - contentPanel.add(separator_1); - - JButton btnCopyFileTo = new JButton("Copy File to Prod"); - btnCopyFileTo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - client.startFileCopy(user.path+"/"+uploadFile.getName()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); - btnCopyFileTo.setBounds(10, 375, 264, 23); - contentPanel.add(btnCopyFileTo); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBackground(UIManager.getColor("Button.background")); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane, BorderLayout.SOUTH); - { - JButton ButtonReady = new JButton("Abschlie\u00DFen"); - ButtonReady.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - writeData(); - dispose(); - MainMenue_GUI m=new MainMenue_GUI(); - m.setVisible(true); - if(taskrun==true) - { - try { - client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - task.cancel(true); - } - - } - }); - - JButton buttonCancel = new JButton("Schlie\u00DFen"); - buttonCancel.setActionCommand("Cancel"); - buttonPane.add(buttonCancel); - ButtonReady.setActionCommand("Cancel"); - buttonPane.add(ButtonReady); - } - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnHillfe = new JMenu("Hillfe"); - menuBar.add(mnHillfe); - setVisible(true); - - } - - private void buttonUploadActionPerformed(ActionEvent event) { - // File (or directory) with old name - // File file = new File(lblNewLabel.getText()); - - // File (or directory) with new name - //System.out.println(file.getAbsolutePath().substring(0,file.getAbsolutePath().lastIndexOf("\\"))+"\\"+vm.vl.getLaborname()+".vmdk"); - //File file2 = new File(file.getAbsoluteFile()+"\\"+vm.vl.getLaborname()+".vmdk"); - - - // Rename file (or directory) - //boolean success = file.renameTo(file2); - //if (!success) { - // File was not successfully renamed - //System.out.println("Not OK"); - //} - //else - //{ - //System.out.println("OK"); - //} - progressBar.setValue(0); - - try { - user=client.getFtpUser(); - System.out.println("name"+user.userName); - System.out.println("path"+user.path); - System.out.println("pass"+user.password); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - task=new UploadTask(host,port,user.userName,user.password,user.path, uploadFile); - - task.addPropertyChangeListener(this); - task.execute(); - taskrun=true; - - //createXML(); - //TransferToSatellit(); - - - } - - public void propertyChange(PropertyChangeEvent arg0) { - if ("progress" == arg0.getPropertyName()) { - int progress = (Integer) arg0.getNewValue(); - progressBar.setValue(progress); - } - if("speed"==arg0.getPropertyName()){ - speed=(double)arg0.getNewValue(); - //if(speed<=1){ - - UpSpeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s"); - - // }else - //{ - //double MBSpeed=speed/1024; - //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf("."))); - //} - - } - if("bytesread"==arg0.getPropertyName()) - { - bytesread=(long)arg0.getNewValue(); - labelfertig.setText((bytesread/1024/1024)+" MB"); - labelverbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB"); - - - labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten"); - - - } - if("filesize"==arg0.getPropertyName()) - { - filesize=(long)arg0.getNewValue(); - labelfilesize.setText((filesize/1024/1024)+" MB"); - - } - - } - - public boolean writeData(){ - - try { - - - - client.writeVLdata(Image.image.getImagename(), person.verantowrtlicher.getVorname(), person.verantowrtlicher.getName(), person.verantowrtlicher.getHochschule(), person.verantowrtlicher.getEMail(), person.verantowrtlicher.getTel(), person.verantowrtlicher.getFakultät(), Image.image.isLicensed(), Image.image.isInternet(), Image.image.getRam(), Image.image.getCpu()); - } catch (TException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - return true; - - - } -}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/Login_GUI.java b/Dozentenmodul/src/gui/Login_GUI.java deleted file mode 100644 index cc558261..00000000 --- a/Dozentenmodul/src/gui/Login_GUI.java +++ /dev/null @@ -1,203 +0,0 @@ -package gui; - - -import java.awt.Dimension; -import java.awt.EventQueue; -import java.awt.Image; -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 java.io.File; -import java.io.IOException; - -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; - -import models.person; - -import org.ini4j.Wini; - -import config.config_file; - - -@SuppressWarnings("serial") -public class Login_GUI extends JFrame { - - private JPanel contentPane; - private JTextField username; - private JPasswordField pass; - - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - //Prüfe und Erzeuge gegebenfalls Config - config_file cf=new config_file(); - boolean conf=cf.createConfig(); - if(conf==true) - { - //Aufruf und Anzeige des Login Fensters - Login_GUI frame = new Login_GUI(); - frame.setVisible(true); - } - else - { - JOptionPane.showMessageDialog(null, - "Fehler beim erzeugen der Konfigurationsfile", "Message", - JOptionPane.ERROR_MESSAGE); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public Login_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - - //Fenster darf nicht vergrößert werden - setResizable(false); - try { - //Setzt das Look and Feel auf System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Titel des Fensters setzen - setTitle("Dozentenmodul *Prototyp*"); - //Aktion die beim Schließen durchgeführt werden soll - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - //Größe des Fensters definieren - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 400) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 400); - //Erzeugen eines Panels - contentPane = new JPanel(); - //Hintergrund Farbe des Panels setzen - contentPane.setBackground(SystemColor.menu); - //Rahmen des Fensters setzen - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - //Layout setzen - contentPane.setLayout(null); - //Label für das Logo erzeugen - JLabel imgLabel = new JLabel(); - //Größe und Position des Logos festelegen - imgLabel.setBounds(150, 11, 350, 142); - //Pfadangabe des Logos - - ImageIcon icon = new ImageIcon(getClass().getResource("/Logo_bwLehrpool.png"),"Logo"); - //Skalierung des Logos - Image scaled=icon.getImage().getScaledInstance(270, 64, 0); - imgLabel.setIcon(new ImageIcon(scaled)); - //Hinzufügen des Logos in das Fenster - contentPane.add(imgLabel); - - //Erzeugen und Hinzufügen des Labels - JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); - LabelUser.setBounds(150, 164, 134, 20); - contentPane.add(LabelUser); - - //Erzeugen und Hinzufügen des Textfeldes - username = new JTextField(); - username.setBounds(343, 164, 125, 20); - contentPane.add(username); - username.setColumns(10); - - //Erzeugen und Hinzufügen des Labels - JLabel LabelPass = new JLabel("bwIDM-Passwort:"); - LabelPass.setBounds(150, 195, 134, 20); - contentPane.add(LabelPass); - - //Erzeugen, Hinzufügen und definierung der Aktion des Buttons - JButton BtnLogin = new JButton("Login"); - BtnLogin.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt - //Ldap check=new Ldap(); - boolean login=true; - //boolean login=check.LdapAuth(username.getText(), new String(pass.getPassword())); - if(login==true) - { - - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - //Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht zeige diese an - if(ini.get("main", "BillOfRights",boolean.class)==false){ - //Erstellen einer Instanz der Aktionsauswahl - BillOfRights_GUI re=new BillOfRights_GUI(); - re.setVisible(true); - //Schließen des Fensters nach erfolgreichen Login - setVisible(false); - } - else - { - //Prüfe ob die Links zu vmware angezeigt werden sollen - if(ini.get("main", "vmware",boolean.class)==false){ - VmWareLink_GUI vm=new VmWareLink_GUI(); - vm.setVisible(true); - setVisible(false); - } - else - { - person.verantowrtlicher.setName("Spitzer"); - person.verantowrtlicher.setVorname("Tobias"); - person.verantowrtlicher.setEMail("tspitzer@hs-offenburg.de"); - person.verantowrtlicher.setHochschule("HS Offenburg"); - //Öffne das Hauprmenü - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - setVisible(false); - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - else - { - JOptionPane.showMessageDialog(null, - "Login denied!", "Message", - JOptionPane.INFORMATION_MESSAGE); - } - } - }); - BtnLogin.setBounds(343, 244, 125, 23); - contentPane.add(BtnLogin); - - //Erzeugen und Hinzufügen des Passwortfeldes - pass = new JPasswordField(); - pass.setBounds(343, 195, 125, 20); - contentPane.add(pass); - } -} diff --git a/Dozentenmodul/src/gui/MainMenue_GUI.java b/Dozentenmodul/src/gui/MainMenue_GUI.java deleted file mode 100644 index b879ccf1..00000000 --- a/Dozentenmodul/src/gui/MainMenue_GUI.java +++ /dev/null @@ -1,338 +0,0 @@ -package gui; - -import java.awt.Dimension; -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; -import javax.swing.border.EmptyBorder; -import java.awt.Color; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JRadioButton; -import javax.swing.SwingConstants; -import javax.swing.ButtonGroup; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.border.TitledBorder; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.ScrollPane; -import javax.swing.JTextArea; - -@SuppressWarnings("serial") -public class MainMenue_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnImageNew; - JRadioButton rdbtnImageEdit; - JRadioButton rdbtnImageSearchDownload; - JRadioButton rdbtnVeranstaltungNew; - JRadioButton rdbtnImageDelete; - 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(); - } - } - - /** - * Create the dialog. - */ - public MainMenue_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 545, 366); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 567, 69); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hauptmen\u00FC"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panelImage = new JPanel(); - panelImage.setBackground(SystemColor.menu); - panelImage.setBorder(new TitledBorder(null, "VL-Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelImage.setBounds(10, 86, 270, 200); - contentPanel.add(panelImage); - panelImage.setLayout(null); - - rdbtnImageNew = new JRadioButton("Neu"); - rdbtnImageNew.setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden"); - rdbtnImageNew.setBounds(6, 22, 159, 23); - panelImage.add(rdbtnImageNew); - rdbtnImageNew.setSelected(true); - buttonGroup.add(rdbtnImageNew); - rdbtnImageNew.setBackground(SystemColor.menu); - - - - rdbtnImageEdit = new JRadioButton("Bearbeiten"); - rdbtnImageEdit.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageEdit.setBounds(6, 48, 185, 23); - panelImage.add(rdbtnImageEdit); - buttonGroup.add(rdbtnImageEdit); - rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageEdit.setBackground(SystemColor.menu); - - rdbtnImageDelete = new JRadioButton("L\u00F6schen"); - rdbtnImageDelete.setEnabled(false); - buttonGroup.add(rdbtnImageDelete); - rdbtnImageDelete.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageDelete.setBackground(SystemColor.menu); - rdbtnImageDelete.setBounds(6, 74, 185, 23); - panelImage.add(rdbtnImageDelete); - - rdbtnImageSearchDownload = new JRadioButton("Suche und Download"); - rdbtnImageSearchDownload.setEnabled(false); - buttonGroup.add(rdbtnImageSearchDownload); - rdbtnImageSearchDownload.setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); - rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT); - rdbtnImageSearchDownload.setBackground(SystemColor.menu); - rdbtnImageSearchDownload.setBounds(6, 100, 185, 23); - panelImage.add(rdbtnImageSearchDownload); - - JPanel panelDesc = new JPanel(); - panelDesc.setLayout(null); - panelDesc.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Erklärung", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelDesc.setBackground(SystemColor.menu); - panelDesc.setBounds(290, 86, 270, 200); - contentPanel.add(panelDesc); - - ScrollPane scrollPaneDesc = new ScrollPane(); - scrollPaneDesc.setBounds(5, 15, 260, 180); - JTextArea txtDesc=new JTextArea(); - txtDesc.setBackground(SystemColor.menu); - txtDesc.setWrapStyleWord(true); - txtDesc.setLineWrap(true); - scrollPaneDesc.add(txtDesc); - //Pro AUswahl - txtDesc.setText("Hier steht irgendwann die Beschreibung der einzelnen Punkte\r\n"); - panelDesc.add(scrollPaneDesc); - - JPanel panelVeranstaltung = new JPanel(); - panelVeranstaltung.setLayout(null); - panelVeranstaltung.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelVeranstaltung.setBackground(SystemColor.menu); - panelVeranstaltung.setBounds(10, 297, 270, 200); - contentPanel.add(panelVeranstaltung); - - rdbtnVeranstaltungNew = new JRadioButton("Neu"); - buttonGroup.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew.setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben"); - rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23); - panelVeranstaltung.add(rdbtnVeranstaltungNew); - rdbtnVeranstaltungNew.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten"); - rdbtnVeranstaltungEdit.setEnabled(false); - rdbtnVeranstaltungEdit.setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen"); - rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23); - panelVeranstaltung.add(rdbtnVeranstaltungEdit); - buttonGroup.add(rdbtnVeranstaltungEdit); - rdbtnVeranstaltungEdit.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen"); - rdbtnVeranstaltungDelete.setEnabled(false); - rdbtnVeranstaltungDelete.setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungDelete); - buttonGroup.add(rdbtnVeranstaltungDelete); - rdbtnVeranstaltungDelete.setBackground(SystemColor.menu); - - JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche"); - rdbtnVeranstaltungSearch.setEnabled(false); - buttonGroup.add(rdbtnVeranstaltungSearch); - rdbtnVeranstaltungSearch.setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); - rdbtnVeranstaltungSearch.setBackground(SystemColor.menu); - rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); - panelVeranstaltung.add(rdbtnVeranstaltungSearch); - - JLabel lblCrumbStart = new JLabel("Startseite"); - lblCrumbStart.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - Login_GUI lw=new Login_GUI(); - lw.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblCrumbStart.setForeground(Color.BLUE); - lblCrumbStart.setBounds(10, 0, 52, 14); - contentPanel.add(lblCrumbStart); - - JLabel label = new JLabel(">"); - label.setBounds(60, 0, 13, 14); - contentPanel.add(label); - - JLabel lblRechtshinweis = new JLabel("Rechtshinweis"); - lblRechtshinweis.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - BillOfRights_GUI rb=new BillOfRights_GUI(); - rb.setVisible(true); - MainMenue_GUI.this.setVisible(false); - } - }); - lblRechtshinweis.setForeground(Color.BLUE); - lblRechtshinweis.setBounds(72, 0, 68, 14); - contentPanel.add(lblRechtshinweis); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(142, 0, 13, 14); - contentPanel.add(label_1); - - JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); - lblNewLabel_1.setBounds(150, 0, 74, 14); - contentPanel.add(lblNewLabel_1); - - JLabel lblNewLabel_2 = new JLabel("*Platzhalter Bild*"); - lblNewLabel_2.setBounds(10, 25, 557, 59); - contentPanel.add(lblNewLabel_2); - - JPanel panelNews = new JPanel(); - panelNews.setLayout(null); - panelNews.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "News", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panelNews.setBackground(SystemColor.menu); - panelNews.setBounds(290, 297, 270, 200); - contentPanel.add(panelNews); - - ScrollPane scrollPaneNews = new ScrollPane(); - scrollPaneNews.setBounds(5, 15, 260, 180); - JTextArea txtNews=new JTextArea(); - txtNews.setBackground(SystemColor.menu); - txtNews.setWrapStyleWord(true); - txtNews.setLineWrap(true); - txtNews.setText("Hier werden mal die Neuigkeiten stehen"); - scrollPaneNews.add(txtNews); - panelNews.add(scrollPaneNews); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnImageNew.isSelected()==true) - { - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); - dispose(); - } else if(rdbtnImageEdit.isSelected()==true) - { - - SearchEditImage_GUI si=new SearchEditImage_GUI(); - si.setVisible(true); - dispose(); - }else if(rdbtnImageSearchDownload.isSelected()==true) - { - SearchMethod_GUI sm=new SearchMethod_GUI(); - sm.setVisible(true); - dispose(); - }else if(rdbtnImageDelete.isSelected()==true) - { - DeleteImage_GUI di=new DeleteImage_GUI(); - di.setVisible(true); - dispose(); - } - else if(rdbtnVeranstaltungNew.isSelected()==true) - { - EingabeVeranstaltungAllgemein_GUI av=new EingabeVeranstaltungAllgemein_GUI(); - av.setVisible(true); - dispose(); - } - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - - - } -} diff --git a/Dozentenmodul/src/gui/SearchImage_GUI.java b/Dozentenmodul/src/gui/SearchImage_GUI.java index 4225a295..83e6bc07 100644 --- a/Dozentenmodul/src/gui/SearchImage_GUI.java +++ b/Dozentenmodul/src/gui/SearchImage_GUI.java @@ -1,6 +1,11 @@ package gui; +import gui.image.EditImageAllgemein_GUI; +import gui.image.FTPDownloader_GUI; +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_GUI; + import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -188,7 +193,7 @@ public class SearchImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); @@ -354,7 +359,7 @@ public class SearchImage_GUI extends JFrame { btnDownload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); + FTPDownloader_GUI down=new FTPDownloader_GUI(); down.setVisible(true); SearchImage_GUI.this.setVisible(false); } diff --git a/Dozentenmodul/src/gui/SearchMethod_GUI.java b/Dozentenmodul/src/gui/SearchMethod_GUI.java deleted file mode 100644 index 24a12959..00000000 --- a/Dozentenmodul/src/gui/SearchMethod_GUI.java +++ /dev/null @@ -1,243 +0,0 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.ButtonGroup; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JSeparator; -import javax.swing.JTextArea; -import javax.swing.JTextPane; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -@SuppressWarnings("serial") -public class SearchMethod_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnNachEinemVlimage; - JRadioButton rdbtnNachEinerVeranstaltung; - private final ButtonGroup buttonGroup = new ButtonGroup(); - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchMethod_GUI dialog = new SearchMethod_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchMethod_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - System.exit(0); - } - }); - setResizable(false); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("bwLehrpool Suite *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 603) / 2; - int left=(screenSize.width - 722) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 493); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Wählen Sie bitte die Suchmethode Ihrer Suche", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 36, 557, 369); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - rdbtnNachEinemVlimage = new JRadioButton("Nach einem VL-Image oder Vorlagen suchen"); - buttonGroup.add(rdbtnNachEinemVlimage); - rdbtnNachEinemVlimage.setBounds(6, 38, 545, 23); - panel_1.add(rdbtnNachEinemVlimage); - - JTextArea txtrHierKlickenWenn = new JTextArea(); - txtrHierKlickenWenn.setBackground(SystemColor.menu); - txtrHierKlickenWenn.setLineWrap(true); - txtrHierKlickenWenn.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn.setText("Hier klicken, wenn Sie nach einem konkreten Image suchen, von dem Sie exakte Daten kennen. Hierzu geh\u00F6ren z.B. das Betriebssystem oder die installierte Software.\r\nEs werden zudem alle Vorlagen aufgelistet."); - txtrHierKlickenWenn.setBounds(25, 68, 518, 80); - panel_1.add(txtrHierKlickenWenn); - - JTextArea txtrHierKlickenWenn_1 = new JTextArea(); - txtrHierKlickenWenn_1.setText("Hier klicken, wenn Sie nur wissen f\u00FCr welche Veranstaltung das gesuchte Image verwendet wird. Hierzu geh\u00F6ren z.B. der Name des Dozenten oder der Name der Veranstaltung."); - txtrHierKlickenWenn_1.setLineWrap(true); - txtrHierKlickenWenn_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrHierKlickenWenn_1.setBackground(SystemColor.menu); - txtrHierKlickenWenn_1.setBounds(25, 210, 518, 80); - panel_1.add(txtrHierKlickenWenn_1); - - rdbtnNachEinerVeranstaltung = new JRadioButton("Nach einer Veranstaltung suchen"); - buttonGroup.add(rdbtnNachEinerVeranstaltung); - rdbtnNachEinerVeranstaltung.setBounds(6, 180, 545, 23); - panel_1.add(rdbtnNachEinerVeranstaltung); - - JPanel panel = new JPanel(); - panel.setBounds(10, 402, 577, 33); - contentPanel.add(panel); - panel.setLayout(null); - panel.setBorder(new EmptyBorder(5, 5, 5, 5)); - panel.setBackground(SystemColor.menu); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - SearchMethod_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Suchmethode"); - lblNewLabel_1.setBounds(146, 11, 82, 14); - contentPanel.add(lblNewLabel_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - if(rdbtnNachEinemVlimage.isSelected()==true) - { - SearchImage_GUI ea=new SearchImage_GUI(); - ea.setVisible(true); - dispose(); - } - } - - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu = new JMenu("Suchen"); - menuBar.add(mnNewMenu); - - JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); - mnNewMenu.add(mntmVlSuche); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } -} diff --git a/Dozentenmodul/src/gui/VmWareLink_GUI.java b/Dozentenmodul/src/gui/VmWareLink_GUI.java deleted file mode 100644 index 43df06a6..00000000 --- a/Dozentenmodul/src/gui/VmWareLink_GUI.java +++ /dev/null @@ -1,215 +0,0 @@ -package gui; - -import java.awt.Desktop; -import java.awt.Dimension; -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; -import javax.swing.border.EmptyBorder; -import javax.swing.JLabel; -import java.awt.Font; -import javax.swing.JTextPane; -import java.awt.SystemColor; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JSeparator; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import javax.swing.JCheckBox; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; - -import org.ini4j.InvalidFileFormatException; -import org.ini4j.Wini; - - -@SuppressWarnings("serial") -public class VmWareLink_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JCheckBox chckbxNewCheckBox; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - VmWareLink_GUI dialog = new VmWareLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public VmWareLink_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - setTitle("Dozentenmodul *Prototyp*"); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - //setBounds(100, 100, 603, 722); - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBounds(0, 0, 577, 80); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Hinweis VMWare Player"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 42); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 104, 567, 502); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JTextPane txtpnUmIhreVmdk = new JTextPane(); - txtpnUmIhreVmdk.setBackground(SystemColor.menu); - txtpnUmIhreVmdk.setEditable(false); - txtpnUmIhreVmdk.setText("F\u00FCr die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player ben\u00F6tigt. Diesen k\u00F6nnen Sie sich unter folgendem Link kostenfrei downloaden."); - txtpnUmIhreVmdk.setBounds(10, 16, 499, 66); - contentPanel.add(txtpnUmIhreVmdk); - - JLabel lblNewLabel_1 = new JLabel("<html><b>Windows: </b></html>"); - lblNewLabel_1.addMouseListener(new MouseAdapter() { - @Override - public void mouseReleased(MouseEvent arg0) { - URI url; - try { - url = new URI("https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"); - Desktop.getDesktop().browse(url); - } catch (URISyntaxException | IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - }); - - lblNewLabel_1.setBounds(10, 93, 499, 14); - contentPanel.add(lblNewLabel_1); - - chckbxNewCheckBox = new JCheckBox("Diese Benachrichtigung nicht mehr anzeigen."); - chckbxNewCheckBox.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - if(chckbxNewCheckBox.isSelected()==true) - { - try { - Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", "vmware",true); - ini.store(); - } catch (InvalidFileFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - } - }); - chckbxNewCheckBox.setBounds(6, 472, 555, 23); - contentPanel.add(chckbxNewCheckBox); - - JLabel lbllinuxvmwarePlayer = new JLabel("<html><b>Linux: </b></html>"); - lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); - contentPanel.add(lbllinuxvmwarePlayer); - - JLabel lblvmwarePlayerDownload = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); - contentPanel.add(lblvmwarePlayerDownload); - - JLabel lblvmwarePlayerDownload_1 = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); - contentPanel.add(lblvmwarePlayerDownload_1); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 630, 587, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - MainMenue_GUI ea=new MainMenue_GUI(); - ea.setVisible(true); - dispose(); - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 617, 587, 2); - getContentPane().add(separator); - } - { - JSeparator separator = new JSeparator(); - separator.setBounds(0, 91, 587, 2); - getContentPane().add(separator); - } - { - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - { - JMenu mnHilfe = new JMenu("Hilfe"); - menuBar.add(mnHilfe); - { - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnHilfe.add(mntmFaq); - } - { - JMenuItem mntmHilfe = new JMenuItem("Hilfe"); - mnHilfe.add(mntmHilfe); - } - } - } - - - - } -} diff --git a/Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java index 12678e0e..bf1d0230 100644 --- a/Dozentenmodul/src/gui/EingabeImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/CreateImageAllgemein_GUI.java @@ -1,6 +1,8 @@ -package gui; +package gui.image; +import gui.intro.MainMenue_GUI; + import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; @@ -36,7 +38,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @SuppressWarnings("serial") -public class EingabeImageAllgemein_GUI extends JFrame { +public class CreateImageAllgemein_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -49,13 +51,17 @@ public class EingabeImageAllgemein_GUI extends JFrame { /** * Create the dialog. */ - public EingabeImageAllgemein_GUI() { + public CreateImageAllgemein_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { //Beendet das Fenster auf X System.exit(0); } + @Override + public void windowOpened(WindowEvent arg0) { + imagename.requestFocusInWindow(); + } }); //Verhindert das Vergrößern des Fensters setResizable(false); @@ -119,7 +125,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { Vorname.setEnabled(false); Vorname.setEditable(false); Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantowrtlicher.getVorname()); + Vorname.setText(person.verantwortlicher.getVorname()); Vorname.setColumns(10); Vorname.setBounds(145, 245, 350, 20); panel_1.add(Vorname); @@ -133,7 +139,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { Nachname.setEnabled(false); Nachname.setEditable(false); Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantowrtlicher.getName()); + Nachname.setText(person.verantwortlicher.getName()); Nachname.setColumns(10); Nachname.setBounds(145, 276, 350, 20); panel_1.add(Nachname); @@ -147,7 +153,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { Hochschule.setEnabled(false); Hochschule.setEditable(false); Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantowrtlicher.getHochschule()); + Hochschule.setText(person.verantwortlicher.getHochschule()); Hochschule.setColumns(10); Hochschule.setBounds(145, 307, 350, 20); panel_1.add(Hochschule); @@ -161,7 +167,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { EMail.setEnabled(false); EMail.setEditable(false); EMail.setBackground(Color.WHITE); - EMail.setText(person.verantowrtlicher.getEMail()); + EMail.setText(person.verantwortlicher.getEMail()); EMail.setColumns(10); EMail.setBounds(145, 338, 350, 20); panel_1.add(EMail); @@ -171,14 +177,17 @@ public class EingabeImageAllgemein_GUI extends JFrame { lblImagename.setBounds(10, 31, 125, 20); panel_1.add(lblImagename); + imagename = new JTextField(); imagename.setBackground(Color.WHITE); imagename.setText((String) null); imagename.setColumns(10); imagename.setBounds(145, 31, 350, 20); + imagename.setText(Image.image.getImagename()); //null am Anfang, aber speichert die Eingabe, wenn man zurück kommt zur Seite panel_1.add(imagename); JTextArea txtrGebenSieBitte = new JTextArea(); + txtrGebenSieBitte.setEditable(false); txtrGebenSieBitte.setBackground(SystemColor.menu); txtrGebenSieBitte.setLineWrap(true); txtrGebenSieBitte.setFont(new Font("Tahoma", Font.PLAIN, 12)); @@ -202,7 +211,7 @@ public class EingabeImageAllgemein_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { //Öffnet das Hauptmenü - EingabeImageAllgemein_GUI.this.setVisible(false); + CreateImageAllgemein_GUI.this.setVisible(false); MainMenue_GUI main=new MainMenue_GUI(); main.setVisible(true); } @@ -234,8 +243,8 @@ public class EingabeImageAllgemein_GUI extends JFrame { buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane); { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Image.image.setImagename(imagename.getText()); MainMenue_GUI sr=new MainMenue_GUI(); @@ -243,31 +252,31 @@ public class EingabeImageAllgemein_GUI extends JFrame { dispose(); } }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); } { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //Prüft die Eingabe - if(Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) + if(imagename.getText().isEmpty()==false && Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) { //Schreibt die Daten in das Model Image.image.setImagename(imagename.getText()); - EingabeImageTechnisch_GUI ea=new EingabeImageTechnisch_GUI(); + CreateImageTechnisch_GUI ea=new CreateImageTechnisch_GUI(); ea.setVisible(true); dispose(); } else{ JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + "Daten unvollständig", JOptionPane.INFORMATION_MESSAGE); } } }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); } } @@ -291,5 +300,5 @@ public class EingabeImageAllgemein_GUI extends JFrame { JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); - } + }//end main } diff --git a/Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java index 62cfd19a..e9d2d91a 100644 --- a/Dozentenmodul/src/gui/EingabeImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/CreateImageTechnisch_GUI.java @@ -1,6 +1,8 @@ -package gui; +package gui.image; +import gui.intro.MainMenue_GUI; + import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; @@ -36,7 +38,7 @@ import javax.swing.SpinnerNumberModel; import models.Image; @SuppressWarnings("serial") -public class EingabeImageTechnisch_GUI extends JFrame { +public class CreateImageTechnisch_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -53,7 +55,7 @@ public class EingabeImageTechnisch_GUI extends JFrame { */ public static void main(String[] args) { try { - EingabeImageTechnisch_GUI dialog = new EingabeImageTechnisch_GUI(); + CreateImageTechnisch_GUI dialog = new CreateImageTechnisch_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -64,7 +66,7 @@ public class EingabeImageTechnisch_GUI extends JFrame { /** * Create the dialog. */ - public EingabeImageTechnisch_GUI() { + public CreateImageTechnisch_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -116,102 +118,71 @@ public class EingabeImageTechnisch_GUI extends JFrame { JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 95); + panel_1.setBounds(10, 66, 557, 124); contentPanel.add(panel_1); panel_1.setLayout(null); - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - rdbtnlicenseJa = new JRadioButton("Ja"); - rdbtnlicenseJa.setSelected(true); - buttonGrouplicense.add(rdbtnlicenseJa); - rdbtnlicenseJa.setBounds(266, 29, 109, 23); - panel_1.add(rdbtnlicenseJa); - rdbtnlicenseNein = new JRadioButton("Nein"); buttonGrouplicense.add(rdbtnlicenseNein); - rdbtnlicenseNein.setBounds(377, 29, 109, 23); + rdbtnlicenseNein.setBounds(377, 29, 46, 23); panel_1.add(rdbtnlicenseNein); - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); + rdbtnInternetNein = new JRadioButton("Nein"); + rdbtnInternetNein.setSelected(true); + buttonGroupInternet.add(rdbtnInternetNein); + rdbtnInternetNein.setBounds(377, 57, 46, 23); + panel_1.add(rdbtnInternetNein); + + JLabel lblInternetIstInnerhalb = new JLabel("Internet ist f\u00FCr dieses Image gesperrt:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); + JButton btnInternetSettings = new JButton("Einstellungen..."); + btnInternetSettings.setEnabled(false); + btnInternetSettings.setBounds(439, 57, 108, 23); + panel_1.add(btnInternetSettings); + rdbtnInternetJa = new JRadioButton("Ja"); + buttonGroupInternet.add(rdbtnInternetJa); - rdbtnInternetJa.setBounds(266, 57, 109, 23); + rdbtnInternetJa.setBounds(266, 57, 41, 23); panel_1.add(rdbtnInternetJa); - rdbtnInternetNein = new JRadioButton("Nein"); - rdbtnInternetNein.setSelected(true); - buttonGroupInternet.add(rdbtnInternetNein); - rdbtnInternetNein.setBounds(377, 57, 109, 23); - panel_1.add(rdbtnInternetNein); - - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); - lblHauptmen.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - - EingabeImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - } - }); - lblHauptmen.setForeground(Color.BLUE); - lblHauptmen.setBounds(10, 11, 61, 14); - contentPanel.add(lblHauptmen); - - JLabel label_1 = new JLabel(">"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); + rdbtnlicenseJa = new JRadioButton("Ja"); + rdbtnlicenseJa.setSelected(true); + buttonGrouplicense.add(rdbtnlicenseJa); + rdbtnlicenseJa.setBounds(266, 29, 41, 23); + panel_1.add(rdbtnlicenseJa); - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); + JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); + JLabel lblLizenzserverEintragen = new JLabel("Lizenzserver eintragen:"); + lblLizenzserverEintragen.setBounds(10, 85, 250, 20); + panel_1.add(lblLizenzserverEintragen); - JLabel lblNewLabel_1 = new JLabel("Neu"); - lblNewLabel_1.setBounds(146, 11, 46, 14); - contentPanel.add(lblNewLabel_1); + JButton btnLicenseServer = new JButton("Server-Adresse..."); + btnLicenseServer.setEnabled(false); + btnLicenseServer.setBounds(266, 84, 157, 23); + panel_1.add(btnLicenseServer); JPanel panel_2 = new JPanel(); panel_2.setLayout(null); panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_2.setBackground(SystemColor.menu); - panel_2.setBounds(10, 172, 557, 338); + panel_2.setBounds(11, 196, 557, 338); contentPanel.add(panel_2); - JTextArea txtrHinweisSolltenSie = new JTextArea(); - txtrHinweisSolltenSie.setBackground(SystemColor.menu); - txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); - txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); - panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); - lblNewLabel_3.setBounds(10, 91, 280, 20); - panel_2.add(lblNewLabel_3); - - JLabel lblMindestens = new JLabel("mindestens"); - lblMindestens.setBounds(315, 91, 60, 20); - panel_2.add(lblMindestens); - - spinnerRam = new JSpinner(); - spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); - spinnerRam.setBounds(385, 88, 29, 20); - panel_2.add(spinnerRam); - JLabel lblGbyte = new JLabel("GByte"); lblGbyte.setBounds(424, 91, 46, 20); panel_2.add(lblGbyte); + spinnerCPU = new JSpinner(); + spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); + spinnerCPU.setBounds(385, 188, 29, 20); + panel_2.add(spinnerCPU); + JTextArea txtrBeispielWindows = new JTextArea(); txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); @@ -219,29 +190,77 @@ public class EingabeImageTechnisch_GUI extends JFrame { txtrBeispielWindows.setBounds(10, 122, 280, 55); panel_2.add(txtrBeispielWindows); - JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); - txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); - txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); - panel_2.add(txtrBeispielWindows_1); + + + JLabel lblKerne = new JLabel("Kerne"); + lblKerne.setBounds(424, 191, 46, 20); + panel_2.add(lblKerne); JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); lblWieVieleCpus.setBounds(10, 191, 280, 20); panel_2.add(lblWieVieleCpus); + spinnerRam = new JSpinner(); + spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); + spinnerRam.setBounds(385, 88, 29, 20); + panel_2.add(spinnerRam); + JLabel label_3 = new JLabel("mindestens"); label_3.setBounds(315, 191, 60, 20); panel_2.add(label_3); - spinnerCPU = new JSpinner(); - spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); - panel_2.add(spinnerCPU); + JLabel lblMindestens = new JLabel("mindestens"); + lblMindestens.setBounds(315, 91, 60, 20); + panel_2.add(lblMindestens); - JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); - panel_2.add(lblKerne); + JTextArea txtrBeispielWindows_1 = new JTextArea(); + txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtrBeispielWindows_1.setBackground(SystemColor.menu); + txtrBeispielWindows_1.setBounds(10, 222, 280, 55); + panel_2.add(txtrBeispielWindows_1); + + JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + lblNewLabel_3.setBounds(10, 91, 280, 20); + panel_2.add(lblNewLabel_3); + + JTextArea txtrHinweisSolltenSie = new JTextArea(); + txtrHinweisSolltenSie.setBackground(SystemColor.menu); + txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); + txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); + panel_2.add(txtrHinweisSolltenSie); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + CreateImageTechnisch_GUI.this.setVisible(false); + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -249,8 +268,8 @@ public class EingabeImageTechnisch_GUI extends JFrame { buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane); { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { + JButton cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(rdbtnInternetJa.isSelected()==true) @@ -273,18 +292,18 @@ public class EingabeImageTechnisch_GUI extends JFrame { Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); sr.setVisible(true); dispose(); } }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); + cancelButton.setActionCommand("OK"); + buttonPane.add(cancelButton); + //getRootPane().setDefaultButton(cancelButton); } { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(rdbtnInternetJa.isSelected()==true) { @@ -305,14 +324,15 @@ public class EingabeImageTechnisch_GUI extends JFrame { } Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - FTPUploader_GUI ea=new FTPUploader_GUI(); + FTPCreateUploader_GUI ea=new FTPCreateUploader_GUI(); ea.setVisible(true); dispose(); } }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); + continueButton.setActionCommand("Cancel"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); } } diff --git a/Dozentenmodul/src/gui/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java index de6d4123..d19e5c9f 100644 --- a/Dozentenmodul/src/gui/DeleteImage_GUI.java +++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java @@ -1,6 +1,9 @@ -package gui; +package gui.image; +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_GUI; + import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -188,7 +191,7 @@ public class DeleteImage_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI es=new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); @@ -354,7 +357,7 @@ public class DeleteImage_GUI extends JFrame { btnDelete.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); + FTPDownloader_GUI down=new FTPDownloader_GUI(); down.setVisible(true); DeleteImage_GUI.this.setVisible(false); } diff --git a/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java index 58cab4ec..b80e4953 100644 --- a/Dozentenmodul/src/GUI/EditImageAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java @@ -1,4 +1,6 @@ -package gui; +package gui.image; + +import gui.intro.MainMenue_GUI; import java.awt.Color; import java.awt.Dimension; @@ -13,13 +15,13 @@ import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.Map; - import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSeparator; import javax.swing.JTextArea; @@ -29,9 +31,7 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; - import org.apache.thrift.TException; - import models.Image; import models.person; import server.Server.Client; @@ -49,6 +49,12 @@ public class EditImageAllgemein_GUI extends JFrame { private JTextField imagename; ThriftConnection con=new ThriftConnection(); Client client=con.getThriftConnection(); + private JPanel panel_2; + private JLabel lblNewLabel; + private JTextPane txtpnBitteWhlenSie; + private JPanel buttonPane; + private JButton backButton; + private JButton okButton; /** * Create the dialog. @@ -58,6 +64,7 @@ public class EditImageAllgemein_GUI extends JFrame { @Override public void windowClosing(WindowEvent arg0) { //Beendet die Anwendung bei einem Klick auf das X + con.closeThriftConnection(); System.exit(0); } }); @@ -82,24 +89,24 @@ public class EditImageAllgemein_GUI extends JFrame { initData(); getContentPane().setLayout(null); { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); + panel_2 = new JPanel(); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 11, 577, 57); + getContentPane().add(panel_2); + panel_2.setLayout(null); { - JLabel lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); + lblNewLabel = new JLabel("Bearbeiten Ihrer Daten"); lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); + panel_2.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); } - JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie = new JTextPane(); txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); + panel_2.add(txtpnBitteWhlenSie); } contentPanel.setBounds(10, 85, 577, 493); contentPanel.setBackground(SystemColor.menu); @@ -123,7 +130,7 @@ public class EditImageAllgemein_GUI extends JFrame { Vorname.setEditable(false); Vorname.setEnabled(false); Vorname.setBackground(Color.WHITE); - Vorname.setText(person.verantowrtlicher.getVorname()); + Vorname.setText(person.verantwortlicher.getVorname()); Vorname.setColumns(10); Vorname.setBounds(145, 245, 350, 20); panel_1.add(Vorname); @@ -137,7 +144,7 @@ public class EditImageAllgemein_GUI extends JFrame { Nachname.setEnabled(false); Nachname.setEditable(false); Nachname.setBackground(Color.WHITE); - Nachname.setText(person.verantowrtlicher.getName()); + Nachname.setText(person.verantwortlicher.getName()); Nachname.setColumns(10); Nachname.setBounds(145, 276, 350, 20); panel_1.add(Nachname); @@ -151,7 +158,7 @@ public class EditImageAllgemein_GUI extends JFrame { Hochschule.setEnabled(false); Hochschule.setEditable(false); Hochschule.setBackground(Color.WHITE); - Hochschule.setText(person.verantowrtlicher.getHochschule()); + Hochschule.setText(person.verantwortlicher.getHochschule()); Hochschule.setColumns(10); Hochschule.setBounds(145, 307, 350, 20); panel_1.add(Hochschule); @@ -165,7 +172,7 @@ public class EditImageAllgemein_GUI extends JFrame { EMail.setEnabled(false); EMail.setEditable(false); EMail.setBackground(Color.WHITE); - EMail.setText(person.verantowrtlicher.getEMail()); + EMail.setText(person.verantwortlicher.getEMail()); EMail.setColumns(10); EMail.setBounds(145, 338, 350, 20); panel_1.add(EMail); @@ -176,6 +183,7 @@ public class EditImageAllgemein_GUI extends JFrame { panel_1.add(lblImagename); imagename = new JTextField(); + imagename.setToolTipText("Bitte geben Sie hier den Namen des Image ein, z.B. \"Programmieren\"."); imagename.setBackground(Color.WHITE); imagename.setText(Image.image.getImagename()); imagename.setColumns(10); @@ -206,6 +214,7 @@ public class EditImageAllgemein_GUI extends JFrame { @Override 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); @@ -232,45 +241,51 @@ public class EditImageAllgemein_GUI extends JFrame { lblNewLabel_1.setBounds(146, 11, 71, 14); contentPanel.add(lblNewLabel_1); { - JPanel buttonPane = new JPanel(); + buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); buttonPane.setBackground(SystemColor.menu); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane); { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { + backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar //Image.image.setImagename(imagename.getText()); - - MainMenue_GUI sr=new MainMenue_GUI(); - sr.setVisible(true); + con.closeThriftConnection(); + SearchEditImage_GUI se=new SearchEditImage_GUI(); + se.setVisible(true); dispose(); } }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); + backButton.setActionCommand("CANCEL"); + buttonPane.add(backButton); + } { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Prüfung ob alle notwendigen Felder ausgefüllt sind - //Setzen der Eingabe im Model, dadurch bleiben die Daten bei einem erneuten Aufruf verfügbar - System.out.println(imagename.getText()); - Image.image.setNewName(imagename.getText()); - con.closeThriftConnection(); - EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); - ea.setVisible(true); - dispose(); - + okButton = new JButton("Weiter"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //check is textfield has content + if(imagename.getText().length() <= 0){ + JOptionPane.showMessageDialog(null, + "Bitte geben Sie einen Labornamen ein.", + "Daten nicht vollständig", + JOptionPane.INFORMATION_MESSAGE); + } else { + Image.image.setNewName(imagename.getText()); + con.closeThriftConnection(); + EditImageTechnisch_GUI ea=new EditImageTechnisch_GUI(); + ea.setVisible(true); + dispose(); + }//end else } }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); + + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); } } @@ -293,13 +308,14 @@ public class EditImageAllgemein_GUI extends JFrame { JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); + //setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), panel_2, lblNewLabel, txtpnBitteWhlenSie, contentPanel, panel_1, label, Vorname, label_7, Nachname, label_8, Hochschule, label_9, EMail, lblImagename, imagename, txtrGebenSieBitte, panel, lblPflichtfelder, lblHauptmen, label_1, lblVlimage, label_2, lblNewLabel_1, buttonPane, backButton, okButton, separator, separator_1, menuBar, mnNewMenu_1, mntmFaq, mntmOtrs})); } public void initData(){ try { - System.out.println("initdata1:"+Image.image.getImagename()); - Map<String,String> map=client.getImageData(Image.image.getImagename()); + + Map<String,String> map=client.getImageData(Image.image.getImageId(),Image.image.getVersion()); if(map.get("internet").equals("0")){ Image.image.setInternet(false); } @@ -313,6 +329,7 @@ public class EditImageAllgemein_GUI extends JFrame { else{ Image.image.setLicensed(true); } + Image.image.setImagename(map.get("name")); Image.image.setRam(Integer.parseInt(map.get("ram"))); Image.image.setCpu(Integer.parseInt(map.get("cpu"))); } catch (TException e) { diff --git a/Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java index d8ab833f..7d9de383 100644 --- a/Dozentenmodul/src/GUI/EditImageTechnisch_GUI.java +++ b/Dozentenmodul/src/gui/image/EditImageTechnisch_GUI.java @@ -1,5 +1,6 @@ -package gui; +package gui.image; +import gui.intro.MainMenue_GUI; import java.awt.Color; import java.awt.Dimension; @@ -13,9 +14,6 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.util.HashMap; -import java.util.Map; - import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JFrame; @@ -34,12 +32,6 @@ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - import models.Image; @SuppressWarnings("serial") @@ -56,7 +48,6 @@ public class EditImageTechnisch_GUI extends JFrame { private final ButtonGroup buttonGrouplicense = new ButtonGroup(); private final ButtonGroup buttonGroupInternet = new ButtonGroup(); - /** * Create the dialog. */ @@ -64,31 +55,31 @@ public class EditImageTechnisch_GUI extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung bei Klick auf das X + // Beendet die Anwendung bei Klick auf das X + System.exit(0); } - + }); - //Verhindert das Vergrößern des Fensters + // Verhindert das Vergrößern des Fensters setResizable(false); - + try { - //setzt das Look & Feel + // setzt das Look & Feel UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { // TODO Auto-generated catch block e.printStackTrace(); } - //Setzt den Titel des Fensters + // Setzt den Titel des Fensters setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster + // Zentriert das Fenster Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; setBounds(left, top, 603, 722); - - + getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -102,11 +93,12 @@ public class EditImageTechnisch_GUI extends JFrame { panel.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); } - + JTextPane txtpnBitteWhlenSie = new JTextPane(); txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie + .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); panel.add(txtpnBitteWhlenSie); } @@ -118,148 +110,154 @@ public class EditImageTechnisch_GUI extends JFrame { JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Image", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 66, 557, 95); contentPanel.add(panel_1); panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Image enth\u00E4lt lizenzpflichtige Software:"); + + JLabel lblNewLabel_2 = new JLabel( + "Image enth\u00E4lt lizenzpflichtige Software:"); lblNewLabel_2.setBounds(10, 30, 250, 20); panel_1.add(lblNewLabel_2); - + rdbtnlicenseJa = new JRadioButton("Ja"); + rdbtnlicenseJa.setSelected(true); buttonGrouplicense.add(rdbtnlicenseJa); rdbtnlicenseJa.setBounds(266, 29, 109, 23); panel_1.add(rdbtnlicenseJa); - + rdbtnlicenseNein = new JRadioButton("Nein"); buttonGrouplicense.add(rdbtnlicenseNein); rdbtnlicenseNein.setBounds(377, 29, 109, 23); panel_1.add(rdbtnlicenseNein); - if(Image.image.isLicensed()==true){ + if (Image.image.isLicensed() == true) { rdbtnlicenseJa.setSelected(true); - } - else - { + } else { rdbtnlicenseNein.setSelected(true); } - - - JLabel lblInternetIstInnerhalb = new JLabel("Internet ist innerhalb des Image gesperrt:"); + JLabel lblInternetIstInnerhalb = new JLabel( + "Internet ist innerhalb des Image gesperrt:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); - + rdbtnInternetJa = new JRadioButton("Ja"); buttonGroupInternet.add(rdbtnInternetJa); rdbtnInternetJa.setBounds(266, 57, 109, 23); panel_1.add(rdbtnInternetJa); - + rdbtnInternetNein = new JRadioButton("Nein"); rdbtnInternetNein.setSelected(true); buttonGroupInternet.add(rdbtnInternetNein); rdbtnInternetNein.setBounds(377, 57, 109, 23); panel_1.add(rdbtnInternetNein); - if(Image.image.isInternet()==true){ + if (Image.image.isInternet() == true) { rdbtnInternetJa.setSelected(true); - } - else - { + } else { rdbtnInternetNein.setSelected(true); } JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - //Macht dieses Fenster unsichtbar und das vorhergehende Fenster sichtbar + // Macht dieses Fenster unsichtbar und das vorhergehende Fenster + // sichtbar EditImageTechnisch_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); } }); lblHauptmen.setForeground(Color.BLUE); lblHauptmen.setBounds(10, 11, 61, 14); contentPanel.add(lblHauptmen); - + JLabel label_1 = new JLabel(">"); label_1.setBounds(69, 11, 13, 14); contentPanel.add(label_1); - + JLabel lblVlimage = new JLabel("VL-Image"); lblVlimage.setForeground(Color.BLUE); lblVlimage.setBounds(81, 11, 45, 14); contentPanel.add(lblVlimage); - + JLabel label_2 = new JLabel(">"); label_2.setBounds(133, 11, 13, 14); contentPanel.add(label_2); - + JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); - + JPanel panel_2 = new JPanel(); panel_2.setLayout(null); - panel_2.setBorder(new TitledBorder(null, "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBorder(new TitledBorder(null, + "Empfehlung bezüglich Ressourcen", TitledBorder.LEADING, + TitledBorder.TOP, null, null)); panel_2.setBackground(SystemColor.menu); panel_2.setBounds(10, 172, 557, 338); contentPanel.add(panel_2); - + JTextArea txtrHinweisSolltenSie = new JTextArea(); txtrHinweisSolltenSie.setBackground(SystemColor.menu); txtrHinweisSolltenSie.setFont(new Font("Tahoma", Font.PLAIN, 13)); - txtrHinweisSolltenSie.setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); + txtrHinweisSolltenSie + .setText("Hinweis: Sollten Sie keine Software einsetzen, die viele Ressourcen ben\u00F6tigt,\r\nk\u00F6nnen Sie sich an den Beispielwerten orientieren."); txtrHinweisSolltenSie.setBounds(10, 25, 537, 55); panel_2.add(txtrHinweisSolltenSie); - - JLabel lblNewLabel_3 = new JLabel("Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); + + JLabel lblNewLabel_3 = new JLabel( + "Wie viel Arbeitsspeicher empfehlen Sie f\u00FCr das Image:"); lblNewLabel_3.setBounds(10, 91, 280, 20); panel_2.add(lblNewLabel_3); - + JLabel lblMindestens = new JLabel("mindestens"); lblMindestens.setBounds(315, 91, 60, 20); panel_2.add(lblMindestens); - + spinnerRam = new JSpinner(); spinnerRam.setModel(new SpinnerNumberModel(1, 1, 8, 1)); spinnerRam.setBounds(385, 88, 29, 20); spinnerRam.setValue(Image.image.getRam()); panel_2.add(spinnerRam); - + JLabel lblGbyte = new JLabel("GByte"); lblGbyte.setBounds(424, 91, 46, 20); panel_2.add(lblGbyte); - + JTextArea txtrBeispielWindows = new JTextArea(); - txtrBeispielWindows.setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); + txtrBeispielWindows + .setText("Beispiel:\r\nWindows 7 32/64 Bit: 2 GByte\r\nLinux/Unix 32/64 Bit: 1 GByte"); txtrBeispielWindows.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtrBeispielWindows.setBackground(SystemColor.menu); - txtrBeispielWindows.setBounds(10, 122, 280, 55); + txtrBeispielWindows.setBounds(20, 111, 280, 55); panel_2.add(txtrBeispielWindows); - + JTextArea txtrBeispielWindows_1 = new JTextArea(); - txtrBeispielWindows_1.setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); + txtrBeispielWindows_1 + .setText("Beispiel:\r\nWindows 7 32/64 Bit: 1 Kern\r\nLinux/Unix 32/64 Bit: 1 Kern"); txtrBeispielWindows_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtrBeispielWindows_1.setBackground(SystemColor.menu); - txtrBeispielWindows_1.setBounds(10, 222, 280, 55); + txtrBeispielWindows_1.setBounds(20, 226, 280, 55); panel_2.add(txtrBeispielWindows_1); - - JLabel lblWieVieleCpus = new JLabel("Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); - lblWieVieleCpus.setBounds(10, 191, 280, 20); + + JLabel lblWieVieleCpus = new JLabel( + "Wie viele CPUs empfehlen Sie f\u00FCr das Image:"); + lblWieVieleCpus.setBounds(10, 201, 280, 20); panel_2.add(lblWieVieleCpus); - + JLabel label_3 = new JLabel("mindestens"); - label_3.setBounds(315, 191, 60, 20); + label_3.setBounds(315, 201, 60, 20); panel_2.add(label_3); - + spinnerCPU = new JSpinner(); spinnerCPU.setModel(new SpinnerNumberModel(1, 1, 4, 1)); - spinnerCPU.setBounds(385, 188, 29, 20); + spinnerCPU.setBounds(385, 198, 29, 20); spinnerCPU.setValue(Image.image.getCpu()); panel_2.add(spinnerCPU); - + JLabel lblKerne = new JLabel("Kerne"); - lblKerne.setBounds(424, 191, 46, 20); + lblKerne.setBounds(424, 201, 46, 20); panel_2.add(lblKerne); { JPanel buttonPane = new JPanel(); @@ -271,29 +269,25 @@ public class EditImageTechnisch_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - //Setzt die Imagewerte in das Model - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { + // Setzt die Imagewerte in das Model + Image.image.setCpu(Integer.valueOf( + spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf( + spinnerRam.getValue().toString()).intValue()); + if (rdbtnInternetJa.isSelected() == true) { Image.image.setInternet(true); - } - else - { + } else { Image.image.setInternet(false); } - - if(rdbtnlicenseJa.isSelected()==true) - { + + if (rdbtnlicenseJa.isSelected() == true) { Image.image.setLicensed(true); - } - else - { + } else { Image.image.setLicensed(false); } - //Öffnet das vorherige Fenster - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); - sr.setVisible(true); + // Öffnet das vorherige Fenster + EditImageAllgemein_GUI ei = new EditImageAllgemein_GUI(); + ei.setVisible(true); dispose(); } }); @@ -305,60 +299,53 @@ public class EditImageTechnisch_GUI extends JFrame { JButton cancelButton = new JButton("Weiter"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - Image.image.setCpu(Integer.valueOf(spinnerCPU.getValue().toString()).intValue()); - Image.image.setRam(Integer.valueOf(spinnerRam.getValue().toString()).intValue()); - if(rdbtnInternetJa.isSelected()==true) - { + Image.image.setCpu(Integer.valueOf( + spinnerCPU.getValue().toString()).intValue()); + Image.image.setRam(Integer.valueOf( + spinnerRam.getValue().toString()).intValue()); + if (rdbtnInternetJa.isSelected() == true) { Image.image.setInternet(true); - } - else - { + } else { Image.image.setInternet(false); } - - if(rdbtnlicenseJa.isSelected()==true) - { + + if (rdbtnlicenseJa.isSelected() == true) { Image.image.setLicensed(true); - } - else - { + } else { Image.image.setLicensed(false); } - //Öffnet das nächste Fenster - FTPEditUploader_GUI ea=new FTPEditUploader_GUI(); + // Öffnet das nächste Fenster + FTPEditUploader_GUI ea = new FTPEditUploader_GUI(); ea.setVisible(true); dispose(); - + } }); cancelButton.setActionCommand("Cancel"); buttonPane.add(cancelButton); } } - + JSeparator separator = new JSeparator(); separator.setBounds(0, 78, 597, 2); getContentPane().add(separator); - + JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); - + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenu mnNewMenu_1 = new JMenu("Hilfe"); menuBar.add(mnNewMenu_1); - + JMenuItem mntmFaq = new JMenuItem("FAQ"); mnNewMenu_1.add(mntmFaq); - + JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); - - } - - } +} diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java new file mode 100644 index 00000000..1bf8cc3a --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -0,0 +1,493 @@ +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; +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 java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JSeparator; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.Image; +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; + +@SuppressWarnings("serial") +public class FTPCreateUploader_GUI extends JFrame implements + PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblPath; + JProgressBar progressBar; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; + int port = 21; + server.User user; + String filename = ""; + File uploadFile; + static String arg = ""; + UploadTask task; + JLabel UpSpeed; + JLabel labelfertig; + JLabel labelfilesize; + JLabel labelZeit; + JLabel labelverbleibend; + long filesize; + double speed; + long bytesread; + boolean taskrun = false; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton finishButton = new JButton("Fertigstellen"); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + 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. + */ + public FTPCreateUploader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + System.exit(0); + }// end window closing + }); + setResizable(false); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + // filename=name; + setBackground(Color.WHITE); + setTitle("Dozentenmodul *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + // setBounds(100, 100, 603, 250); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + + fc.showOpenDialog(getParent()); + File file = fc.getSelectedFile(); + // check if a file is selected and exists + if (file != null) { + // file selected + uploadFile = file; + filename = uploadFile.getName(); + lblPath.setText(file.getAbsolutePath()); + } else { + // no file selected + lblPath.setText(""); + }// end if + } + }); + + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + btnUploadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + btnUploadStarten.setText("Upload auf Server starten"); + } + } + }); + lblPath.setHorizontalAlignment(SwingConstants.LEFT); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); + + btnUploadStarten.setEnabled(false); + btnUploadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonUploadActionPerformed(arg0); + + } + }); + + btnUploadStarten.setBounds(102, 200, 173, 23); + contentPanel.add(btnUploadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(102, 234, 485, 30); + contentPanel.add(progressBar); + + JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); + lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); + contentPanel.add(lblUploadgeschwindigkeit); + + JLabel label_1 = new JLabel("Fertig:"); + label_1.setBounds(102, 325, 46, 14); + contentPanel.add(label_1); + + labelfertig = new JLabel("0"); + labelfertig.setHorizontalAlignment(SwingConstants.LEFT); + labelfertig.setBounds(183, 325, 108, 14); + contentPanel.add(labelfertig); + + UpSpeed = new JLabel("0"); + UpSpeed.setHorizontalAlignment(SwingConstants.LEFT); + UpSpeed.setBounds(374, 275, 117, 14); + contentPanel.add(UpSpeed); + + JLabel label_4 = new JLabel("von:"); + label_4.setBounds(318, 325, 46, 14); + contentPanel.add(label_4); + + labelfilesize = new JLabel("0"); + labelfilesize.setHorizontalAlignment(SwingConstants.LEFT); + labelfilesize.setBounds(374, 325, 117, 14); + contentPanel.add(labelfilesize); + + JLabel label_6 = new JLabel("Verbleibend:"); + label_6.setBounds(102, 350, 71, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); + label_7.setBounds(102, 300, 150, 14); + contentPanel.add(label_7); + + labelZeit = new JLabel("0"); + labelZeit.setHorizontalAlignment(SwingConstants.LEFT); + labelZeit.setBounds(374, 300, 117, 14); + contentPanel.add(labelZeit); + + labelverbleibend = new JLabel("0"); + labelverbleibend.setHorizontalAlignment(SwingConstants.LEFT); + labelverbleibend.setBounds(183, 350, 108, 14); + contentPanel.add(labelverbleibend); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); + lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblUploadIhresImage.setBounds(10, 11, 509, 22); + panel.add(lblUploadIhresImage); + + JTextPane txtpnFhreSieBitte = new JTextPane(); + txtpnFhreSieBitte + .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); + txtpnFhreSieBitte.setEditable(false); + txtpnFhreSieBitte.setBackground(SystemColor.menu); + txtpnFhreSieBitte.setBounds(10, 36, 509, 32); + panel.add(txtpnFhreSieBitte); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setForeground(Color.BLUE); + lblNewLabel_1.setBounds(20, 88, 61, 20); + contentPanel.add(lblNewLabel_1); + + JLabel label_3 = new JLabel(">"); + label_3.setBounds(80, 91, 14, 14); + contentPanel.add(label_3); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(91, 88, 46, 20); + contentPanel.add(lblVlimage); + + JLabel label_5 = new JLabel(">"); + label_5.setBounds(139, 91, 14, 14); + contentPanel.add(label_5); + + JLabel lblNeubearbeiten = new JLabel("Neu"); + lblNeubearbeiten.setBounds(149, 91, 108, 14); + contentPanel.add(lblNeubearbeiten); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + contentPanel.add(separator_1); + + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + btnCopyFileTo.setEnabled(false); + btnCopyFileTo.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + System.out.println("Copying file to " + user.path + "/" + + uploadFile.getName()); + client.startFileCopy(user.path + "/" + uploadFile.getName()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); + btnCopyFileTo.setBounds(102, 375, 173, 23); + contentPanel.add(btnCopyFileTo); + + JLabel lblSchritt_1 = new JLabel("Schritt 1:"); + lblSchritt_1.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblSchritt_2 = new JLabel("Schritt 2:"); + lblSchritt_2.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_2); + + JLabel lblSchritt_3 = new JLabel("Schritt 3:"); + lblSchritt_3.setBounds(20, 423, 57, 14); + contentPanel.add(lblSchritt_3); + + JLabel lblKlickenSieAuf = new JLabel( + "Klicken Sie auf \"Fertigstellen\"."); + lblKlickenSieAuf.setBounds(98, 423, 241, 14); + contentPanel.add(lblKlickenSieAuf); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + finishButton.setEnabled(false); + finishButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + writeData(); + dispose(); + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + thrift.closeThriftConnection(); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + + } + }); + + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + thrift.closeThriftConnection(); + CreateImageTechnisch_GUI m = new CreateImageTechnisch_GUI(); + m.setVisible(true); + } + }); + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + finishButton.setActionCommand("Cancel"); + buttonPane.add(finishButton); + } + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnHillfe = new JMenu("Hillfe"); + menuBar.add(mnHillfe); + setVisible(true); + + } + + private void buttonUploadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + btnUploadStarten.setText("Bitte warten"); + + try { + user = client.getFtpUser(); + System.out.println("FTP name" + user.userName); + System.out.println("FTP path" + user.path); + System.out.println("FTP pass" + user.password); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + + System.out.println(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + Image.image.setNewName(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + task = new UploadTask(host, port, user.userName, user.password, + user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + progress = 0; + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); + } + + } + + + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + labelfertig.setText((bytesread / 1024 / 1024) + " MB"); + labelverbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + labelfilesize.setText((filesize / 1024 / 1024) + " MB"); + + } + + } + + public boolean writeData() { + + try { + + client.writeVLdata(Image.image.getImagename(), + person.verantwortlicher.getVorname(), + person.verantwortlicher.getName(), + person.verantwortlicher.getHochschule(), + person.verantwortlicher.getEMail(), + person.verantwortlicher.getTel(), + person.verantwortlicher.getFakultät(), + Image.image.isLicensed(), Image.image.isInternet(), + Image.image.getRam(), Image.image.getCpu(), + "/srv/openslx/nfs/temp/" + Image.image.getNewName()); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + return true; + + } +}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java new file mode 100644 index 00000000..d0f789f4 --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -0,0 +1,400 @@ +package gui.image; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import java.io.File; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import ftp.DownloadTask; +import gui.intro.MainMenue_GUI; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.SystemColor; +import java.awt.Font; +import javax.swing.JTextPane; +import javax.swing.JSeparator; +import models.Image; +import org.apache.thrift.TException; +import server.Server.Client; +import server.User; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblPath; + JLabel downspeed; + User user; + JProgressBar progressBar; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; + int port = 21; + String downloadFile = ""; + static String arg = ""; + DownloadTask task; + JLabel lblBytesread; + JLabel lblNewLabel_3; + JLabel labelVerbleibend; + long filesize; + double speed; + int progress = 0; // progress of download + long bytesread; + JLabel labelZeit; + boolean taskrun = false; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton btnZurck = new JButton("Zur\u00FCck"); + JButton btnDownloadStarten = new JButton("Download starten"); + JButton btnMainMenu = new JButton("Hauptmen\u00FC"); + + + /** + * Create the frame. + */ + public FTPDownloader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + thrift.closeThriftConnection(); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + //dispose(); + System.exit(0); + }//end window closing + }); + setResizable(false); + // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + setBackground(Color.WHITE); + setTitle("Dozentenmodul *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + JButton btnSpeicherortAuswhlen = new JButton( + "Speicherort ausw\u00E4hlen"); + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + fc.showOpenDialog(getParent()); + File dir = fc.getSelectedFile(); + // check if directory is selected + if (dir != null) { + // is selected + lblPath.setText(dir.getAbsolutePath()); + } else { + // no directory selected + lblPath.setText(""); + }// end if + } + }); + + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnDownloadStarten.setEnabled(false); + btnDownloadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnDownloadStarten.setEnabled(true); + btnDownloadStarten.setText("Download starten"); + } + } + }); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); + + btnDownloadStarten.setEnabled(false); + btnDownloadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonDownloadActionPerformed(arg0); + } + }); + + btnDownloadStarten.setBounds(102, 200, 173, 23); + contentPanel.add(btnDownloadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(102, 234, 485, 30); + contentPanel.add(progressBar); + + JLabel lblDownloadgeschwindigkeit = new JLabel( + "Downloadgeschwindigkeit:"); + lblDownloadgeschwindigkeit.setBounds(102, 275, 141, 14); + contentPanel.add(lblDownloadgeschwindigkeit); + + downspeed = new JLabel("0"); + downspeed.setBounds(374, 275, 117, 14); + contentPanel.add(downspeed); + + JLabel lblFertig = new JLabel("Fertig:"); + lblFertig.setBounds(102, 325, 46, 14); + contentPanel.add(lblFertig); + + lblBytesread = new JLabel("0"); + lblBytesread.setBounds(183, 325, 108, 14); + contentPanel.add(lblBytesread); + + JLabel lblVon = new JLabel("von:"); + lblVon.setBounds(318, 325, 46, 14); + contentPanel.add(lblVon); + + lblNewLabel_3 = new JLabel("0"); + lblNewLabel_3.setBounds(374, 325, 117, 14); + contentPanel.add(lblNewLabel_3); + + JLabel lblMbVerbleibend = new JLabel("Verbleibend:"); + lblMbVerbleibend.setBounds(102, 350, 71, 14); + contentPanel.add(lblMbVerbleibend); + + labelVerbleibend = new JLabel("0"); + labelVerbleibend.setBounds(183, 350, 108, 14); + contentPanel.add(labelVerbleibend); + + JLabel lblGeschtzteVerbleibendeZeit = new JLabel( + "Gesch\u00E4tzte Verbleibende Zeit:"); + lblGeschtzteVerbleibendeZeit.setBounds(102, 300, 150, 14); + contentPanel.add(lblGeschtzteVerbleibendeZeit); + + labelZeit = new JLabel("0"); + labelZeit.setBounds(374, 300, 117, 14); + contentPanel.add(labelZeit); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel label = new JLabel("Eingabe Ihrer Daten"); + label.setFont(new Font("Tahoma", Font.BOLD, 18)); + label.setBounds(10, 11, 509, 22); + panel.add(label); + + JTextPane textPane = new JTextPane(); + textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + textPane.setEditable(false); + textPane.setBackground(SystemColor.menu); + textPane.setBounds(10, 36, 509, 32); + panel.add(textPane); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel label_1 = new JLabel("Hauptmen\u00FC"); + label_1.setForeground(Color.BLUE); + label_1.setBounds(20, 88, 61, 20); + contentPanel.add(label_1); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(80, 91, 14, 14); + contentPanel.add(label_2); + + JLabel label_3 = new JLabel("VL-Image"); + label_3.setForeground(Color.BLUE); + label_3.setBounds(91, 88, 46, 20); + contentPanel.add(label_3); + + JLabel label_4 = new JLabel(">"); + label_4.setBounds(139, 91, 14, 14); + contentPanel.add(label_4); + + JLabel label_5 = new JLabel("Neu/Bearbeiten"); + label_5.setBounds(149, 91, 108, 14); + contentPanel.add(label_5); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(-10, 648, 597, 2); + contentPanel.add(separator_1); + + JLabel lblSchritt = new JLabel("Schritt 1:"); + lblSchritt.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt); + + JLabel lblSchritt_1 = new JLabel("Schritt 2:"); + lblSchritt_1.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblSchritt_3 = new JLabel("Schritt 3:"); + lblSchritt_3.setBounds(20, 423, 57, 14); + contentPanel.add(lblSchritt_3); + + JLabel lblKlickenSieAuf = new JLabel( + "Klicken Sie auf \"Fertigstellen\"."); + lblKlickenSieAuf.setBounds(98, 423, 241, 14); + contentPanel.add(lblKlickenSieAuf); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (taskrun == true) { + task.cancel(true); + try { + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + thrift.closeThriftConnection(); + SearchEditImage_GUI se = new SearchEditImage_GUI(); + se.setVisible(true); + dispose(); + } + }); + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + } + + + btnMainMenu.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + thrift.closeThriftConnection(); + MainMenue_GUI mm = new MainMenue_GUI(); + mm.setVisible(true); + dispose(); + } + }); + btnMainMenu.setActionCommand("Cancel"); + buttonPane.add(btnMainMenu); + } + setVisible(true); + + } + + private void buttonDownloadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnDownloadStarten.setEnabled(false); // verhindert schnellen zweiten + // Klick + btnDownloadStarten.setText("Bitte warten"); + try { + user = client.getFtpUser(); + + downloadFile = client.getPathOfImage(Image.image.getImageId(), + Image.image.getVersion()); + + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + task = new DownloadTask(host, port, user.userName, user.password, + downloadFile, lblPath.getText(), this); + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + + progress = 0; + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + btnMainMenu.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + btnMainMenu.setEnabled(false); + } + } + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + downspeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + lblBytesread.setText((bytesread / 1024 / 1024) + " MB"); + labelVerbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB"); + + } + + } +}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java new file mode 100644 index 00000000..b184c96c --- /dev/null +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -0,0 +1,475 @@ +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; +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 java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JSeparator; +import javax.swing.JTextPane; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import models.Image; +import models.person; +import org.apache.thrift.TException; +import server.Server.Client; +import thrift.ThriftConnection; +import ftp.UploadTask; +import gui.intro.MainMenue_GUI; + +@SuppressWarnings("serial") +public class FTPEditUploader_GUI extends JFrame implements + PropertyChangeListener { + + @SuppressWarnings("unused") + private JPanel contentPane; + private final JPanel contentPanel = new JPanel(); + JLabel lblPath; + JProgressBar progressBar; + //String host = "141.79.128.121"; + String host = "141.79.128.102"; + int port = 21; + server.User user; + String filename = ""; + File uploadFile; + static String arg = ""; + UploadTask task; + JLabel UpSpeed; + JLabel labelfertig; + JLabel labelfilesize; + JLabel labelZeit; + JLabel labelverbleibend; + long filesize; + double speed; + long bytesread; + boolean taskrun = false; + int progress = 0; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); + JButton btnUploadStarten = new JButton("Upload auf Server starten"); + JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen"); + JButton btnCopyFileTo = new JButton("Copy File to Prod"); + 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. + */ + public FTPEditUploader_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + if (taskrun == true) { + try { + + client.DeleteFtpUser(user.userName); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + System.exit(0); + }// end window closing + }); + setResizable(false); + // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + // filename=name; + setBackground(Color.WHITE); + setTitle("Dozentenmodul *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + // setBounds(100, 100, 603, 250); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + contentPanel.setLayout(null); + { + + btnSpeicherortAuswhlen.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + JFileChooser fc = new JFileChooser(); + fc.setFileSelectionMode(JFileChooser.FILES_ONLY); + + fc.showOpenDialog(getParent()); + File file = fc.getSelectedFile(); + // check if a file is selected and exists + if (file != null) { + // file exists + uploadFile = file; + filename = uploadFile.getName(); + lblPath.setText(file.getAbsolutePath()); + } else { + // no file selected + lblPath.setText(""); + }// end if + } + }); + + btnSpeicherortAuswhlen.setBounds(102, 124, 173, 23); + btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP); + contentPanel.add(btnSpeicherortAuswhlen); + } + + lblPath = new JLabel(""); + lblPath.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent arg0) { + if (lblPath.getText().isEmpty()) { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(false); + btnUploadStarten.setText("Bitte warten"); + } else { + // wenn leer, dann upload button nicht freigeben + btnUploadStarten.setEnabled(true); + btnUploadStarten.setText("Upload auf Server starten"); + } + } + }); + lblPath.setBounds(102, 158, 485, 23); + contentPanel.add(lblPath); + + btnUploadStarten.setEnabled(false); + btnUploadStarten.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + buttonUploadActionPerformed(arg0); + + } + }); + + btnUploadStarten.setBounds(102, 200, 173, 23); + contentPanel.add(btnUploadStarten); + + progressBar = new JProgressBar(0, 100); + progressBar.setStringPainted(true); + + progressBar.setBounds(102, 234, 485, 30); + contentPanel.add(progressBar); + + JLabel lblUploadgeschwindigkeit = new JLabel("Uploadgeschwindigkeit:"); + lblUploadgeschwindigkeit.setBounds(102, 275, 141, 14); + contentPanel.add(lblUploadgeschwindigkeit); + + JLabel label_1 = new JLabel("Fertig:"); + label_1.setBounds(102, 325, 46, 14); + contentPanel.add(label_1); + + labelfertig = new JLabel("0"); + labelfertig.setBounds(183, 325, 108, 14); + contentPanel.add(labelfertig); + + UpSpeed = new JLabel("0"); + UpSpeed.setBounds(374, 275, 117, 14); + contentPanel.add(UpSpeed); + + JLabel label_4 = new JLabel("von:"); + label_4.setBounds(318, 325, 46, 14); + contentPanel.add(label_4); + + labelfilesize = new JLabel("0"); + labelfilesize.setBounds(374, 325, 117, 14); + contentPanel.add(labelfilesize); + + JLabel label_6 = new JLabel("Verbleibend:"); + label_6.setBounds(102, 350, 71, 14); + contentPanel.add(label_6); + + JLabel label_7 = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:"); + label_7.setBounds(102, 300, 150, 14); + contentPanel.add(label_7); + + labelZeit = new JLabel("0"); + labelZeit.setBounds(374, 300, 117, 14); + contentPanel.add(labelZeit); + + labelverbleibend = new JLabel("0"); + labelverbleibend.setBounds(183, 350, 108, 14); + contentPanel.add(labelverbleibend); + + JPanel panel = new JPanel(); + panel.setLayout(null); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + contentPanel.add(panel); + + JLabel lblUploadIhresImage = new JLabel("Upload Ihres Image"); + lblUploadIhresImage.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblUploadIhresImage.setBounds(10, 11, 509, 22); + panel.add(lblUploadIhresImage); + + JTextPane txtpnFhreSieBitte = new JTextPane(); + txtpnFhreSieBitte + .setText("F\u00FChre Sie bitte die folgenden 3 Schritte aus um Ihr Image auf unseren Server zu laden."); + txtpnFhreSieBitte.setEditable(false); + txtpnFhreSieBitte.setBackground(SystemColor.menu); + txtpnFhreSieBitte.setBounds(10, 36, 509, 32); + panel.add(txtpnFhreSieBitte); + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 79, 597, 2); + contentPanel.add(separator); + + JLabel lblNewLabel_1 = new JLabel("Hauptmen\u00FC"); + lblNewLabel_1.setForeground(Color.BLUE); + lblNewLabel_1.setBounds(20, 88, 61, 20); + contentPanel.add(lblNewLabel_1); + + JLabel label_3 = new JLabel(">"); + label_3.setBounds(80, 91, 14, 14); + contentPanel.add(label_3); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(91, 88, 46, 20); + contentPanel.add(lblVlimage); + + JLabel label_5 = new JLabel(">"); + label_5.setBounds(139, 91, 14, 14); + contentPanel.add(label_5); + + JLabel lblNeubearbeiten = new JLabel("Bearbeiten"); + lblNeubearbeiten.setBounds(149, 91, 108, 14); + contentPanel.add(lblNeubearbeiten); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + contentPanel.add(separator_1); + + btnCopyFileTo.setEnabled(false); + btnCopyFileTo.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + client.startFileCopy(user.path + "/" + uploadFile.getName()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); + btnCopyFileTo.setBounds(102, 375, 173, 23); + contentPanel.add(btnCopyFileTo); + + JLabel lblSchritt_1 = new JLabel("Schritt 1:"); + lblSchritt_1.setBounds(24, 128, 57, 14); + contentPanel.add(lblSchritt_1); + + JLabel lblSchritt_2 = new JLabel("Schritt 2:"); + lblSchritt_2.setBounds(24, 204, 57, 14); + contentPanel.add(lblSchritt_2); + + JLabel label = new JLabel("Schritt 3:"); + label.setBounds(20, 423, 57, 14); + contentPanel.add(label); + + JLabel label_2 = new JLabel("Klicken Sie auf \"Fertigstellen\"."); + label_2.setBounds(98, 423, 241, 14); + contentPanel.add(label_2); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(UIManager.getColor("Button.background")); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + + finishButton.setEnabled(false); + finishButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + updateData(); + dispose(); + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + + if (taskrun == true) { + try { + client.DeleteFtpUser(user.userName); + + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + task.cancel(true); + } + thrift.closeThriftConnection(); + } + }); + btnZurck.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + dispose(); + EditImageTechnisch_GUI ei = new EditImageTechnisch_GUI(); + ei.setVisible(true); + } + }); + + btnZurck.setActionCommand("Cancel"); + buttonPane.add(btnZurck); + finishButton.setActionCommand("Cancel"); + buttonPane.add(finishButton); + } + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnHillfe = new JMenu("Hillfe"); + menuBar.add(mnHillfe); + setVisible(true); + + } + + private void buttonUploadActionPerformed(ActionEvent event) { + + progressBar.setValue(0); + btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick + btnUploadStarten.setText("Bitte warten"); + + try { + user = client.getFtpUser(); + System.out.println("FTP name" + user.userName); + System.out.println("FTP path" + user.path); + System.out.println("FTP pass" + user.password); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + Image.image.setNewName(formatter.format(new Date()) + "_" + + person.verantwortlicher.getHochschule() + "_" + + person.verantwortlicher.getUsername() + "_" + + Image.image.getImagename() + ".vmdk"); + task = new UploadTask(host, port, user.userName, user.password, + user.path, uploadFile); + + task.addPropertyChangeListener(this); + task.execute(); + taskrun = true; + + } + + public void propertyChange(PropertyChangeEvent arg0) { + if ("progress" == arg0.getPropertyName()) { + progress = (Integer) arg0.getNewValue(); + progressBar.setValue(progress); + + // Button zum Fertigstellen freischalten, wenn 100% erreicht sind + if (progress == 0 || progress == 100) { + // not uploading currently + btnZurck.setEnabled(true); + } else { + // currently uploading, don't let user interact + btnZurck.setEnabled(false); + } + + // Fertigstellen erlauben wenn upload abgeschlossen + if (progress == 100) { + finishButton.setEnabled(true); + } else { + finishButton.setEnabled(false); + } + } + + + + if ("speed" == arg0.getPropertyName()) { + speed = (double) arg0.getNewValue(); + // if(speed<=1){ + + UpSpeed.setText(String.valueOf(speed).substring(0, + String.valueOf(speed).lastIndexOf(".") + 3) + + " MB/s"); + + } + if ("bytesread" == arg0.getPropertyName()) { + bytesread = (long) arg0.getNewValue(); + labelfertig.setText((bytesread / 1024 / 1024) + " MB"); + labelverbleibend + .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) + + " MB"); + + labelZeit + .setText(String + .valueOf( + ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1) + .substring( + 0, + String.valueOf( + (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + .lastIndexOf(".")) + + " Minuten"); + + } + if ("filesize" == arg0.getPropertyName()) { + filesize = (long) arg0.getNewValue(); + labelfilesize.setText((filesize / 1024 / 1024) + " MB"); + + } + + } + + public boolean updateData() { + + try { + client.updateImageData(Image.image.getImagename(), + Image.image.getNewName(), Image.image.isLicensed(), + Image.image.isInternet(), Image.image.getRam(), + Image.image.getCpu(), Image.image.getImageId(), + Image.image.getVersion()); + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + return true; + + } +}
\ No newline at end of file diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java new file mode 100644 index 00000000..e6bb055e --- /dev/null +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -0,0 +1,520 @@ +package gui.image; + +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_GUI; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.Iterator; +import java.util.List; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.RowFilter; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; +import models.Image; +import models.person; +//import models.person; + +import org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class SearchEditImage_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox<String> comboBox; + JTable tableAllImages; + JTable tablemyImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); + final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( + modelAll); + final TableRowSorter<TableModel> rowSorterMyImages = new TableRowSorter<TableModel>( + modelMyImages); + + /** + * Launch the application. + * + * public static void main(String[] args) { try { SearchEditImage_GUI dialog + * = new SearchEditImage_GUI(); + * dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + * dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } + */ + + /** + * Create the dialog. + */ + public SearchEditImage_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + // Beendet die Anwendung nach klick auf X + con.closeThriftConnection(); + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + textFieldName.requestFocusInWindow(); + } + }); + // Verhindert das Vergrößern Des Fensters + setResizable(false); + + try { + // Setzt das Look & Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // Setzt den Fenstertitel + setTitle("bwLehrpool Suite *Prototyp*"); + // Zentriert das Fenster in die Bildmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + final DefaultTableModel model = new DefaultTableModel(titles, 0); + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Suche nach VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + // Key Listener der Tastatureingabe registriert + textFieldName.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + // Textfield eingabe auslesen + String stext = textFieldName.getText(); + + // Wenn Textfield nicht leer + if (stext != "") { + // Filtere nach der Eingabe + rowSorterAll.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + + } + } + }); + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel( + "<html><u>Erweiterte Suche</u></html>"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + // Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox<String>(); + try { + // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List<String> list = client.getAllOS(); + // Leeres Item hinzufügen + comboBox.addItem(""); + for (int i = 0; i < list.size(); i++) { + // Hinzufügen der verfügbaren Betriebssysteme + comboBox.addItem(list.get(i)); + } + } catch (TException e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + } + // Registriert Auswahländerungen der Box + comboBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + // Prüft das die Auswahl nicht leer ist + if (comboBox.getSelectedItem().toString() != "") { + // Filtert nach dem ausgewählten Betriebssystem + rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox + .getSelectedItem().toString(), 2)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + comboBox.getSelectedItem().toString(), 2)); + } + } + + }); + comboBox.setBounds(270, 58, 250, 20); + panel_1.add(comboBox); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @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); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if (tabbedPane.getSelectedIndex() == 0) { + + String username = person.verantwortlicher.getName() + " " + + person.verantwortlicher.getVorname(); + // String username="Spitzer Tobias"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + username, 4)); + } else if (tabbedPane.getSelectedIndex() == 1) { + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + initTableModel(modelMyImages); + + JScrollPane scrollPaneAllImages = new JScrollPane(); + tableAllImages = new JTable(); + tableAllImages.setModel(modelAll); + tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); + initTableModel(modelAll); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyImages = new JTable(); + tablemyImages.setModel(modelMyImages); + tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); + tablemyImages.setRowSorter(rowSorterMyImages); + + scrollPaneMyImage.setViewportView(tablemyImages); + tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); + tableAllImages.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + JScrollPane scrollPaneCoopImages = new JScrollPane(); + JTable tableCoopImages = new JTable(); + tableCoopImages.setModel(model); + tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPaneCoopImages.setViewportView(tableCoopImages); + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, + null); + tabbedPane.setEnabledAt(2, false); + + JScrollPane scrollPanePublicImages = new JScrollPane(); + JTable tablePublicImages = new JTable(); + tablePublicImages.setModel(model); + tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicImages.setViewportView(tablePublicImages); + tabbedPane.addTab("\u00D6ffentliche Images", null, + scrollPanePublicImages, null); + tabbedPane.setEnabledAt(3, false); + + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); + JTable tablePublicVorlagen = new JTable(); + tablePublicVorlagen.setModel(model); + tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, + scrollPanePublicVorlagen, null); + tabbedPane.setEnabledAt(4, false); + + JButton btnDownload = new JButton("Download"); + btnDownload.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + // Öffnet den Downloader + + if (tablemyImages.getSelectedRow() != -1) { + String imageid = modelMyImages.getValueAt( + tablemyImages.convertRowIndexToModel(tablemyImages + .getSelectedRow()), 7).toString(); + + Image.image.setImageId(imageid); + String imageversion = modelMyImages.getValueAt( + tablemyImages.convertRowIndexToModel(tablemyImages + .getSelectedRow()), 8).toString(); + + Image.image.setVersion(imageversion); + SearchEditImage_GUI.this.setVisible(false); + FTPDownloader_GUI down = new FTPDownloader_GUI(); + down.setVisible(true); + con.closeThriftConnection(); + + } else { + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image für den Download aus", + "Message", JOptionPane.INFORMATION_MESSAGE); + } + } + }); + btnDownload.setBounds(449, 508, 118, 23); + contentPanel.add(btnDownload); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton okButton = new JButton("Zur\u00FCck"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // Öffnet das Hauptmenü + con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + dispose(); + } + }); + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + { + 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) { + //check if a row is selected + if (tablemyImages.getSelectedRow() != -1) { + String imageid = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .getSelectedRow()), + 7).toString(); + + Image.image.setImageId(imageid); + String imageversion = modelMyImages + .getValueAt( + tablemyImages + .convertRowIndexToModel(tablemyImages + .getSelectedRow()), + 8).toString(); + + Image.image.setVersion(imageversion); + con.closeThriftConnection(); + EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); + ea.setVisible(true); + dispose(); + } else { + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", JOptionPane.INFORMATION_MESSAGE); + }// end check if row is selected + } else { + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein eigenes Image aus.", + "Image Auswahl", JOptionPane.INFORMATION_MESSAGE); + }//end check if correct tab is selected + } + }); + cancelButton.setActionCommand("Cancel"); + buttonPane.add(cancelButton); + } + } + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 78, 597, 2); + getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + getContentPane().add(separator_1); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnNewMenu_1.add(mntmFaq); + + JMenuItem mntmOtrs = new JMenuItem("OTRS"); + mnNewMenu_1.add(mntmOtrs); + + } + + // Initiale Beffülung eines Table models + public DefaultTableModel initTableModel(DefaultTableModel model) { + List<server.Image> images; + try { + // Hole eine Liste der Images + images = client.getImageList(); + + Iterator<server.Image> i = images.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime(), "", images.get(x).id, + images.get(x).getVersion() }; + // Füge diese Objekte der Tabelle hinzu + model.addRow(obj); + x++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + +} diff --git a/Dozentenmodul/src/gui/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchImage_GUI.java index 840f283c..493230d3 100644 --- a/Dozentenmodul/src/gui/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchImage_GUI.java @@ -1,6 +1,7 @@ -package gui; - +package gui.image; +import gui.intro.MainMenue_GUI; +import gui.lecture.ExtendedSearchForImages_GUI; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -17,8 +18,6 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.Iterator; import java.util.List; -import java.util.Map; - import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JDialog; @@ -46,16 +45,13 @@ import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; -import models.Image; -import models.person; - import org.apache.thrift.TException; import server.Server.Client; import thrift.ThriftConnection; @SuppressWarnings("serial") -public class SearchEditImage_GUI extends JFrame { +public class SearchImage_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -66,20 +62,23 @@ public class SearchEditImage_GUI extends JFrame { JTable tablemyImages; private JTextField textFieldName; JTabbedPane tabbedPane; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); - final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( modelAll ); - final TableRowSorter<TableModel> rowSorterMyImages = new TableRowSorter<TableModel>( modelMyImages ); - + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel modelMyImages = new DefaultTableModel(titles, 0); + final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( + modelAll); + final TableRowSorter<TableModel> rowSorterMyImages = new TableRowSorter<TableModel>( + modelMyImages); + /** * Launch the application. */ public static void main(String[] args) { try { - SearchEditImage_GUI dialog = new SearchEditImage_GUI(); + SearchImage_GUI dialog = new SearchImage_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -90,38 +89,35 @@ public class SearchEditImage_GUI extends JFrame { /** * Create the dialog. */ - public SearchEditImage_GUI() { + public SearchImage_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung nach klick auf X + // Beendet die Anwendung nach klick auf X System.exit(0); } }); - //Verhindert das Vergrößern Des Fensters + // Verhindert das Vergrößern Des Fensters setResizable(false); - + try { - //Setzt das Look & Feel auf System + // Setzt das Look & Feel auf System UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { // TODO Auto-generated catch block e.printStackTrace(); } - //Setzt den Fenstertitel + // Setzt den Fenstertitel setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster in die Bildmitte + // Zentriert das Fenster in die Bildmitte Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; setBounds(left, top, 603, 722); - - - final DefaultTableModel model = new DefaultTableModel( titles, 0 ); - - + final DefaultTableModel model = new DefaultTableModel(titles, 0); + getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -135,11 +131,12 @@ public class SearchEditImage_GUI extends JFrame { panel.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); } - + JTextPane txtpnBitteWhlenSie = new JTextPane(); txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); panel.add(txtpnBitteWhlenSie); } @@ -148,145 +145,145 @@ public class SearchEditImage_GUI extends JFrame { contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel); contentPanel.setLayout(null); - + JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 49, 557, 131); contentPanel.add(panel_1); panel_1.setLayout(null); - + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); lblNewLabel_2.setBounds(10, 30, 250, 20); panel_1.add(lblNewLabel_2); - + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); - + textFieldName = new JTextField(); - //Key Listener der Tastatureingabe registriert + // Key Listener der Tastatureingabe registriert textFieldName.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { - //Textfield eingabe auslesen - String stext=textFieldName.getText(); - - //Wenn Textfield nicht leer - if(stext!="") - { - //Filtere nach der Eingabe - rowSorterAll.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - - } - }}); + // Textfield eingabe auslesen + String stext = textFieldName.getText(); + // Wenn Textfield nicht leer + if (stext != "") { + // Filtere nach der Eingabe + rowSorterAll.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + + } + } + }); textFieldName.setBounds(270, 30, 250, 20); panel_1.add(textFieldName); textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("<html><u>Erweiterte Suche</u></html>"); + + JLabel lblErweiterteSuche = new JLabel( + "<html><u>Erweiterte Suche</u></html>"); lblErweiterteSuche.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + // Öffnet das Fenster Extended GUI + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); lblErweiterteSuche.setForeground(Color.BLUE); - + lblErweiterteSuche.setBounds(431, 106, 89, 14); panel_1.add(lblErweiterteSuche); - + comboBox = new JComboBox<String>(); try { - //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List<String> list=client.getAllOS(); - //Leeres Item hinzufügen + // Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List<String> list = client.getAllOS(); + // Leeres Item hinzufügen comboBox.addItem(""); - for(int i=0;i<list.size();i++) - { - //Hinzufügen der verfügbaren Betriebssysteme + for (int i = 0; i < list.size(); i++) { + // Hinzufügen der verfügbaren Betriebssysteme comboBox.addItem(list.get(i)); } } catch (TException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } - //Registriert Auswahländerungen der Box + // Registriert Auswahländerungen der Box comboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - //Prüft das die Auswahl nicht leer ist - if(comboBox.getSelectedItem().toString()!="") - { - //Filtert nach dem ausgewählten Betriebssystem - rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox.getSelectedItem().toString(), 2)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(comboBox.getSelectedItem().toString(), 2)); - } + // Prüft das die Auswahl nicht leer ist + if (comboBox.getSelectedItem().toString() != "") { + // Filtert nach dem ausgewählten Betriebssystem + rowSorterAll.setRowFilter(RowFilter.regexFilter(comboBox + .getSelectedItem().toString(), 2)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + comboBox.getSelectedItem().toString(), 2)); + } } - + }); comboBox.setBounds(270, 58, 250, 20); panel_1.add(comboBox); - + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - //Öffnet das Hauütmenü - SearchEditImage_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); + // Öffnet das Hauütmenü + SearchImage_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); } }); lblHauptmen.setForeground(Color.BLUE); lblHauptmen.setBounds(10, 11, 61, 14); contentPanel.add(lblHauptmen); - + JLabel label_1 = new JLabel(">"); label_1.setBounds(69, 11, 13, 14); contentPanel.add(label_1); - + JLabel lblVlimage = new JLabel("VL-Image"); lblVlimage.setForeground(Color.BLUE); lblVlimage.setBounds(81, 11, 45, 14); contentPanel.add(lblVlimage); - + JLabel label_2 = new JLabel(">"); label_2.setBounds(133, 11, 13, 14); contentPanel.add(label_2); - + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); lblNewLabel_1.setBounds(146, 11, 85, 14); contentPanel.add(lblNewLabel_1); - + tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { System.out.println(tabbedPane.getSelectedIndex()); - if(tabbedPane.getSelectedIndex()==0){ - - - - } - else if(tabbedPane.getSelectedIndex()==1){ - String username="Spitzer Tobias"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); - - //rowSorterMyImages.toggleSortOrder(0); + if (tabbedPane.getSelectedIndex() == 0) { + + } else if (tabbedPane.getSelectedIndex() == 1) { + String username = "Spitzer Tobias"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter( + username, 4)); + // rowSorterMyImages.toggleSortOrder(0); } - + } }); tabbedPane.setBounds(10, 197, 557, 300); contentPanel.add(tabbedPane); - + JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages=new JTable(); + tablemyImages = new JTable(); tablemyImages.setModel(modelMyImages); tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -295,9 +292,9 @@ public class SearchEditImage_GUI extends JFrame { tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); initTableModel(modelMyImages); tablemyImages.setRowSorter(rowSorterMyImages); - + JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages=new JTable(); + tableAllImages = new JTable(); tableAllImages.setModel(modelAll); tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -306,15 +303,15 @@ public class SearchEditImage_GUI extends JFrame { tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); initTableModel(modelAll); tableAllImages.setRowSorter(rowSorterAll); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); scrollPaneMyImage.setViewportView(tablemyImages); tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - + JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages=new JTable(); + JTable tableCoopImages = new JTable(); tableCoopImages.setModel(model); tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -323,11 +320,12 @@ public class SearchEditImage_GUI extends JFrame { tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null); + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, + null); tabbedPane.setEnabledAt(2, false); - + JScrollPane scrollPanePublicImages = new JScrollPane(); - JTable tablePublicImages=new JTable(); + JTable tablePublicImages = new JTable(); tablePublicImages.setModel(model); tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -336,11 +334,12 @@ public class SearchEditImage_GUI extends JFrame { tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicImages.setViewportView(tablePublicImages); - tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null); + tabbedPane.addTab("\u00D6ffentliche Images", null, + scrollPanePublicImages, null); tabbedPane.setEnabledAt(3, false); - + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); - JTable tablePublicVorlagen=new JTable(); + JTable tablePublicVorlagen = new JTable(); tablePublicVorlagen.setModel(model); tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -349,19 +348,17 @@ public class SearchEditImage_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); - tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, + scrollPanePublicVorlagen, null); tabbedPane.setEnabledAt(4, false); - - - JButton btnDownload = new JButton("Download"); btnDownload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); + // Öffnet den Downloader + FTPDownloader_GUI down = new FTPDownloader_GUI(); down.setVisible(true); - SearchEditImage_GUI.this.setVisible(false); + SearchImage_GUI.this.setVisible(false); } }); btnDownload.setBounds(449, 508, 118, 23); @@ -373,80 +370,84 @@ public class SearchEditImage_GUI extends JFrame { buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane); { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { + JButton cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - //Öffnet das Hauptmenü - - MainMenue_GUI main=new MainMenue_GUI(); + // Öffnet das Hauptmenü + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); } }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); + cancelButton.setActionCommand("OK"); + buttonPane.add(cancelButton); + getRootPane().setDefaultButton(cancelButton); } { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { + con.closeThriftConnection(); - String imagename=modelMyImages.getValueAt(tablemyImages.convertRowIndexToModel(tablemyImages.getSelectedRow()), 0).toString(); - Image.image.setImagename(imagename); - EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); + EditImageAllgemein_GUI ea = new EditImageAllgemein_GUI(); ea.setVisible(true); - dispose(); + dispose(); + } }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); + continueButton.setActionCommand("Cancel"); + buttonPane.add(continueButton); } } - + JSeparator separator = new JSeparator(); separator.setBounds(0, 78, 597, 2); getContentPane().add(separator); - + JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); - + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); - + JMenu mnNewMenu_1 = new JMenu("Hilfe"); menuBar.add(mnNewMenu_1); - + JMenuItem mntmFaq = new JMenuItem("FAQ"); mnNewMenu_1.add(mntmFaq); - + JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); - + } - //Initiale Beffülung eines Table models - public DefaultTableModel initTableModel(DefaultTableModel model){ + + // Initiale Beffülung eines Table models + public DefaultTableModel initTableModel(DefaultTableModel model) { List<server.Image> images; try { - //Hole eine Liste der Images + // Hole eine Liste der Images + images = client.getImageList(); - - Iterator<server.Image> i=images.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime()}; - //Füge diese Objekte der Tabelle hinzu + Iterator<server.Image> i = images.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime() }; + // Füge diese Objekte der Tabelle hinzu model.addRow(obj); x++; i.next(); - + } - + return model; } catch (TException e1) { // TODO Auto-generated catch block @@ -454,7 +455,5 @@ public class SearchEditImage_GUI extends JFrame { } return model; } - - } - +} diff --git a/Dozentenmodul/src/GUI/BillOfRights_GUI.java b/Dozentenmodul/src/gui/intro/BillOfRights_GUI.java index a18ce291..e4f37871 100644 --- a/Dozentenmodul/src/GUI/BillOfRights_GUI.java +++ b/Dozentenmodul/src/gui/intro/BillOfRights_GUI.java @@ -1,4 +1,5 @@ -package gui; +package gui.intro; + import java.awt.Dimension; import java.awt.FlowLayout; diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java new file mode 100644 index 00000000..e2db747e --- /dev/null +++ b/Dozentenmodul/src/gui/intro/Login_GUI.java @@ -0,0 +1,261 @@ +package gui.intro; + + +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Image; +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 java.io.File; +import java.io.IOException; +import java.nio.channels.SeekableByteChannel; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; + +import models.SessionData; +import models.person; +import org.apache.thrift.TException; +import org.ini4j.Wini; +import thrift.MasterThriftConnection; +import thrift.ImageServer.Client; +import thrift.UserInfo; + +import config.config_file; + +@SuppressWarnings("serial") +public class Login_GUI extends JFrame { + + private JPanel contentPane; + private JTextField username; + private JPasswordField pass; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + // Prüfe und Erzeuge gegebenfalls Config + config_file cf = new config_file(); + boolean conf = cf.createConfig(); + if (conf == true) { + // Aufruf und Anzeige des Login Fensters + Login_GUI frame = new Login_GUI(); + frame.setVisible(true); + } else { + JOptionPane.showMessageDialog(null, + "Fehler beim erzeugen der Konfigurationsfile", + "Message", JOptionPane.ERROR_MESSAGE); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Login_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + // Fenster darf nicht vergrößert werden + setResizable(false); + try { + // Setzt das Look and Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // Titel des Fensters setzen + setTitle("Dozentenmodul *Prototyp*"); + // Aktion die beim Schließen durchgeführt werden soll + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + // Größe des Fensters definieren + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 400) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 400); + // Erzeugen eines Panels + contentPane = new JPanel(); + // Hintergrund Farbe des Panels setzen + contentPane.setBackground(SystemColor.menu); + // Rahmen des Fensters setzen + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + // Layout setzen + contentPane.setLayout(null); + // Label für das Logo erzeugen + JLabel imgLabel = new JLabel(); + // Größe und Position des Logos festelegen + imgLabel.setBounds(150, 11, 350, 142); + // Pfadangabe des Logos + + ImageIcon icon = new ImageIcon(getClass().getResource( + "/Logo_bwLehrpool.png"), "Logo"); + // Skalierung des Logos + Image scaled = icon.getImage().getScaledInstance(270, 64, 0); + imgLabel.setIcon(new ImageIcon(scaled)); + // Hinzufügen des Logos in das Fenster + contentPane.add(imgLabel); + + // Erzeugen und Hinzufügen des Labels + JLabel LabelUser = new JLabel("bwIDM-Benutzername:"); + LabelUser.setBounds(111, 164, 134, 20); + contentPane.add(LabelUser); + + // Erzeugen und Hinzufügen des Textfeldes + username = new JTextField(); + username.setToolTipText("Bitte geben Sie Ihren bwIDM-Benutzernamen ein."); + username.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + performLogin(); + } + }); + username.setBounds(304, 164, 196, 20); + contentPane.add(username); + username.setColumns(10); + + // Erzeugen und Hinzufügen des Labels + JLabel LabelPass = new JLabel("bwIDM-Passwort:"); + LabelPass.setBounds(111, 195, 134, 20); + contentPane.add(LabelPass); + + // Erzeugen, Hinzufügen und definierung der Aktion des Buttons + JButton BtnLogin = new JButton("Login"); + BtnLogin.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + performLogin(); + }// end actionPerformed + }); + + BtnLogin.setBounds(304, 244, 196, 23); + contentPane.add(BtnLogin); + + // Erzeugen und Hinzufügen des Passwortfeldes + pass = new JPasswordField(); + pass.setToolTipText("Bitte geben Sie Ihr bwIDM-Passwort ein."); + pass.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + performLogin(); + } + }); + pass.setBounds(304, 195, 196, 20); + contentPane.add(pass); + }// end LoginGUI() + + //Versuche den Benutzer einzuloggen + public void performLogin() { + // Aufruf der Ldap Klasse, welche die Ldap überprüfung vornimmt + // Ldap check=new Ldap(); + boolean login = true; + // boolean login=check.LdapAuth(username.getText(), new + // String(pass.getPassword())); + MasterThriftConnection thrift = new MasterThriftConnection(); + Client client = thrift.getMasterThriftConnection(); + String token = null; + final thrift.SessionData result; + try { + String passText = new String(pass.getPassword()); + System.out.println("Benutzer:" +username.getText() + "\nPasswort" + passText); + result = client.authenticate(username.getText(), passText); + SessionData.session.setAuthToken(result.authToken); + SessionData.session.setSessionID(result.sessionId); + SessionData.session.setServerAdress(result.serverAddress); + System.out.println("Server Adresse: "+result.serverAddress); + + } catch (thrift.AuthenticationException e) { + System.out.println("Authentifizierung fehlgeschlagen: " + e.message); + JOptionPane.showMessageDialog(null, + "Benutzeranmeldung fehlgeschlagen: Bitte Benutzername und Passwort überprüfen.", + "Anmeldung fehlgeschlagen", + JOptionPane.ERROR_MESSAGE); + + return; + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return; + } + System.out + .println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " + + result.sessionId + + ", mein Token für den Satelliten " + + result.authToken); + token = result.authToken; + if (login == true) { + + try { + Wini ini = new Wini(new File("C:\\Users\\" + + System.getProperty("user.name") + + "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); + // Prüfe ob Bills Of Rights schon akzeptiert wurden, wenn nicht + // zeige diese an + if (ini.get("main", "BillOfRights", boolean.class) == false) { + // Erstellen einer Instanz der Aktionsauswahl + BillOfRights_GUI re = new BillOfRights_GUI(); + re.setVisible(true); + // Schließen des Fensters nach erfolgreichen Login + setVisible(false); + } else { + // Prüfe ob die Links zu vmware angezeigt werden sollen + if (ini.get("main", "vmware", boolean.class) == false) { + VmWareLink_GUI vm = new VmWareLink_GUI(); + vm.setVisible(true); + setVisible(false); + } else { + UserInfo user = client.getUserFromToken(token); + + String hochschule = user.eMail.substring(user.eMail + .indexOf("@") + 1, user.eMail.indexOf(".", + user.eMail.indexOf("@"))); + // System.out.println("hochschule="+hochschule); + + person.verantwortlicher.setUsername(username.getText()); + person.verantwortlicher.setName(user.lastName); + person.verantwortlicher.setVorname(user.firstName); + person.verantwortlicher.setEMail(user.eMail); + person.verantwortlicher.setHochschule(hochschule); + + // Öffne das Hauprmenü + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + setVisible(false); + } + } + } catch (IOException | TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } else { + JOptionPane.showMessageDialog(null, "Login denied!", "Message", + JOptionPane.INFORMATION_MESSAGE); + } + }// end performLogin + +}// end class diff --git a/Dozentenmodul/src/gui/intro/MainMenue_GUI.java b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java new file mode 100644 index 00000000..9965002c --- /dev/null +++ b/Dozentenmodul/src/gui/intro/MainMenue_GUI.java @@ -0,0 +1,405 @@ +package gui.intro; + +import gui.image.*; +import gui.lecture.*; +import java.awt.Dimension; +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; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextPane; +import java.awt.SystemColor; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JSeparator; +import javax.swing.JRadioButton; +import javax.swing.SwingConstants; +import javax.swing.ButtonGroup; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.ToolTipManager; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.border.TitledBorder; +import java.awt.ScrollPane; +import javax.swing.JTextArea; +import javax.swing.ImageIcon; + +@SuppressWarnings("serial") +public class MainMenue_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + String descNewImage, descEditImage, descDeleteImage, descSearchImage, + descNewLecture, descEditLecture, descDeleteLecture, + descSearchLecture = ""; + JRadioButton rdbtnImageNew; + JRadioButton rdbtnImageEdit; + JRadioButton rdbtnImageSearchDownload; + JRadioButton rdbtnVeranstaltungNew; + JRadioButton rdbtnImageDelete; + JRadioButton rdbtnVeranstaltungEdit; + 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. + */ + public MainMenue_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + }); + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + setTitle("bwLehrpool Suite *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + // setBounds(100, 100, 545, 366); + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 567, 69); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Hauptmen\u00FC"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Bitte w\u00E4hlen Sie ihre gew\u00FCnschte Aktion."); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 22); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 104, 567, 502); + contentPanel.setBackground(SystemColor.menu); + + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panelImage = new JPanel(); + panelImage.setBackground(SystemColor.menu); + panelImage.setBorder(new TitledBorder(null, "VL-Image", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelImage.setBounds(10, 146, 270, 170); + contentPanel.add(panelImage); + panelImage.setLayout(null); + + rdbtnImageNew = new JRadioButton("Neu"); + rdbtnImageNew + .setToolTipText("Hier k\u00F6nnen Sie eine standard Laborvorlage downloaden"); + rdbtnImageNew.setBounds(6, 22, 159, 23); + panelImage.add(rdbtnImageNew); + rdbtnImageNew.setSelected(true); + buttonGroup.add(rdbtnImageNew); + rdbtnImageNew.setBackground(SystemColor.menu); + + rdbtnImageEdit = new JRadioButton("Bearbeiten"); + rdbtnImageEdit + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageEdit.setBounds(6, 48, 185, 23); + panelImage.add(rdbtnImageEdit); + buttonGroup.add(rdbtnImageEdit); + rdbtnImageEdit.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageEdit.setBackground(SystemColor.menu); + + rdbtnImageDelete = new JRadioButton("L\u00F6schen"); + rdbtnImageDelete.setEnabled(false); + buttonGroup.add(rdbtnImageDelete); + rdbtnImageDelete + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageDelete.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageDelete.setBackground(SystemColor.menu); + rdbtnImageDelete.setBounds(6, 74, 185, 23); + panelImage.add(rdbtnImageDelete); + + rdbtnImageSearchDownload = new JRadioButton("Suche und Download"); + rdbtnImageSearchDownload.setEnabled(false); + buttonGroup.add(rdbtnImageSearchDownload); + rdbtnImageSearchDownload + .setToolTipText("Hier k\u00F6nnen Sie ein bestehendes Labor zum ver\u00E4ndern downloaden"); + rdbtnImageSearchDownload.setHorizontalAlignment(SwingConstants.LEFT); + rdbtnImageSearchDownload.setBackground(SystemColor.menu); + rdbtnImageSearchDownload.setBounds(6, 100, 185, 23); + panelImage.add(rdbtnImageSearchDownload); + + JPanel panelDesc = new JPanel(); + panelDesc.setLayout(null); + panelDesc.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "Erklärung", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelDesc.setBackground(SystemColor.menu); + panelDesc.setBounds(290, 146, 270, 170); + contentPanel.add(panelDesc); + + ScrollPane scrollPaneDesc = new ScrollPane(); + scrollPaneDesc.setBounds(10, 15, 250, 145); + final JTextArea txtDesc = new JTextArea(); + txtDesc.setLineWrap(true); + txtDesc.setWrapStyleWord(true); + txtDesc.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtDesc.setBackground(SystemColor.menu); + scrollPaneDesc.add(txtDesc); + // Pro AUswahl + txtDesc.setText("Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."); + panelDesc.add(scrollPaneDesc); + + JPanel panelVeranstaltung = new JPanel(); + panelVeranstaltung.setLayout(null); + panelVeranstaltung.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "Veranstaltung (VMChooser)", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelVeranstaltung.setBackground(SystemColor.menu); + panelVeranstaltung.setBounds(10, 327, 270, 170); + contentPanel.add(panelVeranstaltung); + + rdbtnVeranstaltungNew = new JRadioButton("Neu"); + buttonGroup.add(rdbtnVeranstaltungNew); + rdbtnVeranstaltungNew + .setToolTipText("Hier k\u00F6nnen Sie Ihre Labordaten eingeben"); + rdbtnVeranstaltungNew.setBounds(6, 24, 185, 23); + panelVeranstaltung.add(rdbtnVeranstaltungNew); + rdbtnVeranstaltungNew.setBackground(SystemColor.menu); + + rdbtnVeranstaltungEdit = new JRadioButton("Bearbeiten"); + rdbtnVeranstaltungEdit + .setToolTipText("Hier k\u00F6nnen Sie einen Link auf ein bestehendes Labor erzeugen"); + rdbtnVeranstaltungEdit.setBounds(6, 50, 230, 23); + panelVeranstaltung.add(rdbtnVeranstaltungEdit); + buttonGroup.add(rdbtnVeranstaltungEdit); + rdbtnVeranstaltungEdit.setBackground(SystemColor.menu); + + JRadioButton rdbtnVeranstaltungDelete = new JRadioButton("L\u00F6schen"); + rdbtnVeranstaltungDelete.setEnabled(false); + rdbtnVeranstaltungDelete + .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); + rdbtnVeranstaltungDelete.setBounds(6, 76, 175, 23); + panelVeranstaltung.add(rdbtnVeranstaltungDelete); + buttonGroup.add(rdbtnVeranstaltungDelete); + rdbtnVeranstaltungDelete.setBackground(SystemColor.menu); + + JRadioButton rdbtnVeranstaltungSearch = new JRadioButton("Suche"); + rdbtnVeranstaltungSearch.setEnabled(false); + buttonGroup.add(rdbtnVeranstaltungSearch); + rdbtnVeranstaltungSearch + .setToolTipText("Hier k\u00F6nnen Sie ein Labor l\u00F6schen"); + rdbtnVeranstaltungSearch.setBackground(SystemColor.menu); + rdbtnVeranstaltungSearch.setBounds(6, 102, 175, 23); + panelVeranstaltung.add(rdbtnVeranstaltungSearch); + + JPanel panelNews = new JPanel(); + panelNews.setLayout(null); + panelNews.setBorder(new TitledBorder(UIManager + .getBorder("TitledBorder.border"), "News", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panelNews.setBackground(SystemColor.menu); + panelNews.setBounds(290, 327, 270, 170); + contentPanel.add(panelNews); + + ScrollPane scrollPaneNews = new ScrollPane(); + // scrollPaneDesc.setBounds(10, 15, 250, 145); + scrollPaneNews.setBounds(10, 15, 250, 145); + JTextArea txtNews = new JTextArea(); + txtNews.setFont(new Font("Tahoma", Font.PLAIN, 11)); + txtNews.setBackground(SystemColor.menu); + txtNews.setWrapStyleWord(true); + txtNews.setLineWrap(true); + txtNews.setText("Hier werden mal die Neuigkeiten stehen. Diese kommen direkt vom Satelliten, sind als HS-spezifisch :)"); + scrollPaneNews.add(txtNews); + panelNews.add(scrollPaneNews); + + /* + * Funktion Texte für das Klicken der RadioButtons + */ + rdbtnImageNew.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + descNewImage = "Legen Sie ein neues Image an und laden Sie anschließend die passende .vmdk-Datei hoch. Ein Image (wenn auch von einem anderen Dozenten) ist die Voraussetzung für eine Veranstaltung."; + txtDesc.setText(descNewImage); + } + }); + rdbtnImageEdit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descEditImage = "Bearbeiten Sie die hinterlegten Informationen zu einem Image oder laden Sie eine neue .vmdk-Datei hoch."; + txtDesc.setText(descEditImage); + } + }); + rdbtnImageDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descDeleteImage = "Suchen Sie alte und nicht mehr benötigte Images und löschen Sie diese."; + txtDesc.setText(descDeleteImage); + } + }); + rdbtnImageSearchDownload.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descSearchImage = "Suchen Sie nach bestimmten Images oder verschaffen Sie sich einen Überblick über alle verfügbaren Images. Sie können gewünschte Images umgehend herunterladen."; + txtDesc.setText(descSearchImage); + } + }); + rdbtnVeranstaltungNew.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descNewLecture = "Legen Sie eine neue Veranstaltung an und verknüpfen Sie diese mit einem bereits vorhandenem Image. Ihre neue Veranstaltung kann auch auf dem Image eines anderen Dozenten beruhen."; + txtDesc.setText(descNewLecture); + } + }); + rdbtnVeranstaltungEdit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descEditLecture = "Bearbeiten Sie die hinterlegten Informationen zu einer Veranstaltung."; + txtDesc.setText(descEditLecture); + } + }); + rdbtnVeranstaltungDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descDeleteLecture = "Suchen und löschen Sie eine Veranstaltung. Das hiermit verbundene Image bleibt erhalten."; + } + }); + rdbtnVeranstaltungSearch.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + descSearchLecture = "Suchen Sie nach bestimmten Veranstaltungen oder verschaffen Sie sich einen Überblick über alle verfügbaren Veranstaltungen. Eventuell gibt es bereits etwas passendes für Ihre Vorlesung."; + txtDesc.setText(descSearchLecture); + } + }); + /* + * Ende der Radiobuttons + */ + + JLabel lblGrafik = new JLabel(""); + // ToolTipp für Grafik + lblGrafik + .setToolTipText("<html>" + + "Ein virtuelles Labor besteht immer aus den beiden Komponenten <br>" + + "Image und Veranstaltung. Ein Image ist dabei die Grundlage f\u00FCr <br>" + + "mehrere Veranstaltungen. Somit kann eine neue Veranstaltung <br>" + + "erstellt werden, ohne ein neues Image hochladen zu m\u00FCssen. <br> <br> <br>" + + "<b>Image:</b> Das Image enth\u00E4lt die ben\u00F6tigte Software, die im <br>" + + "virtuellen Labor ben\u00F6tigt wird. Es wird von genau einem Dozenten <br>" + + "angelegt und besitzt einen allgemeinen Namen, z.B. \"Programmieren\". <br>" + + "Bei einem Image handelt es sich um eine Datei vom Typ VMDK. <br> <br> <br>" + + "<b>Veranstaltung:</b> Es k\u00F6nnen nun, basierend auf einem Image,<br>" + + " beliebig viele Veranstaltungen von unterschiedlichen Dozenten erstellt <br>" + + "werden. Diese k\u00F6nnten z.B. konkret \"Web-Entwicklung\" oder \"K\u00FCnstliche <br>" + + "Intelligenz\" lauten und referenzieren dabei auf das allgemeine Image <br>" + + "\"Programmieren\".</html>"); + lblGrafik.setIcon(new ImageIcon(MainMenue_GUI.class + .getResource("/Image_zu_Veranstaltung_HDD.png"))); + // ToolTipp lange anzeigen - 60sec + ToolTipManager.sharedInstance().setDismissDelay(60000); + ToolTipManager.sharedInstance().registerComponent(lblGrafik); + lblGrafik.setBounds(82, 3, 391, 110); + contentPanel.add(lblGrafik); + + JTextPane txtpnUmDetaillierteInformationen = new JTextPane(); + txtpnUmDetaillierteInformationen + .setText("Um detaillierte Informationen zu erhalten, fahren Sie bitte mit der Maus \u00FCber die Grafik."); + txtpnUmDetaillierteInformationen.setEditable(false); + txtpnUmDetaillierteInformationen.setBackground(SystemColor.menu); + txtpnUmDetaillierteInformationen.setBounds(10, 113, 509, 22); + contentPanel.add(txtpnUmDetaillierteInformationen); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 630, 587, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton continueButton = new JButton("Weiter"); + + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if (rdbtnImageNew.isSelected() == true) { + CreateImageAllgemein_GUI sr = new CreateImageAllgemein_GUI(); + sr.setVisible(true); + dispose(); + } else if (rdbtnImageEdit.isSelected() == true) { + + SearchEditImage_GUI si = new SearchEditImage_GUI(); + si.setVisible(true); + dispose(); + } else if (rdbtnImageSearchDownload.isSelected() == true) { + SearchMethodLecture_GUI sm = new SearchMethodLecture_GUI(); + sm.setVisible(true); + dispose(); + } else if (rdbtnImageDelete.isSelected() == true) { + DeleteImage_GUI di = new DeleteImage_GUI(); + di.setVisible(true); + dispose(); + } else if (rdbtnVeranstaltungNew.isSelected() == true) { + CreateLectureAllgemein_GUI av = new CreateLectureAllgemein_GUI(); + av.setVisible(true); + dispose(); + } else if (rdbtnVeranstaltungEdit.isSelected() == true) { + //SearchEditLecture_GUI sl = new SearchEditLecture_GUI(); + EditLectureSearch_GUI el = new EditLectureSearch_GUI(); + el.setVisible(true); + dispose(); + } + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + getRootPane().setDefaultButton(continueButton); + } + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 617, 587, 2); + getContentPane().add(separator); + } + { + JSeparator separator = new JSeparator(); + separator.setBounds(0, 91, 587, 2); + getContentPane().add(separator); + } + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnNewMenu_1.add(mntmFaq); + + JMenuItem mntmOtrs = new JMenuItem("OTRS"); + mnNewMenu_1.add(mntmOtrs); + + }// end main + +}// end class diff --git a/Dozentenmodul/src/GUI/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java index 43df06a6..2f578e8b 100644 --- a/Dozentenmodul/src/GUI/VmWareLink_GUI.java +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -1,4 +1,5 @@ -package gui; +package gui.intro; + import java.awt.Desktop; import java.awt.Dimension; diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java new file mode 100644 index 00000000..026cb7c5 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/CreateLectureAllgemein_GUI.java @@ -0,0 +1,507 @@ +package gui.lecture; + +import gui.intro.MainMenue_GUI; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +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; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.JTextField; +import javax.swing.JTextPane; +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.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import java.util.Calendar; +import java.util.Date; + +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; + +@SuppressWarnings("serial") +public class CreateLectureAllgemein_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + private JTextField Vorname; + private JTextField Nachname; + private JTextField Hochschule; + private JTextField EMail; + private JTextField txtFldVeranstaltungsname; + JTextArea description; + JRadioButton radioButtonyes; + JRadioButton radioButtonno; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + Date startDate = new Date(); + Date endDate; + int maxLifeTime = 180; // Anzahl Tage, die eine Veranstaltung in der Zukunft + // aktiv sein darf + 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. + */ + public CreateLectureAllgemein_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + System.exit(0); + } + + @Override + public void windowOpened(WindowEvent arg0) { + txtFldVeranstaltungsname.requestFocusInWindow(); + } + }); + setResizable(false); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + setTitle("bwLehrpool Suite *Prototyp*"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + // setBounds(100, 100, 603, 722); + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Eingabe Ihrer Daten"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 493); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 331, 557, 162); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel label = new JLabel("Vorname: *"); + label.setBackground(SystemColor.menu); + label.setBounds(10, 33, 125, 20); + panel_1.add(label); + + Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setText(person.verantwortlicher.getVorname()); + Vorname.setBackground(Color.WHITE); + Vorname.setColumns(10); + Vorname.setBounds(145, 33, 350, 20); + panel_1.add(Vorname); + + JLabel label_7 = new JLabel("Nachname: *"); + label_7.setBackground(SystemColor.menu); + label_7.setBounds(10, 64, 125, 20); + panel_1.add(label_7); + + Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setText(person.verantwortlicher.getName()); + Nachname.setBackground(Color.WHITE); + Nachname.setColumns(10); + Nachname.setBounds(145, 64, 350, 20); + panel_1.add(Nachname); + + JLabel label_8 = new JLabel("Hochschule: *"); + label_8.setBackground(SystemColor.menu); + label_8.setBounds(10, 95, 125, 20); + panel_1.add(label_8); + + Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setText(person.verantwortlicher.getHochschule()); + Hochschule.setBackground(Color.WHITE); + Hochschule.setColumns(10); + Hochschule.setBounds(145, 95, 350, 20); + panel_1.add(Hochschule); + + JLabel label_9 = new JLabel("E-Mail: *"); + label_9.setBackground(SystemColor.menu); + label_9.setBounds(10, 126, 125, 20); + panel_1.add(label_9); + + EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setText(person.verantwortlicher.getEMail()); + EMail.setBackground(Color.WHITE); + EMail.setColumns(10); + EMail.setBounds(145, 126, 350, 20); + panel_1.add(EMail); + + JPanel panel = new JPanel(); + panel.setBounds(10, 402, 577, 33); + contentPanel.add(panel); + panel.setLayout(null); + panel.setBorder(new EmptyBorder(5, 5, 5, 5)); + panel.setBackground(SystemColor.menu); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + + CreateLectureAllgemein_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Neu"); + lblNewLabel_1.setBounds(146, 11, 46, 14); + contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Veranstaltungsdaten", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 36, 557, 284); + contentPanel.add(panel_2); + + JLabel label_3 = new JLabel("Laborname (Anzeigename): *"); + label_3.setBounds(10, 25, 180, 14); + panel_2.add(label_3); + + txtFldVeranstaltungsname = new JTextField(); + txtFldVeranstaltungsname.setColumns(10); + txtFldVeranstaltungsname.setBounds(200, 22, 347, 20); + txtFldVeranstaltungsname.setText(Lecture.lecture.getName()); + panel_2.add(txtFldVeranstaltungsname); + + JTextArea textArea = new JTextArea(); + textArea.setEditable(false); + textArea.setWrapStyleWord(true); + textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + textArea.setLineWrap(true); + textArea.setFont(new Font("Tahoma", Font.PLAIN, 12)); + textArea.setBackground(SystemColor.menu); + textArea.setBounds(10, 49, 537, 49); + panel_2.add(textArea); + + JLabel lblDesc = new JLabel("Beschreibung: *"); + lblDesc.setBounds(10, 111, 180, 14); + panel_2.add(lblDesc); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setFont(new Font("Tahoma", Font.PLAIN, 11)); + description.setLineWrap(true); + description.setText(Lecture.lecture.getDesc()); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + endDate = addDays(new Date(), maxLifeTime); // Datum darf weiter als 6 + // Monate in der Zukunft + // liegen + dateChooserend.setDate(endDate); + if (Lecture.lecture.getEnddate() == null) { + // is not defined yet + dateChooserend.setDate(endDate); + } else { + // already defined from last visit on this page + dateChooserend.setDate(Lecture.lecture.getEnddate()); + } + dateChooserend.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserend.setBounds(404, 188, 143, 20); + panel_2.add(dateChooserend); + + JLabel lblBis = new JLabel("bis:"); + lblBis.setBounds(378, 188, 21, 20); + panel_2.add(lblBis); + + dateChooserstart = new JDateChooser(); + if (Lecture.lecture.getStartdate() == null) { + // is not defined yet + dateChooserstart.setDate(startDate); + } else { + // already defined from last visit on this page + dateChooserstart.setDate(Lecture.lecture.getStartdate()); + } + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setBounds(226, 188, 143, 20); + panel_2.add(dateChooserstart); + + JLabel label_6 = new JLabel("von:"); + label_6.setBounds(200, 188, 30, 20); + panel_2.add(label_6); + + JLabel label_10 = new JLabel("G\u00FCltigkeitsdatum: *"); + label_10.setBounds(10, 194, 127, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 127, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + radioButtonyes.setSelected(true); + radioButtonyes.setBounds(200, 225, 73, 23); + panel_2.add(radioButtonyes); + + radioButtonno = new JRadioButton("Nein"); + radioButtonyes.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + radioButtonyes.setSelected(true); + radioButtonno.setSelected(false); + } + }); + radioButtonno.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + radioButtonno.setSelected(true); + radioButtonyes.setSelected(false); + } + }); + radioButtonno.setBounds(296, 225, 73, 23); + panel_2.add(radioButtonno); + + JLabel lblimVmchooserSichtbar = new JLabel("(im VMChooser sichtbar)"); + lblimVmchooserSichtbar.setBounds(10, 245, 127, 14); + panel_2.add(lblimVmchooserSichtbar); + + JLabel lblmaxMonate = new JLabel("(max. 6 Monate)"); + lblmaxMonate.setBounds(10, 208, 127, 14); + panel_2.add(lblmaxMonate); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton backButton = new JButton("Zur\u00FCck"); + backButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + MainMenue_GUI sr = new MainMenue_GUI(); + sr.setVisible(true); + dispose(); + } + }); + backButton.setActionCommand("Cancel"); + buttonPane.add(backButton); + getRootPane().setDefaultButton(backButton); + } + { + JButton continueButton = new JButton("Weiter"); + continueButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // liegt das End-Datum vor dem Start-Datum? + if (dateChooserend.getDate().before( + dateChooserstart.getDate())) { + // datum ist falsch rum + isDateOrderCorrect = false; + JOptionPane + .showMessageDialog( + null, + "Das End-Datum liegt vor dem Start-Datum. Bitte ändern.", + "Datum fehlerhaft", + JOptionPane.INFORMATION_MESSAGE); + } else { + // bereit + isDateOrderCorrect = true; + } + // liegt das eingegebene Datum nach dem erlaubten + // End-Datum? + if (dateChooserend.getDate().after(endDate)) { + // Datum zu weit weg + isDateMaxLifeTimeCorrect = false; + JOptionPane.showMessageDialog(null, + "Das End-Datum liegt zu weit in der Zukunft. Erlaubt ist maximal:\n" + + endDate, "Datum fehlerhaft", + JOptionPane.INFORMATION_MESSAGE); + dateChooserend.setDate(endDate); //setze Datum auf maximum + } else { + // bereit + isDateMaxLifeTimeCorrect = true; + } + // Prüfen ob alles eingegeben wurde + if (txtFldVeranstaltungsname.getText().isEmpty() == true + || description.getText().isEmpty() == true) { + // mind 1 Textfeld ist leer + isAllInformationReady = false; + JOptionPane + .showMessageDialog( + null, + "Bitte geben Sie einen Veranstaltungsnamen und eine Beschreibung ein.", + "Datum fehlerhaft", + JOptionPane.INFORMATION_MESSAGE); + } else { + // Textfelder bereit + isAllInformationReady = true; + } + + // welcher Radiobutton ist geklickt? + if (radioButtonyes.isSelected() == true) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + // Prüfe ob alle Eingaben korrekt sind, dann mache + // weiter + if (isAllInformationReady == true + && isDateMaxLifeTimeCorrect == true + && isDateOrderCorrect == true) { + // everything is ok, proceed + Lecture.lecture.setName(txtFldVeranstaltungsname + .getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart + .getDate()); + Image.image.setImagename(txtFldVeranstaltungsname + .getText()); + + CreateLectureLink_GUI ev = new CreateLectureLink_GUI(); + ev.setVisible(true); + dispose(); + } + + } + }); + continueButton.setActionCommand("OK"); + buttonPane.add(continueButton); + } + } + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 78, 597, 2); + getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + getContentPane().add(separator_1); + + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu = new JMenu("Suchen"); + menuBar.add(mnNewMenu); + + JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); + mnNewMenu.add(mntmVlSuche); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnNewMenu_1.add(mntmFaq); + + JMenuItem mntmOtrs = new JMenuItem("OTRS"); + mnNewMenu_1.add(mntmOtrs); + + } + + public Date addDays(Date date, int days) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.DATE, days); // minus number would decrement the days + return cal.getTime(); + } +} diff --git a/Dozentenmodul/src/gui/LinkImage_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index 38b3d5e3..2243fd43 100644 --- a/Dozentenmodul/src/gui/LinkImage_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -1,5 +1,6 @@ -package gui; +package gui.lecture; +import gui.intro.MainMenue_GUI; import java.awt.Color; import java.awt.Dimension; @@ -20,7 +21,6 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; - import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JDialog; @@ -29,6 +29,7 @@ import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; @@ -42,36 +43,37 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; import javax.swing.table.DefaultTableModel; - import models.Lecture; import models.person; - import org.apache.thrift.TException; - import server.Server.Client; import thrift.ThriftConnection; @SuppressWarnings("serial") -public class LinkImage_GUI extends JFrame { +public class CreateLectureLink_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; JRadioButton rdbtnInternetJa; JRadioButton rdbtnInternetNein; JComboBox<String> comboBox; - JTable tableAllImages; + JTable tableAllImages = new JTable(); + JTable tablemyImages = new JTable(); + JTable tableCoopImages = new JTable(); + JTable tablePublicImages = new JTable(); + JTable tablePublicVorlagen = new JTable(); private JTextField textFieldName; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); - /** * Launch the application. */ public static void main(String[] args) { try { - LinkImage_GUI dialog = new LinkImage_GUI(); + CreateLectureLink_GUI dialog = new CreateLectureLink_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -82,15 +84,20 @@ public class LinkImage_GUI extends JFrame { /** * Create the dialog. */ - public LinkImage_GUI() { + public CreateLectureLink_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { System.exit(0); } + + @Override + public void windowOpened(WindowEvent arg0) { + textFieldName.requestFocusInWindow(); + } }); setResizable(false); - + try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException @@ -100,15 +107,13 @@ public class LinkImage_GUI extends JFrame { } setTitle("bwLehrpool Suite *Prototyp*"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 603) / 2; - int left=(screenSize.width - 722) / 2; + int top = (screenSize.height - 603) / 2; + int left = (screenSize.width - 722) / 2; setBounds(left, top, 603, 722); - - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel model = new DefaultTableModel( titles, 0 ); - - + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel model = new DefaultTableModel(titles, 0); + getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -117,16 +122,17 @@ public class LinkImage_GUI extends JFrame { getContentPane().add(panel); panel.setLayout(null); { - JLabel lblNewLabel = new JLabel("Suche nach VL-Image"); + JLabel lblNewLabel = new JLabel("Image zur Verlinkung ausw\u00E4hlen"); lblNewLabel.setBounds(10, 11, 509, 22); panel.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); } - + JTextPane txtpnBitteWhlenSie = new JTextPane(); txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie + .setText("W\u00E4hlen Sie bitte ein Image aus, auf dem Ihre Versanstaltung basiert."); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); panel.add(txtpnBitteWhlenSie); } @@ -135,72 +141,70 @@ public class LinkImage_GUI extends JFrame { contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel); contentPanel.setLayout(null); - + JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 49, 557, 131); contentPanel.add(panel_1); panel_1.setLayout(null); - + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); lblNewLabel_2.setBounds(10, 30, 250, 20); panel_1.add(lblNewLabel_2); - + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); - + textFieldName = new JTextField(); textFieldName.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { - String stext=textFieldName.getText(); + String stext = textFieldName.getText(); modelAll.setRowCount(0); initTableModel(modelAll); - - if(stext!="") - for(int i=0;i<modelAll.getRowCount();i++){ - - if(modelAll.getValueAt(i, 0).toString().startsWith(stext)){ - - } - else - { - modelAll.removeRow(i); + + if (stext != "") + for (int i = 0; i < modelAll.getRowCount(); i++) { + + if (modelAll.getValueAt(i, 0).toString() + .startsWith(stext)) { + + } else { + modelAll.removeRow(i); + } } - } - - + } - - + }); textFieldName.setBounds(270, 30, 250, 20); panel_1.add(textFieldName); textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("<html><u>Erweiterte Suche</u></html>"); + + JLabel lblErweiterteSuche = new JLabel( + "<html><u>Erweiterte Suche</u></html>"); lblErweiterteSuche.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); lblErweiterteSuche.setForeground(Color.BLUE); - + lblErweiterteSuche.setBounds(431, 106, 89, 14); panel_1.add(lblErweiterteSuche); - + comboBox = new JComboBox<String>(); try { - List<String> list=client.getAllOS(); + List<String> list = client.getAllOS(); comboBox.addItem(""); - for(int i=0;i<list.size();i++) - { - comboBox.addItem(list.get(i)); + for (int i = 0; i < list.size(); i++) { + comboBox.addItem(list.get(i)); } } catch (TException e2) { // TODO Auto-generated catch block @@ -210,91 +214,85 @@ public class LinkImage_GUI extends JFrame { public void actionPerformed(ActionEvent arg0) { modelAll.setRowCount(0); initTableModel(modelAll); - String selItem=comboBox.getSelectedItem().toString(); - if(selItem!="") - { - for(int i=0;i<modelAll.getRowCount();i++){ - - if(modelAll.getValueAt(i, 2).equals(selItem)){ - - } - else - { - modelAll.removeRow(i); + String selItem = comboBox.getSelectedItem().toString(); + if (selItem != "") { + for (int i = 0; i < modelAll.getRowCount(); i++) { + + if (modelAll.getValueAt(i, 2).equals(selItem)) { + + } else { + modelAll.removeRow(i); + } } + } - - - } } }); comboBox.setBounds(270, 58, 250, 20); panel_1.add(comboBox); - + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - - LinkImage_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); + + CreateLectureLink_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); } }); lblHauptmen.setForeground(Color.BLUE); lblHauptmen.setBounds(10, 11, 61, 14); contentPanel.add(lblHauptmen); - + JLabel label_1 = new JLabel(">"); label_1.setBounds(69, 11, 13, 14); contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); + + JLabel lblVlimage = new JLabel("Veranstaltung"); lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); + lblVlimage.setBounds(81, 11, 76, 14); contentPanel.add(lblVlimage); - + JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); + label_2.setBounds(151, 11, 13, 14); contentPanel.add(label_2); - + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); + lblNewLabel_1.setBounds(164, 11, 85, 14); contentPanel.add(lblNewLabel_1); - + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.setBounds(10, 197, 557, 300); contentPanel.add(tabbedPane); - + JScrollPane scrollPaneMyImage = new JScrollPane(); - JTable tablemyImages=new JTable(); + tablemyImages.setModel(model); tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - + JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages=new JTable(); + tableAllImages = new JTable(); tableAllImages.setModel(modelAll); tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); scrollPaneMyImage.setViewportView(tablemyImages); tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - + JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages=new JTable(); + tableCoopImages.setModel(model); tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -303,10 +301,12 @@ public class LinkImage_GUI extends JFrame { tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null); - + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, + null); + tabbedPane.setEnabledAt(2, false); + JScrollPane scrollPanePublicImages = new JScrollPane(); - JTable tablePublicImages=new JTable(); + tablePublicImages.setModel(model); tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -315,10 +315,12 @@ public class LinkImage_GUI extends JFrame { tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicImages.setViewportView(tablePublicImages); - tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null); - + tabbedPane.addTab("\u00D6ffentliche Images", null, + scrollPanePublicImages, null); + tabbedPane.setEnabledAt(3, false); + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); - JTable tablePublicVorlagen=new JTable(); + tablePublicVorlagen.setModel(model); tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -327,9 +329,11 @@ public class LinkImage_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); - tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null); - - initTableModel(modelAll); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, + scrollPanePublicVorlagen, null); + tabbedPane.setEnabledAt(4, false); + + initTableModel(modelAll); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -337,89 +341,150 @@ public class LinkImage_GUI extends JFrame { buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane); { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { + JButton cancelButton = new JButton("Zur\u00FCck"); + cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); + con.closeThriftConnection(); + CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI(); + eVAG.setVisible(true); dispose(); } }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); + cancelButton.setActionCommand("CANCEL"); + buttonPane.add(cancelButton); + getRootPane().setDefaultButton(cancelButton); } { - JButton cancelButton = new JButton("Veranstaltung erzeugen und abschlie\u00DFen"); - cancelButton.addActionListener(new ActionListener() { + JButton doLinkButton = new JButton( + "Veranstaltung erzeugen und abschlie\u00DFen"); + doLinkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - - String imagename=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 0).toString(); - try { - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - System.out.println(formatter.format(Lecture.lecture.getStartdate()).toString()); - client.writeLecturedata(Lecture.lecture.getName(), Lecture.lecture.getShortDesc(), Lecture.lecture.getDesc(), formatter.format(Lecture.lecture.getStartdate()).toString(), formatter.format(Lecture.lecture.getEnddate()).toString(), Lecture.lecture.isActive(), imagename, person.verantowrtlicher.getVorname(), person.verantowrtlicher.getName(), person.verantowrtlicher.getHochschule(), person.verantowrtlicher.getEMail(), person.verantowrtlicher.getTel(), person.verantowrtlicher.getFakultät()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); + + // check if a row is selected + if ((tableAllImages.getSelectedRow() != -1) + || (tablemyImages.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + String imagename = tableAllImages.getValueAt( + tableAllImages.getSelectedRow(), 0) + .toString(); + try { + DateFormat formatter = new SimpleDateFormat( + "yyyy-MM-dd hh:mm:ss"); + System.out.println("Veranstaltung angelegt um: " + + formatter.format( + Lecture.lecture.getStartdate()) + .toString()); + client.writeLecturedata( + Lecture.lecture.getName(), + Lecture.lecture.getShortDesc(), + Lecture.lecture.getDesc(), + formatter.format( + Lecture.lecture.getStartdate()) + .toString(), + formatter.format( + Lecture.lecture.getEnddate()) + .toString(), + Lecture.lecture.isActive(), + imagename, + person.verantwortlicher.getVorname(), + person.verantwortlicher.getName(), + person.verantwortlicher.getHochschule(), + person.verantwortlicher.getEMail(), + person.verantwortlicher.getTel(), + person.verantwortlicher.getFakultät()); + JOptionPane + .showMessageDialog( + null, + "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.", + "Veranstaltung angelegt", + JOptionPane.INFORMATION_MESSAGE); + // zurück zum Menü + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + JOptionPane + .showMessageDialog( + null, + "Beim Anlegen Ihrer Veranstaltung ist ein Fehler aufgetreten.", + "Error", + JOptionPane.ERROR_MESSAGE); + } + con.closeThriftConnection(); + dispose(); + + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); } - dispose(); - + } }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); + doLinkButton.setActionCommand("OK"); + buttonPane.add(doLinkButton); } } - + JSeparator separator = new JSeparator(); separator.setBounds(0, 78, 597, 2); getContentPane().add(separator); - + JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); - + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); - + JMenu mnNewMenu = new JMenu("Suchen"); menuBar.add(mnNewMenu); - + JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); mnNewMenu.add(mntmVlSuche); - + JMenu mnNewMenu_1 = new JMenu("Hilfe"); menuBar.add(mnNewMenu_1); - + JMenuItem mntmFaq = new JMenuItem("FAQ"); mnNewMenu_1.add(mntmFaq); - + JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); - + } - - public DefaultTableModel initTableModel(DefaultTableModel model){ + + public DefaultTableModel initTableModel(DefaultTableModel model) { List<server.Image> images; try { images = client.getImageList(); - Iterator<server.Image> i=images.iterator(); + Iterator<server.Image> i = images.iterator(); List<Object[]> ListObj = new ArrayList<Object[]>(); - int x=0; - - while(i.hasNext()) - { - + int x = 0; + + while (i.hasNext()) { + i.next(); - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUpdateTime(),images.get(x).getUserData()}; + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime() + }; ListObj.add(obj); model.addRow(ListObj.get(x)); x++; - + } - + return model; } catch (TException e1) { // TODO Auto-generated catch block @@ -427,7 +492,5 @@ public class LinkImage_GUI extends JFrame { } return model; } - - } - +} diff --git a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java index 86052152..115a9f1f 100644 --- a/Dozentenmodul/src/GUI/EingabeVeranstaltungAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java @@ -1,6 +1,8 @@ -package gui; +package gui.lecture; +import gui.intro.MainMenue_GUI; + import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -21,7 +23,6 @@ import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSeparator; import javax.swing.JTextField; @@ -31,11 +32,18 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import models.Image; +import models.Lecture; import models.person; +import javax.swing.JTextArea; +import java.awt.ScrollPane; +import com.toedter.calendar.JDateChooser; +import javax.swing.JRadioButton; +import javax.swing.ButtonGroup; @SuppressWarnings("serial") -public class EingabeVeranstaltungAllgemein_GUI extends JFrame { +public class EditLectureAllgemein_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -43,12 +51,19 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { private JTextField Nachname; private JTextField Hochschule; private JTextField EMail; + private JTextField textFieldLaborname; + JTextArea description; + JRadioButton radioButtonyes; + JDateChooser dateChooserend; + JDateChooser dateChooserstart; + JRadioButton radioButtonno; + private final ButtonGroup buttonGroup = new ButtonGroup(); /** * Launch the application. */ public static void main(String[] args) { try { - EingabeVeranstaltungAllgemein_GUI dialog = new EingabeVeranstaltungAllgemein_GUI(); + EditLectureAllgemein_GUI dialog = new EditLectureAllgemein_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -59,7 +74,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { /** * Create the dialog. */ - public EingabeVeranstaltungAllgemein_GUI() { + public EditLectureAllgemein_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -99,7 +114,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); txtpnBitteWhlenSie.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 21); panel.add(txtpnBitteWhlenSie); } contentPanel.setBounds(10, 85, 577, 493); @@ -111,7 +126,7 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); panel_1.setBorder(new TitledBorder(null, "Informationen zum Besitzer", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 66, 557, 369); + panel_1.setBounds(10, 331, 557, 162); contentPanel.add(panel_1); panel_1.setLayout(null); @@ -121,8 +136,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { panel_1.add(label); Vorname = new JTextField(); + Vorname.setEditable(false); + Vorname.setEnabled(false); + Vorname.setText(person.verantwortlicher.getVorname()); Vorname.setBackground(Color.WHITE); - Vorname.setText((String) null); Vorname.setColumns(10); Vorname.setBounds(145, 33, 350, 20); panel_1.add(Vorname); @@ -133,8 +150,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { panel_1.add(label_7); Nachname = new JTextField(); + Nachname.setEnabled(false); + Nachname.setEditable(false); + Nachname.setText(person.verantwortlicher.getName()); Nachname.setBackground(Color.WHITE); - Nachname.setText((String) null); Nachname.setColumns(10); Nachname.setBounds(145, 64, 350, 20); panel_1.add(Nachname); @@ -145,8 +164,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { panel_1.add(label_8); Hochschule = new JTextField(); + Hochschule.setEnabled(false); + Hochschule.setEditable(false); + Hochschule.setText(person.verantwortlicher.getHochschule()); Hochschule.setBackground(Color.WHITE); - Hochschule.setText((String) null); Hochschule.setColumns(10); Hochschule.setBounds(145, 95, 350, 20); panel_1.add(Hochschule); @@ -157,8 +178,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { panel_1.add(label_9); EMail = new JTextField(); + EMail.setEnabled(false); + EMail.setEditable(false); + EMail.setText(person.verantwortlicher.getEMail()); EMail.setBackground(Color.WHITE); - EMail.setText((String) null); EMail.setColumns(10); EMail.setBounds(145, 126, 350, 20); panel_1.add(EMail); @@ -170,16 +193,12 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { panel.setBorder(new EmptyBorder(5, 5, 5, 5)); panel.setBackground(SystemColor.menu); - JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); - lblPflichtfelder.setBounds(10, 442, 136, 14); - contentPanel.add(lblPflichtfelder); - JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - EingabeVeranstaltungAllgemein_GUI.this.setVisible(false); + EditLectureAllgemein_GUI.this.setVisible(false); MainMenue_GUI main=new MainMenue_GUI(); main.setVisible(true); } @@ -204,6 +223,96 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JLabel lblNewLabel_1 = new JLabel("Neu"); lblNewLabel_1.setBounds(146, 11, 46, 14); contentPanel.add(lblNewLabel_1); + + JPanel panel_2 = new JPanel(); + panel_2.setLayout(null); + panel_2.setBorder(new TitledBorder(null, "Veranstaltungsdaten", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_2.setBackground(SystemColor.menu); + panel_2.setBounds(10, 36, 557, 284); + contentPanel.add(panel_2); + + JLabel label_3 = new JLabel("Laborname (Anzeigename): *"); + label_3.setBounds(10, 25, 180, 14); + panel_2.add(label_3); + + textFieldLaborname = new JTextField(); + textFieldLaborname.setText(Lecture.lecture.getName()); + textFieldLaborname.setColumns(10); + textFieldLaborname.setBounds(200, 22, 347, 20); + panel_2.add(textFieldLaborname); + + JTextArea textArea = new JTextArea(); + textArea.setWrapStyleWord(true); + textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\""); + textArea.setLineWrap(true); + textArea.setFont(new Font("Tahoma", Font.PLAIN, 12)); + textArea.setBackground(SystemColor.menu); + textArea.setBounds(10, 49, 537, 49); + panel_2.add(textArea); + + JLabel label_4 = new JLabel("Beschreibung: *"); + label_4.setBounds(10, 111, 180, 14); + panel_2.add(label_4); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setBounds(200, 104, 347, 78); + panel_2.add(scrollPane); + description = new JTextArea(); + description.setText(Lecture.lecture.getDesc()); + description.setLineWrap(true); + scrollPane.add(description); + description.setBounds(0, 0, 4, 22); + scrollPane.add(description); + + dateChooserend = new JDateChooser(); + dateChooserend.setDateFormatString("dd-MM-yyyy hh:mm:ss"); + dateChooserend.setDate(Lecture.lecture.getEnddate()); + dateChooserend.setBounds(385, 188, 100, 20); + panel_2.add(dateChooserend); + + JLabel label_5 = new JLabel("bis"); + label_5.setBounds(351, 188, 24, 20); + panel_2.add(label_5); + + dateChooserstart = new JDateChooser(); + dateChooserstart.setDateFormatString("yyyy-MM-dd hh:mm:ss"); + dateChooserstart.setDate(Lecture.lecture.getStartdate()); + dateChooserstart.setBounds(240, 188, 101, 20); + panel_2.add(dateChooserstart); + + JLabel label_6 = new JLabel("von:"); + label_6.setBounds(200, 188, 30, 20); + panel_2.add(label_6); + + JLabel label_10 = new JLabel("G\u00FCltigkeitsdatum: *"); + label_10.setBounds(10, 188, 250, 14); + panel_2.add(label_10); + + JLabel label_11 = new JLabel("Aktiv:"); + label_11.setBounds(10, 229, 250, 14); + panel_2.add(label_11); + + radioButtonyes = new JRadioButton("Ja"); + buttonGroup.add(radioButtonyes); + if(Lecture.lecture.isActive()==true) + { + radioButtonyes.setSelected(true); + }else + { + radioButtonno.setSelected(true); + } + + radioButtonyes.setBounds(240, 225, 109, 23); + panel_2.add(radioButtonyes); + + radioButtonno = new JRadioButton("Nein"); + buttonGroup.add(radioButtonno); + radioButtonno.setBounds(385, 225, 109, 23); + panel_2.add(radioButtonno); + + JLabel label_12 = new JLabel("(Im VMChooser sichtbar)"); + label_12.setBounds(10, 254, 250, 14); + panel_2.add(label_12); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -214,13 +323,20 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - person.verantowrtlicher.setVorname(Vorname.getText()); - person.verantowrtlicher.setName(Nachname.getText()); - person.verantowrtlicher.setEMail(EMail.getText()); - - person.verantowrtlicher.setHochschule(Hochschule.getText()); - + if(radioButtonyes.isSelected()==true) + { + Lecture.lecture.setActive(true); + } + else + { + Lecture.lecture.setActive(false); + } + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); MainMenue_GUI sr=new MainMenue_GUI(); sr.setVisible(true); @@ -235,23 +351,26 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { JButton cancelButton = new JButton("Weiter"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - if(Vorname.getText().isEmpty()==false && Nachname.getText().isEmpty()==false && Hochschule.getText().isEmpty()==false&&EMail.getText().isEmpty()==false) + if(radioButtonyes.isSelected()==true) { - person.verantowrtlicher.setVorname(Vorname.getText()); - person.verantowrtlicher.setName(Nachname.getText()); - person.verantowrtlicher.setEMail(EMail.getText()); - - person.verantowrtlicher.setHochschule(Hochschule.getText()); - - - EingabeVeranstatlungTechnisch_GUI ea=new EingabeVeranstatlungTechnisch_GUI(); - ea.setVisible(true); - dispose(); + Lecture.lecture.setActive(true); } - else{ - JOptionPane.showMessageDialog(null, "Bitte geben Sie alle notwendigen Daten an!", - "Error", JOptionPane.ERROR_MESSAGE); + else + { + Lecture.lecture.setActive(false); } + + Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setNewName(textFieldLaborname.getText()); + Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setEnddate(dateChooserend.getDate()); + Lecture.lecture.setStartdate(dateChooserstart.getDate()); + Image.image.setImagename(textFieldLaborname.getText()); + + + EditLectureLink_GUI ev=new EditLectureLink_GUI(); + ev.setVisible(true); + dispose(); } }); cancelButton.setActionCommand("Cancel"); @@ -267,6 +386,10 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); + JLabel lblPflichtfelder = new JLabel("* Pflichtfelder"); + lblPflichtfelder.setBounds(32, 602, 136, 14); + getContentPane().add(lblPflichtfelder); + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); @@ -286,4 +409,6 @@ public class EingabeVeranstaltungAllgemein_GUI extends JFrame { mnNewMenu_1.add(mntmOtrs); } -} + + +}
\ No newline at end of file diff --git a/Dozentenmodul/src/GUI/LinkImage_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index 38b3d5e3..c1fdec80 100644 --- a/Dozentenmodul/src/GUI/LinkImage_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -1,6 +1,6 @@ -package gui; - +package gui.lecture; +import gui.intro.MainMenue_GUI; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -20,7 +20,6 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; - import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JDialog; @@ -29,6 +28,7 @@ import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; @@ -42,36 +42,37 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; import javax.swing.table.DefaultTableModel; - import models.Lecture; import models.person; - import org.apache.thrift.TException; - import server.Server.Client; import thrift.ThriftConnection; @SuppressWarnings("serial") -public class LinkImage_GUI extends JFrame { +public class EditLectureLink_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; JRadioButton rdbtnInternetJa; JRadioButton rdbtnInternetNein; JComboBox<String> comboBox; - JTable tableAllImages; + JTable tableAllImages = new JTable(); + JTable tablemyImages = new JTable(); + JTable tableCoopImages = new JTable(); + JTable tablePublicImages = new JTable(); + JTable tablePublicVorlagen = new JTable(); private JTextField textFieldName; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; - ThriftConnection thrift=new ThriftConnection(); - Client client=thrift.getThriftConnection(); + String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; + ThriftConnection thrift = new ThriftConnection(); + Client client = thrift.getThriftConnection(); - /** * Launch the application. */ public static void main(String[] args) { try { - LinkImage_GUI dialog = new LinkImage_GUI(); + EditLectureLink_GUI dialog = new EditLectureLink_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -82,7 +83,7 @@ public class LinkImage_GUI extends JFrame { /** * Create the dialog. */ - public LinkImage_GUI() { + public EditLectureLink_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -90,7 +91,7 @@ public class LinkImage_GUI extends JFrame { } }); setResizable(false); - + try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException @@ -100,15 +101,13 @@ public class LinkImage_GUI extends JFrame { } setTitle("bwLehrpool Suite *Prototyp*"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 603) / 2; - int left=(screenSize.width - 722) / 2; + int top = (screenSize.height - 603) / 2; + int left = (screenSize.width - 722) / 2; setBounds(left, top, 603, 722); - - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel model = new DefaultTableModel( titles, 0 ); - - + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel model = new DefaultTableModel(titles, 0); + getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -117,16 +116,18 @@ public class LinkImage_GUI extends JFrame { getContentPane().add(panel); panel.setLayout(null); { - JLabel lblNewLabel = new JLabel("Suche nach VL-Image"); + JLabel lblNewLabel = new JLabel( + "Image zur Verlinkung ausw\u00E4hlen"); lblNewLabel.setBounds(10, 11, 509, 22); panel.add(lblNewLabel); lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); } - + JTextPane txtpnBitteWhlenSie = new JTextPane(); txtpnBitteWhlenSie.setEditable(false); txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie + .setText("W\u00E4hlen Sie bitte ein Image aus, auf dem Ihre Versanstaltung basiert."); txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); panel.add(txtpnBitteWhlenSie); } @@ -135,72 +136,70 @@ public class LinkImage_GUI extends JFrame { contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel); contentPanel.setLayout(null); - + JPanel panel_1 = new JPanel(); panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 49, 557, 131); contentPanel.add(panel_1); panel_1.setLayout(null); - + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); lblNewLabel_2.setBounds(10, 30, 250, 20); panel_1.add(lblNewLabel_2); - + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); panel_1.add(lblInternetIstInnerhalb); - + textFieldName = new JTextField(); textFieldName.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { - String stext=textFieldName.getText(); + String stext = textFieldName.getText(); modelAll.setRowCount(0); initTableModel(modelAll); - - if(stext!="") - for(int i=0;i<modelAll.getRowCount();i++){ - - if(modelAll.getValueAt(i, 0).toString().startsWith(stext)){ - - } - else - { - modelAll.removeRow(i); + + if (stext != "") + for (int i = 0; i < modelAll.getRowCount(); i++) { + + if (modelAll.getValueAt(i, 0).toString() + .startsWith(stext)) { + + } else { + modelAll.removeRow(i); + } } - } - - + } - - + }); textFieldName.setBounds(270, 30, 250, 20); panel_1.add(textFieldName); textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("<html><u>Erweiterte Suche</u></html>"); + + JLabel lblErweiterteSuche = new JLabel( + "<html><u>Erweiterte Suche</u></html>"); lblErweiterteSuche.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); es.setVisible(true); } }); lblErweiterteSuche.setForeground(Color.BLUE); - + lblErweiterteSuche.setBounds(431, 106, 89, 14); panel_1.add(lblErweiterteSuche); - + comboBox = new JComboBox<String>(); try { - List<String> list=client.getAllOS(); + List<String> list = client.getAllOS(); comboBox.addItem(""); - for(int i=0;i<list.size();i++) - { - comboBox.addItem(list.get(i)); + for (int i = 0; i < list.size(); i++) { + comboBox.addItem(list.get(i)); } } catch (TException e2) { // TODO Auto-generated catch block @@ -210,91 +209,84 @@ public class LinkImage_GUI extends JFrame { public void actionPerformed(ActionEvent arg0) { modelAll.setRowCount(0); initTableModel(modelAll); - String selItem=comboBox.getSelectedItem().toString(); - if(selItem!="") - { - for(int i=0;i<modelAll.getRowCount();i++){ - - if(modelAll.getValueAt(i, 2).equals(selItem)){ - - } - else - { - modelAll.removeRow(i); + String selItem = comboBox.getSelectedItem().toString(); + if (selItem != "") { + for (int i = 0; i < modelAll.getRowCount(); i++) { + + if (modelAll.getValueAt(i, 2).equals(selItem)) { + + } else { + modelAll.removeRow(i); + } } + } - - - } } }); comboBox.setBounds(270, 58, 250, 20); panel_1.add(comboBox); - + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); lblHauptmen.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { - - LinkImage_GUI.this.setVisible(false); - MainMenue_GUI main=new MainMenue_GUI(); + + EditLectureLink_GUI.this.setVisible(false); + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); } }); lblHauptmen.setForeground(Color.BLUE); lblHauptmen.setBounds(10, 11, 61, 14); contentPanel.add(lblHauptmen); - + JLabel label_1 = new JLabel(">"); label_1.setBounds(69, 11, 13, 14); contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); + + JLabel lblVlimage = new JLabel("Veranstaltung"); lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); + lblVlimage.setBounds(81, 11, 76, 14); contentPanel.add(lblVlimage); - + JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); + label_2.setBounds(151, 11, 13, 14); contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); + + JLabel lblNewLabel_1 = new JLabel("Veranstaltung verlinken"); + lblNewLabel_1.setBounds(164, 11, 113, 14); contentPanel.add(lblNewLabel_1); - + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.setBounds(10, 197, 557, 300); contentPanel.add(tabbedPane); - + JScrollPane scrollPaneMyImage = new JScrollPane(); - JTable tablemyImages=new JTable(); + tablemyImages.setModel(model); tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - + JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages=new JTable(); tableAllImages.setModel(modelAll); tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); scrollPaneMyImage.setViewportView(tablemyImages); tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - + JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages=new JTable(); + tableCoopImages.setModel(model); tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -303,10 +295,12 @@ public class LinkImage_GUI extends JFrame { tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null); - + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, + null); + tabbedPane.setEnabledAt(2, false); + JScrollPane scrollPanePublicImages = new JScrollPane(); - JTable tablePublicImages=new JTable(); + tablePublicImages.setModel(model); tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -315,10 +309,12 @@ public class LinkImage_GUI extends JFrame { tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicImages.setViewportView(tablePublicImages); - tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null); - + tabbedPane.addTab("\u00D6ffentliche Images", null, + scrollPanePublicImages, null); + tabbedPane.setEnabledAt(3, false); + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); - JTable tablePublicVorlagen=new JTable(); + tablePublicVorlagen.setModel(model); tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); @@ -327,9 +323,16 @@ public class LinkImage_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); - tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null); - - initTableModel(modelAll); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, + scrollPanePublicVorlagen, null); + tabbedPane.setEnabledAt(4, false); + + JButton btnLinkLschen = new JButton("Link l\u00F6schen"); + btnLinkLschen.setEnabled(false); + btnLinkLschen.setBounds(478, 508, 89, 23); + contentPanel.add(btnLinkLschen); + + initTableModel(modelAll); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 640, 597, 33); @@ -340,9 +343,9 @@ public class LinkImage_GUI extends JFrame { JButton okButton = new JButton("Zur\u00FCck"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); + + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.setVisible(true); dispose(); } }); @@ -351,75 +354,126 @@ public class LinkImage_GUI extends JFrame { getRootPane().setDefaultButton(okButton); } { - JButton cancelButton = new JButton("Veranstaltung erzeugen und abschlie\u00DFen"); + JButton cancelButton = new JButton( + "Veranstaltung ändern und abschlie\u00DFen"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - - String imagename=tableAllImages.getValueAt(tableAllImages.getSelectedRow(), 0).toString(); - try { - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - System.out.println(formatter.format(Lecture.lecture.getStartdate()).toString()); - client.writeLecturedata(Lecture.lecture.getName(), Lecture.lecture.getShortDesc(), Lecture.lecture.getDesc(), formatter.format(Lecture.lecture.getStartdate()).toString(), formatter.format(Lecture.lecture.getEnddate()).toString(), Lecture.lecture.isActive(), imagename, person.verantowrtlicher.getVorname(), person.verantowrtlicher.getName(), person.verantowrtlicher.getHochschule(), person.verantowrtlicher.getEMail(), person.verantowrtlicher.getTel(), person.verantowrtlicher.getFakultät()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); + + // check if a row is selected + if ((tableAllImages.getSelectedRow() != -1) + || (tablemyImages.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + String imagename = tableAllImages.getValueAt( + tableAllImages.getSelectedRow(), 0) + .toString(); + System.out.println("ID: "+Lecture.lecture.getid()); + + try { + + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + System.out.println( formatter.format( + Lecture.lecture.getEnddate()) + .toString()); + client.updateLecturedata(Lecture.lecture.getName(), + Lecture.lecture.getNewName(), + Lecture.lecture.getShortDesc(), + Lecture.lecture.getDesc(), + formatter.format( + Lecture.lecture.getStartdate()) + .toString(), + formatter.format( + Lecture.lecture.getEnddate()) + .toString(), + Lecture.lecture.isActive(), + imagename, + person.verantwortlicher.getVorname(), + person.verantwortlicher.getName(), + person.verantwortlicher.getHochschule(), + person.verantwortlicher.getEMail(), + person.verantwortlicher.getTel(), + person.verantwortlicher.getFakultät(), + Lecture.lecture.getid()); + + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); + } + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); dispose(); - + } }); cancelButton.setActionCommand("Cancel"); buttonPane.add(cancelButton); } } - + JSeparator separator = new JSeparator(); separator.setBounds(0, 78, 597, 2); getContentPane().add(separator); - + JSeparator separator_1 = new JSeparator(); separator_1.setBounds(0, 627, 597, 2); getContentPane().add(separator_1); - + JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); - + JMenu mnNewMenu = new JMenu("Suchen"); menuBar.add(mnNewMenu); - + JMenuItem mntmVlSuche = new JMenuItem("VL Suche"); mnNewMenu.add(mntmVlSuche); - + JMenu mnNewMenu_1 = new JMenu("Hilfe"); menuBar.add(mnNewMenu_1); - + JMenuItem mntmFaq = new JMenuItem("FAQ"); mnNewMenu_1.add(mntmFaq); - + JMenuItem mntmOtrs = new JMenuItem("OTRS"); mnNewMenu_1.add(mntmOtrs); - + } - - public DefaultTableModel initTableModel(DefaultTableModel model){ + + public DefaultTableModel initTableModel(DefaultTableModel model) { List<server.Image> images; try { images = client.getImageList(); - Iterator<server.Image> i=images.iterator(); + Iterator<server.Image> i = images.iterator(); List<Object[]> ListObj = new ArrayList<Object[]>(); - int x=0; - - while(i.hasNext()) - { - + int x = 0; + + while (i.hasNext()) { + i.next(); - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUpdateTime(),images.get(x).getUserData()}; + Object[] obj = { images.get(x).getImageName(), + images.get(x).getLicenseRestriction(), + images.get(x).getOsName(), + images.get(x).getLectureName(), + images.get(x).getUserData(), + images.get(x).getUpdateTime(), "", images.get(x).id, + images.get(x).getVersion() }; ListObj.add(obj); model.addRow(ListObj.get(x)); x++; - + } - + return model; } catch (TException e1) { // TODO Auto-generated catch block @@ -427,7 +481,4 @@ public class LinkImage_GUI extends JFrame { } return model; } - - } - - +} diff --git a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java new file mode 100644 index 00000000..ae50fa22 --- /dev/null +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -0,0 +1,529 @@ +package gui.lecture; + +import gui.image.EditImageAllgemein_GUI; +import gui.intro.MainMenue_GUI; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.text.DateFormat; +import java.text.ParseException; +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; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.RowFilter; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; +import models.Lecture; +import models.person; +import org.apache.thrift.TException; +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class EditLectureSearch_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JTable tableAllLectures; + JTable tablemyLectures; + JTable tableCoopImages; + JTable tablePublicVorlagen; + JTable tablePublicImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles = { "Veranstaltungsname", "Beschreibung", + "Gültigkeitsdatum", "Aktiv", "Letzte Benutzung", + "Verantwortlicher", "Image", "Schlagwort", "ID" }; + ThriftConnection con = new ThriftConnection(); + Client client = con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); + final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0); + final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( + modelAll); + 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. + */ + public EditLectureSearch_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + // Beendet die Anwendung nach klick auf X + con.closeThriftConnection(); + System.exit(0); + } + }); + // Verhindert das Vergrößern Des Fensters + setResizable(false); + + try { + // Setzt das Look & Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // Setzt den Fenstertitel + setTitle("bwLehrpool Suite *Prototyp*"); + // Zentriert das Fenster in die Bildmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top = (screenSize.height - 722) / 2; + int left = (screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + final DefaultTableModel model = new DefaultTableModel(titles, 0); + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Suche nach Veranstaltung"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie + .setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", + TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + textFieldName = new JTextField(); + // Key Listener der Tastatureingabe registriert + textFieldName.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + // Textfield eingabe auslesen + String stext = textFieldName.getText(); + + // Wenn Textfield nicht leer + if (stext != "") { + // Filtere nach der Eingabe + rowSorterAll.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter( + textFieldName.getText(), 0)); + + } + } + }); + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel( + "<html><u>Erweiterte Suche</u></html>"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + // Öffnet das Fenster Extended GUI + con.closeThriftConnection(); + ExtendedSearchForImages_GUI es = new ExtendedSearchForImages_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + JLabel lblHauptmen = new JLabel("Hauptmen\u00FC"); + lblHauptmen.addMouseListener(new MouseAdapter() { + @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); + } + }); + lblHauptmen.setForeground(Color.BLUE); + lblHauptmen.setBounds(10, 11, 61, 14); + contentPanel.add(lblHauptmen); + + JLabel label_1 = new JLabel(">"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("Veranstaltung"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 75, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(152, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Veranstaltungsauswahl"); + lblNewLabel_1.setBounds(166, 11, 128, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if (tabbedPane.getSelectedIndex() == 0) { + + String username = person.verantwortlicher.getName() + " " + + person.verantwortlicher.getVorname(); + rowSorterMyLectures.setRowFilter(RowFilter.regexFilter( + username, 5)); + } else if (tabbedPane.getSelectedIndex() == 1) { + + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 323); + contentPanel.add(tabbedPane); + initTableModel(modelMyLectures); + + JScrollPane scrollPaneAllImages = new JScrollPane(); + tableAllLectures = new JTable(); + tableAllLectures.setModel(modelAll); + tableAllLectures.getColumnModel().getColumn(1).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(2).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(3).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(4).sizeWidthToFit(); + tableAllLectures.getColumnModel().getColumn(5).sizeWidthToFit(); + initTableModel(modelAll); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyLectures = new JTable(); + tablemyLectures.setModel(modelMyLectures); + + tablemyLectures.getColumnModel().getColumn(1).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(2).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(3).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(4).sizeWidthToFit(); + tablemyLectures.getColumnModel().getColumn(5).sizeWidthToFit(); + tablemyLectures.setRowSorter(rowSorterMyLectures); + + scrollPaneMyImage.setViewportView(tablemyLectures); + tabbedPane.addTab("Meine Veranstaltungen", null, scrollPaneMyImage, + null); + tableAllLectures.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllLectures); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + JScrollPane scrollPaneCoopImages = new JScrollPane(); + tableCoopImages = new JTable(); + tableCoopImages.setModel(model); + tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPaneCoopImages.setViewportView(tableCoopImages); + tabbedPane.addTab("Kooperative Veranstaltungen", null, + scrollPaneCoopImages, null); + tabbedPane.setEnabledAt(2, false); + + JScrollPane scrollPanePublicImages = new JScrollPane(); + tablePublicImages = new JTable(); + tablePublicImages.setModel(model); + tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicImages.setViewportView(tablePublicImages); + tabbedPane.addTab("\u00D6ffentliche Images", null, + scrollPanePublicImages, null); + tabbedPane.setEnabledAt(3, false); + + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); + tablePublicVorlagen = new JTable(); + tablePublicVorlagen.setModel(model); + tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, + scrollPanePublicVorlagen, null); + tabbedPane.setEnabledAt(4, false); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton btnBack = new JButton("Zur\u00FCck"); + btnBack.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + // Öffnet das Hauptmenü + con.closeThriftConnection(); + MainMenue_GUI main = new MainMenue_GUI(); + main.setVisible(true); + dispose(); + } + }); + btnBack.setActionCommand("OK"); + buttonPane.add(btnBack); + getRootPane().setDefaultButton(btnBack); + } + { + JButton btnContinue = new JButton("Weiter"); + btnContinue.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + System.out + .println("\ntableAllImages.getSelectedRow() = " + + tableAllLectures.getSelectedRow() + + "\ntablemyImages.getSelectedRow() = " + + tablemyLectures.getSelectedRow() + + "\ntableCoopImages.getSelectedRow() = " + + tableCoopImages.getSelectedRow() + + "\ntablePublicImages.getSelectedRow() = " + + tablePublicImages.getSelectedRow() + + "\ntablePublicVorlagen.getSelectedRow() = " + + tablePublicVorlagen.getSelectedRow()); + + // check if a row is selected + if ((tableAllLectures.getSelectedRow() != -1) + || (tablemyLectures.getSelectedRow() != -1) + || (tableCoopImages.getSelectedRow() != -1) + || (tablePublicImages.getSelectedRow() != -1) + || (tablePublicVorlagen.getSelectedRow() != -1)) { + + // a row is selected, do operations + + if (tabbedPane.getSelectedIndex() == 0) { + + Lecture.lecture.setid(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 8).toString()); + Lecture.lecture.setName(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 0).toString()); + Lecture.lecture.setDesc(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 1).toString()); + String date = modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 2).toString(); + + Lecture.lecture.setLinkedImagename(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 6).toString()); + + int zweitesLeerzeichen = date.indexOf(" ", + date.indexOf(" ") + 1); + + String startdate = date.substring(0, + zweitesLeerzeichen); + String enddate = date + .substring(zweitesLeerzeichen); + DateFormat df = new SimpleDateFormat( + "yyyy-MM-dd hh:mm:ss"); + + try { + // Format has to be "yyyy-MM-dd hh:mm:ss" + Lecture.lecture.setEnddate(df + .parse(enddate)); + Lecture.lecture.setStartdate(df + .parse(startdate)); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + if (modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 3).toString().equals("1")) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + con.closeThriftConnection(); + // EditImageAllgemein_GUI ea=new + // EditImageAllgemein_GUI(); + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.setVisible(true); + dispose(); + } else { + JOptionPane + .showMessageDialog( + null, + "Bitte wählen Sie ein eigenes Image aus", + "Message", + JOptionPane.INFORMATION_MESSAGE); + } + } else { + // nothing selected + JOptionPane.showMessageDialog(null, + "Bitte wählen Sie ein Image aus.", + "Image Auswahl", + JOptionPane.INFORMATION_MESSAGE); + }// end check if a row is selected + + } + }); + btnContinue.setActionCommand("Cancel"); + buttonPane.add(btnContinue); + } + } + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 78, 597, 2); + getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + getContentPane().add(separator_1); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnNewMenu_1.add(mntmFaq); + + JMenuItem mntmOtrs = new JMenuItem("OTRS"); + mnNewMenu_1.add(mntmOtrs); + + } + + // Initiale Beffülung eines Table models + public DefaultTableModel initTableModel(DefaultTableModel model) { + List<server.Lecture> lectures; + try { + // Hole eine Liste der Images + lectures = client.getLectureList(); + Iterator<server.Lecture> i = lectures.iterator(); + + int x = 0; + + while (i.hasNext()) { + // erzeuge Objekte für die Tabelle + Object[] obj = { + lectures.get(x).lecturename, + lectures.get(x).desc, + lectures.get(x).starttime + " " + + lectures.get(x).endtime, + lectures.get(x).isActive, lectures.get(x).lastused, + lectures.get(x).username, " ", + lectures.get(x).imagename, lectures.get(x).id }; + // Füge diese Objekte der Tabelle hinzu + model.addRow(obj); + x++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + +} diff --git a/Dozentenmodul/src/GUI/ExtendedSearch_GUI.java b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java index ab9693a7..3fc4b7f6 100644 --- a/Dozentenmodul/src/GUI/ExtendedSearch_GUI.java +++ b/Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java @@ -1,6 +1,9 @@ -package gui; +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; @@ -30,7 +33,7 @@ import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; @SuppressWarnings("serial") -public class ExtendedSearch_GUI extends JFrame { +public class ExtendedSearchForImages_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -41,9 +44,10 @@ public class ExtendedSearch_GUI extends JFrame { */ public static void main(String[] args) { try { - ExtendedSearch_GUI dialog = new ExtendedSearch_GUI(); + ExtendedSearchForImages_GUI dialog = new ExtendedSearchForImages_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); + } catch (Exception e) { e.printStackTrace(); } @@ -52,7 +56,7 @@ public class ExtendedSearch_GUI extends JFrame { /** * Create the dialog. */ - public ExtendedSearch_GUI() { + public ExtendedSearchForImages_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -177,7 +181,7 @@ public class ExtendedSearch_GUI extends JFrame { public void actionPerformed(ActionEvent e) { - EingabeImageAllgemein_GUI sr=new EingabeImageAllgemein_GUI(); + CreateImageAllgemein_GUI sr=new CreateImageAllgemein_GUI(); sr.setVisible(true); dispose(); } @@ -192,7 +196,7 @@ public class ExtendedSearch_GUI extends JFrame { public void actionPerformed(ActionEvent e) { - FTPUploader_GUI ea=new FTPUploader_GUI(); + FTPCreateUploader_GUI ea=new FTPCreateUploader_GUI(); ea.setVisible(true); dispose(); diff --git a/Dozentenmodul/src/GUI/SearchMethod_GUI.java b/Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java index 24a12959..ae31236a 100644 --- a/Dozentenmodul/src/GUI/SearchMethod_GUI.java +++ b/Dozentenmodul/src/gui/lecture/SearchMethodLecture_GUI.java @@ -1,6 +1,9 @@ -package gui; +package gui.lecture; +import gui.image.SearchImage_GUI; +import gui.intro.MainMenue_GUI; + import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; @@ -33,7 +36,7 @@ import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; @SuppressWarnings("serial") -public class SearchMethod_GUI extends JFrame { +public class SearchMethodLecture_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -45,7 +48,7 @@ public class SearchMethod_GUI extends JFrame { */ public static void main(String[] args) { try { - SearchMethod_GUI dialog = new SearchMethod_GUI(); + SearchMethodLecture_GUI dialog = new SearchMethodLecture_GUI(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { @@ -56,7 +59,7 @@ public class SearchMethod_GUI extends JFrame { /** * Create the dialog. */ - public SearchMethod_GUI() { + public SearchMethodLecture_GUI() { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent arg0) { @@ -150,7 +153,7 @@ public class SearchMethod_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { - SearchMethod_GUI.this.setVisible(false); + SearchMethodLecture_GUI.this.setVisible(false); MainMenue_GUI main=new MainMenue_GUI(); main.setVisible(true); } diff --git a/Dozentenmodul/src/models/Image.java b/Dozentenmodul/src/models/Image.java index 2a8c4fcd..cdc8264c 100644 --- a/Dozentenmodul/src/models/Image.java +++ b/Dozentenmodul/src/models/Image.java @@ -1,6 +1,9 @@ package models; public class Image { + private String ImageId; + private String version; + private String imagename; private String newName; private boolean licensed; @@ -46,4 +49,16 @@ public class Image { public void setNewName(String newName) { this.newName = newName; } + public String getImageId() { + return ImageId; + } + public void setImageId(String imageId) { + ImageId = imageId; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } } diff --git a/Dozentenmodul/src/models/Lecture.java b/Dozentenmodul/src/models/Lecture.java index 383bded9..6b7e6fa1 100644 --- a/Dozentenmodul/src/models/Lecture.java +++ b/Dozentenmodul/src/models/Lecture.java @@ -6,14 +6,42 @@ public class Lecture { private String name; + private String newName; private String shortDesc; private String desc; private Date startdate; private Date enddate; private boolean active; + private String id; + private String linkedImagename; + public static Lecture lecture =new Lecture(); + + + public String getNewName() { + return newName; + } + public void setNewName(String newName) { + this.newName = newName; + } + + public String getLinkedImagename() { + return linkedImagename; + } + + public void setLinkedImagename(String linkedImagename) { + this.linkedImagename = linkedImagename; + } + + public String getid() { + return id; + } + + public void setid(String id) { + this.id = id; + } public String getName() { return name; } diff --git a/Dozentenmodul/src/models/SessionData.java b/Dozentenmodul/src/models/SessionData.java new file mode 100644 index 00000000..3b91e1a2 --- /dev/null +++ b/Dozentenmodul/src/models/SessionData.java @@ -0,0 +1,28 @@ +package models; + +public class SessionData { + private String sessionID; + private String authToken; + private String serverAdress; + public static SessionData session =new SessionData(); + public String getSessionID() { + return sessionID; + } + public void setSessionID(String sessionID) { + this.sessionID = sessionID; + } + public String getAuthToken() { + return authToken; + } + public void setAuthToken(String authToken) { + this.authToken = authToken; + } + public String getServerAdress() { + return serverAdress; + } + public void setServerAdress(String serverAdress) { + this.serverAdress = serverAdress; + } + + +} diff --git a/Dozentenmodul/src/models/person.java b/Dozentenmodul/src/models/person.java index f4dd5c22..435f3c1d 100644 --- a/Dozentenmodul/src/models/person.java +++ b/Dozentenmodul/src/models/person.java @@ -3,6 +3,9 @@ package models; public class person{ + + private String username; + private String Name; private String Vorname; private String Hochschule; @@ -12,9 +15,21 @@ public class person{ private boolean ischecked; + public static person verantowrtlicher=new person(); public static person ersteller=new person(); + + public static person verantwortlicher=new person(); + + + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getName() { return Name; } diff --git a/Dozentenmodul/src/models/vm.java b/Dozentenmodul/src/models/vm.java deleted file mode 100644 index 34f9ffaa..00000000 --- a/Dozentenmodul/src/models/vm.java +++ /dev/null @@ -1,69 +0,0 @@ -package models; - -import java.awt.List; -import java.util.Date; - - -public class vm { - - private String Laborname; - private String shortDesc; - private String longDesc; - private String comment; - private String OS; - private Date begin; - private Date end; - private List software; - - public static vm vl=new vm(); - public String getLaborname() { - return Laborname; - } - public void setLaborname(String laborname) { - Laborname = laborname; - } - public String getShortDesc() { - return shortDesc; - } - public void setShortDesc(String shortDesc) { - this.shortDesc = shortDesc; - } - public String getLongDesc() { - return longDesc; - } - public void setLongDesc(String longDesc) { - this.longDesc = longDesc; - } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } - public String getOS() { - return OS; - } - public void setOS(String oS) { - OS = oS; - } - public Date getBegin() { - return begin; - } - public void setBegin(Date begin) { - this.begin = begin; - } - public Date getEnd() { - return end; - } - public void setEnd(Date end) { - this.end = end; - } - public List getSoftware() { - return software; - } - public void setSoftware(List software) { - this.software = software; - } - - -} diff --git a/Dozentenmodul/src/thrift/AuthenticationError.java b/Dozentenmodul/src/thrift/AuthenticationError.java new file mode 100644 index 00000000..7d543832 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthenticationError.java @@ -0,0 +1,51 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum AuthenticationError implements org.apache.thrift.TEnum { + GENERIC_ERROR(0), + INVALID_CREDENTIALS(1), + ACCOUNT_SUSPENDED(2), + BANNED_NETWORK(3); + + private final int value; + + private AuthenticationError(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static AuthenticationError findByValue(int value) { + switch (value) { + case 0: + return GENERIC_ERROR; + case 1: + return INVALID_CREDENTIALS; + case 2: + return ACCOUNT_SUSPENDED; + case 3: + return BANNED_NETWORK; + default: + return null; + } + } +} diff --git a/Dozentenmodul/src/thrift/AuthenticationException.java b/Dozentenmodul/src/thrift/AuthenticationException.java new file mode 100644 index 00000000..d416cacf --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthenticationException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException"); + + private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AuthenticationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory()); + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationError number; // required + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see AuthenticationError + */ + NUMBER((short)1, "number"), + MESSAGE((short)2, "message"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUMBER + return NUMBER; + case 2: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationError.class))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap); + } + + public AuthenticationException() { + } + + public AuthenticationException( + AuthenticationError number, + String message) + { + this(); + this.number = number; + this.message = message; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public AuthenticationException(AuthenticationException other) { + if (other.isSetNumber()) { + this.number = other.number; + } + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AuthenticationException deepCopy() { + return new AuthenticationException(this); + } + + @Override + public void clear() { + this.number = null; + this.message = null; + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationError getNumber() { + return this.number; + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationException setNumber(AuthenticationError number) { + this.number = number; + return this; + } + + public void unsetNumber() { + this.number = null; + } + + /** Returns true if field number is set (has been assigned a value) and false otherwise */ + public boolean isSetNumber() { + return this.number != null; + } + + public void setNumberIsSet(boolean value) { + if (!value) { + this.number = null; + } + } + + public String getMessage() { + return this.message; + } + + public AuthenticationException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUMBER: + if (value == null) { + unsetNumber(); + } else { + setNumber((AuthenticationError)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUMBER: + return getNumber(); + + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUMBER: + return isSetNumber(); + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AuthenticationException) + return this.equals((AuthenticationException)that); + return false; + } + + public boolean equals(AuthenticationException that) { + if (that == null) + return false; + + boolean this_present_number = true && this.isSetNumber(); + boolean that_present_number = true && that.isSetNumber(); + if (this_present_number || that_present_number) { + if (!(this_present_number && that_present_number)) + return false; + if (!this.number.equals(that.number)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(AuthenticationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumber()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AuthenticationException("); + boolean first = true; + + sb.append("number:"); + if (this.number == null) { + sb.append("null"); + } else { + sb.append(this.number); + } + first = false; + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class AuthenticationExceptionStandardSchemeFactory implements SchemeFactory { + public AuthenticationExceptionStandardScheme getScheme() { + return new AuthenticationExceptionStandardScheme(); + } + } + + private static class AuthenticationExceptionStandardScheme extends StandardScheme<AuthenticationException> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUMBER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AuthenticationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.number != null) { + oprot.writeFieldBegin(NUMBER_FIELD_DESC); + oprot.writeI32(struct.number.getValue()); + oprot.writeFieldEnd(); + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory { + public AuthenticationExceptionTupleScheme getScheme() { + return new AuthenticationExceptionTupleScheme(); + } + } + + private static class AuthenticationExceptionTupleScheme extends TupleScheme<AuthenticationException> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumber()) { + optionals.set(0); + } + if (struct.isSetMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNumber()) { + oprot.writeI32(struct.number.getValue()); + } + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } + if (incoming.get(1)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/AuthorizationError.java b/Dozentenmodul/src/thrift/AuthorizationError.java new file mode 100644 index 00000000..443be4f4 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthorizationError.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum AuthorizationError implements org.apache.thrift.TEnum { + GENERIC_ERROR(0), + NOT_AUTHENTICATED(1), + NO_PERMISSION(2); + + private final int value; + + private AuthorizationError(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static AuthorizationError findByValue(int value) { + switch (value) { + case 0: + return GENERIC_ERROR; + case 1: + return NOT_AUTHENTICATED; + case 2: + return NO_PERMISSION; + default: + return null; + } + } +} diff --git a/Dozentenmodul/src/thrift/AuthorizationException.java b/Dozentenmodul/src/thrift/AuthorizationException.java new file mode 100644 index 00000000..0d5320c2 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthorizationException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException"); + + private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AuthorizationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory()); + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationError number; // required + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see AuthorizationError + */ + NUMBER((short)1, "number"), + MESSAGE((short)2, "message"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUMBER + return NUMBER; + case 2: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthorizationError.class))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap); + } + + public AuthorizationException() { + } + + public AuthorizationException( + AuthorizationError number, + String message) + { + this(); + this.number = number; + this.message = message; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public AuthorizationException(AuthorizationException other) { + if (other.isSetNumber()) { + this.number = other.number; + } + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AuthorizationException deepCopy() { + return new AuthorizationException(this); + } + + @Override + public void clear() { + this.number = null; + this.message = null; + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationError getNumber() { + return this.number; + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationException setNumber(AuthorizationError number) { + this.number = number; + return this; + } + + public void unsetNumber() { + this.number = null; + } + + /** Returns true if field number is set (has been assigned a value) and false otherwise */ + public boolean isSetNumber() { + return this.number != null; + } + + public void setNumberIsSet(boolean value) { + if (!value) { + this.number = null; + } + } + + public String getMessage() { + return this.message; + } + + public AuthorizationException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUMBER: + if (value == null) { + unsetNumber(); + } else { + setNumber((AuthorizationError)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUMBER: + return getNumber(); + + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUMBER: + return isSetNumber(); + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AuthorizationException) + return this.equals((AuthorizationException)that); + return false; + } + + public boolean equals(AuthorizationException that) { + if (that == null) + return false; + + boolean this_present_number = true && this.isSetNumber(); + boolean that_present_number = true && that.isSetNumber(); + if (this_present_number || that_present_number) { + if (!(this_present_number && that_present_number)) + return false; + if (!this.number.equals(that.number)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(AuthorizationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumber()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AuthorizationException("); + boolean first = true; + + sb.append("number:"); + if (this.number == null) { + sb.append("null"); + } else { + sb.append(this.number); + } + first = false; + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class AuthorizationExceptionStandardSchemeFactory implements SchemeFactory { + public AuthorizationExceptionStandardScheme getScheme() { + return new AuthorizationExceptionStandardScheme(); + } + } + + private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUMBER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AuthorizationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.number != null) { + oprot.writeFieldBegin(NUMBER_FIELD_DESC); + oprot.writeI32(struct.number.getValue()); + oprot.writeFieldEnd(); + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory { + public AuthorizationExceptionTupleScheme getScheme() { + return new AuthorizationExceptionTupleScheme(); + } + } + + private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumber()) { + optionals.set(0); + } + if (struct.isSetMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNumber()) { + oprot.writeI32(struct.number.getValue()); + } + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } + if (incoming.get(1)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/ImageServer.java b/Dozentenmodul/src/thrift/ImageServer.java new file mode 100644 index 00000000..410f437b --- /dev/null +++ b/Dozentenmodul/src/thrift/ImageServer.java @@ -0,0 +1,2871 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ImageServer { + + public interface Iface { + + public boolean ping() throws org.apache.thrift.TException; + + public SessionData authenticate(String username, String password) throws AuthenticationException, org.apache.thrift.TException; + + public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void authenticate(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public boolean ping() throws org.apache.thrift.TException + { + send_ping(); + return recv_ping(); + } + + public void send_ping() throws org.apache.thrift.TException + { + ping_args args = new ping_args(); + sendBase("ping", args); + } + + public boolean recv_ping() throws org.apache.thrift.TException + { + ping_result result = new ping_result(); + receiveBase(result, "ping"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result"); + } + + public SessionData authenticate(String username, String password) throws AuthenticationException, org.apache.thrift.TException + { + send_authenticate(username, password); + return recv_authenticate(); + } + + public void send_authenticate(String username, String password) throws org.apache.thrift.TException + { + authenticate_args args = new authenticate_args(); + args.setUsername(username); + args.setPassword(password); + sendBase("authenticate", args); + } + + public SessionData recv_authenticate() throws AuthenticationException, org.apache.thrift.TException + { + authenticate_result result = new authenticate_result(); + receiveBase(result, "authenticate"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.failure != null) { + throw result.failure; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result"); + } + + public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException + { + send_getUserFromToken(token); + return recv_getUserFromToken(); + } + + public void send_getUserFromToken(String token) throws org.apache.thrift.TException + { + getUserFromToken_args args = new getUserFromToken_args(); + args.setToken(token); + sendBase("getUserFromToken", args); + } + + public UserInfo recv_getUserFromToken() throws InvalidTokenException, org.apache.thrift.TException + { + getUserFromToken_result result = new getUserFromToken_result(); + receiveBase(result, "getUserFromToken"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.failure != null) { + throw result.failure; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { + public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); + ping_args args = new ping_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_ping(); + } + } + + public void authenticate(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + authenticate_call method_call = new authenticate_call(username, password, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall { + private String username; + private String password; + public authenticate_call(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.username = username; + this.password = password; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + authenticate_args args = new authenticate_args(); + args.setUsername(username); + args.setPassword(password); + args.write(prot); + prot.writeMessageEnd(); + } + + public SessionData getResult() throws AuthenticationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_authenticate(); + } + } + + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token; + public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token = token; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getUserFromToken_args args = new getUserFromToken_args(); + args.setToken(token); + args.write(prot); + prot.writeMessageEnd(); + } + + public UserInfo getResult() throws InvalidTokenException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getUserFromToken(); + } + } + + } + + public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); + } + + protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { + processMap.put("ping", new ping()); + processMap.put("authenticate", new authenticate()); + processMap.put("getUserFromToken", new getUserFromToken()); + return processMap; + } + + public static class ping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, ping_args> { + public ping() { + super("ping"); + } + + public ping_args getEmptyArgsInstance() { + return new ping_args(); + } + + protected boolean isOneway() { + return false; + } + + public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { + ping_result result = new ping_result(); + result.success = iface.ping(); + result.setSuccessIsSet(true); + return result; + } + } + + public static class authenticate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, authenticate_args> { + public authenticate() { + super("authenticate"); + } + + public authenticate_args getEmptyArgsInstance() { + return new authenticate_args(); + } + + protected boolean isOneway() { + return false; + } + + public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException { + authenticate_result result = new authenticate_result(); + try { + result.success = iface.authenticate(args.username, args.password); + } catch (AuthenticationException failure) { + result.failure = failure; + } + return result; + } + } + + public static class getUserFromToken<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserFromToken_args> { + public getUserFromToken() { + super("getUserFromToken"); + } + + public getUserFromToken_args getEmptyArgsInstance() { + return new getUserFromToken_args(); + } + + protected boolean isOneway() { + return false; + } + + public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException { + getUserFromToken_result result = new getUserFromToken_result(); + try { + result.success = iface.getUserFromToken(args.token); + } catch (InvalidTokenException failure) { + result.failure = failure; + } + return result; + } + } + + } + + public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); + } + + protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { + processMap.put("ping", new ping()); + processMap.put("authenticate", new authenticate()); + processMap.put("getUserFromToken", new getUserFromToken()); + return processMap; + } + + public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> { + public ping() { + super("ping"); + } + + public ping_args getEmptyArgsInstance() { + return new ping_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + ping_result result = new ping_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + ping_result result = new ping_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.ping(resultHandler); + } + } + + public static class authenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticate_args, SessionData> { + public authenticate() { + super("authenticate"); + } + + public authenticate_args getEmptyArgsInstance() { + return new authenticate_args(); + } + + public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<SessionData>() { + public void onComplete(SessionData o) { + authenticate_result result = new authenticate_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + authenticate_result result = new authenticate_result(); + if (e instanceof AuthenticationException) { + result.failure = (AuthenticationException) e; + result.setFailureIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException { + iface.authenticate(args.username, args.password,resultHandler); + } + } + + public static class getUserFromToken<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserFromToken_args, UserInfo> { + public getUserFromToken() { + super("getUserFromToken"); + } + + public getUserFromToken_args getEmptyArgsInstance() { + return new getUserFromToken_args(); + } + + public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<UserInfo>() { + public void onComplete(UserInfo o) { + getUserFromToken_result result = new getUserFromToken_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getUserFromToken_result result = new getUserFromToken_result(); + if (e instanceof InvalidTokenException) { + result.failure = (InvalidTokenException) e; + result.setFailureIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException { + iface.getUserFromToken(args.token,resultHandler); + } + } + + } + + public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap); + } + + public ping_args() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ping_args(ping_args other) { + } + + public ping_args deepCopy() { + return new ping_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ping_args) + return this.equals((ping_args)that); + return false; + } + + public boolean equals(ping_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ping_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ping_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ping_argsStandardSchemeFactory implements SchemeFactory { + public ping_argsStandardScheme getScheme() { + return new ping_argsStandardScheme(); + } + } + + private static class ping_argsStandardScheme extends StandardScheme<ping_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ping_argsTupleSchemeFactory implements SchemeFactory { + public ping_argsTupleScheme getScheme() { + return new ping_argsTupleScheme(); + } + } + + private static class ping_argsTupleScheme extends TupleScheme<ping_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); + } + + public ping_result() { + } + + public ping_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ping_result(ping_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public ping_result deepCopy() { + return new ping_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public ping_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ping_result) + return this.equals((ping_result)that); + return false; + } + + public boolean equals(ping_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ping_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ping_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ping_resultStandardSchemeFactory implements SchemeFactory { + public ping_resultStandardScheme getScheme() { + return new ping_resultStandardScheme(); + } + } + + private static class ping_resultStandardScheme extends StandardScheme<ping_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ping_resultTupleSchemeFactory implements SchemeFactory { + public ping_resultTupleScheme getScheme() { + return new ping_resultTupleScheme(); + } + } + + private static class ping_resultTupleScheme extends TupleScheme<ping_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args"); + + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new authenticate_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory()); + } + + public String username; // required + public String password; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USERNAME((short)1, "username"), + PASSWORD((short)2, "password"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USERNAME + return USERNAME; + case 2: // PASSWORD + return PASSWORD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap); + } + + public authenticate_args() { + } + + public authenticate_args( + String username, + String password) + { + this(); + this.username = username; + this.password = password; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public authenticate_args(authenticate_args other) { + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetPassword()) { + this.password = other.password; + } + } + + public authenticate_args deepCopy() { + return new authenticate_args(this); + } + + @Override + public void clear() { + this.username = null; + this.password = null; + } + + public String getUsername() { + return this.username; + } + + public authenticate_args setUsername(String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public String getPassword() { + return this.password; + } + + public authenticate_args setPassword(String password) { + this.password = password; + return this; + } + + public void unsetPassword() { + this.password = null; + } + + /** Returns true if field password is set (has been assigned a value) and false otherwise */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USERNAME: + return getUsername(); + + case PASSWORD: + return getPassword(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USERNAME: + return isSetUsername(); + case PASSWORD: + return isSetPassword(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof authenticate_args) + return this.equals((authenticate_args)that); + return false; + } + + public boolean equals(authenticate_args that) { + if (that == null) + return false; + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(authenticate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("authenticate_args("); + boolean first = true; + + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + if (!first) sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class authenticate_argsStandardSchemeFactory implements SchemeFactory { + public authenticate_argsStandardScheme getScheme() { + return new authenticate_argsStandardScheme(); + } + } + + private static class authenticate_argsStandardScheme extends StandardScheme<authenticate_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + if (struct.password != null) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class authenticate_argsTupleSchemeFactory implements SchemeFactory { + public authenticate_argsTupleScheme getScheme() { + return new authenticate_argsTupleScheme(); + } + } + + private static class authenticate_argsTupleScheme extends TupleScheme<authenticate_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUsername()) { + optionals.set(0); + } + if (struct.isSetPassword()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + if (incoming.get(1)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + } + } + + } + + public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new authenticate_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory()); + } + + public SessionData success; // required + public AuthenticationException failure; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + FAILURE((short)1, "failure"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // FAILURE + return FAILURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.class))); + tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap); + } + + public authenticate_result() { + } + + public authenticate_result( + SessionData success, + AuthenticationException failure) + { + this(); + this.success = success; + this.failure = failure; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public authenticate_result(authenticate_result other) { + if (other.isSetSuccess()) { + this.success = new SessionData(other.success); + } + if (other.isSetFailure()) { + this.failure = new AuthenticationException(other.failure); + } + } + + public authenticate_result deepCopy() { + return new authenticate_result(this); + } + + @Override + public void clear() { + this.success = null; + this.failure = null; + } + + public SessionData getSuccess() { + return this.success; + } + + public authenticate_result setSuccess(SessionData success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public AuthenticationException getFailure() { + return this.failure; + } + + public authenticate_result setFailure(AuthenticationException failure) { + this.failure = failure; + return this; + } + + public void unsetFailure() { + this.failure = null; + } + + /** Returns true if field failure is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure() { + return this.failure != null; + } + + public void setFailureIsSet(boolean value) { + if (!value) { + this.failure = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((SessionData)value); + } + break; + + case FAILURE: + if (value == null) { + unsetFailure(); + } else { + setFailure((AuthenticationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case FAILURE: + return getFailure(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case FAILURE: + return isSetFailure(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof authenticate_result) + return this.equals((authenticate_result)that); + return false; + } + + public boolean equals(authenticate_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_failure = true && this.isSetFailure(); + boolean that_present_failure = true && that.isSetFailure(); + if (this_present_failure || that_present_failure) { + if (!(this_present_failure && that_present_failure)) + return false; + if (!this.failure.equals(that.failure)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(authenticate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("authenticate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("failure:"); + if (this.failure == null) { + sb.append("null"); + } else { + sb.append(this.failure); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class authenticate_resultStandardSchemeFactory implements SchemeFactory { + public authenticate_resultStandardScheme getScheme() { + return new authenticate_resultStandardScheme(); + } + } + + private static class authenticate_resultStandardScheme extends StandardScheme<authenticate_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new SessionData(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // FAILURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.failure = new AuthenticationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.failure != null) { + oprot.writeFieldBegin(FAILURE_FIELD_DESC); + struct.failure.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class authenticate_resultTupleSchemeFactory implements SchemeFactory { + public authenticate_resultTupleScheme getScheme() { + return new authenticate_resultTupleScheme(); + } + } + + private static class authenticate_resultTupleScheme extends TupleScheme<authenticate_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetFailure()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetFailure()) { + struct.failure.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new SessionData(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.failure = new AuthenticationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } + } + } + + } + + public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args"); + + private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserFromToken_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory()); + } + + public String token; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN((short)1, "token"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN + return TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap); + } + + public getUserFromToken_args() { + } + + public getUserFromToken_args( + String token) + { + this(); + this.token = token; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getUserFromToken_args(getUserFromToken_args other) { + if (other.isSetToken()) { + this.token = other.token; + } + } + + public getUserFromToken_args deepCopy() { + return new getUserFromToken_args(this); + } + + @Override + public void clear() { + this.token = null; + } + + public String getToken() { + return this.token; + } + + public getUserFromToken_args setToken(String token) { + this.token = token; + return this; + } + + public void unsetToken() { + this.token = null; + } + + /** Returns true if field token is set (has been assigned a value) and false otherwise */ + public boolean isSetToken() { + return this.token != null; + } + + public void setTokenIsSet(boolean value) { + if (!value) { + this.token = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN: + if (value == null) { + unsetToken(); + } else { + setToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN: + return getToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN: + return isSetToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserFromToken_args) + return this.equals((getUserFromToken_args)that); + return false; + } + + public boolean equals(getUserFromToken_args that) { + if (that == null) + return false; + + boolean this_present_token = true && this.isSetToken(); + boolean that_present_token = true && that.isSetToken(); + if (this_present_token || that_present_token) { + if (!(this_present_token && that_present_token)) + return false; + if (!this.token.equals(that.token)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserFromToken_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserFromToken_args("); + boolean first = true; + + sb.append("token:"); + if (this.token == null) { + sb.append("null"); + } else { + sb.append(this.token); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserFromToken_argsStandardSchemeFactory implements SchemeFactory { + public getUserFromToken_argsStandardScheme getScheme() { + return new getUserFromToken_argsStandardScheme(); + } + } + + private static class getUserFromToken_argsStandardScheme extends StandardScheme<getUserFromToken_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token = iprot.readString(); + struct.setTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token != null) { + oprot.writeFieldBegin(TOKEN_FIELD_DESC); + oprot.writeString(struct.token); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory { + public getUserFromToken_argsTupleScheme getScheme() { + return new getUserFromToken_argsTupleScheme(); + } + } + + private static class getUserFromToken_argsTupleScheme extends TupleScheme<getUserFromToken_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken()) { + oprot.writeString(struct.token); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token = iprot.readString(); + struct.setTokenIsSet(true); + } + } + } + + } + + public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory()); + } + + public UserInfo success; // required + public InvalidTokenException failure; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + FAILURE((short)1, "failure"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // FAILURE + return FAILURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class))); + tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap); + } + + public getUserFromToken_result() { + } + + public getUserFromToken_result( + UserInfo success, + InvalidTokenException failure) + { + this(); + this.success = success; + this.failure = failure; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getUserFromToken_result(getUserFromToken_result other) { + if (other.isSetSuccess()) { + this.success = new UserInfo(other.success); + } + if (other.isSetFailure()) { + this.failure = new InvalidTokenException(other.failure); + } + } + + public getUserFromToken_result deepCopy() { + return new getUserFromToken_result(this); + } + + @Override + public void clear() { + this.success = null; + this.failure = null; + } + + public UserInfo getSuccess() { + return this.success; + } + + public getUserFromToken_result setSuccess(UserInfo success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidTokenException getFailure() { + return this.failure; + } + + public getUserFromToken_result setFailure(InvalidTokenException failure) { + this.failure = failure; + return this; + } + + public void unsetFailure() { + this.failure = null; + } + + /** Returns true if field failure is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure() { + return this.failure != null; + } + + public void setFailureIsSet(boolean value) { + if (!value) { + this.failure = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((UserInfo)value); + } + break; + + case FAILURE: + if (value == null) { + unsetFailure(); + } else { + setFailure((InvalidTokenException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case FAILURE: + return getFailure(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case FAILURE: + return isSetFailure(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserFromToken_result) + return this.equals((getUserFromToken_result)that); + return false; + } + + public boolean equals(getUserFromToken_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_failure = true && this.isSetFailure(); + boolean that_present_failure = true && that.isSetFailure(); + if (this_present_failure || that_present_failure) { + if (!(this_present_failure && that_present_failure)) + return false; + if (!this.failure.equals(that.failure)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserFromToken_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserFromToken_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("failure:"); + if (this.failure == null) { + sb.append("null"); + } else { + sb.append(this.failure); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserFromToken_resultStandardSchemeFactory implements SchemeFactory { + public getUserFromToken_resultStandardScheme getScheme() { + return new getUserFromToken_resultStandardScheme(); + } + } + + private static class getUserFromToken_resultStandardScheme extends StandardScheme<getUserFromToken_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new UserInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // FAILURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.failure = new InvalidTokenException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.failure != null) { + oprot.writeFieldBegin(FAILURE_FIELD_DESC); + struct.failure.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory { + public getUserFromToken_resultTupleScheme getScheme() { + return new getUserFromToken_resultTupleScheme(); + } + } + + private static class getUserFromToken_resultTupleScheme extends TupleScheme<getUserFromToken_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetFailure()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetFailure()) { + struct.failure.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new UserInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.failure = new InvalidTokenException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } + } + } + + } + +} diff --git a/Dozentenmodul/src/thrift/InvalidTokenException.java b/Dozentenmodul/src/thrift/InvalidTokenException.java new file mode 100644 index 00000000..914199b5 --- /dev/null +++ b/Dozentenmodul/src/thrift/InvalidTokenException.java @@ -0,0 +1,280 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class InvalidTokenException extends TException implements org.apache.thrift.TBase<InvalidTokenException, InvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTokenException> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTokenException"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidTokenExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidTokenExceptionTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTokenException.class, metaDataMap); + } + + public InvalidTokenException() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public InvalidTokenException(InvalidTokenException other) { + } + + public InvalidTokenException deepCopy() { + return new InvalidTokenException(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidTokenException) + return this.equals((InvalidTokenException)that); + return false; + } + + public boolean equals(InvalidTokenException that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(InvalidTokenException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidTokenException("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class InvalidTokenExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidTokenExceptionStandardScheme getScheme() { + return new InvalidTokenExceptionStandardScheme(); + } + } + + private static class InvalidTokenExceptionStandardScheme extends StandardScheme<InvalidTokenException> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidTokenException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidTokenException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidTokenExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidTokenExceptionTupleScheme getScheme() { + return new InvalidTokenExceptionTupleScheme(); + } + } + + private static class InvalidTokenExceptionTupleScheme extends TupleScheme<InvalidTokenException> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java new file mode 100644 index 00000000..ecbc689c --- /dev/null +++ b/Dozentenmodul/src/thrift/MasterThriftConnection.java @@ -0,0 +1,38 @@ +package thrift; + +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import org.apache.thrift.transport.TTransportException; + +import thrift.ImageServer.Client; + + + +public class MasterThriftConnection { + final TTransport transport = new TSocket("132.230.4.16", 9090); + public Client getMasterThriftConnection() + { + + try { + transport.open(); + } catch (TTransportException e) { + System.out.println("Keine Verbindung möglich!"); + return null; + } + + final TProtocol protocol = new TBinaryProtocol(transport); + final Client client = new Client(protocol); + + + System.out.println("Der Server läuft!"); + + return client; + } + + public void closeMasterThriftConnection() + { + transport.close(); + } +} diff --git a/Dozentenmodul/src/thrift/SessionData.java b/Dozentenmodul/src/thrift/SessionData.java new file mode 100644 index 00000000..51f0f80b --- /dev/null +++ b/Dozentenmodul/src/thrift/SessionData.java @@ -0,0 +1,588 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable, Comparable<SessionData> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SERVER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("serverAddress", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SessionDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SessionDataTupleSchemeFactory()); + } + + public String sessionId; // required + public String authToken; // required + public String serverAddress; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + AUTH_TOKEN((short)2, "authToken"), + SERVER_ADDRESS((short)3, "serverAddress"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // AUTH_TOKEN + return AUTH_TOKEN; + case 3: // SERVER_ADDRESS + return SERVER_ADDRESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID"))); + tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.SERVER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("serverAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SessionData.class, metaDataMap); + } + + public SessionData() { + } + + public SessionData( + String sessionId, + String authToken, + String serverAddress) + { + this(); + this.sessionId = sessionId; + this.authToken = authToken; + this.serverAddress = serverAddress; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public SessionData(SessionData other) { + if (other.isSetSessionId()) { + this.sessionId = other.sessionId; + } + if (other.isSetAuthToken()) { + this.authToken = other.authToken; + } + if (other.isSetServerAddress()) { + this.serverAddress = other.serverAddress; + } + } + + public SessionData deepCopy() { + return new SessionData(this); + } + + @Override + public void clear() { + this.sessionId = null; + this.authToken = null; + this.serverAddress = null; + } + + public String getSessionId() { + return this.sessionId; + } + + public SessionData setSessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + public void unsetSessionId() { + this.sessionId = null; + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return this.sessionId != null; + } + + public void setSessionIdIsSet(boolean value) { + if (!value) { + this.sessionId = null; + } + } + + public String getAuthToken() { + return this.authToken; + } + + public SessionData setAuthToken(String authToken) { + this.authToken = authToken; + return this; + } + + public void unsetAuthToken() { + this.authToken = null; + } + + /** Returns true if field authToken is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthToken() { + return this.authToken != null; + } + + public void setAuthTokenIsSet(boolean value) { + if (!value) { + this.authToken = null; + } + } + + public String getServerAddress() { + return this.serverAddress; + } + + public SessionData setServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return this; + } + + public void unsetServerAddress() { + this.serverAddress = null; + } + + /** Returns true if field serverAddress is set (has been assigned a value) and false otherwise */ + public boolean isSetServerAddress() { + return this.serverAddress != null; + } + + public void setServerAddressIsSet(boolean value) { + if (!value) { + this.serverAddress = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((String)value); + } + break; + + case AUTH_TOKEN: + if (value == null) { + unsetAuthToken(); + } else { + setAuthToken((String)value); + } + break; + + case SERVER_ADDRESS: + if (value == null) { + unsetServerAddress(); + } else { + setServerAddress((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case AUTH_TOKEN: + return getAuthToken(); + + case SERVER_ADDRESS: + return getServerAddress(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case AUTH_TOKEN: + return isSetAuthToken(); + case SERVER_ADDRESS: + return isSetServerAddress(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SessionData) + return this.equals((SessionData)that); + return false; + } + + public boolean equals(SessionData that) { + if (that == null) + return false; + + boolean this_present_sessionId = true && this.isSetSessionId(); + boolean that_present_sessionId = true && that.isSetSessionId(); + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (!this.sessionId.equals(that.sessionId)) + return false; + } + + boolean this_present_authToken = true && this.isSetAuthToken(); + boolean that_present_authToken = true && that.isSetAuthToken(); + if (this_present_authToken || that_present_authToken) { + if (!(this_present_authToken && that_present_authToken)) + return false; + if (!this.authToken.equals(that.authToken)) + return false; + } + + boolean this_present_serverAddress = true && this.isSetServerAddress(); + boolean that_present_serverAddress = true && that.isSetServerAddress(); + if (this_present_serverAddress || that_present_serverAddress) { + if (!(this_present_serverAddress && that_present_serverAddress)) + return false; + if (!this.serverAddress.equals(that.serverAddress)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(SessionData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, other.serverAddress); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SessionData("); + boolean first = true; + + sb.append("sessionId:"); + if (this.sessionId == null) { + sb.append("null"); + } else { + sb.append(this.sessionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("authToken:"); + if (this.authToken == null) { + sb.append("null"); + } else { + sb.append(this.authToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("serverAddress:"); + if (this.serverAddress == null) { + sb.append("null"); + } else { + sb.append(this.serverAddress); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class SessionDataStandardSchemeFactory implements SchemeFactory { + public SessionDataStandardScheme getScheme() { + return new SessionDataStandardScheme(); + } + } + + private static class SessionDataStandardScheme extends StandardScheme<SessionData> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SessionData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.sessionId = iprot.readString(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AUTH_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.authToken = iprot.readString(); + struct.setAuthTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SERVER_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serverAddress = iprot.readString(); + struct.setServerAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SessionData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.sessionId != null) { + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeString(struct.sessionId); + oprot.writeFieldEnd(); + } + if (struct.authToken != null) { + oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC); + oprot.writeString(struct.authToken); + oprot.writeFieldEnd(); + } + if (struct.serverAddress != null) { + oprot.writeFieldBegin(SERVER_ADDRESS_FIELD_DESC); + oprot.writeString(struct.serverAddress); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SessionDataTupleSchemeFactory implements SchemeFactory { + public SessionDataTupleScheme getScheme() { + return new SessionDataTupleScheme(); + } + } + + private static class SessionDataTupleScheme extends TupleScheme<SessionData> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetAuthToken()) { + optionals.set(1); + } + if (struct.isSetServerAddress()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSessionId()) { + oprot.writeString(struct.sessionId); + } + if (struct.isSetAuthToken()) { + oprot.writeString(struct.authToken); + } + if (struct.isSetServerAddress()) { + oprot.writeString(struct.serverAddress); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.sessionId = iprot.readString(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + struct.authToken = iprot.readString(); + struct.setAuthTokenIsSet(true); + } + if (incoming.get(2)) { + struct.serverAddress = iprot.readString(); + struct.setServerAddressIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/ThriftConnection.java b/Dozentenmodul/src/thrift/ThriftConnection.java index 21baff96..311125f5 100644 --- a/Dozentenmodul/src/thrift/ThriftConnection.java +++ b/Dozentenmodul/src/thrift/ThriftConnection.java @@ -10,7 +10,8 @@ import server.Server; import server.Server.Client; public class ThriftConnection { - final TTransport transport = new TSocket("141.79.128.121", 9090); + //final TTransport transport = new TSocket("141.79.128.121", 9090); + final TTransport transport = new TSocket("141.79.128.102", 9090); public Client getThriftConnection() { @@ -25,13 +26,14 @@ public class ThriftConnection { final Server.Client client = new Server.Client(protocol); - System.out.println("Der Server läuft!"); + System.out.println("Verbindung wurde aufgebaut."); return client; } public void closeThriftConnection() { + System.out.println("Verbindung wird geplant getrennt..."); transport.close(); } } diff --git a/Dozentenmodul/src/thrift/UserInfo.java b/Dozentenmodul/src/thrift/UserInfo.java new file mode 100644 index 00000000..56678646 --- /dev/null +++ b/Dozentenmodul/src/thrift/UserInfo.java @@ -0,0 +1,688 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInfo> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo"); + + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField E_MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("eMail", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UserInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UserInfoTupleSchemeFactory()); + } + + public String userId; // required + public String firstName; // required + public String lastName; // required + public String eMail; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_ID((short)1, "userId"), + FIRST_NAME((short)2, "firstName"), + LAST_NAME((short)3, "lastName"), + E_MAIL((short)4, "eMail"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_ID + return USER_ID; + case 2: // FIRST_NAME + return FIRST_NAME; + case 3: // LAST_NAME + return LAST_NAME; + case 4: // E_MAIL + return E_MAIL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.E_MAIL, new org.apache.thrift.meta_data.FieldMetaData("eMail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInfo.class, metaDataMap); + } + + public UserInfo() { + } + + public UserInfo( + String userId, + String firstName, + String lastName, + String eMail) + { + this(); + this.userId = userId; + this.firstName = firstName; + this.lastName = lastName; + this.eMail = eMail; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public UserInfo(UserInfo other) { + if (other.isSetUserId()) { + this.userId = other.userId; + } + if (other.isSetFirstName()) { + this.firstName = other.firstName; + } + if (other.isSetLastName()) { + this.lastName = other.lastName; + } + if (other.isSetEMail()) { + this.eMail = other.eMail; + } + } + + public UserInfo deepCopy() { + return new UserInfo(this); + } + + @Override + public void clear() { + this.userId = null; + this.firstName = null; + this.lastName = null; + this.eMail = null; + } + + public String getUserId() { + return this.userId; + } + + public UserInfo setUserId(String userId) { + this.userId = userId; + return this; + } + + public void unsetUserId() { + this.userId = null; + } + + /** Returns true if field userId is set (has been assigned a value) and false otherwise */ + public boolean isSetUserId() { + return this.userId != null; + } + + public void setUserIdIsSet(boolean value) { + if (!value) { + this.userId = null; + } + } + + public String getFirstName() { + return this.firstName; + } + + public UserInfo setFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + public void unsetFirstName() { + this.firstName = null; + } + + /** Returns true if field firstName is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstName() { + return this.firstName != null; + } + + public void setFirstNameIsSet(boolean value) { + if (!value) { + this.firstName = null; + } + } + + public String getLastName() { + return this.lastName; + } + + public UserInfo setLastName(String lastName) { + this.lastName = lastName; + return this; + } + + public void unsetLastName() { + this.lastName = null; + } + + /** Returns true if field lastName is set (has been assigned a value) and false otherwise */ + public boolean isSetLastName() { + return this.lastName != null; + } + + public void setLastNameIsSet(boolean value) { + if (!value) { + this.lastName = null; + } + } + + public String getEMail() { + return this.eMail; + } + + public UserInfo setEMail(String eMail) { + this.eMail = eMail; + return this; + } + + public void unsetEMail() { + this.eMail = null; + } + + /** Returns true if field eMail is set (has been assigned a value) and false otherwise */ + public boolean isSetEMail() { + return this.eMail != null; + } + + public void setEMailIsSet(boolean value) { + if (!value) { + this.eMail = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_ID: + if (value == null) { + unsetUserId(); + } else { + setUserId((String)value); + } + break; + + case FIRST_NAME: + if (value == null) { + unsetFirstName(); + } else { + setFirstName((String)value); + } + break; + + case LAST_NAME: + if (value == null) { + unsetLastName(); + } else { + setLastName((String)value); + } + break; + + case E_MAIL: + if (value == null) { + unsetEMail(); + } else { + setEMail((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_ID: + return getUserId(); + + case FIRST_NAME: + return getFirstName(); + + case LAST_NAME: + return getLastName(); + + case E_MAIL: + return getEMail(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_ID: + return isSetUserId(); + case FIRST_NAME: + return isSetFirstName(); + case LAST_NAME: + return isSetLastName(); + case E_MAIL: + return isSetEMail(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UserInfo) + return this.equals((UserInfo)that); + return false; + } + + public boolean equals(UserInfo that) { + if (that == null) + return false; + + boolean this_present_userId = true && this.isSetUserId(); + boolean that_present_userId = true && that.isSetUserId(); + if (this_present_userId || that_present_userId) { + if (!(this_present_userId && that_present_userId)) + return false; + if (!this.userId.equals(that.userId)) + return false; + } + + boolean this_present_firstName = true && this.isSetFirstName(); + boolean that_present_firstName = true && that.isSetFirstName(); + if (this_present_firstName || that_present_firstName) { + if (!(this_present_firstName && that_present_firstName)) + return false; + if (!this.firstName.equals(that.firstName)) + return false; + } + + boolean this_present_lastName = true && this.isSetLastName(); + boolean that_present_lastName = true && that.isSetLastName(); + if (this_present_lastName || that_present_lastName) { + if (!(this_present_lastName && that_present_lastName)) + return false; + if (!this.lastName.equals(that.lastName)) + return false; + } + + boolean this_present_eMail = true && this.isSetEMail(); + boolean that_present_eMail = true && that.isSetEMail(); + if (this_present_eMail || that_present_eMail) { + if (!(this_present_eMail && that_present_eMail)) + return false; + if (!this.eMail.equals(that.eMail)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(UserInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, other.eMail); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("UserInfo("); + boolean first = true; + + sb.append("userId:"); + if (this.userId == null) { + sb.append("null"); + } else { + sb.append(this.userId); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstName:"); + if (this.firstName == null) { + sb.append("null"); + } else { + sb.append(this.firstName); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastName:"); + if (this.lastName == null) { + sb.append("null"); + } else { + sb.append(this.lastName); + } + first = false; + if (!first) sb.append(", "); + sb.append("eMail:"); + if (this.eMail == null) { + sb.append("null"); + } else { + sb.append(this.eMail); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class UserInfoStandardSchemeFactory implements SchemeFactory { + public UserInfoStandardScheme getScheme() { + return new UserInfoStandardScheme(); + } + } + + private static class UserInfoStandardScheme extends StandardScheme<UserInfo> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UserInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userId = iprot.readString(); + struct.setUserIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FIRST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LAST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // E_MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.eMail = iprot.readString(); + struct.setEMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UserInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userId != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userId); + oprot.writeFieldEnd(); + } + if (struct.firstName != null) { + oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC); + oprot.writeString(struct.firstName); + oprot.writeFieldEnd(); + } + if (struct.lastName != null) { + oprot.writeFieldBegin(LAST_NAME_FIELD_DESC); + oprot.writeString(struct.lastName); + oprot.writeFieldEnd(); + } + if (struct.eMail != null) { + oprot.writeFieldBegin(E_MAIL_FIELD_DESC); + oprot.writeString(struct.eMail); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UserInfoTupleSchemeFactory implements SchemeFactory { + public UserInfoTupleScheme getScheme() { + return new UserInfoTupleScheme(); + } + } + + private static class UserInfoTupleScheme extends TupleScheme<UserInfo> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserId()) { + optionals.set(0); + } + if (struct.isSetFirstName()) { + optionals.set(1); + } + if (struct.isSetLastName()) { + optionals.set(2); + } + if (struct.isSetEMail()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUserId()) { + oprot.writeString(struct.userId); + } + if (struct.isSetFirstName()) { + oprot.writeString(struct.firstName); + } + if (struct.isSetLastName()) { + oprot.writeString(struct.lastName); + } + if (struct.isSetEMail()) { + oprot.writeString(struct.eMail); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.userId = iprot.readString(); + struct.setUserIdIsSet(true); + } + if (incoming.get(1)) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } + if (incoming.get(2)) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } + if (incoming.get(3)) { + struct.eMail = iprot.readString(); + struct.setEMailIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/communicate.thrift b/Dozentenmodul/src/thrift/communicate.thrift deleted file mode 100644 index e69de29b..00000000 --- a/Dozentenmodul/src/thrift/communicate.thrift +++ /dev/null |
