From 5f540aaa05c9b4400d8bc58a8fdbc7a9157b4908 Mon Sep 17 00:00:00 2001 From: Tobias Spitzer Date: Tue, 19 Aug 2014 08:26:22 +0200 Subject: gfdgfsd --- .../src/gui/lecture/SearchLecture_GUI.java | 101 +- ...eData_args$getLectureData_argsTupleScheme.class | Bin 2145 -> 2139 bytes .../Server$getLectureData_result$_Fields.class | Bin 3040 -> 3040 bytes .../bin/server/Server$updateImageData_args.class | Bin 24591 -> 24591 bytes .../Server$updateImageData_result$_Fields.class | Bin 3050 -> 3050 bytes .../bin/server/Server$updateImageData_result.class | Bin 9798 -> 9798 bytes Dozentenmodulserver/bin/sql/SQL.class | Bin 24560 -> 25242 bytes Dozentenmodulserver/src/server/Server.java | 3646 ++++++++++---------- Dozentenmodulserver/src/server/ServerHandler.java | 17 +- Dozentenmodulserver/src/sql/SQL.java | 33 + Dozentenmodulserver/thrift/server.thrift | 2 +- 11 files changed, 1924 insertions(+), 1875 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 Binary files a/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class and b/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class 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 Binary files a/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class and b/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class differ diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class index a9bac9a6..8c3bcc07 100644 Binary files a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class and b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class 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 Binary files a/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class and b/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class differ diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class index 314ce299..e64cad3a 100644 Binary files a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class and b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class differ diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class index c502967e..94acdc53 100644 Binary files a/Dozentenmodulserver/bin/sql/SQL.class and b/Dozentenmodulserver/bin/sql/SQL.class 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 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 getLectureData(String lectureid) throws org.apache.thrift.TException; - public Map 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 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 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 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 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 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 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 extends org.apache.thrift.ProcessFunction { - public updateImageData() { - super("updateImageData"); + public static class getLectureData extends org.apache.thrift.ProcessFunction { + 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 extends org.apache.thrift.ProcessFunction { - public getLectureData() { - super("getLectureData"); + public static class updateImageData extends org.apache.thrift.ProcessFunction { + 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 extends org.apache.thrift.AsyncProcessFunction { - public updateImageData() { - super("updateImageData"); + public static class getLectureData extends org.apache.thrift.AsyncProcessFunction> { + public getLectureData() { + super("getLectureData"); } - public updateImageData_args getEmptyArgsInstance() { - return new updateImageData_args(); + public getLectureData_args getEmptyArgsInstance() { + return new getLectureData_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - updateImageData_result result = new updateImageData_result(); + return new AsyncMethodCallback>() { + public void onComplete(Map 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 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> resultHandler) throws TException { + iface.getLectureData(args.lectureid,resultHandler); } } - public static class getLectureData extends org.apache.thrift.AsyncProcessFunction> { - public getLectureData() { - super("getLectureData"); + public static class updateImageData extends org.apache.thrift.AsyncProcessFunction { + public updateImageData() { + super("updateImageData"); } - public getLectureData_args getEmptyArgsInstance() { - return new getLectureData_args(); + public updateImageData_args getEmptyArgsInstance() { + return new updateImageData_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(Map o) { - getLectureData_result result = new getLectureData_result(); + return new AsyncMethodCallback() { + 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> resultHandler) throws TException { - iface.getLectureData(args.lecturename,resultHandler); + public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback 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,58 +14305,22 @@ public class Server { } - public static class updateImageData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args"); + public static class getLectureData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1); - private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2); - private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)-3); - private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-4); - private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-5); - private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-6); - private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-7); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-8); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-9); - private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-10); - 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)-11); - 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)-12); - 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)-13); + 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new updateImageData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new updateImageData_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory()); } - public String name; // required - public String newName; // required - public String image_path; // required - public boolean license; // required - public boolean internet; // required - public long ram; // required - public long cpu; // required - public String id; // required - public String version; // required - public boolean isTemplate; // required - public long filesize; // required - public long shareMode; // required - public String os; // 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 { - NAME((short)-1, "name"), - NEW_NAME((short)-2, "newName"), - IMAGE_PATH((short)-3, "image_path"), - LICENSE((short)-4, "license"), - INTERNET((short)-5, "internet"), - RAM((short)-6, "ram"), - CPU((short)-7, "cpu"), - ID((short)-8, "id"), - VERSION((short)-9, "version"), - IS_TEMPLATE((short)-10, "isTemplate"), - FILESIZE((short)-11, "filesize"), - SHARE_MODE((short)-12, "shareMode"), - OS((short)-13, "os"); + LECTUREID((short)-1, "lectureid"); private static final Map byName = new HashMap(); @@ -14371,32 +14335,8 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case -1: // NAME - return NAME; - case -2: // NEW_NAME - return NEW_NAME; - case -3: // IMAGE_PATH - return IMAGE_PATH; - case -4: // LICENSE - return LICENSE; - case -5: // INTERNET - return INTERNET; - case -6: // RAM - return RAM; - case -7: // CPU - return CPU; - case -8: // ID - return ID; - case -9: // VERSION - return VERSION; - case -10: // IS_TEMPLATE - return IS_TEMPLATE; - case -11: // FILESIZE - return FILESIZE; - case -12: // SHARE_MODE - return SHARE_MODE; - case -13: // OS - return OS; + case -1: // LECTUREID + return LECTUREID; default: return null; } @@ -14437,556 +14377,442 @@ public class Server { } // isset id assignments - private static final int __LICENSE_ISSET_ID = 0; - private static final int __INTERNET_ISSET_ID = 1; - private static final int __RAM_ISSET_ID = 2; - private static final int __CPU_ISSET_ID = 3; - private static final int __ISTEMPLATE_ISSET_ID = 4; - private static final int __FILESIZE_ISSET_ID = 5; - private static final int __SHAREMODE_ISSET_ID = 6; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.INTERNET, new org.apache.thrift.meta_data.FieldMetaData("internet", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RAM, new org.apache.thrift.meta_data.FieldMetaData("ram", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); - tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.FILESIZE, new org.apache.thrift.meta_data.FieldMetaData("filesize", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT, - 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, + 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(updateImageData_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_args.class, metaDataMap); } - public updateImageData_args() { + public getLectureData_args() { } - public updateImageData_args( - 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) + public getLectureData_args( + String lectureid) { this(); - this.name = name; - this.newName = newName; - this.image_path = image_path; - this.license = license; - setLicenseIsSet(true); - this.internet = internet; - setInternetIsSet(true); - this.ram = ram; - setRamIsSet(true); - this.cpu = cpu; - setCpuIsSet(true); - this.id = id; - this.version = version; - this.isTemplate = isTemplate; - setIsTemplateIsSet(true); - this.filesize = filesize; - setFilesizeIsSet(true); - this.shareMode = shareMode; - setShareModeIsSet(true); - this.os = os; + this.lectureid = lectureid; } /** * Performs a deep copy on other. */ - public updateImageData_args(updateImageData_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetNewName()) { - this.newName = other.newName; - } - if (other.isSetImage_path()) { - this.image_path = other.image_path; - } - this.license = other.license; - this.internet = other.internet; - this.ram = other.ram; - this.cpu = other.cpu; - if (other.isSetId()) { - this.id = other.id; - } - if (other.isSetVersion()) { - this.version = other.version; - } - this.isTemplate = other.isTemplate; - this.filesize = other.filesize; - this.shareMode = other.shareMode; - if (other.isSetOs()) { - this.os = other.os; + public getLectureData_args(getLectureData_args other) { + if (other.isSetLectureid()) { + this.lectureid = other.lectureid; } } - public updateImageData_args deepCopy() { - return new updateImageData_args(this); + public getLectureData_args deepCopy() { + return new getLectureData_args(this); } @Override public void clear() { - this.name = null; - this.newName = null; - this.image_path = null; - setLicenseIsSet(false); - this.license = false; - setInternetIsSet(false); - this.internet = false; - setRamIsSet(false); - this.ram = 0; - setCpuIsSet(false); - this.cpu = 0; - this.id = null; - this.version = null; - setIsTemplateIsSet(false); - this.isTemplate = false; - setFilesizeIsSet(false); - this.filesize = 0; - setShareModeIsSet(false); - this.shareMode = 0; - this.os = null; + this.lectureid = null; } - public String getName() { - return this.name; + public String getLectureid() { + return this.lectureid; } - public updateImageData_args setName(String name) { - this.name = name; + public getLectureData_args setLectureid(String lectureid) { + this.lectureid = lectureid; return this; } - public void unsetName() { - this.name = null; + public void unsetLectureid() { + this.lectureid = null; } - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != 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 setNameIsSet(boolean value) { + public void setLectureidIsSet(boolean value) { if (!value) { - this.name = null; + this.lectureid = null; } } - public String getNewName() { - return this.newName; - } - - public updateImageData_args setNewName(String newName) { - this.newName = newName; - return this; - } + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LECTUREID: + if (value == null) { + unsetLectureid(); + } else { + setLectureid((String)value); + } + break; - public void unsetNewName() { - this.newName = null; + } } - /** Returns true if field newName is set (has been assigned a value) and false otherwise */ - public boolean isSetNewName() { - return this.newName != null; - } + public Object getFieldValue(_Fields field) { + switch (field) { + case LECTUREID: + return getLectureid(); - public void setNewNameIsSet(boolean value) { - if (!value) { - this.newName = null; } + throw new IllegalStateException(); } - public String getImage_path() { - return this.image_path; - } + /** 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(); + } - public updateImageData_args setImage_path(String image_path) { - this.image_path = image_path; - return this; + switch (field) { + case LECTUREID: + return isSetLectureid(); + } + throw new IllegalStateException(); } - public void unsetImage_path() { - this.image_path = null; + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureData_args) + return this.equals((getLectureData_args)that); + return false; } - /** Returns true if field image_path is set (has been assigned a value) and false otherwise */ - public boolean isSetImage_path() { - return this.image_path != null; - } + public boolean equals(getLectureData_args that) { + if (that == null) + return false; - public void setImage_pathIsSet(boolean value) { - if (!value) { - this.image_path = null; + 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; } - } - public boolean isLicense() { - return this.license; + return true; } - public updateImageData_args setLicense(boolean license) { - this.license = license; - setLicenseIsSet(true); - return this; + @Override + public int hashCode() { + return 0; } - public void unsetLicense() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LICENSE_ISSET_ID); - } + @Override + public int compareTo(getLectureData_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - /** Returns true if field license is set (has been assigned a value) and false otherwise */ - public boolean isSetLicense() { - return EncodingUtils.testBit(__isset_bitfield, __LICENSE_ISSET_ID); - } + int lastComparison = 0; - public void setLicenseIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LICENSE_ISSET_ID, value); + 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 boolean isInternet() { - return this.internet; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } - public updateImageData_args setInternet(boolean internet) { - this.internet = internet; - setInternetIsSet(true); - return this; + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } - public void unsetInternet() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTERNET_ISSET_ID); + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - /** Returns true if field internet is set (has been assigned a value) and false otherwise */ - public boolean isSetInternet() { - return EncodingUtils.testBit(__isset_bitfield, __INTERNET_ISSET_ID); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureData_args("); + boolean first = true; - public void setInternetIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTERNET_ISSET_ID, value); + sb.append("lectureid:"); + if (this.lectureid == null) { + sb.append("null"); + } else { + sb.append(this.lectureid); + } + first = false; + sb.append(")"); + return sb.toString(); } - public long getRam() { - return this.ram; + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity } - public updateImageData_args setRam(long ram) { - this.ram = ram; - setRamIsSet(true); - return this; + 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); + } } - public void unsetRam() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RAM_ISSET_ID); + 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); + } } - /** Returns true if field ram is set (has been assigned a value) and false otherwise */ - public boolean isSetRam() { - return EncodingUtils.testBit(__isset_bitfield, __RAM_ISSET_ID); + private static class getLectureData_argsStandardSchemeFactory implements SchemeFactory { + public getLectureData_argsStandardScheme getScheme() { + return new getLectureData_argsStandardScheme(); + } } - public void setRamIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RAM_ISSET_ID, value); - } + private static class getLectureData_argsStandardScheme extends StandardScheme { - public long getCpu() { - return this.cpu; - } + 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(); - public updateImageData_args setCpu(long cpu) { - this.cpu = cpu; - setCpuIsSet(true); - return this; - } + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } - public void unsetCpu() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID); - } + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_args struct) throws org.apache.thrift.TException { + struct.validate(); - /** Returns true if field cpu is set (has been assigned a value) and false otherwise */ - public boolean isSetCpu() { - return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID); - } + oprot.writeStructBegin(STRUCT_DESC); + if (struct.lectureid != null) { + oprot.writeFieldBegin(LECTUREID_FIELD_DESC); + oprot.writeString(struct.lectureid); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } - public void setCpuIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value); } - public String getId() { - return this.id; + private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory { + public getLectureData_argsTupleScheme getScheme() { + return new getLectureData_argsTupleScheme(); + } } - public updateImageData_args setId(String id) { - this.id = id; - return this; - } + private static class getLectureData_argsTupleScheme extends TupleScheme { - public void unsetId() { - this.id = null; + @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); + } + } } - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; + } + + public static class getLectureData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory()); } - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; + public Map 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 byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } } - } - public String getVersion() { - return this.version; - } + /** + * 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; + } + } - public updateImageData_args setVersion(String version) { - this.version = version; - return this; - } + /** + * 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; + } - public void unsetVersion() { - this.version = null; - } + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } + private final short _thriftId; + private final String _fieldName; - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; } - } - public boolean isIsTemplate() { - return this.isTemplate; - } + public short getThriftFieldId() { + return _thriftId; + } - public updateImageData_args setIsTemplate(boolean isTemplate) { - this.isTemplate = isTemplate; - setIsTemplateIsSet(true); - return this; + public String getFieldName() { + return _fieldName; + } } - public void unsetIsTemplate() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + // 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); } - /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ - public boolean isSetIsTemplate() { - return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + public getLectureData_result() { } - public void setIsTemplateIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); + public getLectureData_result( + Map success) + { + this(); + this.success = success; } - public long getFilesize() { - return this.filesize; + /** + * Performs a deep copy on other. + */ + public getLectureData_result(getLectureData_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success); + this.success = __this__success; + } } - public updateImageData_args setFilesize(long filesize) { - this.filesize = filesize; - setFilesizeIsSet(true); - return this; + public getLectureData_result deepCopy() { + return new getLectureData_result(this); } - public void unsetFilesize() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID); + @Override + public void clear() { + this.success = null; } - /** Returns true if field filesize is set (has been assigned a value) and false otherwise */ - public boolean isSetFilesize() { - return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setFilesizeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); - } - - public long getShareMode() { - return this.shareMode; - } - - public updateImageData_args setShareMode(long shareMode) { - this.shareMode = shareMode; - setShareModeIsSet(true); - return this; - } - - public void unsetShareMode() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREMODE_ISSET_ID); - } - - /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */ - public boolean isSetShareMode() { - return EncodingUtils.testBit(__isset_bitfield, __SHAREMODE_ISSET_ID); - } - - public void setShareModeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value); + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); } - public String getOs() { - return this.os; + public Map getSuccess() { + return this.success; } - public updateImageData_args setOs(String os) { - this.os = os; + public getLectureData_result setSuccess(Map success) { + this.success = success; return this; } - public void unsetOs() { - this.os = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field os is set (has been assigned a value) and false otherwise */ - public boolean isSetOs() { - return this.os != 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 setOsIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.os = null; + this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case NEW_NAME: - if (value == null) { - unsetNewName(); - } else { - setNewName((String)value); - } - break; - - case IMAGE_PATH: - if (value == null) { - unsetImage_path(); - } else { - setImage_path((String)value); - } - break; - - case LICENSE: - if (value == null) { - unsetLicense(); - } else { - setLicense((Boolean)value); - } - break; - - case INTERNET: - if (value == null) { - unsetInternet(); - } else { - setInternet((Boolean)value); - } - break; - - case RAM: - if (value == null) { - unsetRam(); - } else { - setRam((Long)value); - } - break; - - case CPU: - if (value == null) { - unsetCpu(); - } else { - setCpu((Long)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((String)value); - } - break; - - case IS_TEMPLATE: - if (value == null) { - unsetIsTemplate(); - } else { - setIsTemplate((Boolean)value); - } - break; - - case FILESIZE: - if (value == null) { - unsetFilesize(); - } else { - setFilesize((Long)value); - } - break; - - case SHARE_MODE: - if (value == null) { - unsetShareMode(); - } else { - setShareMode((Long)value); - } - break; - - case OS: + case SUCCESS: if (value == null) { - unsetOs(); + unsetSuccess(); } else { - setOs((String)value); + setSuccess((Map)value); } break; @@ -14995,44 +14821,8 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); - - case NEW_NAME: - return getNewName(); - - case IMAGE_PATH: - return getImage_path(); - - case LICENSE: - return Boolean.valueOf(isLicense()); - - case INTERNET: - return Boolean.valueOf(isInternet()); - - case RAM: - return Long.valueOf(getRam()); - - case CPU: - return Long.valueOf(getCpu()); - - case ID: - return getId(); - - case VERSION: - return getVersion(); - - case IS_TEMPLATE: - return Boolean.valueOf(isIsTemplate()); - - case FILESIZE: - return Long.valueOf(getFilesize()); - - case SHARE_MODE: - return Long.valueOf(getShareMode()); - - case OS: - return getOs(); + case SUCCESS: + return getSuccess(); } throw new IllegalStateException(); @@ -15045,32 +14835,8 @@ public class Server { } switch (field) { - case NAME: - return isSetName(); - case NEW_NAME: - return isSetNewName(); - case IMAGE_PATH: - return isSetImage_path(); - case LICENSE: - return isSetLicense(); - case INTERNET: - return isSetInternet(); - case RAM: - return isSetRam(); - case CPU: - return isSetCpu(); - case ID: - return isSetId(); - case VERSION: - return isSetVersion(); - case IS_TEMPLATE: - return isSetIsTemplate(); - case FILESIZE: - return isSetFilesize(); - case SHARE_MODE: - return isSetShareMode(); - case OS: - return isSetOs(); + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -15079,274 +14845,46 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof updateImageData_args) - return this.equals((updateImageData_args)that); + if (that instanceof getLectureData_result) + return this.equals((getLectureData_result)that); return false; } - public boolean equals(updateImageData_args that) { + public boolean equals(getLectureData_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_newName = true && this.isSetNewName(); - boolean that_present_newName = true && that.isSetNewName(); - if (this_present_newName || that_present_newName) { - if (!(this_present_newName && that_present_newName)) - return false; - if (!this.newName.equals(that.newName)) - return false; - } - - boolean this_present_image_path = true && this.isSetImage_path(); - boolean that_present_image_path = true && that.isSetImage_path(); - if (this_present_image_path || that_present_image_path) { - if (!(this_present_image_path && that_present_image_path)) - return false; - if (!this.image_path.equals(that.image_path)) - return false; - } - - boolean this_present_license = true; - boolean that_present_license = true; - if (this_present_license || that_present_license) { - if (!(this_present_license && that_present_license)) - return false; - if (this.license != that.license) - return false; - } - - boolean this_present_internet = true; - boolean that_present_internet = true; - if (this_present_internet || that_present_internet) { - if (!(this_present_internet && that_present_internet)) - return false; - if (this.internet != that.internet) - return false; - } - - boolean this_present_ram = true; - boolean that_present_ram = true; - if (this_present_ram || that_present_ram) { - if (!(this_present_ram && that_present_ram)) - return false; - if (this.ram != that.ram) - return false; - } - - boolean this_present_cpu = true; - boolean that_present_cpu = true; - if (this_present_cpu || that_present_cpu) { - if (!(this_present_cpu && that_present_cpu)) - return false; - if (this.cpu != that.cpu) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_isTemplate = true; - boolean that_present_isTemplate = true; - if (this_present_isTemplate || that_present_isTemplate) { - if (!(this_present_isTemplate && that_present_isTemplate)) - return false; - if (this.isTemplate != that.isTemplate) - return false; - } - - boolean this_present_filesize = true; - boolean that_present_filesize = true; - if (this_present_filesize || that_present_filesize) { - if (!(this_present_filesize && that_present_filesize)) - return false; - if (this.filesize != that.filesize) - return false; - } - - boolean this_present_shareMode = true; - boolean that_present_shareMode = true; - if (this_present_shareMode || that_present_shareMode) { - if (!(this_present_shareMode && that_present_shareMode)) - return false; - if (this.shareMode != that.shareMode) - return false; - } - - boolean this_present_os = true && this.isSetOs(); - boolean that_present_os = true && that.isSetOs(); - if (this_present_os || that_present_os) { - if (!(this_present_os && that_present_os)) - return false; - if (!this.os.equals(that.os)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(updateImageData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); + 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(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNewName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetImage_path()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_path, other.image_path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLicense()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.license, other.license); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInternet()).compareTo(other.isSetInternet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInternet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internet, other.internet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRam()).compareTo(other.isSetRam()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRam()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ram, other.ram); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCpu()).compareTo(other.isSetCpu()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCpu()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpu, other.cpu); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsTemplate()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilesize()).compareTo(other.isSetFilesize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilesize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesize, other.filesize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetShareMode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetOs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -15364,86 +14902,18 @@ public class Server { 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("updateImageData_args("); + StringBuilder sb = new StringBuilder("getLectureData_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("newName:"); - if (this.newName == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.newName); - } - first = false; - if (!first) sb.append(", "); - sb.append("image_path:"); - if (this.image_path == null) { - sb.append("null"); - } else { - sb.append(this.image_path); - } - first = false; - if (!first) sb.append(", "); - sb.append("license:"); - sb.append(this.license); - first = false; - if (!first) sb.append(", "); - sb.append("internet:"); - sb.append(this.internet); - first = false; - if (!first) sb.append(", "); - sb.append("ram:"); - sb.append(this.ram); - first = false; - if (!first) sb.append(", "); - sb.append("cpu:"); - sb.append(this.cpu); - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("isTemplate:"); - sb.append(this.isTemplate); - first = false; - if (!first) sb.append(", "); - sb.append("filesize:"); - sb.append(this.filesize); - first = false; - if (!first) sb.append(", "); - sb.append("shareMode:"); - sb.append(this.shareMode); - first = false; - if (!first) sb.append(", "); - sb.append("os:"); - if (this.os == null) { - sb.append("null"); - } else { - sb.append(this.os); + sb.append(this.success); } first = false; sb.append(")"); @@ -15465,23 +14935,21 @@ public class Server { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class updateImageData_argsStandardSchemeFactory implements SchemeFactory { - public updateImageData_argsStandardScheme getScheme() { - return new updateImageData_argsStandardScheme(); + private static class getLectureData_resultStandardSchemeFactory implements SchemeFactory { + public getLectureData_resultStandardScheme getScheme() { + return new getLectureData_resultStandardScheme(); } } - private static class updateImageData_argsStandardScheme extends StandardScheme { + private static class getLectureData_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_args struct) throws org.apache.thrift.TException { + 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) @@ -15491,106 +14959,22 @@ public class Server { break; } switch (schemeField.id) { - case -1: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -2: // NEW_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.newName = iprot.readString(); - struct.setNewNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -3: // IMAGE_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.image_path = iprot.readString(); - struct.setImage_pathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -4: // LICENSE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.license = iprot.readBool(); - struct.setLicenseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -5: // INTERNET - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.internet = iprot.readBool(); - struct.setInternetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -6: // RAM - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.ram = iprot.readI64(); - struct.setRamIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -7: // CPU - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.cpu = iprot.readI64(); - struct.setCpuIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -8: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -9: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -10: // IS_TEMPLATE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isTemplate = iprot.readBool(); - struct.setIsTemplateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -11: // FILESIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.filesize = iprot.readI64(); - struct.setFilesizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -12: // SHARE_MODE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.shareMode = iprot.readI64(); - struct.setShareModeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case -13: // OS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.os = iprot.readString(); - struct.setOsIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin(); + struct.success = new HashMap(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); } @@ -15606,59 +14990,21 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageData_args struct) throws org.apache.thrift.TException { + 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.os != null) { - oprot.writeFieldBegin(OS_FIELD_DESC); - oprot.writeString(struct.os); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC); - oprot.writeI64(struct.shareMode); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(FILESIZE_FIELD_DESC); - oprot.writeI64(struct.filesize); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); - oprot.writeBool(struct.isTemplate); - oprot.writeFieldEnd(); - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(struct.version); - oprot.writeFieldEnd(); - } - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CPU_FIELD_DESC); - oprot.writeI64(struct.cpu); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RAM_FIELD_DESC); - oprot.writeI64(struct.ram); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(INTERNET_FIELD_DESC); - oprot.writeBool(struct.internet); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LICENSE_FIELD_DESC); - oprot.writeBool(struct.license); - oprot.writeFieldEnd(); - if (struct.image_path != null) { - oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC); - oprot.writeString(struct.image_path); - oprot.writeFieldEnd(); - } - if (struct.newName != null) { - oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); - oprot.writeString(struct.newName); - oprot.writeFieldEnd(); - } - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); + 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 _iter56 : struct.success.entrySet()) + { + oprot.writeString(_iter56.getKey()); + oprot.writeString(_iter56.getValue()); + } + oprot.writeMapEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15667,701 +15013,955 @@ public class Server { } - private static class updateImageData_argsTupleSchemeFactory implements SchemeFactory { - public updateImageData_argsTupleScheme getScheme() { - return new updateImageData_argsTupleScheme(); + private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory { + public getLectureData_resultTupleScheme getScheme() { + return new getLectureData_resultTupleScheme(); } } - private static class updateImageData_argsTupleScheme extends TupleScheme { + private static class getLectureData_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException { + 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.isSetName()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetNewName()) { - optionals.set(1); - } - if (struct.isSetImage_path()) { - optionals.set(2); - } - if (struct.isSetLicense()) { - optionals.set(3); - } - if (struct.isSetInternet()) { - optionals.set(4); - } - if (struct.isSetRam()) { - optionals.set(5); - } - if (struct.isSetCpu()) { - optionals.set(6); - } - if (struct.isSetId()) { - optionals.set(7); - } - if (struct.isSetVersion()) { - optionals.set(8); - } - if (struct.isSetIsTemplate()) { - optionals.set(9); - } - if (struct.isSetFilesize()) { - optionals.set(10); - } - if (struct.isSetShareMode()) { - optionals.set(11); - } - if (struct.isSetOs()) { - optionals.set(12); - } - oprot.writeBitSet(optionals, 13); - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetNewName()) { - oprot.writeString(struct.newName); - } - if (struct.isSetImage_path()) { - oprot.writeString(struct.image_path); - } - if (struct.isSetLicense()) { - oprot.writeBool(struct.license); - } - if (struct.isSetInternet()) { - oprot.writeBool(struct.internet); - } - if (struct.isSetRam()) { - oprot.writeI64(struct.ram); - } - if (struct.isSetCpu()) { - oprot.writeI64(struct.cpu); - } - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - if (struct.isSetVersion()) { - oprot.writeString(struct.version); - } - if (struct.isSetIsTemplate()) { - oprot.writeBool(struct.isTemplate); - } - if (struct.isSetFilesize()) { - oprot.writeI64(struct.filesize); - } - if (struct.isSetShareMode()) { - oprot.writeI64(struct.shareMode); - } - if (struct.isSetOs()) { - oprot.writeString(struct.os); + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter57 : struct.success.entrySet()) + { + oprot.writeString(_iter57.getKey()); + oprot.writeString(_iter57.getValue()); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException { + 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(13); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(1)) { - struct.newName = iprot.readString(); - struct.setNewNameIsSet(true); - } - if (incoming.get(2)) { - struct.image_path = iprot.readString(); - struct.setImage_pathIsSet(true); - } - if (incoming.get(3)) { - struct.license = iprot.readBool(); - struct.setLicenseIsSet(true); - } - if (incoming.get(4)) { - struct.internet = iprot.readBool(); - struct.setInternetIsSet(true); - } - if (incoming.get(5)) { - struct.ram = iprot.readI64(); - struct.setRamIsSet(true); - } - if (incoming.get(6)) { - struct.cpu = iprot.readI64(); - struct.setCpuIsSet(true); - } - if (incoming.get(7)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - if (incoming.get(8)) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } - if (incoming.get(9)) { - struct.isTemplate = iprot.readBool(); - struct.setIsTemplateIsSet(true); - } - if (incoming.get(10)) { - struct.filesize = iprot.readI64(); - struct.setFilesizeIsSet(true); + { + 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(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); } - if (incoming.get(11)) { - struct.shareMode = iprot.readI64(); - struct.setShareModeIsSet(true); + } + } + + } + + public static class updateImageData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-4); + private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-5); + private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-6); + private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-7); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-10); + 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)-11); + 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)-12); + 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)-13); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateImageData_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageData_argsTupleSchemeFactory()); + } + + public String name; // required + public String newName; // required + public String image_path; // required + public boolean license; // required + public boolean internet; // required + public long ram; // required + public long cpu; // required + public String id; // required + public String version; // required + public boolean isTemplate; // required + public long filesize; // required + public long shareMode; // required + public String os; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)-1, "name"), + NEW_NAME((short)-2, "newName"), + IMAGE_PATH((short)-3, "image_path"), + LICENSE((short)-4, "license"), + INTERNET((short)-5, "internet"), + RAM((short)-6, "ram"), + CPU((short)-7, "cpu"), + ID((short)-8, "id"), + VERSION((short)-9, "version"), + IS_TEMPLATE((short)-10, "isTemplate"), + FILESIZE((short)-11, "filesize"), + SHARE_MODE((short)-12, "shareMode"), + OS((short)-13, "os"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); } - if (incoming.get(12)) { - struct.os = iprot.readString(); - struct.setOsIsSet(true); + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // NAME + return NAME; + case -2: // NEW_NAME + return NEW_NAME; + case -3: // IMAGE_PATH + return IMAGE_PATH; + case -4: // LICENSE + return LICENSE; + case -5: // INTERNET + return INTERNET; + case -6: // RAM + return RAM; + case -7: // CPU + return CPU; + case -8: // ID + return ID; + case -9: // VERSION + return VERSION; + case -10: // IS_TEMPLATE + return IS_TEMPLATE; + case -11: // FILESIZE + return FILESIZE; + case -12: // SHARE_MODE + return SHARE_MODE; + case -13: // OS + return OS; + default: + return null; } } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LICENSE_ISSET_ID = 0; + private static final int __INTERNET_ISSET_ID = 1; + private static final int __RAM_ISSET_ID = 2; + private static final int __CPU_ISSET_ID = 3; + private static final int __ISTEMPLATE_ISSET_ID = 4; + private static final int __FILESIZE_ISSET_ID = 5; + private static final int __SHAREMODE_ISSET_ID = 6; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.INTERNET, new org.apache.thrift.meta_data.FieldMetaData("internet", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.RAM, new org.apache.thrift.meta_data.FieldMetaData("ram", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.FILESIZE, new org.apache.thrift.meta_data.FieldMetaData("filesize", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_args.class, metaDataMap); + } + + public updateImageData_args() { + } + + public updateImageData_args( + 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) + { + this(); + this.name = name; + this.newName = newName; + this.image_path = image_path; + this.license = license; + setLicenseIsSet(true); + this.internet = internet; + setInternetIsSet(true); + this.ram = ram; + setRamIsSet(true); + this.cpu = cpu; + setCpuIsSet(true); + this.id = id; + this.version = version; + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + this.filesize = filesize; + setFilesizeIsSet(true); + this.shareMode = shareMode; + setShareModeIsSet(true); + this.os = os; + } + + /** + * Performs a deep copy on other. + */ + public updateImageData_args(updateImageData_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetNewName()) { + this.newName = other.newName; + } + if (other.isSetImage_path()) { + this.image_path = other.image_path; + } + this.license = other.license; + this.internet = other.internet; + this.ram = other.ram; + this.cpu = other.cpu; + if (other.isSetId()) { + this.id = other.id; + } + if (other.isSetVersion()) { + this.version = other.version; + } + this.isTemplate = other.isTemplate; + this.filesize = other.filesize; + this.shareMode = other.shareMode; + if (other.isSetOs()) { + this.os = other.os; + } + } + + public updateImageData_args deepCopy() { + return new updateImageData_args(this); + } + + @Override + public void clear() { + this.name = null; + this.newName = null; + this.image_path = null; + setLicenseIsSet(false); + this.license = false; + setInternetIsSet(false); + this.internet = false; + setRamIsSet(false); + this.ram = 0; + setCpuIsSet(false); + this.cpu = 0; + this.id = null; + this.version = null; + setIsTemplateIsSet(false); + this.isTemplate = false; + setFilesizeIsSet(false); + this.filesize = 0; + setShareModeIsSet(false); + this.shareMode = 0; + this.os = null; + } + + public String getName() { + return this.name; + } + + public updateImageData_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } } - } + public String getNewName() { + return this.newName; + } - public static class updateImageData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_result"); + public updateImageData_args setNewName(String newName) { + this.newName = newName; + return this; + } - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + public void unsetNewName() { + this.newName = null; + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new updateImageData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new updateImageData_resultTupleSchemeFactory()); + /** Returns true if field newName is set (has been assigned a value) and false otherwise */ + public boolean isSetNewName() { + return this.newName != null; } - public boolean success; // required + public void setNewNameIsSet(boolean value) { + if (!value) { + this.newName = null; + } + } - /** 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"); + public String getImage_path() { + return this.image_path; + } - private static final Map byName = new HashMap(); + public updateImageData_args setImage_path(String image_path) { + this.image_path = image_path; + return this; + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + public void unsetImage_path() { + this.image_path = null; + } - /** - * 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; - } - } + /** Returns true if field image_path is set (has been assigned a value) and false otherwise */ + public boolean isSetImage_path() { + return this.image_path != 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; + public void setImage_pathIsSet(boolean value) { + if (!value) { + this.image_path = null; } + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public boolean isLicense() { + return this.license; + } - private final short _thriftId; - private final String _fieldName; + public updateImageData_args setLicense(boolean license) { + this.license = license; + setLicenseIsSet(true); + return this; + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + public void unsetLicense() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LICENSE_ISSET_ID); + } - public short getThriftFieldId() { - return _thriftId; - } + /** Returns true if field license is set (has been assigned a value) and false otherwise */ + public boolean isSetLicense() { + return EncodingUtils.testBit(__isset_bitfield, __LICENSE_ISSET_ID); + } - public String getFieldName() { - return _fieldName; - } + public void setLicenseIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LICENSE_ISSET_ID, value); } - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_result.class, metaDataMap); + public boolean isInternet() { + return this.internet; } - public updateImageData_result() { + public updateImageData_args setInternet(boolean internet) { + this.internet = internet; + setInternetIsSet(true); + return this; } - public updateImageData_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); + public void unsetInternet() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTERNET_ISSET_ID); } - /** - * Performs a deep copy on other. - */ - public updateImageData_result(updateImageData_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + /** Returns true if field internet is set (has been assigned a value) and false otherwise */ + public boolean isSetInternet() { + return EncodingUtils.testBit(__isset_bitfield, __INTERNET_ISSET_ID); } - public updateImageData_result deepCopy() { - return new updateImageData_result(this); + public void setInternetIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTERNET_ISSET_ID, value); } - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; + public long getRam() { + return this.ram; } - public boolean isSuccess() { - return this.success; + public updateImageData_args setRam(long ram) { + this.ram = ram; + setRamIsSet(true); + return this; } - public updateImageData_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public void unsetRam() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RAM_ISSET_ID); + } + + /** Returns true if field ram is set (has been assigned a value) and false otherwise */ + public boolean isSetRam() { + return EncodingUtils.testBit(__isset_bitfield, __RAM_ISSET_ID); + } + + public void setRamIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RAM_ISSET_ID, value); + } + + public long getCpu() { + return this.cpu; + } + + public updateImageData_args setCpu(long cpu) { + this.cpu = cpu; + setCpuIsSet(true); return this; } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public void unsetCpu() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID); } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + /** Returns true if field cpu is set (has been assigned a value) and false otherwise */ + public boolean isSetCpu() { + return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + public void setCpuIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; + public String getId() { + return this.id; + } + + public updateImageData_args setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; } } - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); + public String getVersion() { + return this.version; + } + public updateImageData_args setVersion(String version) { + this.version = version; + return this; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; } - 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(); - } + public boolean isIsTemplate() { + return this.isTemplate; + } - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); + public updateImageData_args setIsTemplate(boolean isTemplate) { + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + return this; } - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof updateImageData_result) - return this.equals((updateImageData_result)that); - return false; + public void unsetIsTemplate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); } - public boolean equals(updateImageData_result that) { - if (that == null) - return false; + /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTemplate() { + return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + } - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } + public void setIsTemplateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); + } - return true; + public long getFilesize() { + return this.filesize; } - @Override - public int hashCode() { - return 0; + public updateImageData_args setFilesize(long filesize) { + this.filesize = filesize; + setFilesizeIsSet(true); + return this; } - @Override - public int compareTo(updateImageData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } + public void unsetFilesize() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID); + } - int lastComparison = 0; + /** Returns true if field filesize is set (has been assigned a value) and false otherwise */ + public boolean isSetFilesize() { + return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); + } - 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 void setFilesizeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); + public long getShareMode() { + return this.shareMode; } - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + public updateImageData_args setShareMode(long shareMode) { + this.shareMode = shareMode; + setShareModeIsSet(true); + return this; } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + public void unsetShareMode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREMODE_ISSET_ID); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("updateImageData_result("); - boolean first = true; + /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */ + public boolean isSetShareMode() { + return EncodingUtils.testBit(__isset_bitfield, __SHAREMODE_ISSET_ID); + } - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); + public void setShareModeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value); } - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity + public String getOs() { + return this.os; } - 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); - } + public updateImageData_args setOs(String os) { + this.os = os; + return this; } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } + public void unsetOs() { + this.os = null; } - private static class updateImageData_resultStandardSchemeFactory implements SchemeFactory { - public updateImageData_resultStandardScheme getScheme() { - return new updateImageData_resultStandardScheme(); + /** Returns true if field os is set (has been assigned a value) and false otherwise */ + public boolean isSetOs() { + return this.os != null; + } + + public void setOsIsSet(boolean value) { + if (!value) { + this.os = null; } } - private static class updateImageData_resultStandardScheme extends StandardScheme { + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; - public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); + case NEW_NAME: + if (value == null) { + unsetNewName(); + } else { + setNewName((String)value); } - iprot.readStructEnd(); + break; - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } + case IMAGE_PATH: + if (value == null) { + unsetImage_path(); + } else { + setImage_path((String)value); + } + break; - public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageData_result struct) throws org.apache.thrift.TException { - struct.validate(); + case LICENSE: + if (value == null) { + unsetLicense(); + } else { + setLicense((Boolean)value); + } + break; - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); + case INTERNET: + if (value == null) { + unsetInternet(); + } else { + setInternet((Boolean)value); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } + break; - } + case RAM: + if (value == null) { + unsetRam(); + } else { + setRam((Long)value); + } + break; - private static class updateImageData_resultTupleSchemeFactory implements SchemeFactory { - public updateImageData_resultTupleScheme getScheme() { - return new updateImageData_resultTupleScheme(); - } - } + case CPU: + if (value == null) { + unsetCpu(); + } else { + setCpu((Long)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((String)value); + } + break; - private static class updateImageData_resultTupleScheme extends TupleScheme { + case IS_TEMPLATE: + if (value == null) { + unsetIsTemplate(); + } else { + setIsTemplate((Boolean)value); + } + break; - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); + case FILESIZE: + if (value == null) { + unsetFilesize(); + } else { + setFilesize((Long)value); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + break; + + case SHARE_MODE: + if (value == null) { + unsetShareMode(); + } else { + setShareMode((Long)value); } - } + break; - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + case OS: + if (value == null) { + unsetOs(); + } else { + setOs((String)value); } + break; + } } - } - - public static class getLectureData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args"); + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); - 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); + case NEW_NAME: + return getNewName(); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory()); - } + case IMAGE_PATH: + return getImage_path(); - public String lecturename; // required + case LICENSE: + return Boolean.valueOf(isLicense()); - /** 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"); + case INTERNET: + return Boolean.valueOf(isInternet()); - private static final Map byName = new HashMap(); + case RAM: + return Long.valueOf(getRam()); - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + case CPU: + return Long.valueOf(getCpu()); - /** - * 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; - } - } + case ID: + return getId(); - /** - * 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; - } + case VERSION: + return getVersion(); - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + case IS_TEMPLATE: + return Boolean.valueOf(isIsTemplate()); - private final short _thriftId; - private final String _fieldName; + case FILESIZE: + return Long.valueOf(getFilesize()); - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + case SHARE_MODE: + return Long.valueOf(getShareMode()); - public short getThriftFieldId() { - return _thriftId; - } + case OS: + return getOs(); - public String getFieldName() { - return _fieldName; } + throw new IllegalStateException(); } - // 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 other. - */ - public getLectureData_args(getLectureData_args other) { - if (other.isSetLecturename()) { - this.lecturename = other.lecturename; + /** 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(); } - } - public getLectureData_args deepCopy() { - return new getLectureData_args(this); + switch (field) { + case NAME: + return isSetName(); + case NEW_NAME: + return isSetNewName(); + case IMAGE_PATH: + return isSetImage_path(); + case LICENSE: + return isSetLicense(); + case INTERNET: + return isSetInternet(); + case RAM: + return isSetRam(); + case CPU: + return isSetCpu(); + case ID: + return isSetId(); + case VERSION: + return isSetVersion(); + case IS_TEMPLATE: + return isSetIsTemplate(); + case FILESIZE: + return isSetFilesize(); + case SHARE_MODE: + return isSetShareMode(); + case OS: + return isSetOs(); + } + throw new IllegalStateException(); } @Override - public void clear() { - this.lecturename = null; + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateImageData_args) + return this.equals((updateImageData_args)that); + return false; } - public String getLecturename() { - return this.lecturename; - } + public boolean equals(updateImageData_args that) { + if (that == null) + return false; - public getLectureData_args setLecturename(String lecturename) { - this.lecturename = lecturename; - return this; - } + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } - public void unsetLecturename() { - this.lecturename = null; - } + boolean this_present_newName = true && this.isSetNewName(); + boolean that_present_newName = true && that.isSetNewName(); + if (this_present_newName || that_present_newName) { + if (!(this_present_newName && that_present_newName)) + return false; + if (!this.newName.equals(that.newName)) + return false; + } - /** Returns true if field lecturename is set (has been assigned a value) and false otherwise */ - public boolean isSetLecturename() { - return this.lecturename != null; - } + boolean this_present_image_path = true && this.isSetImage_path(); + boolean that_present_image_path = true && that.isSetImage_path(); + if (this_present_image_path || that_present_image_path) { + if (!(this_present_image_path && that_present_image_path)) + return false; + if (!this.image_path.equals(that.image_path)) + return false; + } - public void setLecturenameIsSet(boolean value) { - if (!value) { - this.lecturename = null; + boolean this_present_license = true; + boolean that_present_license = true; + if (this_present_license || that_present_license) { + if (!(this_present_license && that_present_license)) + return false; + if (this.license != that.license) + return false; } - } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LECTURENAME: - if (value == null) { - unsetLecturename(); - } else { - setLecturename((String)value); - } - break; + boolean this_present_internet = true; + boolean that_present_internet = true; + if (this_present_internet || that_present_internet) { + if (!(this_present_internet && that_present_internet)) + return false; + if (this.internet != that.internet) + return false; + } + + boolean this_present_ram = true; + boolean that_present_ram = true; + if (this_present_ram || that_present_ram) { + if (!(this_present_ram && that_present_ram)) + return false; + if (this.ram != that.ram) + return false; + } + boolean this_present_cpu = true; + boolean that_present_cpu = true; + if (this_present_cpu || that_present_cpu) { + if (!(this_present_cpu && that_present_cpu)) + return false; + if (this.cpu != that.cpu) + return false; } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LECTURENAME: - return getLecturename(); + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; } - 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(); + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; } - switch (field) { - case LECTURENAME: - return isSetLecturename(); + boolean this_present_isTemplate = true; + boolean that_present_isTemplate = true; + if (this_present_isTemplate || that_present_isTemplate) { + if (!(this_present_isTemplate && that_present_isTemplate)) + return false; + if (this.isTemplate != that.isTemplate) + return false; } - 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; - } + boolean this_present_filesize = true; + boolean that_present_filesize = true; + if (this_present_filesize || that_present_filesize) { + if (!(this_present_filesize && that_present_filesize)) + return false; + if (this.filesize != that.filesize) + return false; + } - public boolean equals(getLectureData_args that) { - if (that == null) - return false; + boolean this_present_shareMode = true; + boolean that_present_shareMode = true; + if (this_present_shareMode || that_present_shareMode) { + if (!(this_present_shareMode && that_present_shareMode)) + return false; + if (this.shareMode != that.shareMode) + 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)) + boolean this_present_os = true && this.isSetOs(); + boolean that_present_os = true && that.isSetOs(); + if (this_present_os || that_present_os) { + if (!(this_present_os && that_present_os)) return false; - if (!this.lecturename.equals(that.lecturename)) + if (!this.os.equals(that.os)) return false; } @@ -16374,19 +15974,139 @@ public class Server { } @Override - public int compareTo(getLectureData_args other) { + public int compareTo(updateImageData_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetLecturename()).compareTo(other.isSetLecturename()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImage_path()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_path, other.image_path); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLicense()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.license, other.license); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInternet()).compareTo(other.isSetInternet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInternet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internet, other.internet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRam()).compareTo(other.isSetRam()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRam()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ram, other.ram); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCpu()).compareTo(other.isSetCpu()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCpu()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpu, other.cpu); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTemplate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilesize()).compareTo(other.isSetFilesize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilesize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesize, other.filesize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShareMode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs()); if (lastComparison != 0) { return lastComparison; } - if (isSetLecturename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecturename, other.lecturename); + if (isSetOs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os); if (lastComparison != 0) { return lastComparison; } @@ -16408,14 +16128,82 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureData_args("); + StringBuilder sb = new StringBuilder("updateImageData_args("); boolean first = true; - sb.append("lecturename:"); - if (this.lecturename == null) { + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("newName:"); + if (this.newName == null) { + sb.append("null"); + } else { + sb.append(this.newName); + } + first = false; + if (!first) sb.append(", "); + sb.append("image_path:"); + if (this.image_path == null) { + sb.append("null"); + } else { + sb.append(this.image_path); + } + first = false; + if (!first) sb.append(", "); + sb.append("license:"); + sb.append(this.license); + first = false; + if (!first) sb.append(", "); + sb.append("internet:"); + sb.append(this.internet); + first = false; + if (!first) sb.append(", "); + sb.append("ram:"); + sb.append(this.ram); + first = false; + if (!first) sb.append(", "); + sb.append("cpu:"); + sb.append(this.cpu); + first = false; + if (!first) sb.append(", "); + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); + sb.append("isTemplate:"); + sb.append(this.isTemplate); + first = false; + if (!first) sb.append(", "); + sb.append("filesize:"); + sb.append(this.filesize); + first = false; + if (!first) sb.append(", "); + sb.append("shareMode:"); + sb.append(this.shareMode); + first = false; + if (!first) sb.append(", "); + sb.append("os:"); + if (this.os == null) { sb.append("null"); } else { - sb.append(this.lecturename); + sb.append(this.os); } first = false; sb.append(")"); @@ -16437,21 +16225,23 @@ public class Server { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getLectureData_argsStandardSchemeFactory implements SchemeFactory { - public getLectureData_argsStandardScheme getScheme() { - return new getLectureData_argsStandardScheme(); + private static class updateImageData_argsStandardSchemeFactory implements SchemeFactory { + public updateImageData_argsStandardScheme getScheme() { + return new updateImageData_argsStandardScheme(); } } - private static class getLectureData_argsStandardScheme extends StandardScheme { + private static class updateImageData_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16461,10 +16251,106 @@ public class Server { break; } switch (schemeField.id) { - case -1: // LECTURENAME + case -1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // NEW_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // IMAGE_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.image_path = iprot.readString(); + struct.setImage_pathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // LICENSE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.license = iprot.readBool(); + struct.setLicenseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // INTERNET + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.internet = iprot.readBool(); + struct.setInternetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // RAM + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.ram = iprot.readI64(); + struct.setRamIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // CPU + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.cpu = iprot.readI64(); + struct.setCpuIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -8: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -9: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -10: // IS_TEMPLATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -11: // FILESIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.filesize = iprot.readI64(); + struct.setFilesizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -12: // SHARE_MODE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.shareMode = iprot.readI64(); + struct.setShareModeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -13: // OS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.lecturename = iprot.readString(); - struct.setLecturenameIsSet(true); + struct.os = iprot.readString(); + struct.setOsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16480,67 +16366,233 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageData_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); + if (struct.os != null) { + oprot.writeFieldBegin(OS_FIELD_DESC); + oprot.writeString(struct.os); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC); + oprot.writeI64(struct.shareMode); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(FILESIZE_FIELD_DESC); + oprot.writeI64(struct.filesize); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); + oprot.writeBool(struct.isTemplate); + oprot.writeFieldEnd(); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CPU_FIELD_DESC); + oprot.writeI64(struct.cpu); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RAM_FIELD_DESC); + oprot.writeI64(struct.ram); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(INTERNET_FIELD_DESC); + oprot.writeBool(struct.internet); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LICENSE_FIELD_DESC); + oprot.writeBool(struct.license); + oprot.writeFieldEnd(); + if (struct.image_path != null) { + oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC); + oprot.writeString(struct.image_path); + oprot.writeFieldEnd(); + } + if (struct.newName != null) { + oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); + oprot.writeString(struct.newName); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); oprot.writeFieldEnd(); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory { - public getLectureData_argsTupleScheme getScheme() { - return new getLectureData_argsTupleScheme(); - } - } - - private static class getLectureData_argsTupleScheme extends TupleScheme { - - @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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateImageData_argsTupleSchemeFactory implements SchemeFactory { + public updateImageData_argsTupleScheme getScheme() { + return new updateImageData_argsTupleScheme(); + } + } + + private static class updateImageData_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetNewName()) { + optionals.set(1); + } + if (struct.isSetImage_path()) { + optionals.set(2); + } + if (struct.isSetLicense()) { + optionals.set(3); + } + if (struct.isSetInternet()) { + optionals.set(4); + } + if (struct.isSetRam()) { + optionals.set(5); + } + if (struct.isSetCpu()) { + optionals.set(6); + } + if (struct.isSetId()) { + optionals.set(7); + } + if (struct.isSetVersion()) { + optionals.set(8); + } + if (struct.isSetIsTemplate()) { + optionals.set(9); + } + if (struct.isSetFilesize()) { + optionals.set(10); + } + if (struct.isSetShareMode()) { + optionals.set(11); + } + if (struct.isSetOs()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetNewName()) { + oprot.writeString(struct.newName); + } + if (struct.isSetImage_path()) { + oprot.writeString(struct.image_path); + } + if (struct.isSetLicense()) { + oprot.writeBool(struct.license); + } + if (struct.isSetInternet()) { + oprot.writeBool(struct.internet); + } + if (struct.isSetRam()) { + oprot.writeI64(struct.ram); + } + if (struct.isSetCpu()) { + oprot.writeI64(struct.cpu); + } + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + if (struct.isSetVersion()) { + oprot.writeString(struct.version); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetLecturename()) { - oprot.writeString(struct.lecturename); + if (struct.isSetIsTemplate()) { + oprot.writeBool(struct.isTemplate); + } + if (struct.isSetFilesize()) { + oprot.writeI64(struct.filesize); + } + if (struct.isSetShareMode()) { + oprot.writeI64(struct.shareMode); + } + if (struct.isSetOs()) { + oprot.writeString(struct.os); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(13); if (incoming.get(0)) { - struct.lecturename = iprot.readString(); - struct.setLecturenameIsSet(true); + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } + if (incoming.get(2)) { + struct.image_path = iprot.readString(); + struct.setImage_pathIsSet(true); + } + if (incoming.get(3)) { + struct.license = iprot.readBool(); + struct.setLicenseIsSet(true); + } + if (incoming.get(4)) { + struct.internet = iprot.readBool(); + struct.setInternetIsSet(true); + } + if (incoming.get(5)) { + struct.ram = iprot.readI64(); + struct.setRamIsSet(true); + } + if (incoming.get(6)) { + struct.cpu = iprot.readI64(); + struct.setCpuIsSet(true); + } + if (incoming.get(7)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + if (incoming.get(8)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } + if (incoming.get(9)) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(true); + } + if (incoming.get(10)) { + struct.filesize = iprot.readI64(); + struct.setFilesizeIsSet(true); + } + if (incoming.get(11)) { + struct.shareMode = iprot.readI64(); + struct.setShareModeIsSet(true); + } + if (incoming.get(12)) { + struct.os = iprot.readString(); + struct.setOsIsSet(true); } } } } - public static class getLectureData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result"); + public static class updateImageData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_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 org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new updateImageData_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageData_resultTupleSchemeFactory()); } - public Map success; // required + public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -16601,79 +16653,67 @@ public class Server { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.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)))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_result.class, metaDataMap); } - public getLectureData_result() { + public updateImageData_result() { } - public getLectureData_result( - Map success) + public updateImageData_result( + boolean success) { this(); this.success = success; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public getLectureData_result(getLectureData_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(other.success); - this.success = __this__success; - } + public updateImageData_result(updateImageData_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public getLectureData_result deepCopy() { - return new getLectureData_result(this); + public updateImageData_result deepCopy() { + return new updateImageData_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(); - } - this.success.put(key, val); + setSuccessIsSet(false); + this.success = false; } - public Map getSuccess() { + public boolean isSuccess() { return this.success; } - public getLectureData_result setSuccess(Map success) { + public updateImageData_result setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -16682,7 +16722,7 @@ public class Server { if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((Boolean)value); } break; @@ -16692,7 +16732,7 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); } throw new IllegalStateException(); @@ -16715,21 +16755,21 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureData_result) - return this.equals((getLectureData_result)that); + if (that instanceof updateImageData_result) + return this.equals((updateImageData_result)that); return false; } - public boolean equals(getLectureData_result that) { + public boolean equals(updateImageData_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -16742,7 +16782,7 @@ public class Server { } @Override - public int compareTo(getLectureData_result other) { + public int compareTo(updateImageData_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -16776,15 +16816,11 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureData_result("); + StringBuilder sb = new StringBuilder("updateImageData_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; sb.append(")"); return sb.toString(); @@ -16805,21 +16841,23 @@ public class Server { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getLectureData_resultStandardSchemeFactory implements SchemeFactory { - public getLectureData_resultStandardScheme getScheme() { - return new getLectureData_resultStandardScheme(); + private static class updateImageData_resultStandardSchemeFactory implements SchemeFactory { + public updateImageData_resultStandardScheme getScheme() { + return new updateImageData_resultStandardScheme(); } } - private static class getLectureData_resultStandardScheme extends StandardScheme { + private static class updateImageData_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16830,20 +16868,8 @@ public class Server { } 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(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(); - } + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -16860,21 +16886,13 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageData_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { 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 _iter56 : struct.success.entrySet()) - { - oprot.writeString(_iter56.getKey()); - oprot.writeString(_iter56.getValue()); - } - oprot.writeMapEnd(); - } + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -16883,16 +16901,16 @@ public class Server { } - private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory { - public getLectureData_resultTupleScheme getScheme() { - return new getLectureData_resultTupleScheme(); + private static class updateImageData_resultTupleSchemeFactory implements SchemeFactory { + public updateImageData_resultTupleScheme getScheme() { + return new updateImageData_resultTupleScheme(); } } - private static class getLectureData_resultTupleScheme extends TupleScheme { + private static class updateImageData_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -16900,34 +16918,16 @@ public class Server { } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Map.Entry _iter57 : struct.success.entrySet()) - { - oprot.writeString(_iter57.getKey()); - oprot.writeString(_iter57.getValue()); - } - } + oprot.writeBool(struct.success); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_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(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.success = iprot.readBool(); struct.setSuccessIsSet(true); } } 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 getLectureData(String lecturename) - throws TException { - // TODO Auto-generated method stub - return null; - } + + @Override public List getLectureList() throws TException { @@ -412,6 +408,15 @@ public class ServerHandler implements Server.Iface { } + @Override + public Map 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 getLectureData(String id) { + Map map = new HashMap(); + 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 getImageData(string imageid, string imageversion), + map 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 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), -- cgit v1.2.3-55-g7522