summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodulserver')
-rw-r--r--dozentenmodulserver/src/main/java/server/ServerHandler.java51
-rw-r--r--dozentenmodulserver/src/main/java/server/generated/Server.java992
-rw-r--r--dozentenmodulserver/src/main/java/sql/SQL.java43
-rw-r--r--dozentenmodulserver/thrift/server.thrift7
4 files changed, 1022 insertions, 71 deletions
diff --git a/dozentenmodulserver/src/main/java/server/ServerHandler.java b/dozentenmodulserver/src/main/java/server/ServerHandler.java
index 79d10415..2c2c6167 100644
--- a/dozentenmodulserver/src/main/java/server/ServerHandler.java
+++ b/dozentenmodulserver/src/main/java/server/ServerHandler.java
@@ -166,7 +166,7 @@ public class ServerHandler implements Server.Iface {
String firstname, String lastname, String university, String Mail,
String Tel, String Fak, boolean license, boolean internet,
long ram, long cpu, String imagePath, boolean isTemplate,
- long filesize, long shareMode, String os) throws TException {
+ long filesize, long shareMode, String os, String uid) throws TException {
String mode = null;
@@ -191,7 +191,7 @@ public class ServerHandler implements Server.Iface {
// imagename,desc, imagePath, filesize,mode,pk_os);
sql.setImageData(login, license, internet, cpu, ram, imagename, desc,
- imagePath, filesize, mode, pk_os);
+ imagePath, filesize, mode, pk_os, uid);
log.info("written VLdata");
// TODO Auto-generated method stub
@@ -248,22 +248,24 @@ public class ServerHandler implements Server.Iface {
@Override
public boolean writeLecturedata(String name, String shortdesc, String desc,
String startDate, String endDate, boolean isActive,
- String imagename, String login, String firstname, String lastname,
- String university, String Mail, String Tel, String Fak)
+ String imageID, String login, String firstname, String lastname,
+ String university, String Mail, String Tel, String Fak, String lectureID)
throws TException {
- String pk_image = null;
+
+ //String pk_image = imageID;
Map<String, String> map = new HashMap<String, String>();
int imageversion = 0;
String pk_institution = sql.setInstitution(university);
String pk_person = sql.setPerson(login, lastname, firstname, Mail,
new Date(), pk_institution);
- map = sql.getImageIDandVersion(imagename);
+ map = sql.getImageIDandVersion(imageID);
- pk_image = map.get("GUID");
+ //pk_image = map.get("GUID");
imageversion = Integer.parseInt(map.get("version"));
- sql.setLectureData(pk_person, pk_image, imageversion, name, desc,
- shortdesc, startDate, endDate, isActive);
+
+ sql.setLectureData(pk_person, imageID, imageversion, name, desc,
+ shortdesc, startDate, endDate, isActive, lectureID);
XMLCreator xml = new XMLCreator(sql.getConnection(), name);
@@ -507,7 +509,7 @@ public class ServerHandler implements Server.Iface {
}
@Override
- public boolean writeImageRights(String imagename, String username,
+ public boolean writeImageRights(String imageID, String username,
String lastName, String firstName, String mail, String university,
String role) throws TException {
String pk_image = null;
@@ -516,7 +518,7 @@ public class ServerHandler implements Server.Iface {
String pk_institution = sql.setInstitution(university);
String pk_person = sql.setPerson(username, lastName, firstName, mail,
new Date(), pk_institution);
- map = sql.getImageIDandVersion(imagename);
+ map = sql.getImageIDandVersion(imageID);
pk_image = map.get("GUID");
imageversion = Integer.parseInt(map.get("version"));
@@ -558,15 +560,15 @@ public class ServerHandler implements Server.Iface {
}
@Override
- public boolean writeLectureRights(String lecturename, String username,
+ public boolean writeLectureRights(String lectureID, String username,
String lastName, String firstName, String mail, String university,
String role) throws TException {
- String pk_lecture = null;
+ //String pk_lecture = null;
String pk_institution = sql.setInstitution(university);
String pk_person = sql.setPerson(username, lastName, firstName, mail,
new Date(), pk_institution);
- pk_lecture = sql.getLectureID(lecturename);
+ //pk_lecture = sql.getLectureID(lectureID);
if (role.equals("Dozent")) {
int read = 1;
@@ -575,7 +577,7 @@ public class ServerHandler implements Server.Iface {
int admin = 1;
int roleID = sql.getRoleID(role);
- sql.setLectureRights(pk_person, pk_lecture, roleID, read, write,
+ sql.setLectureRights(pk_person, lectureID, roleID, read, write,
admin);
} else if (role.equals("Admin")) {
@@ -585,7 +587,7 @@ public class ServerHandler implements Server.Iface {
int admin = 1;
int roleID = sql.getRoleID(role);
- sql.setLectureRights(pk_person, pk_lecture, roleID, read, write,
+ sql.setLectureRights(pk_person, lectureID, roleID, read, write,
admin);
} else {
int read = 0;
@@ -594,7 +596,7 @@ public class ServerHandler implements Server.Iface {
int admin = 0;
int roleID = sql.getRoleID(role);
- sql.setLectureRights(pk_person, pk_lecture, roleID, read, write,
+ sql.setLectureRights(pk_person, lectureID, roleID, read, write,
admin);
}
@@ -609,13 +611,13 @@ public class ServerHandler implements Server.Iface {
}
//set permissions for users which are !=userID
- public boolean writeAdditionalImageRights(String imageName, String userID,
+ public boolean writeAdditionalImageRights(String imageID, String userID,
boolean isRead, boolean isWrite, boolean isLinkAllowed,
boolean isAdmin) {
boolean success = false;
Map<String, String> map = new HashMap<String, String>();
- map = sql.getImageIDandVersion(imageName);
- String imageID = map.get("GUID");
+ map = sql.getImageIDandVersion(imageID);
+ //String imageID = map.get("GUID");
sql.writeAdditionalImageRights(imageID, userID, isRead, isWrite,
isLinkAllowed, isAdmin);
@@ -623,11 +625,11 @@ public class ServerHandler implements Server.Iface {
return success;
}
- public boolean writeAdditionalLectureRights(String lectureName,
+ public boolean writeAdditionalLectureRights(String lectureID,
String userID, boolean isRead, boolean isWrite, boolean isAdmin) {
Map<String, String> map = new HashMap<String, String>();
- String lectureID = sql.getLectureID(lectureName);
+ //String lectureID = sql.getLectureID(lectureID);
sql.writeAdditionalLectureRights(lectureID, userID, isRead, isWrite,
isAdmin);
@@ -678,5 +680,10 @@ public class ServerHandler implements Server.Iface {
return sql.getOsNameForGuestOs(guestOS);
}
+ @Override
+ public String createRandomUUID() throws TException {
+ return sql.createRandomUUID();
+ }
+
}// end class
diff --git a/dozentenmodulserver/src/main/java/server/generated/Server.java b/dozentenmodulserver/src/main/java/server/generated/Server.java
index fc1e7dae..d899e959 100644
--- a/dozentenmodulserver/src/main/java/server/generated/Server.java
+++ b/dozentenmodulserver/src/main/java/server/generated/Server.java
@@ -44,7 +44,7 @@ public class Server {
public String setInstitution(String university) throws org.apache.thrift.TException;
- public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException;
+ public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid) throws org.apache.thrift.TException;
public List<Image> getImageListPermissionWrite(String userID) throws org.apache.thrift.TException;
@@ -74,7 +74,7 @@ public class Server {
public void setPerson(String login, String lastname, String firstname, String mail, String Institution) throws org.apache.thrift.TException;
- public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak) throws org.apache.thrift.TException;
+ public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID) throws org.apache.thrift.TException;
public boolean startFileCopy(String file) throws org.apache.thrift.TException;
@@ -120,6 +120,8 @@ public class Server {
public String getOsNameForGuestOs(String guestOS) throws org.apache.thrift.TException;
+ public String createRandomUUID() throws org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -132,7 +134,7 @@ public class Server {
public void setInstitution(String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getImageListPermissionWrite(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -162,7 +164,7 @@ public class Server {
public void setPerson(String login, String lastname, String firstname, String mail, String Institution, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void startFileCopy(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -208,6 +210,8 @@ public class Server {
public void getOsNameForGuestOs(String guestOS, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createRandomUUID(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -322,13 +326,13 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setInstitution failed: unknown result");
}
- public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException
+ public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid) throws org.apache.thrift.TException
{
- send_writeVLdata(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os);
+ send_writeVLdata(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, uid);
return recv_writeVLdata();
}
- public void send_writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException
+ public void send_writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid) throws org.apache.thrift.TException
{
writeVLdata_args args = new writeVLdata_args();
args.setImagename(imagename);
@@ -349,6 +353,7 @@ public class Server {
args.setFilesize(filesize);
args.setShareMode(shareMode);
args.setOs(os);
+ args.setUid(uid);
sendBase("writeVLdata", args);
}
@@ -682,13 +687,13 @@ public class Server {
return;
}
- public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak) throws org.apache.thrift.TException
+ public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID) throws org.apache.thrift.TException
{
- send_writeLecturedata(name, shortdesc, desc, startDate, endDate, isActive, imagename, login, firstname, lastname, university, Mail, Tel, Fak);
+ send_writeLecturedata(name, shortdesc, desc, startDate, endDate, isActive, imagename, login, firstname, lastname, university, Mail, Tel, Fak, lectureID);
return recv_writeLecturedata();
}
- public void send_writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak) throws org.apache.thrift.TException
+ public void send_writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID) throws org.apache.thrift.TException
{
writeLecturedata_args args = new writeLecturedata_args();
args.setName(name);
@@ -705,6 +710,7 @@ public class Server {
args.setMail(Mail);
args.setTel(Tel);
args.setFak(Fak);
+ args.setLectureID(lectureID);
sendBase("writeLecturedata", args);
}
@@ -1282,6 +1288,28 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOsNameForGuestOs failed: unknown result");
}
+ public String createRandomUUID() throws org.apache.thrift.TException
+ {
+ send_createRandomUUID();
+ return recv_createRandomUUID();
+ }
+
+ public void send_createRandomUUID() throws org.apache.thrift.TException
+ {
+ createRandomUUID_args args = new createRandomUUID_args();
+ sendBase("createRandomUUID", args);
+ }
+
+ public String recv_createRandomUUID() throws org.apache.thrift.TException
+ {
+ createRandomUUID_result result = new createRandomUUID_result();
+ receiveBase(result, "createRandomUUID");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRandomUUID failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -1428,9 +1456,9 @@ public class Server {
}
}
- public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- writeVLdata_call method_call = new writeVLdata_call(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, resultHandler, this, ___protocolFactory, ___transport);
+ writeVLdata_call method_call = new writeVLdata_call(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, uid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -1454,7 +1482,8 @@ public class Server {
private long filesize;
private long shareMode;
private String os;
- public writeVLdata_call(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, 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 {
+ private String uid;
+ public writeVLdata_call(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, 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.imagename = imagename;
this.desc = desc;
@@ -1474,6 +1503,7 @@ public class Server {
this.filesize = filesize;
this.shareMode = shareMode;
this.os = os;
+ this.uid = uid;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1497,6 +1527,7 @@ public class Server {
args.setFilesize(filesize);
args.setShareMode(shareMode);
args.setOs(os);
+ args.setUid(uid);
args.write(prot);
prot.writeMessageEnd();
}
@@ -1962,9 +1993,9 @@ public class Server {
}
}
- public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- writeLecturedata_call method_call = new writeLecturedata_call(name, shortdesc, desc, startDate, endDate, isActive, imagename, login, firstname, lastname, university, Mail, Tel, Fak, resultHandler, this, ___protocolFactory, ___transport);
+ writeLecturedata_call method_call = new writeLecturedata_call(name, shortdesc, desc, startDate, endDate, isActive, imagename, login, firstname, lastname, university, Mail, Tel, Fak, lectureID, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -1984,7 +2015,8 @@ public class Server {
private String Mail;
private String Tel;
private String Fak;
- public writeLecturedata_call(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, 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 {
+ private String lectureID;
+ public writeLecturedata_call(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String lectureID, 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.shortdesc = shortdesc;
@@ -2000,6 +2032,7 @@ public class Server {
this.Mail = Mail;
this.Tel = Tel;
this.Fak = Fak;
+ this.lectureID = lectureID;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -2019,6 +2052,7 @@ public class Server {
args.setMail(Mail);
args.setTel(Tel);
args.setFak(Fak);
+ args.setLectureID(lectureID);
args.write(prot);
prot.writeMessageEnd();
}
@@ -2929,6 +2963,35 @@ public class Server {
}
}
+ public void createRandomUUID(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createRandomUUID_call method_call = new createRandomUUID_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createRandomUUID_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public createRandomUUID_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRandomUUID", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createRandomUUID_args args = new createRandomUUID_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String 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_createRandomUUID();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -2984,6 +3047,7 @@ public class Server {
processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions());
processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions());
processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs());
+ processMap.put("createRandomUUID", new createRandomUUID());
return processMap;
}
@@ -3083,7 +3147,7 @@ public class Server {
public writeVLdata_result getResult(I iface, writeVLdata_args args) throws org.apache.thrift.TException {
writeVLdata_result result = new writeVLdata_result();
- result.success = iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os);
+ result.success = iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os, args.uid);
result.setSuccessIsSet(true);
return result;
}
@@ -3384,7 +3448,7 @@ public class Server {
public writeLecturedata_result getResult(I iface, writeLecturedata_args args) throws org.apache.thrift.TException {
writeLecturedata_result result = new writeLecturedata_result();
- result.success = iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak);
+ result.success = iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.lectureID);
result.setSuccessIsSet(true);
return result;
}
@@ -3843,6 +3907,26 @@ public class Server {
}
}
+ public static class createRandomUUID<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRandomUUID_args> {
+ public createRandomUUID() {
+ super("createRandomUUID");
+ }
+
+ public createRandomUUID_args getEmptyArgsInstance() {
+ return new createRandomUUID_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createRandomUUID_result getResult(I iface, createRandomUUID_args args) throws org.apache.thrift.TException {
+ createRandomUUID_result result = new createRandomUUID_result();
+ result.success = iface.createRandomUUID();
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -3898,6 +3982,7 @@ public class Server {
processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions());
processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions());
processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs());
+ processMap.put("createRandomUUID", new createRandomUUID());
return processMap;
}
@@ -4154,7 +4239,7 @@ public class Server {
}
public void start(I iface, writeVLdata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os,resultHandler);
+ iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os, args.uid,resultHandler);
}
}
@@ -4919,7 +5004,7 @@ public class Server {
}
public void start(I iface, writeLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak,resultHandler);
+ iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.lectureID,resultHandler);
}
}
@@ -6056,6 +6141,57 @@ public class Server {
}
}
+ public static class createRandomUUID<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createRandomUUID_args, String> {
+ public createRandomUUID() {
+ super("createRandomUUID");
+ }
+
+ public createRandomUUID_args getEmptyArgsInstance() {
+ return new createRandomUUID_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createRandomUUID_result result = new createRandomUUID_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ createRandomUUID_result result = new createRandomUUID_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, createRandomUUID_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createRandomUUID(resultHandler);
+ }
+ }
+
}
public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> {
@@ -8908,6 +9044,7 @@ public class Server {
private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)16);
private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)17);
private static final org.apache.thrift.protocol.TField OS_FIELD_DESC = new org.apache.thrift.protocol.TField("os", org.apache.thrift.protocol.TType.STRING, (short)18);
+ private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.STRING, (short)19);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -8933,6 +9070,7 @@ public class Server {
public long filesize; // required
public long shareMode; // required
public String os; // required
+ public String uid; // 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 {
@@ -8953,7 +9091,8 @@ public class Server {
IS_TEMPLATE((short)15, "isTemplate"),
FILESIZE((short)16, "filesize"),
SHARE_MODE((short)17, "shareMode"),
- OS((short)18, "os");
+ OS((short)18, "os"),
+ UID((short)19, "uid");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -9004,6 +9143,8 @@ public class Server {
return SHARE_MODE;
case 18: // OS
return OS;
+ case 19: // UID
+ return UID;
default:
return null;
}
@@ -9091,6 +9232,8 @@ public class Server {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
tmpMap.put(_Fields.OS, new org.apache.thrift.meta_data.FieldMetaData("os", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", 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(writeVLdata_args.class, metaDataMap);
}
@@ -9116,7 +9259,8 @@ public class Server {
boolean isTemplate,
long filesize,
long shareMode,
- String os)
+ String os,
+ String uid)
{
this();
this.imagename = imagename;
@@ -9144,6 +9288,7 @@ public class Server {
this.shareMode = shareMode;
setShareModeIsSet(true);
this.os = os;
+ this.uid = uid;
}
/**
@@ -9191,6 +9336,9 @@ public class Server {
if (other.isSetOs()) {
this.os = other.os;
}
+ if (other.isSetUid()) {
+ this.uid = other.uid;
+ }
}
public writeVLdata_args deepCopy() {
@@ -9224,6 +9372,7 @@ public class Server {
setShareModeIsSet(false);
this.shareMode = 0;
this.os = null;
+ this.uid = null;
}
public String getImagename() {
@@ -9651,6 +9800,30 @@ public class Server {
}
}
+ public String getUid() {
+ return this.uid;
+ }
+
+ public writeVLdata_args setUid(String uid) {
+ this.uid = uid;
+ return this;
+ }
+
+ public void unsetUid() {
+ this.uid = null;
+ }
+
+ /** Returns true if field uid is set (has been assigned a value) and false otherwise */
+ public boolean isSetUid() {
+ return this.uid != null;
+ }
+
+ public void setUidIsSet(boolean value) {
+ if (!value) {
+ this.uid = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IMAGENAME:
@@ -9797,6 +9970,14 @@ public class Server {
}
break;
+ case UID:
+ if (value == null) {
+ unsetUid();
+ } else {
+ setUid((String)value);
+ }
+ break;
+
}
}
@@ -9856,6 +10037,9 @@ public class Server {
case OS:
return getOs();
+ case UID:
+ return getUid();
+
}
throw new IllegalStateException();
}
@@ -9903,6 +10087,8 @@ public class Server {
return isSetShareMode();
case OS:
return isSetOs();
+ case UID:
+ return isSetUid();
}
throw new IllegalStateException();
}
@@ -10082,6 +10268,15 @@ public class Server {
return false;
}
+ boolean this_present_uid = true && this.isSetUid();
+ boolean that_present_uid = true && that.isSetUid();
+ if (this_present_uid || that_present_uid) {
+ if (!(this_present_uid && that_present_uid))
+ return false;
+ if (!this.uid.equals(that.uid))
+ return false;
+ }
+
return true;
}
@@ -10278,6 +10473,16 @@ public class Server {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -10413,6 +10618,14 @@ public class Server {
sb.append(this.os);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("uid:");
+ if (this.uid == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uid);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -10602,6 +10815,14 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 19: // UID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uid = iprot.readString();
+ struct.setUidIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -10693,6 +10914,11 @@ public class Server {
oprot.writeString(struct.os);
oprot.writeFieldEnd();
}
+ if (struct.uid != null) {
+ oprot.writeFieldBegin(UID_FIELD_DESC);
+ oprot.writeString(struct.uid);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -10765,7 +10991,10 @@ public class Server {
if (struct.isSetOs()) {
optionals.set(17);
}
- oprot.writeBitSet(optionals, 18);
+ if (struct.isSetUid()) {
+ optionals.set(18);
+ }
+ oprot.writeBitSet(optionals, 19);
if (struct.isSetImagename()) {
oprot.writeString(struct.imagename);
}
@@ -10820,12 +11049,15 @@ public class Server {
if (struct.isSetOs()) {
oprot.writeString(struct.os);
}
+ if (struct.isSetUid()) {
+ oprot.writeString(struct.uid);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeVLdata_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(18);
+ BitSet incoming = iprot.readBitSet(19);
if (incoming.get(0)) {
struct.imagename = iprot.readString();
struct.setImagenameIsSet(true);
@@ -10898,6 +11130,10 @@ public class Server {
struct.os = iprot.readString();
struct.setOsIsSet(true);
}
+ if (incoming.get(18)) {
+ struct.uid = iprot.readString();
+ struct.setUidIsSet(true);
+ }
}
}
@@ -21836,6 +22072,7 @@ public class Server {
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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)16);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -21857,6 +22094,7 @@ public class Server {
public String Mail; // required
public String Tel; // required
public String Fak; // required
+ public String lectureID; // 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 {
@@ -21873,7 +22111,8 @@ public class Server {
UNIVERSITY((short)11, "university"),
MAIL((short)12, "Mail"),
TEL((short)13, "Tel"),
- FAK((short)14, "Fak");
+ FAK((short)14, "Fak"),
+ LECTURE_ID((short)16, "lectureID");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -21916,6 +22155,8 @@ public class Server {
return TEL;
case 14: // FAK
return FAK;
+ case 16: // LECTURE_ID
+ return LECTURE_ID;
default:
return null;
}
@@ -21989,6 +22230,8 @@ public class Server {
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.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", 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(writeLecturedata_args.class, metaDataMap);
}
@@ -22010,7 +22253,8 @@ public class Server {
String university,
String Mail,
String Tel,
- String Fak)
+ String Fak,
+ String lectureID)
{
this();
this.name = name;
@@ -22028,6 +22272,7 @@ public class Server {
this.Mail = Mail;
this.Tel = Tel;
this.Fak = Fak;
+ this.lectureID = lectureID;
}
/**
@@ -22075,6 +22320,9 @@ public class Server {
if (other.isSetFak()) {
this.Fak = other.Fak;
}
+ if (other.isSetLectureID()) {
+ this.lectureID = other.lectureID;
+ }
}
public writeLecturedata_args deepCopy() {
@@ -22098,6 +22346,7 @@ public class Server {
this.Mail = null;
this.Tel = null;
this.Fak = null;
+ this.lectureID = null;
}
public String getName() {
@@ -22435,6 +22684,30 @@ public class Server {
}
}
+ public String getLectureID() {
+ return this.lectureID;
+ }
+
+ public writeLecturedata_args setLectureID(String lectureID) {
+ this.lectureID = lectureID;
+ return this;
+ }
+
+ public void unsetLectureID() {
+ this.lectureID = null;
+ }
+
+ /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
+ public boolean isSetLectureID() {
+ return this.lectureID != null;
+ }
+
+ public void setLectureIDIsSet(boolean value) {
+ if (!value) {
+ this.lectureID = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NAME:
@@ -22549,6 +22822,14 @@ public class Server {
}
break;
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureID();
+ } else {
+ setLectureID((String)value);
+ }
+ break;
+
}
}
@@ -22596,6 +22877,9 @@ public class Server {
case FAK:
return getFak();
+ case LECTURE_ID:
+ return getLectureID();
+
}
throw new IllegalStateException();
}
@@ -22635,6 +22919,8 @@ public class Server {
return isSetTel();
case FAK:
return isSetFak();
+ case LECTURE_ID:
+ return isSetLectureID();
}
throw new IllegalStateException();
}
@@ -22778,6 +23064,15 @@ public class Server {
return false;
}
+ boolean this_present_lectureID = true && this.isSetLectureID();
+ boolean that_present_lectureID = true && that.isSetLectureID();
+ if (this_present_lectureID || that_present_lectureID) {
+ if (!(this_present_lectureID && that_present_lectureID))
+ return false;
+ if (!this.lectureID.equals(that.lectureID))
+ return false;
+ }
+
return true;
}
@@ -22934,6 +23229,16 @@ public class Server {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLectureID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -23061,6 +23366,14 @@ public class Server {
sb.append(this.Fak);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("lectureID:");
+ if (this.lectureID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureID);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -23218,6 +23531,14 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 16: // LECTURE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lectureID = iprot.readString();
+ struct.setLectureIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -23301,6 +23622,11 @@ public class Server {
oprot.writeString(struct.Fak);
oprot.writeFieldEnd();
}
+ if (struct.lectureID != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureID);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -23361,7 +23687,10 @@ public class Server {
if (struct.isSetFak()) {
optionals.set(13);
}
- oprot.writeBitSet(optionals, 14);
+ if (struct.isSetLectureID()) {
+ optionals.set(14);
+ }
+ oprot.writeBitSet(optionals, 15);
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
@@ -23404,12 +23733,15 @@ public class Server {
if (struct.isSetFak()) {
oprot.writeString(struct.Fak);
}
+ if (struct.isSetLectureID()) {
+ oprot.writeString(struct.lectureID);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturedata_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(14);
+ BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
@@ -23466,6 +23798,10 @@ public class Server {
struct.Fak = iprot.readString();
struct.setFakIsSet(true);
}
+ if (incoming.get(14)) {
+ struct.lectureID = iprot.readString();
+ struct.setLectureIDIsSet(true);
+ }
}
}
@@ -45875,4 +46211,604 @@ public class Server {
}
+ public static class createRandomUUID_args implements org.apache.thrift.TBase<createRandomUUID_args, createRandomUUID_args._Fields>, java.io.Serializable, Cloneable, Comparable<createRandomUUID_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRandomUUID_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createRandomUUID_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createRandomUUID_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRandomUUID_args.class, metaDataMap);
+ }
+
+ public createRandomUUID_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createRandomUUID_args(createRandomUUID_args other) {
+ }
+
+ public createRandomUUID_args deepCopy() {
+ return new createRandomUUID_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createRandomUUID_args)
+ return this.equals((createRandomUUID_args)that);
+ return false;
+ }
+
+ public boolean equals(createRandomUUID_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createRandomUUID_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("createRandomUUID_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class createRandomUUID_argsStandardSchemeFactory implements SchemeFactory {
+ public createRandomUUID_argsStandardScheme getScheme() {
+ return new createRandomUUID_argsStandardScheme();
+ }
+ }
+
+ private static class createRandomUUID_argsStandardScheme extends StandardScheme<createRandomUUID_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createRandomUUID_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, createRandomUUID_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createRandomUUID_argsTupleSchemeFactory implements SchemeFactory {
+ public createRandomUUID_argsTupleScheme getScheme() {
+ return new createRandomUUID_argsTupleScheme();
+ }
+ }
+
+ private static class createRandomUUID_argsTupleScheme extends TupleScheme<createRandomUUID_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class createRandomUUID_result implements org.apache.thrift.TBase<createRandomUUID_result, createRandomUUID_result._Fields>, java.io.Serializable, Cloneable, Comparable<createRandomUUID_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRandomUUID_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createRandomUUID_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createRandomUUID_resultTupleSchemeFactory());
+ }
+
+ public String 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
+ 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.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRandomUUID_result.class, metaDataMap);
+ }
+
+ public createRandomUUID_result() {
+ }
+
+ public createRandomUUID_result(
+ String success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createRandomUUID_result(createRandomUUID_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ }
+
+ public createRandomUUID_result deepCopy() {
+ return new createRandomUUID_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public createRandomUUID_result setSuccess(String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ 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 createRandomUUID_result)
+ return this.equals((createRandomUUID_result)that);
+ return false;
+ }
+
+ public boolean equals(createRandomUUID_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createRandomUUID_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("createRandomUUID_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ 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 {
+ 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 createRandomUUID_resultStandardSchemeFactory implements SchemeFactory {
+ public createRandomUUID_resultStandardScheme getScheme() {
+ return new createRandomUUID_resultStandardScheme();
+ }
+ }
+
+ private static class createRandomUUID_resultStandardScheme extends StandardScheme<createRandomUUID_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createRandomUUID_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.STRING) {
+ struct.success = iprot.readString();
+ 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, createRandomUUID_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createRandomUUID_resultTupleSchemeFactory implements SchemeFactory {
+ public createRandomUUID_resultTupleScheme getScheme() {
+ return new createRandomUUID_resultTupleScheme();
+ }
+ }
+
+ private static class createRandomUUID_resultTupleScheme extends TupleScheme<createRandomUUID_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_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.writeString(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
}
diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java
index 10afee96..19148516 100644
--- a/dozentenmodulserver/src/main/java/sql/SQL.java
+++ b/dozentenmodulserver/src/main/java/sql/SQL.java
@@ -395,7 +395,7 @@ public class SQL {
public boolean setImageData(String pk_person, boolean license,
boolean internet, long cpu, long ram, String imagename,
String desc, String imagePath, long filesize, String shareMode,
- String pk_os) {
+ String pk_os, String uid) {
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -413,7 +413,7 @@ public class SQL {
//Statement stm = con.createStatement();
// create a UUID
- String uid = UUID.randomUUID().toString();
+ //String uid = UUID.randomUUID().toString();
@@ -539,7 +539,7 @@ public class SQL {
*/
String sql = "SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID AND pmi.userID = "
+ "?"
- + " AND pmi.image_write = 1 AND pmi.GUID_imageID = vl.GUID_imageID;";
+ + " AND pmi.image_write = 1 AND pmi.GUID_imageID = vl.GUID_imageID ORDER BY vl.image_name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -593,7 +593,7 @@ public class SQL {
String sql = "SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID AND pmi.userID = "
+ "?"
- + " AND pmi.image_read = 1 AND pmi.GUID_imageID = vl.GUID_imageID;";
+ + " AND pmi.image_read = 1 AND pmi.GUID_imageID = vl.GUID_imageID ORDER BY vl.image_name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -642,7 +642,7 @@ public class SQL {
// ResultSet
ResultSet res = stm
- .executeQuery("SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID;");
+ .executeQuery("SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID ORDER BY vl.image_name;");
while (res.next()) {
list.add(new Image(res.getString("GUID_imageID"), res
@@ -699,7 +699,7 @@ public class SQL {
String sql = "SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID AND pmi.userID = "
+ "?"
- + " AND pmi.link_allowed = 1 AND pmi.GUID_imageID = vl.GUID_imageID;";
+ + " AND pmi.link_allowed = 1 AND pmi.GUID_imageID = vl.GUID_imageID ORDER BY vl.image_name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -753,7 +753,7 @@ public class SQL {
String sql = "SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate, vl.image_description FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE u.userID = vl.image_owner AND vl.content_operatingSystem = os.operatingSystemID AND pmi.userID = "
+ "?"
- + " AND pmi.image_admin = 1 AND pmi.GUID_imageID = vl.GUID_imageID;";
+ + " AND pmi.image_admin = 1 AND pmi.GUID_imageID = vl.GUID_imageID ORDER BY vl.image_name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -802,7 +802,7 @@ public class SQL {
// ResultSet
ResultSet res = stm
- .executeQuery("SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.image_description, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE vl.image_isTemplate=1 AND vl.content_operatingSystem=os.operatingSystemID AND vl.image_owner=u.userID;");
+ .executeQuery("SELECT DISTINCT vl.GUID_imageID, vl.imageVersion, vl.image_name, vl.image_description, vl.cond_hasLicenseRestriction, vl.image_filesize, os.name, os.architecture, '' as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate FROM bwLehrpool.pm_VLData_image pmi, bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u WHERE vl.image_isTemplate=1 AND vl.content_operatingSystem=os.operatingSystemID AND vl.image_owner=u.userID ORDER BY vl.image_name;");
while (res.next())
@@ -850,7 +850,7 @@ public class SQL {
String sql = "SELECT DISTINCT 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.pm_VLData_lecture pml, bwLehrpool.m_user u "
- + "WHERE i.GUID_imageID=l.imageID AND l.lectureID=pml.lectureID AND pml.rec_read=true AND u.userID=pml.userID AND u.userID = ? ;";
+ + "WHERE i.GUID_imageID=l.imageID AND l.lectureID=pml.lectureID AND pml.rec_read=true AND u.userID=pml.userID AND u.userID = ? ORDER BY l.name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -900,7 +900,7 @@ public class SQL {
+ "FROM bwLehrpool.m_VLData_lecture l, bwLehrpool.m_VLData_imageInfo i, bwLehrpool.pm_VLData_lecture pml, bwLehrpool.m_user u "
+ "WHERE pml.userID="
+ "?"
- + " AND u.userID=pml.userID AND pml.rec_write=1 AND i.GUID_imageID=l.imageID AND l.lectureID=pml.lectureID;";
+ + " AND u.userID=pml.userID AND pml.rec_write=1 AND i.GUID_imageID=l.imageID AND l.lectureID=pml.lectureID ORDER BY l.name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -949,7 +949,7 @@ public class SQL {
String sql = "SELECT DISTINCT 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.pm_VLData_lecture pml, bwLehrpool.m_user u "
- + "WHERE i.GUID_imageID=l.imageID AND pml.rec_admin=true AND l.lectureID=pml.lectureID AND u.userID=pml.userID AND u.userID= ? ;";
+ + "WHERE i.GUID_imageID=l.imageID AND pml.rec_admin=true AND l.lectureID=pml.lectureID AND u.userID=pml.userID AND u.userID= ? ORDER BY l.name;";
PreparedStatement prest = con.prepareStatement(sql);
prest.setString(1, userID);
@@ -989,7 +989,7 @@ public class SQL {
Connection con = getConnection();
Statement stm = con.createStatement();
ResultSet res = 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;");
+ .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 ORDER BY l.name;");
while (res.next())
@@ -1095,7 +1095,7 @@ public class SQL {
public int setLectureData(String pk_person, String pk_image,
int imageversion, String name, String desc, String shortdesc,
- String start, String end, boolean isactive)
+ String start, String end, boolean isactive, String lectureID)
{
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -1111,7 +1111,8 @@ public class SQL {
Connection con = getConnection();
//Statement stm = con.createStatement();
- String uid = UUID.randomUUID().toString();
+ //String uid = UUID.randomUUID().toString();
+
/*
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
@@ -1173,7 +1174,7 @@ public class SQL {
+ "?" + ");";
PreparedStatement prest = con.prepareStatement(sql);
- prest.setString(1, uid);
+ prest.setString(1, lectureID);
prest.setString(2, name);
prest.setInt(3, active_bol);
prest.setString(4, start);
@@ -1202,7 +1203,7 @@ public class SQL {
- public Map<String, String> getImageIDandVersion(String name) {
+ public Map<String, String> getImageIDandVersion(String id) {
Map<String, String> map = new HashMap<String, String>();
try {
Connection con = getConnection();
@@ -1213,10 +1214,10 @@ public class SQL {
+ name + "';");
*/
- String sql = "SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where image_name like ?";
+ String sql = "SELECT GUID_imageID, imageVersion FROM bwLehrpool.m_VLData_imageInfo where GUID_imageID = ?";
PreparedStatement prest = con.prepareStatement(sql);
- prest.setString(1, name);
+ prest.setString(1, id);
ResultSet image = prest.executeQuery();
con.commit();
@@ -2541,6 +2542,12 @@ public class SQL {
return null;
}
+
+
+ public String createRandomUUID()
+ {
+ return UUID.randomUUID().toString();
+ }
}// end class
diff --git a/dozentenmodulserver/thrift/server.thrift b/dozentenmodulserver/thrift/server.thrift
index eb9719fb..58d4a458 100644
--- a/dozentenmodulserver/thrift/server.thrift
+++ b/dozentenmodulserver/thrift/server.thrift
@@ -53,7 +53,7 @@ service Server{
int DeleteFtpUser(1: string user),
string getPathOfImage(1: string image_id, 2: string version),
string setInstitution(1: string university),
- bool writeVLdata(1: string imagename, 2: string desc, 3: string login, 4: string firstname, 5: string lastname, 6: string university, 7: string Mail, 8: string Tel, 9: string Fak, 10: bool license, 11: bool internet, 12: int ram, 13: int cpu, 14: string imagePath, 15: bool isTemplate, 16: i64 filesize, 17: int shareMode, 18: string os),
+ bool writeVLdata(1: string imagename, 2: string desc, 3: string login, 4: string firstname, 5: string lastname, 6: string university, 7: string Mail, 8: string Tel, 9: string Fak, 10: bool license, 11: bool internet, 12: int ram, 13: int cpu, 14: string imagePath, 15: bool isTemplate, 16: i64 filesize, 17: int shareMode, 18: string os, 19: string uid),
list<Image> getImageListPermissionWrite(1: string userID),
list<Image> getImageListPermissionRead(1: string userID),
list<Image> getImageListPermissionLink(1: string userID),
@@ -68,7 +68,7 @@ service Server{
list<string> getAllUniversities(),
map<string,string> getPersonData(1: string Vorname, 2: string Nachname),
void setPerson(1: string login, 2:string lastname, 3: string firstname, 4: string mail, 5: string Institution),
- bool writeLecturedata(1: string name, 2: string shortdesc, 3: string desc, 4: string startDate, 5: string endDate, 6: bool isActive, 7: string imagename, 8: string login, 9: string firstname, 10: string lastname, 11: string university, 12: string Mail, 13: string Tel, 14: string Fak),
+ bool writeLecturedata(1: string name, 2: string shortdesc, 3: string desc, 4: string startDate, 5: string endDate, 6: bool isActive, 7: string imagename, 8: string login, 9: string firstname, 10: string lastname, 11: string university, 12: string Mail, 13: string Tel, 14: string Fak, 16: string lectureID),
bool startFileCopy(1: string file),
map<string,string> getImageData(1: string imageid, 2: string imageversion),
map<string,string> getLectureData(1: string lectureid),
@@ -90,5 +90,6 @@ service Server{
list<Person>getPermissionForUserAndLecture(1: string userID, 2: string lectureID),
void deleteAllAdditionalImagePermissions(1: string imageID, 2:string userID),
void deleteAllAdditionalLecturePermissions(1: string lectureID, 2: string userID),
- string getOsNameForGuestOs(1: string guestOS)
+ string getOsNameForGuestOs(1: string guestOS),
+ string createRandomUUID()
}