diff options
| author | unknown | 2014-04-10 09:45:29 +0200 |
|---|---|---|
| committer | unknown | 2014-04-10 09:45:29 +0200 |
| commit | 851e1be0f5fac264cec8a120f2f02d8dcdb9ee7f (patch) | |
| tree | 5b86607ee60544e60089f34e8f4ca51ef2f05300 /Dozentenmodulserver/src | |
| parent | rgethgdfb (diff) | |
| parent | Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff) | |
| download | tutor-module-851e1be0f5fac264cec8a120f2f02d8dcdb9ee7f.tar.gz tutor-module-851e1be0f5fac264cec8a120f2f02d8dcdb9ee7f.tar.xz tutor-module-851e1be0f5fac264cec8a120f2f02d8dcdb9ee7f.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
Dozentenmodul/bin/GUI/MainMenue_GUI$1.class
Dozentenmodul/bin/GUI/MainMenue_GUI$2.class
Dozentenmodul/bin/GUI/MainMenue_GUI$3.class
Dozentenmodul/bin/GUI/MainMenue_GUI.class
Dozentenmodul/bin/gui/DeleteImage_GUI$1.class
Dozentenmodul/bin/gui/DeleteImage_GUI$3.class
Dozentenmodul/bin/gui/DeleteImage_GUI$5.class
Dozentenmodul/bin/gui/DeleteImage_GUI$7.class
Dozentenmodul/bin/gui/DeleteImage_GUI$8.class
Dozentenmodul/bin/gui/image/DeleteImage_GUI$2.class
Dozentenmodul/bin/gui/image/DeleteImage_GUI$4.class
Dozentenmodul/bin/gui/image/DeleteImage_GUI$6.class
Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
Dozentenmodul/bin/gui/intro/MainMenue_GUI.class
Dozentenmodul/src/GUI/MainMenue_GUI.java
Dozentenmodul/src/gui/image/DeleteImage_GUI.java
Dozentenmodulserver/bin/server/BinaryListener.class
Dozentenmodulserver/bin/server/Server$AsyncClient$DeleteFtpUser_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$Factory.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getAllOS_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getFtpUser_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getImageData_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getImageList_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getLectureData_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getLectureList_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getPathOfImage_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$getPersonData_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$startFileCopy_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$updateImageData_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$writeLecturedata_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient$writeVLdata_call.class
Dozentenmodulserver/bin/server/Server$AsyncClient.class
Dozentenmodulserver/bin/server/Server$AsyncIface.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$DeleteFtpUser$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$DeleteFtpUser.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getAllOS$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getAllOS.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getFtpUser$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getFtpUser.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getImageData$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getImageData.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getImageList$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getImageList.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getLectureData$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getLectureData.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getLectureList$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getLectureList.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getPathOfImage$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getPathOfImage.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getPersonData$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$getPersonData.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$startFileCopy$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$startFileCopy.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$updateImageData$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$updateImageData.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$writeLecturedata$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$writeLecturedata.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$writeVLdata$1.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor$writeVLdata.class
Dozentenmodulserver/bin/server/Server$AsyncProcessor.class
Dozentenmodulserver/bin/server/Server$Client$Factory.class
Dozentenmodulserver/bin/server/Server$Client.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args$DeleteFtpUser_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args$DeleteFtpUser_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args$DeleteFtpUser_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args$DeleteFtpUser_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args$_Fields.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_args.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result$DeleteFtpUser_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result$DeleteFtpUser_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result$DeleteFtpUser_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result$DeleteFtpUser_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result$_Fields.class
Dozentenmodulserver/bin/server/Server$DeleteFtpUser_result.class
Dozentenmodulserver/bin/server/Server$Iface.class
Dozentenmodulserver/bin/server/Server$Processor$DeleteFtpUser.class
Dozentenmodulserver/bin/server/Server$Processor$getAllOS.class
Dozentenmodulserver/bin/server/Server$Processor$getFtpUser.class
Dozentenmodulserver/bin/server/Server$Processor$getImageData.class
Dozentenmodulserver/bin/server/Server$Processor$getImageList.class
Dozentenmodulserver/bin/server/Server$Processor$getLectureData.class
Dozentenmodulserver/bin/server/Server$Processor$getLectureList.class
Dozentenmodulserver/bin/server/Server$Processor$getPathOfImage.class
Dozentenmodulserver/bin/server/Server$Processor$getPersonData.class
Dozentenmodulserver/bin/server/Server$Processor$startFileCopy.class
Dozentenmodulserver/bin/server/Server$Processor$updateImageData.class
Dozentenmodulserver/bin/server/Server$Processor$writeLecturedata.class
Dozentenmodulserver/bin/server/Server$Processor$writeVLdata.class
Dozentenmodulserver/bin/server/Server$Processor.class
Dozentenmodulserver/bin/server/Server$getAllOS_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getAllOS_args$getAllOS_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getAllOS_args$getAllOS_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getAllOS_args$getAllOS_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getAllOS_args$getAllOS_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getAllOS_args.class
Dozentenmodulserver/bin/server/Server$getAllOS_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getAllOS_result$getAllOS_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getAllOS_result$getAllOS_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getAllOS_result$getAllOS_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getAllOS_result$getAllOS_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getAllOS_result.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args$getFtpUser_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args$getFtpUser_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args$getFtpUser_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args$getFtpUser_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getFtpUser_args.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result$getFtpUser_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result$getFtpUser_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result$getFtpUser_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result$getFtpUser_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getFtpUser_result.class
Dozentenmodulserver/bin/server/Server$getImageData_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getImageData_args$getImageData_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getImageData_args$getImageData_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageData_args$getImageData_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getImageData_args$getImageData_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageData_args.class
Dozentenmodulserver/bin/server/Server$getImageData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getImageData_result$getImageData_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getImageData_result$getImageData_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageData_result$getImageData_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getImageData_result$getImageData_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageData_result.class
Dozentenmodulserver/bin/server/Server$getImageList_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getImageList_args$getImageList_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getImageList_args$getImageList_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageList_args$getImageList_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getImageList_args$getImageList_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageList_args.class
Dozentenmodulserver/bin/server/Server$getImageList_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getImageList_result$getImageList_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getImageList_result$getImageList_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageList_result$getImageList_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getImageList_result$getImageList_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getImageList_result.class
Dozentenmodulserver/bin/server/Server$getLectureData_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureData_args.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$getLectureData_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$getLectureData_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$getLectureData_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$getLectureData_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureData_result.class
Dozentenmodulserver/bin/server/Server$getLectureList_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getLectureList_args$getLectureList_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getLectureList_args$getLectureList_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureList_args$getLectureList_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getLectureList_args$getLectureList_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureList_args.class
Dozentenmodulserver/bin/server/Server$getLectureList_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getLectureList_result$getLectureList_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getLectureList_result$getLectureList_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureList_result$getLectureList_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getLectureList_result$getLectureList_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getLectureList_result.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args$getPathOfImage_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args$getPathOfImage_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args$getPathOfImage_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args$getPathOfImage_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_args.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result$getPathOfImage_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result$getPathOfImage_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result$getPathOfImage_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result$getPathOfImage_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPathOfImage_result.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$getPersonData_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$getPersonData_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$getPersonData_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$getPersonData_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPersonData_args.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$getPersonData_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$getPersonData_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$getPersonData_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$getPersonData_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$getPersonData_result.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$_Fields.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$startFileCopy_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$startFileCopy_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$startFileCopy_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$startFileCopy_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result.class
Dozentenmodulserver/bin/server/Server$updateImageData_args$_Fields.class
Dozentenmodulserver/bin/server/Server$updateImageData_args$updateImageData_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$updateImageData_args$updateImageData_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$updateImageData_args$updateImageData_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$updateImageData_args$updateImageData_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$updateImageData_args.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$updateImageData_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$updateImageData_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$updateImageData_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$updateImageData_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$updateImageData_result.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$_Fields.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$writeLecturedata_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$writeLecturedata_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$writeLecturedata_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$writeLecturedata_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args$_Fields.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args$writeVLdata_argsStandardScheme.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args$writeVLdata_argsStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args$writeVLdata_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args$writeVLdata_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result$_Fields.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result$writeVLdata_resultStandardScheme.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result$writeVLdata_resultStandardSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result$writeVLdata_resultTupleScheme.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result$writeVLdata_resultTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeVLdata_result.class
Dozentenmodulserver/bin/server/Server.class
Dozentenmodulserver/bin/server/ServerHandler.class
Dozentenmodulserver/bin/server/startServer.class
Dozentenmodulserver/bin/sql/SQL.class
Dozentenmodulserver/src/server/Server.java
Dozentenmodulserver/src/server/ServerHandler.java
Dozentenmodulserver/src/sql/SQL.java
Dozentenmodulserver/thrift/server.thrift
Diffstat (limited to 'Dozentenmodulserver/src')
| -rw-r--r-- | Dozentenmodulserver/src/server/BinaryListener.java | 8 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/Server.java | 2298 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/ServerHandler.java | 17 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/startServer.java | 4 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/sql/SQL.java | 493 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/util/XMLCreator.java | 42 |
6 files changed, 2683 insertions, 179 deletions
diff --git a/Dozentenmodulserver/src/server/BinaryListener.java b/Dozentenmodulserver/src/server/BinaryListener.java index 7d8b94b5..8d592992 100644 --- a/Dozentenmodulserver/src/server/BinaryListener.java +++ b/Dozentenmodulserver/src/server/BinaryListener.java @@ -1,5 +1,7 @@ package server; +import java.util.Date; + import org.apache.log4j.Logger; import org.apache.thrift.server.TServer; import org.apache.thrift.server.TServer.Args; @@ -20,13 +22,13 @@ public class BinaryListener implements Runnable final TServerTransport transport; try { transport = new TServerSocket( 9090 ); - log.info("Connected to Port 9090"); + log.info(new Date()+" - Connected to Port 9090"); } catch ( TTransportException e ) { - log.fatal( "Could not listen on port 9090" ); + log.fatal( new Date() +" - Could not listen on port 9090" ); return; } TServer server = new TSimpleServer( new Args( transport ).processor( processor ) ); - log.info("Starting Running Server"); + log.info(new Date() +" - Started Running Server"); server.serve(); } diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java index af526905..50b25821 100644 --- a/Dozentenmodulserver/src/server/Server.java +++ b/Dozentenmodulserver/src/server/Server.java @@ -64,6 +64,8 @@ public class Server { public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException; + public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -94,6 +96,8 @@ public class Server { public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -444,12 +448,51 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result"); } +<<<<<<< HEAD public boolean deleteImageData(String imageid, String imageversion) { SQL sql = new SQL(); return sql.deleteImage( imageid, imageversion); } +======= + public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + { + send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id); + return recv_updateLecturedata(); + } + + public void send_updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + { + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + sendBase("updateLecturedata", args); + } + + public boolean recv_updateLecturedata() throws org.apache.thrift.TException + { + updateLecturedata_result result = new updateLecturedata_result(); + receiveBase(result, "updateLecturedata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecturedata failed: unknown result"); + } +>>>>>>> 0c626844e491923e61657f5483586b9a2a3f6bb8 } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { @@ -972,6 +1015,80 @@ public class Server { } } + public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateLecturedata_call method_call = new updateLecturedata_call(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateLecturedata_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + private String newName; + private String shortdesc; + private String desc; + private String startDate; + private String endDate; + private boolean isActive; + private String imagename; + private String firstname; + private String lastname; + private String university; + private String Mail; + private String Tel; + private String Fak; + private String id; + public updateLecturedata_call(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, 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.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecturedata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + 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_updateLecturedata(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -998,6 +1115,7 @@ public class Server { processMap.put("getImageData", new getImageData()); processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateLecturedata", new updateLecturedata()); return processMap; } @@ -1266,6 +1384,27 @@ public class Server { } } + public static class updateLecturedata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLecturedata_args> { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateLecturedata_result getResult(I iface, updateLecturedata_args args) throws org.apache.thrift.TException { + updateLecturedata_result result = new updateLecturedata_result(); + result.success = iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id); + result.setSuccessIsSet(true); + return result; + } + } + } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { @@ -1292,6 +1431,7 @@ public class Server { processMap.put("getImageData", new getImageData()); processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateLecturedata", new updateLecturedata()); return processMap; } @@ -1963,6 +2103,58 @@ public class Server { } } + public static class updateLecturedata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateLecturedata_args, Boolean> { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_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) { + updateLecturedata_result result = new updateLecturedata_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; + updateLecturedata_result result = new updateLecturedata_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, updateLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id,resultHandler); + } + } + } public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> { @@ -14317,4 +14509,2110 @@ public class Server { + public static class updateLecturedata_args implements org.apache.thrift.TBase<updateLecturedata_args, updateLecturedata_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_args"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField SHORTDESC_FIELD_DESC = new org.apache.thrift.protocol.TField("shortdesc", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.STRING, (short)-6); + private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)-7); + private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-10); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-11); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-12); + private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-13); + private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-14); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-15); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecturedata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_argsTupleSchemeFactory()); + } + + public String name; // required + public String newName; // required + public String shortdesc; // required + public String desc; // required + public String startDate; // required + public String endDate; // required + public boolean isActive; // required + public String imagename; // required + public String firstname; // required + public String lastname; // required + public String university; // required + public String Mail; // required + public String Tel; // required + public String Fak; // required + public String id; // 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 { + NAME((short)-1, "name"), + NEW_NAME((short)-2, "newName"), + SHORTDESC((short)-3, "shortdesc"), + DESC((short)-4, "desc"), + START_DATE((short)-5, "startDate"), + END_DATE((short)-6, "endDate"), + IS_ACTIVE((short)-7, "isActive"), + IMAGENAME((short)-8, "imagename"), + FIRSTNAME((short)-9, "firstname"), + LASTNAME((short)-10, "lastname"), + UNIVERSITY((short)-11, "university"), + MAIL((short)-12, "Mail"), + TEL((short)-13, "Tel"), + FAK((short)-14, "Fak"), + ID((short)-15, "id"); + + 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: // NAME + return NAME; + case -2: // NEW_NAME + return NEW_NAME; + case -3: // SHORTDESC + return SHORTDESC; + case -4: // DESC + return DESC; + case -5: // START_DATE + return START_DATE; + case -6: // END_DATE + return END_DATE; + case -7: // IS_ACTIVE + return IS_ACTIVE; + case -8: // IMAGENAME + return IMAGENAME; + case -9: // FIRSTNAME + return FIRSTNAME; + case -10: // LASTNAME + return LASTNAME; + case -11: // UNIVERSITY + return UNIVERSITY; + case -12: // MAIL + return MAIL; + case -13: // TEL + return TEL; + case -14: // FAK + return FAK; + case -15: // ID + return ID; + 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 __ISACTIVE_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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SHORTDESC, new org.apache.thrift.meta_data.FieldMetaData("shortdesc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRSTNAME, 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.LASTNAME, 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.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("Mail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", 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(updateLecturedata_args.class, metaDataMap); + } + + public updateLecturedata_args() { + } + + public updateLecturedata_args( + String name, + String newName, + String shortdesc, + String desc, + String startDate, + String endDate, + boolean isActive, + String imagename, + String firstname, + String lastname, + String university, + String Mail, + String Tel, + String Fak, + String id) + { + this(); + this.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + setIsActiveIsSet(true); + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public updateLecturedata_args(updateLecturedata_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetNewName()) { + this.newName = other.newName; + } + if (other.isSetShortdesc()) { + this.shortdesc = other.shortdesc; + } + if (other.isSetDesc()) { + this.desc = other.desc; + } + if (other.isSetStartDate()) { + this.startDate = other.startDate; + } + if (other.isSetEndDate()) { + this.endDate = other.endDate; + } + this.isActive = other.isActive; + if (other.isSetImagename()) { + this.imagename = other.imagename; + } + if (other.isSetFirstname()) { + this.firstname = other.firstname; + } + if (other.isSetLastname()) { + this.lastname = other.lastname; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + if (other.isSetMail()) { + this.Mail = other.Mail; + } + if (other.isSetTel()) { + this.Tel = other.Tel; + } + if (other.isSetFak()) { + this.Fak = other.Fak; + } + if (other.isSetId()) { + this.id = other.id; + } + } + + public updateLecturedata_args deepCopy() { + return new updateLecturedata_args(this); + } + + @Override + public void clear() { + this.name = null; + this.newName = null; + this.shortdesc = null; + this.desc = null; + this.startDate = null; + this.endDate = null; + setIsActiveIsSet(false); + this.isActive = false; + this.imagename = null; + this.firstname = null; + this.lastname = null; + this.university = null; + this.Mail = null; + this.Tel = null; + this.Fak = null; + this.id = null; + } + + public String getName() { + return this.name; + } + + public updateLecturedata_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getNewName() { + return this.newName; + } + + public updateLecturedata_args setNewName(String newName) { + this.newName = newName; + return this; + } + + public void unsetNewName() { + this.newName = null; + } + + /** Returns true if field newName is set (has been assigned a value) and false otherwise */ + public boolean isSetNewName() { + return this.newName != null; + } + + public void setNewNameIsSet(boolean value) { + if (!value) { + this.newName = null; + } + } + + public String getShortdesc() { + return this.shortdesc; + } + + public updateLecturedata_args setShortdesc(String shortdesc) { + this.shortdesc = shortdesc; + return this; + } + + public void unsetShortdesc() { + this.shortdesc = null; + } + + /** Returns true if field shortdesc is set (has been assigned a value) and false otherwise */ + public boolean isSetShortdesc() { + return this.shortdesc != null; + } + + public void setShortdescIsSet(boolean value) { + if (!value) { + this.shortdesc = null; + } + } + + public String getDesc() { + return this.desc; + } + + public updateLecturedata_args setDesc(String desc) { + this.desc = desc; + return this; + } + + public void unsetDesc() { + this.desc = null; + } + + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; + } + + public void setDescIsSet(boolean value) { + if (!value) { + this.desc = null; + } + } + + public String getStartDate() { + return this.startDate; + } + + public updateLecturedata_args setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + public void unsetStartDate() { + this.startDate = null; + } + + /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ + public boolean isSetStartDate() { + return this.startDate != null; + } + + public void setStartDateIsSet(boolean value) { + if (!value) { + this.startDate = null; + } + } + + public String getEndDate() { + return this.endDate; + } + + public updateLecturedata_args setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + public void unsetEndDate() { + this.endDate = null; + } + + /** Returns true if field endDate is set (has been assigned a value) and false otherwise */ + public boolean isSetEndDate() { + return this.endDate != null; + } + + public void setEndDateIsSet(boolean value) { + if (!value) { + this.endDate = null; + } + } + + public boolean isIsActive() { + return this.isActive; + } + + public updateLecturedata_args setIsActive(boolean isActive) { + this.isActive = isActive; + setIsActiveIsSet(true); + return this; + } + + public void unsetIsActive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + /** Returns true if field isActive is set (has been assigned a value) and false otherwise */ + public boolean isSetIsActive() { + return EncodingUtils.testBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + public void setIsActiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value); + } + + public String getImagename() { + return this.imagename; + } + + public updateLecturedata_args setImagename(String imagename) { + this.imagename = imagename; + return this; + } + + public void unsetImagename() { + this.imagename = null; + } + + /** Returns true if field imagename is set (has been assigned a value) and false otherwise */ + public boolean isSetImagename() { + return this.imagename != null; + } + + public void setImagenameIsSet(boolean value) { + if (!value) { + this.imagename = null; + } + } + + public String getFirstname() { + return this.firstname; + } + + public updateLecturedata_args 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 updateLecturedata_args 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 getUniversity() { + return this.university; + } + + public updateLecturedata_args setUniversity(String university) { + this.university = university; + return this; + } + + public void unsetUniversity() { + this.university = null; + } + + /** Returns true if field university is set (has been assigned a value) and false otherwise */ + public boolean isSetUniversity() { + return this.university != null; + } + + public void setUniversityIsSet(boolean value) { + if (!value) { + this.university = null; + } + } + + public String getMail() { + return this.Mail; + } + + public updateLecturedata_args setMail(String Mail) { + this.Mail = Mail; + return this; + } + + public void unsetMail() { + this.Mail = null; + } + + /** Returns true if field Mail is set (has been assigned a value) and false otherwise */ + public boolean isSetMail() { + return this.Mail != null; + } + + public void setMailIsSet(boolean value) { + if (!value) { + this.Mail = null; + } + } + + public String getTel() { + return this.Tel; + } + + public updateLecturedata_args setTel(String Tel) { + this.Tel = Tel; + return this; + } + + public void unsetTel() { + this.Tel = null; + } + + /** Returns true if field Tel is set (has been assigned a value) and false otherwise */ + public boolean isSetTel() { + return this.Tel != null; + } + + public void setTelIsSet(boolean value) { + if (!value) { + this.Tel = null; + } + } + + public String getFak() { + return this.Fak; + } + + public updateLecturedata_args setFak(String Fak) { + this.Fak = Fak; + return this; + } + + public void unsetFak() { + this.Fak = null; + } + + /** Returns true if field Fak is set (has been assigned a value) and false otherwise */ + public boolean isSetFak() { + return this.Fak != null; + } + + public void setFakIsSet(boolean value) { + if (!value) { + this.Fak = null; + } + } + + public String getId() { + return this.id; + } + + public updateLecturedata_args setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case NEW_NAME: + if (value == null) { + unsetNewName(); + } else { + setNewName((String)value); + } + break; + + case SHORTDESC: + if (value == null) { + unsetShortdesc(); + } else { + setShortdesc((String)value); + } + break; + + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + + case START_DATE: + if (value == null) { + unsetStartDate(); + } else { + setStartDate((String)value); + } + break; + + case END_DATE: + if (value == null) { + unsetEndDate(); + } else { + setEndDate((String)value); + } + break; + + case IS_ACTIVE: + if (value == null) { + unsetIsActive(); + } else { + setIsActive((Boolean)value); + } + break; + + case IMAGENAME: + if (value == null) { + unsetImagename(); + } else { + setImagename((String)value); + } + break; + + case FIRSTNAME: + if (value == null) { + unsetFirstname(); + } else { + setFirstname((String)value); + } + break; + + case LASTNAME: + if (value == null) { + unsetLastname(); + } else { + setLastname((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case TEL: + if (value == null) { + unsetTel(); + } else { + setTel((String)value); + } + break; + + case FAK: + if (value == null) { + unsetFak(); + } else { + setFak((String)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case NEW_NAME: + return getNewName(); + + case SHORTDESC: + return getShortdesc(); + + case DESC: + return getDesc(); + + case START_DATE: + return getStartDate(); + + case END_DATE: + return getEndDate(); + + case IS_ACTIVE: + return Boolean.valueOf(isIsActive()); + + case IMAGENAME: + return getImagename(); + + case FIRSTNAME: + return getFirstname(); + + case LASTNAME: + return getLastname(); + + case UNIVERSITY: + return getUniversity(); + + case MAIL: + return getMail(); + + case TEL: + return getTel(); + + case FAK: + return getFak(); + + case ID: + return getId(); + + } + 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 NAME: + return isSetName(); + case NEW_NAME: + return isSetNewName(); + case SHORTDESC: + return isSetShortdesc(); + case DESC: + return isSetDesc(); + case START_DATE: + return isSetStartDate(); + case END_DATE: + return isSetEndDate(); + case IS_ACTIVE: + return isSetIsActive(); + case IMAGENAME: + return isSetImagename(); + case FIRSTNAME: + return isSetFirstname(); + case LASTNAME: + return isSetLastname(); + case UNIVERSITY: + return isSetUniversity(); + case MAIL: + return isSetMail(); + case TEL: + return isSetTel(); + case FAK: + return isSetFak(); + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecturedata_args) + return this.equals((updateLecturedata_args)that); + return false; + } + + public boolean equals(updateLecturedata_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_newName = true && this.isSetNewName(); + boolean that_present_newName = true && that.isSetNewName(); + if (this_present_newName || that_present_newName) { + if (!(this_present_newName && that_present_newName)) + return false; + if (!this.newName.equals(that.newName)) + return false; + } + + boolean this_present_shortdesc = true && this.isSetShortdesc(); + boolean that_present_shortdesc = true && that.isSetShortdesc(); + if (this_present_shortdesc || that_present_shortdesc) { + if (!(this_present_shortdesc && that_present_shortdesc)) + return false; + if (!this.shortdesc.equals(that.shortdesc)) + return false; + } + + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) + return false; + if (!this.desc.equals(that.desc)) + return false; + } + + boolean this_present_startDate = true && this.isSetStartDate(); + boolean that_present_startDate = true && that.isSetStartDate(); + if (this_present_startDate || that_present_startDate) { + if (!(this_present_startDate && that_present_startDate)) + return false; + if (!this.startDate.equals(that.startDate)) + return false; + } + + boolean this_present_endDate = true && this.isSetEndDate(); + boolean that_present_endDate = true && that.isSetEndDate(); + if (this_present_endDate || that_present_endDate) { + if (!(this_present_endDate && that_present_endDate)) + return false; + if (!this.endDate.equals(that.endDate)) + return false; + } + + boolean this_present_isActive = true; + boolean that_present_isActive = true; + if (this_present_isActive || that_present_isActive) { + if (!(this_present_isActive && that_present_isActive)) + return false; + if (this.isActive != that.isActive) + return false; + } + + boolean this_present_imagename = true && this.isSetImagename(); + boolean that_present_imagename = true && that.isSetImagename(); + if (this_present_imagename || that_present_imagename) { + if (!(this_present_imagename && that_present_imagename)) + return false; + if (!this.imagename.equals(that.imagename)) + 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_university = true && this.isSetUniversity(); + boolean that_present_university = true && that.isSetUniversity(); + if (this_present_university || that_present_university) { + if (!(this_present_university && that_present_university)) + return false; + if (!this.university.equals(that.university)) + return false; + } + + boolean this_present_Mail = true && this.isSetMail(); + boolean that_present_Mail = true && that.isSetMail(); + if (this_present_Mail || that_present_Mail) { + if (!(this_present_Mail && that_present_Mail)) + return false; + if (!this.Mail.equals(that.Mail)) + return false; + } + + boolean this_present_Tel = true && this.isSetTel(); + boolean that_present_Tel = true && that.isSetTel(); + if (this_present_Tel || that_present_Tel) { + if (!(this_present_Tel && that_present_Tel)) + return false; + if (!this.Tel.equals(that.Tel)) + return false; + } + + boolean this_present_Fak = true && this.isSetFak(); + boolean that_present_Fak = true && that.isSetFak(); + if (this_present_Fak || that_present_Fak) { + if (!(this_present_Fak && that_present_Fak)) + return false; + if (!this.Fak.equals(that.Fak)) + return false; + } + + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecturedata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShortdesc()).compareTo(other.isSetShortdesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShortdesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortdesc, other.shortdesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(other.isSetEndDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, other.endDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsActive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImagename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename); + 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(isSetUniversity()).compareTo(other.isSetUniversity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniversity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Mail, other.Mail); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTel()).compareTo(other.isSetTel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFak()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + 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("updateLecturedata_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("newName:"); + if (this.newName == null) { + sb.append("null"); + } else { + sb.append(this.newName); + } + first = false; + if (!first) sb.append(", "); + sb.append("shortdesc:"); + if (this.shortdesc == null) { + sb.append("null"); + } else { + sb.append(this.shortdesc); + } + first = false; + if (!first) sb.append(", "); + sb.append("desc:"); + if (this.desc == null) { + sb.append("null"); + } else { + sb.append(this.desc); + } + first = false; + if (!first) sb.append(", "); + sb.append("startDate:"); + if (this.startDate == null) { + sb.append("null"); + } else { + sb.append(this.startDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("endDate:"); + if (this.endDate == null) { + sb.append("null"); + } else { + sb.append(this.endDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("isActive:"); + sb.append(this.isActive); + first = false; + if (!first) sb.append(", "); + sb.append("imagename:"); + if (this.imagename == null) { + sb.append("null"); + } else { + sb.append(this.imagename); + } + 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("university:"); + if (this.university == null) { + sb.append("null"); + } else { + sb.append(this.university); + } + first = false; + if (!first) sb.append(", "); + sb.append("Mail:"); + if (this.Mail == null) { + sb.append("null"); + } else { + sb.append(this.Mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("Tel:"); + if (this.Tel == null) { + sb.append("null"); + } else { + sb.append(this.Tel); + } + first = false; + if (!first) sb.append(", "); + sb.append("Fak:"); + if (this.Fak == null) { + sb.append("null"); + } else { + sb.append(this.Fak); + } + first = false; + if (!first) sb.append(", "); + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + 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 updateLecturedata_argsStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_argsStandardScheme getScheme() { + return new updateLecturedata_argsStandardScheme(); + } + } + + private static class updateLecturedata_argsStandardScheme extends StandardScheme<updateLecturedata_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // NEW_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // SHORTDESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // START_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // END_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // IS_ACTIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -8: // IMAGENAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -9: // FIRSTNAME + 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 -10: // LASTNAME + 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 -11: // UNIVERSITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -12: // MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Mail = iprot.readString(); + struct.setMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -13: // TEL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -14: // FAK + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -15: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(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, updateLecturedata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } + if (struct.Fak != null) { + oprot.writeFieldBegin(FAK_FIELD_DESC); + oprot.writeString(struct.Fak); + oprot.writeFieldEnd(); + } + if (struct.Tel != null) { + oprot.writeFieldBegin(TEL_FIELD_DESC); + oprot.writeString(struct.Tel); + oprot.writeFieldEnd(); + } + if (struct.Mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.Mail); + oprot.writeFieldEnd(); + } + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.lastname != null) { + oprot.writeFieldBegin(LASTNAME_FIELD_DESC); + oprot.writeString(struct.lastname); + oprot.writeFieldEnd(); + } + if (struct.firstname != null) { + oprot.writeFieldBegin(FIRSTNAME_FIELD_DESC); + oprot.writeString(struct.firstname); + oprot.writeFieldEnd(); + } + if (struct.imagename != null) { + oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); + oprot.writeString(struct.imagename); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC); + oprot.writeBool(struct.isActive); + oprot.writeFieldEnd(); + if (struct.endDate != null) { + oprot.writeFieldBegin(END_DATE_FIELD_DESC); + oprot.writeString(struct.endDate); + oprot.writeFieldEnd(); + } + if (struct.startDate != null) { + oprot.writeFieldBegin(START_DATE_FIELD_DESC); + oprot.writeString(struct.startDate); + oprot.writeFieldEnd(); + } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } + if (struct.shortdesc != null) { + oprot.writeFieldBegin(SHORTDESC_FIELD_DESC); + oprot.writeString(struct.shortdesc); + oprot.writeFieldEnd(); + } + if (struct.newName != null) { + oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); + oprot.writeString(struct.newName); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecturedata_argsTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_argsTupleScheme getScheme() { + return new updateLecturedata_argsTupleScheme(); + } + } + + private static class updateLecturedata_argsTupleScheme extends TupleScheme<updateLecturedata_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetNewName()) { + optionals.set(1); + } + if (struct.isSetShortdesc()) { + optionals.set(2); + } + if (struct.isSetDesc()) { + optionals.set(3); + } + if (struct.isSetStartDate()) { + optionals.set(4); + } + if (struct.isSetEndDate()) { + optionals.set(5); + } + if (struct.isSetIsActive()) { + optionals.set(6); + } + if (struct.isSetImagename()) { + optionals.set(7); + } + if (struct.isSetFirstname()) { + optionals.set(8); + } + if (struct.isSetLastname()) { + optionals.set(9); + } + if (struct.isSetUniversity()) { + optionals.set(10); + } + if (struct.isSetMail()) { + optionals.set(11); + } + if (struct.isSetTel()) { + optionals.set(12); + } + if (struct.isSetFak()) { + optionals.set(13); + } + if (struct.isSetId()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetNewName()) { + oprot.writeString(struct.newName); + } + if (struct.isSetShortdesc()) { + oprot.writeString(struct.shortdesc); + } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } + if (struct.isSetStartDate()) { + oprot.writeString(struct.startDate); + } + if (struct.isSetEndDate()) { + oprot.writeString(struct.endDate); + } + if (struct.isSetIsActive()) { + oprot.writeBool(struct.isActive); + } + if (struct.isSetImagename()) { + oprot.writeString(struct.imagename); + } + if (struct.isSetFirstname()) { + oprot.writeString(struct.firstname); + } + if (struct.isSetLastname()) { + oprot.writeString(struct.lastname); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + if (struct.isSetMail()) { + oprot.writeString(struct.Mail); + } + if (struct.isSetTel()) { + oprot.writeString(struct.Tel); + } + if (struct.isSetFak()) { + oprot.writeString(struct.Fak); + } + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(15); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } + if (incoming.get(2)) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } + if (incoming.get(3)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(4)) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } + if (incoming.get(5)) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } + if (incoming.get(6)) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } + if (incoming.get(7)) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } + if (incoming.get(8)) { + struct.firstname = iprot.readString(); + struct.setFirstnameIsSet(true); + } + if (incoming.get(9)) { + struct.lastname = iprot.readString(); + struct.setLastnameIsSet(true); + } + if (incoming.get(10)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + if (incoming.get(11)) { + struct.Mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(12)) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } + if (incoming.get(13)) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } + if (incoming.get(14)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + } + } + + } + + public static class updateLecturedata_result implements org.apache.thrift.TBase<updateLecturedata_result, updateLecturedata_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_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 updateLecturedata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_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(updateLecturedata_result.class, metaDataMap); + } + + public updateLecturedata_result() { + } + + public updateLecturedata_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public updateLecturedata_result(updateLecturedata_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public updateLecturedata_result deepCopy() { + return new updateLecturedata_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public updateLecturedata_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 updateLecturedata_result) + return this.equals((updateLecturedata_result)that); + return false; + } + + public boolean equals(updateLecturedata_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(updateLecturedata_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("updateLecturedata_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 updateLecturedata_resultStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_resultStandardScheme getScheme() { + return new updateLecturedata_resultStandardScheme(); + } + } + + private static class updateLecturedata_resultStandardScheme extends StandardScheme<updateLecturedata_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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, updateLecturedata_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 updateLecturedata_resultTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_resultTupleScheme getScheme() { + return new updateLecturedata_resultTupleScheme(); + } + } + + private static class updateLecturedata_resultTupleScheme extends TupleScheme<updateLecturedata_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_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, updateLecturedata_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); + } + } + } + + } + } diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index c3abd69c..e8fbb0d6 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -201,7 +201,7 @@ public class ServerHandler implements Server.Iface { XMLCreator xml=new XMLCreator(con, name); try { xml.create(name); - System.out.println("creator durch"); + System.out.println(new Date() + " - Creator beendet"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -303,5 +303,20 @@ public class ServerHandler implements Server.Iface { return null; } +<<<<<<< HEAD +======= + + + @Override + public boolean updateLecturedata(String name, String newName, + String shortdesc, String desc, String startDate, String endDate, + boolean isActive, String imagename, String firstname, + String lastname, String university, String Mail, String Tel, + String Fak, String id) throws TException { + // TODO Auto-generated method stub + return false; + } + +>>>>>>> 0c626844e491923e61657f5483586b9a2a3f6bb8 } diff --git a/Dozentenmodulserver/src/server/startServer.java b/Dozentenmodulserver/src/server/startServer.java index 7a93183d..e1ab22c0 100644 --- a/Dozentenmodulserver/src/server/startServer.java +++ b/Dozentenmodulserver/src/server/startServer.java @@ -23,7 +23,7 @@ public class startServer { public static void main(String[] args) { BasicConfigurator.configure(); - log.info( new Date() + ", starting Application\n" ); + log.info( new Date() + " - starting Application\n" ); Thread t; t = new Thread(new BinaryListener()); servers.add(t); @@ -42,7 +42,7 @@ public class startServer { } } } - log.info( new Date()+", all Servers shut down, exiting...\n" ); + log.info( new Date()+" - all Servers shut down, exiting...\n" ); } diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index ca3f0f8e..3a2cfdbd 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -10,314 +10,434 @@ import java.text.SimpleDateFormat; import java.util.Date;
import java.util.Random;
+import org.apache.log4j.Logger;
+
+import server.BinaryListener;
public class SQL {
+
+ private static Logger log = Logger.getLogger( BinaryListener.class );
- public Connection getConnection()
- {
+ public Connection getConnection() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (InstantiationException | IllegalAccessException
| ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- }
+ }
try {
- Connection con=DriverManager.getConnection("jdbc:mysql://127.0.0.1/bwLehrpool?user=root&password=slx-ng-open");
+ Connection con = DriverManager
+ .getConnection("jdbc:mysql://127.0.0.1/bwLehrpool?user=root&password=slx-ng-open");
con.setAutoCommit(false);
+ log.info(new Date() + " - Connection returned to Client.");
return con;
} catch (SQLException e) {
// TODO Auto-generated catch block
+ log.info(new Date() + " - Could not return connection to Client.");
e.printStackTrace();
}
return null;
}
-
- public int writeFTPUser(Connection con,String user, String pass)
- {
+
+ public int writeFTPUser(Connection con, String user, String pass) {
Statement stm;
try {
- stm=con.createStatement();
-
- int ret=stm.executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Uid`,`Gid`,`Dir`)VALUES('"+user+"',SHA1('"+pass+"'),'10001','12345','/srv/openslx/nfs/temp');");
+ stm = con.createStatement();
+
+ int ret = stm
+ .executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Uid`,`Gid`,`Dir`)VALUES('"
+ + user
+ + "',SHA1('"
+ + pass
+ + "'),'10001','12345','/srv/openslx/nfs/temp');");
con.commit();
+ log.info(new Date() + " - created FTPUser "+user+" : "+pass+".");
return ret;
} catch (SQLException e) {
// TODO Auto-generated catch block
+ log.info(new Date() + " - FTPUser not created.");
e.printStackTrace();
}
return -1;
}
-
- public int DeleteUser(Connection con, String user)
- {
+
+ public int DeleteUser(Connection con, String user) {
Statement stm;
try {
- stm=con.createStatement();
-
- int ret=stm.executeUpdate("DELETE FROM `bwLehrpool`.`FtpUsers` where User like '"+user+"';");
+ stm = con.createStatement();
+
+ int ret = stm
+ .executeUpdate("DELETE FROM `bwLehrpool`.`FtpUsers` where User like '"
+ + user + "';");
con.commit();
+ log.info(new Date() + " - FTPUser "+user+" deleted.");
return ret;
} catch (SQLException e) {
// TODO Auto-generated catch block
+ log.info(new Date() + " - Could not delete FTPUser "+user+".");
e.printStackTrace();
}
return -1;
}
-
- public ResultSet getImage(Connection con)
- {
+
+ public ResultSet getImage(Connection con) {
try {
- Statement stm=con.createStatement();
-
- return stm.executeQuery("SELECT image_name FROM bwLehrpool.m_VLData_imageInfo;");
-
-
+ Statement stm = con.createStatement();
+
+ return stm
+ .executeQuery("SELECT image_name FROM bwLehrpool.m_VLData_imageInfo;");
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
-
+
return null;
}
- public ResultSet getPathOfImage(Connection con, String image_id, String version)
- {
+ public ResultSet getPathOfImage(Connection con, String image_id,
+ String version) {
try {
- Statement stm=con.createStatement();
-
- return stm.executeQuery("SELECT image_path FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID='"+image_id+"' and imageVersion='"+version+"';");
-
-
+ Statement stm = con.createStatement();
+
+ return stm
+ .executeQuery("SELECT image_path FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID='"
+ + image_id
+ + "' and imageVersion='"
+ + version
+ + "';");
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
-
+
return null;
}
-
- public int setInstitution(Connection con,String university)
- {
+
+ public int setInstitution(Connection con, String university) {
try {
- Statement stm=con.createStatement();
-
-
-
- ResultSet ret=stm.executeQuery("SELECT * FROM bwLehrpool.m_institution where name like'"+university+"';");
- if(ret.next()==false)
- {
- Random rand=new Random();
- int id=rand.nextInt();
- stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_institution`(`institutionID`,`name`)VALUES('"+id+"','"+university+"');");
+ Statement stm = con.createStatement();
+
+ ResultSet ret = stm
+ .executeQuery("SELECT * FROM bwLehrpool.m_institution where name like'"
+ + university + "';");
+ if (ret.next() == false) {
+ Random rand = new Random();
+ int id = rand.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_institution`(`institutionID`,`name`)VALUES('"
+ + id + "','" + university + "');");
con.commit();
- ResultSet rs=stm.executeQuery("SELECT institutionID FROM bwLehrpool.m_institution WHERE name like '"+university+"';");
+ ResultSet rs = stm
+ .executeQuery("SELECT institutionID FROM bwLehrpool.m_institution WHERE name like '"
+ + university + "';");
rs.next();
return rs.getInt("institutionID");
- }
- else
- {
+ } else {
return ret.getInt("institutionID");
}
-
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return -1;
}
-
-
-
- public int setPerson(Connection con,String login, String lastname, String firstname, String mail, Date lastlogin,int Institution)
- {
+
+ public int setPerson(Connection con, String login, String lastname,
+ String firstname, String mail, Date lastlogin, int Institution) {
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
- Statement stm=con.createStatement();
-
- ResultSet ret=stm.executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"+lastname+"' and Vorname like '"+firstname+"';");
- if(ret.next()==false)
- {
- Random rand=new Random();
- int id=rand.nextInt();
- stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_user`(`userID`,`loginName`,`nachname`,`vorname`,`mail`,`lastLogin`,`institution`)VALUES('"+id+"','Platzhalter','"+lastname+"','"+firstname+"','"+mail+"','"+formatter.format(new Date())+"','"+Institution+"');");
- con.commit();
- ResultSet rs=stm.executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"+lastname+"' and Vorname like '"+firstname+"';");
- rs.next();
- return rs.getInt("userID");
- }
- else
- {
+ Statement stm = con.createStatement();
+
+ ResultSet ret = stm
+ .executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"
+ + lastname
+ + "' and Vorname like '"
+ + firstname
+ + "';");
+ if (ret.next() == false) {
+ Random rand = new Random();
+ int id = rand.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_user`(`userID`,`loginName`,`nachname`,`vorname`,`mail`,`lastLogin`,`institution`)VALUES('"
+ + id
+ + "','Platzhalter','"
+ + lastname
+ + "','"
+ + firstname
+ + "','"
+ + mail
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + Institution
+ + "');");
+ con.commit();
+ ResultSet rs = stm
+ .executeQuery("SELECT userID FROM bwLehrpool.m_user where Nachname like '"
+ + lastname
+ + "' and Vorname like '"
+ + firstname
+ + "';");
+ rs.next();
+ return rs.getInt("userID");
+ } else {
return ret.getInt("userID");
}
-
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return -1;
}
-
- public boolean setImageData(Connection con, int pk_person, boolean license, boolean internet, long cpu, long ram, String imagename, String imagePath)
- {
-
+
+ public boolean setImageData(Connection con, int pk_person, boolean license,
+ boolean internet, long cpu, long ram, String imagename,
+ String imagePath) {
+
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
-
- int internet_bol=0;
- int license_bol=0;
- if(internet==true)
- {
- internet_bol=1;
+
+ int internet_bol = 0;
+ int license_bol = 0;
+ if (internet == true) {
+ internet_bol = 1;
}
- if(license==true)
- {
- license_bol=1;
+ if (license == true) {
+ license_bol = 1;
}
try {
- Statement stm=con.createStatement();
- Random random=new Random();
- int uid=random.nextInt();
- stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`)VALUES('"+uid+"',1,'"+imagename+"','"+imagePath+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"',1,1,1,1,1,1,0,0,'"+license_bol+"','"+internet_bol+"','"+ram+"','"+cpu+"');");
+ Statement stm = con.createStatement();
+ Random random = new Random();
+ int uid = random.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`)VALUES('"
+ + uid //GUID_imageID
+ + "',1,'" //imageVersion
+ + imagename //image_name
+ + "','"
+ + imagePath //image_path
+ + "','"
+ + formatter.format(new Date()) //image_lastCall
+ + "','"
+ + formatter.format(new Date()) //image_create_time
+ + "','"
+ + formatter.format(new Date()) //image_update_time
+ + "','"
+ + pk_person //image_owner
+ + "','"
+ + pk_person //image_change_by
+ + "','"
+ + formatter.format(new Date()) //rec_create_time
+ + "','"
+ + formatter.format(new Date()) //rec_change_time
+ + "','"
+ + pk_person //rec_owner
+ + "','"
+ + pk_person //rec_change_by
+ + "',0" //content_operatingSystem
+ + ",1" //status_isCompressed
+ + ",1" //status_isSecure
+ + ",1" //status_isOptimzed
+ + ",1" //status_isValid
+ + ",1" //status_isReady
+ + ",0" //status_isDeleted
+ + ",0,'" //status_isLastOfficialVersion
+ + license_bol //cond_hasLicenseRestriction
+ + "','"
+ + internet_bol //cond_hasInternetRestriction
+ + "','"
+ + ram //cond_minRAM
+ + "','"
+ + cpu //cond_minCPUs
+ + "');");
con.commit();
-
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return true;
-
+
}
-
- public ResultSet getImageList(Connection con){
+
+ public ResultSet getImageList(Connection con) {
try {
- Statement stm=con.createStatement();
-
- return stm.executeQuery("SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, '' as lecture,vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID and vl.image_name not in (SELECT vl.image_name FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID) union SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, lect.name as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;");
-
-
+ Statement stm = con.createStatement();
+
+ return stm
+ .executeQuery("SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, '' as lecture,vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID and vl.image_name not in (SELECT vl.image_name FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID) union SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name, lect.name as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;");
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
-
- public ResultSet getLectureList(Connection con){
+
+ public ResultSet getLectureList(Connection con) {
try {
- Statement stm=con.createStatement();
-
- return stm.executeQuery("SELECT l.lectureID, l.name, l.isActive,l.startTime,l.endTime,l.lastUsed,l.description, i.image_name, concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_lecture l, bwLehrpool.m_VLData_imageInfo i, bwLehrpool.m_user u where i.GUID_imageID=l.imageID and l.admin_owner=u.userID;");
-
-
+ Statement stm = con.createStatement();
+
+ return stm
+ .executeQuery("SELECT l.lectureID, l.name, l.isActive,l.startTime,l.endTime,l.lastUsed,l.description, i.image_name, concat(u.Nachname,' ',u.Vorname) as user FROM bwLehrpool.m_VLData_lecture l, bwLehrpool.m_VLData_imageInfo i, bwLehrpool.m_user u where i.GUID_imageID=l.imageID and l.admin_owner=u.userID;");
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
-
-
- public ResultSet getAllOS(Connection con)
- {
-
-
+
+ public ResultSet getAllOS(Connection con) {
+
try {
- Statement stm=con.createStatement();
- return stm.executeQuery("SELECT name FROM bwLehrpool.m_operatingSystem;");
+ Statement stm = con.createStatement();
+ return stm
+ .executeQuery("SELECT name FROM bwLehrpool.m_operatingSystem;");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
-
return null;
-
+
}
-
- public ResultSet getPersonData(Connection con,String Vorname, String Nachname)
- {
+
+ public ResultSet getPersonData(Connection con, String Vorname,
+ String Nachname) {
try {
- Statement stm=con.createStatement();
- return stm.executeQuery("SELECT u.Nachname, u.Vorname, u.mail, i.name FROM bwLehrpool.m_user u, bwLehrpool.m_institution i where u.Nachname like '"+Nachname+"' and u.Vorname like '"+Vorname+"' and u.institution=i.institutionID;");
+ Statement stm = con.createStatement();
+ return stm
+ .executeQuery("SELECT u.Nachname, u.Vorname, u.mail, i.name FROM bwLehrpool.m_user u, bwLehrpool.m_institution i where u.Nachname like '"
+ + Nachname
+ + "' and u.Vorname like '"
+ + Vorname
+ + "' and u.institution=i.institutionID;");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
-
- public int setLectureData(Connection con, int pk_person, int pk_image,int imageversion, String name, String desc, String shortdesc,String start, String end, boolean isactive)
- {
-
+
+ public int setLectureData(Connection con, int pk_person, int pk_image,
+ int imageversion, String name, String desc, String shortdesc,
+ String start, String end, boolean isactive) {
+
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
- int active_bol=0;
+ int active_bol = 0;
- if(isactive==true)
- {
- active_bol=1;
+ if (isactive == true) {
+ active_bol = 1;
}
try {
- Statement stm=con.createStatement();
- Random random=new Random();
- int uid=random.nextInt();
- stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"+uid+"','"+name+"','"+active_bol+"','"+start+"','"+end+"','"+formatter.format(new Date())+"','"+shortdesc+"','"+desc+"','"+pk_image+"','"+imageversion+"','"+formatter.format(new Date())+"','"+formatter.format(new Date())+"','"+pk_person+"','"+pk_person+"');");
+ Statement stm = con.createStatement();
+ Random random = new Random();
+ int uid = random.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"
+ + uid
+ + "','"
+ + name
+ + "','"
+ + active_bol
+ + "','"
+ + start
+ + "','"
+ + end
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + shortdesc
+ + "','"
+ + desc
+ + "','"
+ + pk_image
+ + "','"
+ + imageversion
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + pk_person
+ + "','"
+ + pk_person + "');");
con.commit();
-
+
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return 0;
-
+
}
-
- public ResultSet getImageIDandVersion(Connection con,String name)
- {
+
+ public ResultSet getImageIDandVersion(Connection con, String name) {
try {
- Statement stm=con.createStatement();
- return stm.executeQuery("SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like '"+name+"';");
+ Statement stm = con.createStatement();
+ return stm
+ .executeQuery("SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like '"
+ + name + "';");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
-
- public ResultSet getImageData(Connection con,String id, String version){
+
+ public ResultSet getImageData(Connection con, String id, String version) {
try {
- Statement stm=con.createStatement();
+ Statement stm = con.createStatement();
System.out.println("Test");
- return stm.executeQuery("SELECT image_name,cond_hasInternetRestriction,cond_hasLicenseRestriction, cond_minCPUs, cond_minRAM FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID = '"+id+"' and imageVersion = '"+version+"' ;");
+ return stm
+ .executeQuery("SELECT image_name,cond_hasInternetRestriction,cond_hasLicenseRestriction, cond_minCPUs, cond_minRAM FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID = '"
+ + id + "' and imageVersion = '" + version + "' ;");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
-
- public int UpdateImageData(Connection con,String name,String newName,boolean license, boolean internet, long cpu, long ram,String id, String version){
+
+ public int UpdateImageData(Connection con, String name, String newName,
+ boolean license, boolean internet, long cpu, long ram, String id,
+ String version) {
try {
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
- Statement stm=con.createStatement();
- int newVersion=Integer.parseInt(version)+1;
-
- int internet_bol=0;
- int license_bol=0;
- if(internet==true)
- {
- internet_bol=1;
+ Statement stm = con.createStatement();
+ int newVersion = Integer.parseInt(version) + 1;
+
+ int internet_bol = 0;
+ int license_bol = 0;
+ if (internet == true) {
+ internet_bol = 1;
}
- if(license==true)
- {
- license_bol=1;
+ if (license == true) {
+ license_bol = 1;
}
System.out.println(internet_bol);
System.out.println(license_bol);
- stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `imageVersion` = '"+newVersion+"',`image_name` = '"+newName+"',`image_update_time` = '"+formatter.format(new Date())+"',`rec_change_time` = '"+formatter.format(new Date())+"',`cond_hasLicenseRestriction` = '"+license_bol+"',`cond_hasInternetRestriction` = '"+internet_bol+"',`cond_minRAM` = '"+ram+"',`cond_minCPUs` = '"+cpu+"' WHERE `GUID_imageID` = '"+id+"' AND `imageVersion` = '"+version+"';");
+ stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `imageVersion` = '"
+ + newVersion
+ + "',`image_name` = '"
+ + newName
+ + "',`image_update_time` = '"
+ + formatter.format(new Date())
+ + "',`rec_change_time` = '"
+ + formatter.format(new Date())
+ + "',`cond_hasLicenseRestriction` = '"
+ + license_bol
+ + "',`cond_hasInternetRestriction` = '"
+ + internet_bol
+ + "',`cond_minRAM` = '"
+ + ram
+ + "',`cond_minCPUs` = '"
+ + cpu
+ + "' WHERE `GUID_imageID` = '"
+ + id
+ + "' AND `imageVersion` = '" + version + "';");
con.commit();
return 0;
} catch (SQLException e) {
@@ -327,6 +447,7 @@ public class SQL { return -1;
}
+<<<<<<< HEAD /**
*
@@ -350,12 +471,64 @@ public class SQL { return true;
+======= + public int updateLectureData(Connection con, int pk_person, int pk_image,
+ int imageversion, String name, String desc, String shortdesc,
+ String start, String end, boolean isactive, String id) {
+
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ int active_bol = 0;
+
+ if (isactive == true) {
+ active_bol = 1;
+ }
+ try {
+ Statement stm = con.createStatement();
+ Random random = new Random();
+ int uid = random.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"
+ + uid
+ + "','"
+ + name
+ + "','"
+ + active_bol
+ + "','"
+ + start
+ + "','"
+ + end
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + shortdesc
+ + "','"
+ + desc
+ + "','"
+ + pk_image
+ + "','"
+ + imageversion
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + pk_person
+ + "','"
+ + pk_person + "');");
+ con.commit();
+
+>>>>>>> 0c626844e491923e61657f5483586b9a2a3f6bb8 } catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
+<<<<<<< HEAD return false;
}
+======= + return 0;
+
+ }
+>>>>>>> 0c626844e491923e61657f5483586b9a2a3f6bb8 }
diff --git a/Dozentenmodulserver/src/util/XMLCreator.java b/Dozentenmodulserver/src/util/XMLCreator.java index 8a8bd701..111a6337 100644 --- a/Dozentenmodulserver/src/util/XMLCreator.java +++ b/Dozentenmodulserver/src/util/XMLCreator.java @@ -5,6 +5,9 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -15,10 +18,13 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import org.apache.log4j.Logger; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; +import server.BinaryListener; + public class XMLCreator { /* @@ -31,13 +37,17 @@ public class XMLCreator { private ResultSet rs = null; private String vmName; private String filePath = "/srv/openslx/nfs/temp/"; + private String imageName; + private String xmlName; + private static Logger log = Logger.getLogger( BinaryListener.class ); // phone param not existing - private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time " - + "FROM bwLehrpool.m_VLData_lecture, bwLehrpool.m_VLData_imageInfo, bwLehrpool.m_user, bwLehrpool.m_operatingSystem " + private String query = "SELECT m_VLData_imageInfo.image_path ,vorname, nachname, mail, shortdescription, description, m_operatingSystem.name as os, m_VLData_lecture.admin_changeTime as time, m_VLData_lecture.name as lectureName, m_user.institution as userInstitution, m_user.loginName as loginName, m_institution.name as institutionName " + + "FROM bwLehrpool.m_VLData_lecture, bwLehrpool.m_VLData_imageInfo, bwLehrpool.m_user, bwLehrpool.m_operatingSystem, bwLehrpool.m_institution " + "WHERE m_user.userID = m_VLData_lecture.admin_owner " + "AND m_VLData_imageInfo.GUID_imageID = m_VLData_lecture.imageID " + "AND m_VLData_imageInfo.content_operatingSystem = m_operatingSystem.operatingSystemID " + + "AND m_user.institution = m_institution.institutionID " + "AND m_VLData_lecture.name = "; public XMLCreator(Connection con) { @@ -61,10 +71,10 @@ public class XMLCreator { boolean success = startCreation(); - if (success) { + if (success) { return true; } - + log.info(new Date() + " - Could not create XML-File '"+vmName+"'. Error in create(String vmName)."); return false; } @@ -85,6 +95,7 @@ public class XMLCreator { if (success) { return true; } + log.info(new Date() + " - Could not create XML-File '"+vmName+"'. Error in create(String vmName)."); return false; } @@ -117,10 +128,10 @@ public class XMLCreator { Element imgName = doc.createElement("image_name"); entry.appendChild(imgName); - String imagePath = rs.getString("image_path").substring( - rs.getString("image_path").lastIndexOf("/")); + imageName = rs.getString("image_path").substring( + rs.getString("image_path").lastIndexOf("/")+1); //+1 um das führende "/" los zu werden - imgName.setAttribute("param", imagePath); + imgName.setAttribute("param", imageName); Element creator = doc.createElement("creator"); entry.appendChild(creator); @@ -138,13 +149,13 @@ public class XMLCreator { Element shortDesc = doc.createElement("short_description"); entry.appendChild(shortDesc); - shortDesc.setAttribute("param", rs.getString("shortdescription")); + shortDesc.setAttribute("param", rs.getString("lectureName")); // TODO append latest change date and time Element longDesc = doc.createElement("long_description"); entry.appendChild(longDesc); longDesc.setAttribute("param", rs.getString("description") - + " last update: " + rs.getString("time")); + + "; last update: " + rs.getString("time")); Element os = doc.createElement("os"); entry.appendChild(os); @@ -189,10 +200,14 @@ public class XMLCreator { .newInstance(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(doc); - - StreamResult result = new StreamResult(new File(filePath - + imagePath.replace("vmdk", "xml"))); // see filepath at top of - // class + + //Set XML-filename + DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss"); + xmlName=formatter.format(new Date()) + "_" + rs.getString("institutionName") + "_" + rs.getString("loginName") + "_" + rs.getString("lectureName") + ".xml"; + + //Write file + StreamResult result = new StreamResult(new File(filePath+ xmlName)); // see filepath at top of class + transformer.transform(source, result); // cleanup @@ -200,6 +215,7 @@ public class XMLCreator { st.close(); // return + log.info(new Date() + " - XML-File '"+xmlName+"' successfully created."); return true; } } |
