summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Spitzer2014-08-19 08:26:22 +0200
committerTobias Spitzer2014-08-19 08:26:22 +0200
commit5f540aaa05c9b4400d8bc58a8fdbc7a9157b4908 (patch)
tree8de97eb2eded74d8c03f9d77c60a06fdc46ed039
parentSuchmaske für Images neu (diff)
downloadtutor-module-5f540aaa05c9b4400d8bc58a8fdbc7a9157b4908.tar.gz
tutor-module-5f540aaa05c9b4400d8bc58a8fdbc7a9157b4908.tar.xz
tutor-module-5f540aaa05c9b4400d8bc58a8fdbc7a9157b4908.zip
gfdgfsd
-rw-r--r--Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java101
-rw-r--r--Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.classbin2145 -> 2139 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.classbin3040 -> 3040 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_args.classbin24591 -> 24591 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.classbin3050 -> 3050 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_result.classbin9798 -> 9798 bytes
-rw-r--r--Dozentenmodulserver/bin/sql/SQL.classbin24560 -> 25242 bytes
-rw-r--r--Dozentenmodulserver/src/server/Server.java1726
-rw-r--r--Dozentenmodulserver/src/server/ServerHandler.java17
-rw-r--r--Dozentenmodulserver/src/sql/SQL.java33
-rw-r--r--Dozentenmodulserver/thrift/server.thrift2
11 files changed, 964 insertions, 915 deletions
diff --git a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java
index 23195b1a..a0276f6c 100644
--- a/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java
+++ b/Dozentenmodul/src/gui/lecture/SearchLecture_GUI.java
@@ -64,9 +64,6 @@ public class SearchLecture_GUI extends JFrame {
JRadioButton rdbtnInternetNein;
JTable tableAllLectures;
JTable tablemyLectures;
- JTable tableCoopImages;
- JTable tablePublicVorlagen;
- JTable tablePublicImages;
private JTextField textFieldName;
JTabbedPane tabbedPane;
String[] titles = { "Veranstaltungsname", "Beschreibung",
@@ -265,48 +262,6 @@ public class SearchLecture_GUI extends JFrame {
scrollPaneAllImages.setViewportView(tableAllLectures);
tabbedPane.addTab("Alle", null, scrollPaneAllImages, null);
-
- JScrollPane scrollPaneCoopImages = new JScrollPane();
- tableCoopImages = new JTable();
- tableCoopImages.setModel(model);
- tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit();
- tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit();
- tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit();
- tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit();
- tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit();
-
- JScrollPane scrollPanePublicVorlagen = new JScrollPane();
- tablePublicVorlagen = new JTable();
- tablePublicVorlagen.setModel(model);
- tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit();
- tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit();
- tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit();
- tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit();
- tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit();
-
- scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen);
- tabbedPane.addTab("\u00D6ffentliche Veranstaltungen", null,
- scrollPanePublicVorlagen, null);
- tabbedPane.setEnabledAt(2, false);
-
- scrollPaneCoopImages.setViewportView(tableCoopImages);
- tabbedPane.addTab("Kooperative Veranstaltungen", null,
- scrollPaneCoopImages, null);
- tabbedPane.setEnabledAt(3, false);
-
- JScrollPane scrollPanePublicImages = new JScrollPane();
- tablePublicImages = new JTable();
- tablePublicImages.setModel(model);
- tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit();
- tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit();
- tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit();
- tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit();
- tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit();
-
- scrollPanePublicImages.setViewportView(tablePublicImages);
- tabbedPane.addTab("\u00D6ffentliche Images", null,
- scrollPanePublicImages, null);
- tabbedPane.setEnabledAt(4, false);
{
JPanel buttonPane = new JPanel();
buttonPane.setBounds(0, 640, 826, 33);
@@ -353,6 +308,62 @@ public class SearchLecture_GUI extends JFrame {
JLabel labelName = new JLabel("");
labelName.setBounds(124, 27, 104, 14);
panel.add(labelName);
+
+ JLabel lblAktiv = new JLabel("Aktiv:");
+ lblAktiv.setBounds(10, 52, 104, 14);
+ panel.add(lblAktiv);
+
+ JLabel labelAktiv = new JLabel("");
+ labelAktiv.setBounds(124, 52, 104, 14);
+ panel.add(labelAktiv);
+
+ JLabel labelstartdate = new JLabel("");
+ labelstartdate.setBounds(124, 77, 104, 14);
+ panel.add(labelstartdate);
+
+ JLabel lblStartdatum = new JLabel("Startdatum:");
+ lblStartdatum.setBounds(10, 77, 104, 14);
+ panel.add(lblStartdatum);
+
+ JLabel labelenddate = new JLabel("");
+ labelenddate.setBounds(124, 102, 104, 14);
+ panel.add(labelenddate);
+
+ JLabel lblEnddatum = new JLabel("Enddatum:");
+ lblEnddatum.setBounds(10, 102, 104, 14);
+ panel.add(lblEnddatum);
+
+ JLabel lblBeschreibung = new JLabel("Beschreibung:");
+ lblBeschreibung.setBounds(10, 127, 104, 14);
+ panel.add(lblBeschreibung);
+
+ JLabel labeldesc = new JLabel("");
+ labeldesc.setBounds(124, 127, 104, 110);
+ panel.add(labeldesc);
+
+ JLabel lblImage = new JLabel("Image:");
+ lblImage.setBounds(10, 248, 104, 14);
+ panel.add(lblImage);
+
+ JLabel labelimage = new JLabel("");
+ labelimage.setBounds(124, 248, 104, 14);
+ panel.add(labelimage);
+
+ JLabel labelVerantwortlicher = new JLabel("");
+ labelVerantwortlicher.setBounds(124, 298, 104, 14);
+ panel.add(labelVerantwortlicher);
+
+ JLabel lblVerantwortlicher = new JLabel("Verantwortlicher:");
+ lblVerantwortlicher.setBounds(10, 298, 104, 14);
+ panel.add(lblVerantwortlicher);
+
+ JLabel lblImageversion = new JLabel("Imageversion:");
+ lblImageversion.setBounds(10, 273, 104, 14);
+ panel.add(lblImageversion);
+
+ JLabel labelimageversion = new JLabel("");
+ labelimageversion.setBounds(124, 273, 104, 14);
+ panel.add(labelimageversion);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
diff --git a/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class b/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
index 6c343374..369faacc 100644
--- a/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
+++ b/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
index b6cf6153..de63a796 100644
--- a/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
index a9bac9a6..8c3bcc07 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
index a79e3a45..674e1e07 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
index 314ce299..e64cad3a 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class
index c502967e..94acdc53 100644
--- a/Dozentenmodulserver/bin/sql/SQL.class
+++ b/Dozentenmodulserver/bin/sql/SQL.class
Binary files differ
diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java
index cf8dd95c..568ef600 100644
--- a/Dozentenmodulserver/src/server/Server.java
+++ b/Dozentenmodulserver/src/server/Server.java
@@ -60,9 +60,9 @@ public class Server {
public Map<String,String> getImageData(String imageid, String imageversion) throws org.apache.thrift.TException;
- public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException;
+ public Map<String,String> getLectureData(String lectureid) throws org.apache.thrift.TException;
- public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException;
+ public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException;
public boolean deleteImageData(String id, String version) throws org.apache.thrift.TException;
@@ -102,9 +102,9 @@ public class Server {
public void getImageData(String imageid, String imageversion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLectureData(String lectureid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deleteImageData(String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -441,6 +441,29 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result");
}
+ public Map<String,String> getLectureData(String lectureid) throws org.apache.thrift.TException
+ {
+ send_getLectureData(lectureid);
+ return recv_getLectureData();
+ }
+
+ public void send_getLectureData(String lectureid) throws org.apache.thrift.TException
+ {
+ getLectureData_args args = new getLectureData_args();
+ args.setLectureid(lectureid);
+ sendBase("getLectureData", args);
+ }
+
+ public Map<String,String> recv_getLectureData() throws org.apache.thrift.TException
+ {
+ getLectureData_result result = new getLectureData_result();
+ receiveBase(result, "getLectureData");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result");
+ }
+
public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException
{
send_updateImageData(name, newName, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os);
@@ -476,29 +499,6 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageData failed: unknown result");
}
- public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException
- {
- send_getLectureData(lecturename);
- return recv_getLectureData();
- }
-
- public void send_getLectureData(String lecturename) throws org.apache.thrift.TException
- {
- getLectureData_args args = new getLectureData_args();
- args.setLecturename(lecturename);
- sendBase("getLectureData", args);
- }
-
- public Map<String,String> recv_getLectureData() throws org.apache.thrift.TException
- {
- getLectureData_result result = new getLectureData_result();
- receiveBase(result, "getLectureData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result");
- }
-
public boolean deleteImageData(String id, String version) throws org.apache.thrift.TException
{
send_deleteImageData(id, version);
@@ -1116,6 +1116,38 @@ public class Server {
}
}
+ public void getLectureData(String lectureid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLectureData_call method_call = new getLectureData_call(lectureid, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLectureData_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String lectureid;
+ public getLectureData_call(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.lectureid = lectureid;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureData", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLectureData_args args = new getLectureData_args();
+ args.setLectureid(lectureid);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,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_getLectureData();
+ }
+ }
+
public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
updateImageData_call method_call = new updateImageData_call(name, newName, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os, resultHandler, this, ___protocolFactory, ___transport);
@@ -1184,38 +1216,6 @@ public class Server {
}
}
- public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureData_call method_call = new getLectureData_call(lecturename, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String lecturename;
- public getLectureData_call(String lecturename, 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.lecturename = lecturename;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureData_args args = new getLectureData_args();
- args.setLecturename(lecturename);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public Map<String,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_getLectureData();
- }
- }
-
public void deleteImageData(String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteImageData_call method_call = new deleteImageData_call(id, version, resultHandler, this, ___protocolFactory, ___transport);
@@ -1458,8 +1458,8 @@ public class Server {
processMap.put("writeLecturedata", new writeLecturedata());
processMap.put("startFileCopy", new startFileCopy());
processMap.put("getImageData", new getImageData());
- processMap.put("updateImageData", new updateImageData());
processMap.put("getLectureData", new getLectureData());
+ processMap.put("updateImageData", new updateImageData());
processMap.put("deleteImageData", new deleteImageData());
processMap.put("updateLecturedata", new updateLecturedata());
processMap.put("deleteImageServer", new deleteImageServer());
@@ -1712,43 +1712,43 @@ public class Server {
}
}
- public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> {
- public updateImageData() {
- super("updateImageData");
+ public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> {
+ public getLectureData() {
+ super("getLectureData");
}
- public updateImageData_args getEmptyArgsInstance() {
- return new updateImageData_args();
+ public getLectureData_args getEmptyArgsInstance() {
+ return new getLectureData_args();
}
protected boolean isOneway() {
return false;
}
- public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException {
- updateImageData_result result = new updateImageData_result();
- result.success = iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os);
- result.setSuccessIsSet(true);
+ public getLectureData_result getResult(I iface, getLectureData_args args) throws org.apache.thrift.TException {
+ getLectureData_result result = new getLectureData_result();
+ result.success = iface.getLectureData(args.lectureid);
return result;
}
}
- public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> {
- public getLectureData() {
- super("getLectureData");
+ public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> {
+ public updateImageData() {
+ super("updateImageData");
}
- public getLectureData_args getEmptyArgsInstance() {
- return new getLectureData_args();
+ public updateImageData_args getEmptyArgsInstance() {
+ return new updateImageData_args();
}
protected boolean isOneway() {
return false;
}
- public getLectureData_result getResult(I iface, getLectureData_args args) throws org.apache.thrift.TException {
- getLectureData_result result = new getLectureData_result();
- result.success = iface.getLectureData(args.lecturename);
+ public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException {
+ updateImageData_result result = new updateImageData_result();
+ result.success = iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os);
+ result.setSuccessIsSet(true);
return result;
}
}
@@ -1883,8 +1883,8 @@ public class Server {
processMap.put("writeLecturedata", new writeLecturedata());
processMap.put("startFileCopy", new startFileCopy());
processMap.put("getImageData", new getImageData());
- processMap.put("updateImageData", new updateImageData());
processMap.put("getLectureData", new getLectureData());
+ processMap.put("updateImageData", new updateImageData());
processMap.put("deleteImageData", new deleteImageData());
processMap.put("updateLecturedata", new updateLecturedata());
processMap.put("deleteImageServer", new deleteImageServer());
@@ -2509,22 +2509,21 @@ public class Server {
}
}
- public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> {
- public updateImageData() {
- super("updateImageData");
+ public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> {
+ public getLectureData() {
+ super("getLectureData");
}
- public updateImageData_args getEmptyArgsInstance() {
- return new updateImageData_args();
+ public getLectureData_args getEmptyArgsInstance() {
+ return new getLectureData_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateImageData_result result = new updateImageData_result();
+ return new AsyncMethodCallback<Map<String,String>>() {
+ public void onComplete(Map<String,String> o) {
+ getLectureData_result result = new getLectureData_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -2536,7 +2535,7 @@ public class Server {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateImageData_result result = new updateImageData_result();
+ getLectureData_result result = new getLectureData_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());
@@ -2556,26 +2555,27 @@ public class Server {
return false;
}
- public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os,resultHandler);
+ public void start(I iface, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
+ iface.getLectureData(args.lectureid,resultHandler);
}
}
- public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> {
- public getLectureData() {
- super("getLectureData");
+ public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> {
+ public updateImageData() {
+ super("updateImageData");
}
- public getLectureData_args getEmptyArgsInstance() {
- return new getLectureData_args();
+ public updateImageData_args getEmptyArgsInstance() {
+ return new updateImageData_args();
}
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getLectureData_result result = new getLectureData_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateImageData_result result = new updateImageData_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -2587,7 +2587,7 @@ public class Server {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getLectureData_result result = new getLectureData_result();
+ updateImageData_result result = new updateImageData_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());
@@ -2607,8 +2607,8 @@ public class Server {
return false;
}
- public void start(I iface, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getLectureData(args.lecturename,resultHandler);
+ public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os,resultHandler);
}
}
@@ -14305,6 +14305,766 @@ public class Server {
}
+ public static class getLectureData_args implements org.apache.thrift.TBase<getLectureData_args, getLectureData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args");
+
+ private static final org.apache.thrift.protocol.TField LECTUREID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureid", org.apache.thrift.protocol.TType.STRING, (short)-1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory());
+ }
+
+ 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 {
+ LECTUREID((short)-1, "lectureid");
+
+ 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: // LECTUREID
+ return LECTUREID;
+ 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.LECTUREID, 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(getLectureData_args.class, metaDataMap);
+ }
+
+ public getLectureData_args() {
+ }
+
+ public getLectureData_args(
+ String lectureid)
+ {
+ this();
+ this.lectureid = lectureid;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureData_args(getLectureData_args other) {
+ if (other.isSetLectureid()) {
+ this.lectureid = other.lectureid;
+ }
+ }
+
+ public getLectureData_args deepCopy() {
+ return new getLectureData_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.lectureid = null;
+ }
+
+ public String getLectureid() {
+ return this.lectureid;
+ }
+
+ public getLectureData_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 LECTUREID:
+ if (value == null) {
+ unsetLectureid();
+ } else {
+ setLectureid((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LECTUREID:
+ return getLectureid();
+
+ }
+ 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 LECTUREID:
+ return isSetLectureid();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLectureData_args)
+ return this.equals((getLectureData_args)that);
+ return false;
+ }
+
+ public boolean equals(getLectureData_args that) {
+ if (that == null)
+ 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;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLectureData_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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;
+ }
+
+ 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("getLectureData_args(");
+ boolean first = true;
+
+ sb.append("lectureid:");
+ if (this.lectureid == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureid);
+ }
+ 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 getLectureData_argsStandardSchemeFactory implements SchemeFactory {
+ public getLectureData_argsStandardScheme getScheme() {
+ return new getLectureData_argsStandardScheme();
+ }
+ }
+
+ private static class getLectureData_argsStandardScheme extends StandardScheme<getLectureData_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_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: // LECTUREID
+ 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);
+ }
+ 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, getLectureData_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.lectureid != null) {
+ oprot.writeFieldBegin(LECTUREID_FIELD_DESC);
+ oprot.writeString(struct.lectureid);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory {
+ public getLectureData_argsTupleScheme getScheme() {
+ return new getLectureData_argsTupleScheme();
+ }
+ }
+
+ private static class getLectureData_argsTupleScheme extends TupleScheme<getLectureData_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLectureid()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetLectureid()) {
+ oprot.writeString(struct.lectureid);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.lectureid = iprot.readString();
+ struct.setLectureidIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLectureData_result implements org.apache.thrift.TBase<getLectureData_result, getLectureData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory());
+ }
+
+ public Map<String,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.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap);
+ }
+
+ public getLectureData_result() {
+ }
+
+ public getLectureData_result(
+ Map<String,String> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureData_result(getLectureData_result other) {
+ if (other.isSetSuccess()) {
+ Map<String,String> __this__success = new HashMap<String,String>(other.success);
+ this.success = __this__success;
+ }
+ }
+
+ public getLectureData_result deepCopy() {
+ return new getLectureData_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public void putToSuccess(String key, String val) {
+ if (this.success == null) {
+ this.success = new HashMap<String,String>();
+ }
+ this.success.put(key, val);
+ }
+
+ public Map<String,String> getSuccess() {
+ return this.success;
+ }
+
+ public getLectureData_result setSuccess(Map<String,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((Map<String,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 getLectureData_result)
+ return this.equals((getLectureData_result)that);
+ return false;
+ }
+
+ public boolean equals(getLectureData_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(getLectureData_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("getLectureData_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 getLectureData_resultStandardSchemeFactory implements SchemeFactory {
+ public getLectureData_resultStandardScheme getScheme() {
+ return new getLectureData_resultStandardScheme();
+ }
+ }
+
+ private static class getLectureData_resultStandardScheme extends StandardScheme<getLectureData_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_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.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin();
+ struct.success = new HashMap<String,String>(2*_map52.size);
+ for (int _i53 = 0; _i53 < _map52.size; ++_i53)
+ {
+ String _key54;
+ String _val55;
+ _key54 = iprot.readString();
+ _val55 = iprot.readString();
+ struct.success.put(_key54, _val55);
+ }
+ iprot.readMapEnd();
+ }
+ 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, getLectureData_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
+ for (Map.Entry<String, String> _iter56 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter56.getKey());
+ oprot.writeString(_iter56.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory {
+ public getLectureData_resultTupleScheme getScheme() {
+ return new getLectureData_resultTupleScheme();
+ }
+ }
+
+ private static class getLectureData_resultTupleScheme extends TupleScheme<getLectureData_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_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.writeI32(struct.success.size());
+ for (Map.Entry<String, String> _iter57 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter57.getKey());
+ oprot.writeString(_iter57.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new HashMap<String,String>(2*_map58.size);
+ for (int _i59 = 0; _i59 < _map58.size; ++_i59)
+ {
+ String _key60;
+ String _val61;
+ _key60 = iprot.readString();
+ _val61 = iprot.readString();
+ struct.success.put(_key60, _val61);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
public static class updateImageData_args implements org.apache.thrift.TBase<updateImageData_args, updateImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args");
@@ -16175,766 +16935,6 @@ public class Server {
}
- public static class getLectureData_args implements org.apache.thrift.TBase<getLectureData_args, getLectureData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args");
-
- private static final org.apache.thrift.protocol.TField LECTURENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lecturename", org.apache.thrift.protocol.TType.STRING, (short)-1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory());
- }
-
- public String lecturename; // 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 {
- LECTURENAME((short)-1, "lecturename");
-
- 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: // LECTURENAME
- return LECTURENAME;
- 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.LECTURENAME, new org.apache.thrift.meta_data.FieldMetaData("lecturename", 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(getLectureData_args.class, metaDataMap);
- }
-
- public getLectureData_args() {
- }
-
- public getLectureData_args(
- String lecturename)
- {
- this();
- this.lecturename = lecturename;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureData_args(getLectureData_args other) {
- if (other.isSetLecturename()) {
- this.lecturename = other.lecturename;
- }
- }
-
- public getLectureData_args deepCopy() {
- return new getLectureData_args(this);
- }
-
- @Override
- public void clear() {
- this.lecturename = null;
- }
-
- public String getLecturename() {
- return this.lecturename;
- }
-
- public getLectureData_args setLecturename(String lecturename) {
- this.lecturename = lecturename;
- return this;
- }
-
- public void unsetLecturename() {
- this.lecturename = null;
- }
-
- /** Returns true if field lecturename is set (has been assigned a value) and false otherwise */
- public boolean isSetLecturename() {
- return this.lecturename != null;
- }
-
- public void setLecturenameIsSet(boolean value) {
- if (!value) {
- this.lecturename = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LECTURENAME:
- if (value == null) {
- unsetLecturename();
- } else {
- setLecturename((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LECTURENAME:
- return getLecturename();
-
- }
- 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 LECTURENAME:
- return isSetLecturename();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureData_args)
- return this.equals((getLectureData_args)that);
- return false;
- }
-
- public boolean equals(getLectureData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_lecturename = true && this.isSetLecturename();
- boolean that_present_lecturename = true && that.isSetLecturename();
- if (this_present_lecturename || that_present_lecturename) {
- if (!(this_present_lecturename && that_present_lecturename))
- return false;
- if (!this.lecturename.equals(that.lecturename))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLecturename()).compareTo(other.isSetLecturename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLecturename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecturename, other.lecturename);
- 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("getLectureData_args(");
- boolean first = true;
-
- sb.append("lecturename:");
- if (this.lecturename == null) {
- sb.append("null");
- } else {
- sb.append(this.lecturename);
- }
- 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 getLectureData_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureData_argsStandardScheme getScheme() {
- return new getLectureData_argsStandardScheme();
- }
- }
-
- private static class getLectureData_argsStandardScheme extends StandardScheme<getLectureData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_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: // LECTURENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lecturename = iprot.readString();
- struct.setLecturenameIsSet(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, getLectureData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.lecturename != null) {
- oprot.writeFieldBegin(LECTURENAME_FIELD_DESC);
- oprot.writeString(struct.lecturename);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureData_argsTupleScheme getScheme() {
- return new getLectureData_argsTupleScheme();
- }
- }
-
- private static class getLectureData_argsTupleScheme extends TupleScheme<getLectureData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLecturename()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetLecturename()) {
- oprot.writeString(struct.lecturename);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.lecturename = iprot.readString();
- struct.setLecturenameIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureData_result implements org.apache.thrift.TBase<getLectureData_result, getLectureData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory());
- }
-
- public Map<String,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.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap);
- }
-
- public getLectureData_result() {
- }
-
- public getLectureData_result(
- Map<String,String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureData_result(getLectureData_result other) {
- if (other.isSetSuccess()) {
- Map<String,String> __this__success = new HashMap<String,String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getLectureData_result deepCopy() {
- return new getLectureData_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, String val) {
- if (this.success == null) {
- this.success = new HashMap<String,String>();
- }
- this.success.put(key, val);
- }
-
- public Map<String,String> getSuccess() {
- return this.success;
- }
-
- public getLectureData_result setSuccess(Map<String,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((Map<String,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 getLectureData_result)
- return this.equals((getLectureData_result)that);
- return false;
- }
-
- public boolean equals(getLectureData_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(getLectureData_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("getLectureData_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 getLectureData_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureData_resultStandardScheme getScheme() {
- return new getLectureData_resultStandardScheme();
- }
- }
-
- private static class getLectureData_resultStandardScheme extends StandardScheme<getLectureData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_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.MAP) {
- {
- org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin();
- struct.success = new HashMap<String,String>(2*_map52.size);
- for (int _i53 = 0; _i53 < _map52.size; ++_i53)
- {
- String _key54;
- String _val55;
- _key54 = iprot.readString();
- _val55 = iprot.readString();
- struct.success.put(_key54, _val55);
- }
- iprot.readMapEnd();
- }
- 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, getLectureData_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (Map.Entry<String, String> _iter56 : struct.success.entrySet())
- {
- oprot.writeString(_iter56.getKey());
- oprot.writeString(_iter56.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureData_resultTupleScheme getScheme() {
- return new getLectureData_resultTupleScheme();
- }
- }
-
- private static class getLectureData_resultTupleScheme extends TupleScheme<getLectureData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_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.writeI32(struct.success.size());
- for (Map.Entry<String, String> _iter57 : struct.success.entrySet())
- {
- oprot.writeString(_iter57.getKey());
- oprot.writeString(_iter57.getValue());
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new HashMap<String,String>(2*_map58.size);
- for (int _i59 = 0; _i59 < _map58.size; ++_i59)
- {
- String _key60;
- String _val61;
- _key60 = iprot.readString();
- _val61 = iprot.readString();
- struct.success.put(_key60, _val61);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
public static class deleteImageData_args implements org.apache.thrift.TBase<deleteImageData_args, deleteImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageData_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageData_args");
diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java
index b70f9c74..0ba4d08c 100644
--- a/Dozentenmodulserver/src/server/ServerHandler.java
+++ b/Dozentenmodulserver/src/server/ServerHandler.java
@@ -302,12 +302,8 @@ public class ServerHandler implements Server.Iface {
return false;
}
- @Override
- public Map<String, String> getLectureData(String lecturename)
- throws TException {
- // TODO Auto-generated method stub
- return null;
- }
+
+
@Override
public List<Lecture> getLectureList() throws TException {
@@ -412,6 +408,15 @@ public class ServerHandler implements Server.Iface {
}
+ @Override
+ public Map<String, String> getLectureData(String lectureid)
+ throws TException {
+ log.info(new Date() + " - returning LectureData: "
+ + sql.getLectureData(lectureid).size() + "items.");
+ return sql.getLectureData(lectureid);
+ }
+
+
public static int nthIndexOf(final String string, final String token,
final int index)
{
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java
index 2922eafc..15d6950f 100644
--- a/Dozentenmodulserver/src/sql/SQL.java
+++ b/Dozentenmodulserver/src/sql/SQL.java
@@ -830,4 +830,37 @@ public class SQL {
return null;
}
+
+ public Map<String,String> getLectureData(String id) {
+ Map<String, String> map = new HashMap<String, String>();
+ try {
+ Connection con=getConnection();
+ Statement stm = con.createStatement();
+ ResultSet data=stm
+ .executeQuery("SELECT i.image_name,i.image_update_time,i.cond_hasInternetRestriction,i.cond_hasLicenseRestriction, i.cond_minCPUs,i.cond_minRAM, i.image_syncMode,i.image_filesize,i.image_path, i.image_isTemplate,os.GuestOS, concat(u.Nachname,' ',u.Vorname) as Owner FROM bwLehrpool.m_VLData_imageInfo i,bwLehrpool.m_user u,bwLehrpool.m_operatingSystem os where i.image_owner=u.userID and i.content_operatingSystem=os.operatingSystemID and GUID_imageID = '" + id + "' ;");
+ while (data.next()) {
+ map.put("name", data.getString("image_name"));
+ map.put("internet",
+ data.getString("cond_hasInternetRestriction"));
+ map.put("license", data.getString("cond_hasLicenseRestriction"));
+ map.put("cpu", data.getString("cond_minCPUs"));
+ map.put("ram", data.getString("cond_minRAM"));
+ map.put("shareMode", data.getString("image_syncMode"));
+ map.put("filesize", data.getString("image_filesize"));
+ map.put("path", data.getString("image_path"));
+ map.put("template", data.getString("image_isTemplate"));
+ map.put("os",data.getString("GuestOS"));
+ map.put("owner", data.getString("Owner"));
+ map.put("lastupdate", data.getString("image_update_time"));
+
+ }
+ con.close();
+ return map;
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ log.info(new Date() + " - Failed to getImageData.");
+ e.printStackTrace();
+ }
+ return null;
+ }
}
diff --git a/Dozentenmodulserver/thrift/server.thrift b/Dozentenmodulserver/thrift/server.thrift
index ff74a6f5..0bd3d800 100644
--- a/Dozentenmodulserver/thrift/server.thrift
+++ b/Dozentenmodulserver/thrift/server.thrift
@@ -47,8 +47,8 @@ service Server{
bool writeLecturedata(string name, string shortdesc, string desc,string startDate, string endDate, bool isActive, string imagename,string login,string firstname,string lastname, string university, string Mail, string Tel,string Fak),
bool startFileCopy(string file),
map<string,string> getImageData(string imageid, string imageversion),
+ map<string,string> getLectureData(string lectureid),
bool updateImageData(string name, string newName,string image_path,bool license, bool internet, int ram,int cpu, string id, string version,bool isTemplate ,i64 filesize, int shareMode, string os),
- map<string,string> getLectureData(string lecturename),
bool deleteImageData(string id, string version),
bool updateLecturedata(string name, string newName ,string shortdesc, string desc,string startDate, string endDate, bool isActive, string imagename,string firstname,string lastname, string university, string Mail, string Tel,string Fak, string id),
bool deleteImageServer(string id, string version),