From 0ed4549c028e2523534a09fd6e41c49c9d178ec1 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Mon, 27 Oct 2014 18:13:20 +0100 Subject: Sämtliche Logik und Grafiken zur Vergabe und Verwaltung von Berechtigungen eingeführt. Kleinere Bugs sind bekannt, werden aktuell behoben --- .../src/main/java/server/ServerHandler.java | 384 +++++++++++---------- 1 file changed, 207 insertions(+), 177 deletions(-) (limited to 'dozentenmodulserver/src/main/java/server/ServerHandler.java') diff --git a/dozentenmodulserver/src/main/java/server/ServerHandler.java b/dozentenmodulserver/src/main/java/server/ServerHandler.java index f9835738..1247c432 100644 --- a/dozentenmodulserver/src/main/java/server/ServerHandler.java +++ b/dozentenmodulserver/src/main/java/server/ServerHandler.java @@ -31,8 +31,6 @@ import com.mysql.jdbc.StringUtils; import sql.SQL; import util.XMLCreator; - - public class ServerHandler implements Server.Iface { static SQL sql = new SQL(); @@ -97,7 +95,7 @@ public class ServerHandler implements Server.Iface { } }// end folderTempExists() - + public boolean folderProdExists() { // check if folder temp exists, otherwise create it Path path = null; @@ -134,8 +132,6 @@ public class ServerHandler implements Server.Iface { } }// end folderProdExists() - - public String getEncodedSha1Sum(String key) { try { @@ -164,57 +160,62 @@ public class ServerHandler implements Server.Iface { } @Override - public String setInstitution(String university){ + public String setInstitution(String university) { return sql.setInstitution(university); } - + @Override - public boolean writeVLdata(String imagename, String desc ,String login, + public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws TException { - - String mode=null; - - if(shareMode==0) - { - mode="only_local"; - } - else{ - mode="to_be_published"; + + String mode = null; + + if (shareMode == 0) { + mode = "only_local"; + } else { + mode = "to_be_published"; } - //String pk_institution = sql.setInstitution(university); - //String pk_person = sql.setPerson(login, lastname, firstname, Mail, new Date(), pk_institution); - - //OS impl Select and write - //ACHTUNG: Anzahl der Leerzeichen muss eingehalten werden: 'Windows 7 32 bit" - String pk_os=sql.getOSpk(os.substring(0, nthIndexOf(os, " ", 2)),os.substring(nthIndexOf(os," ", 2), os.lastIndexOf(" ")).replace(" ", "")); - - //sql.setImageData(pk_person, license, internet, cpu, ram, imagename,desc, imagePath, filesize,mode,pk_os); - - sql.setImageData(login, license, internet, cpu, ram, imagename,desc, - imagePath, filesize,mode,pk_os); - + // String pk_institution = sql.setInstitution(university); + // String pk_person = sql.setPerson(login, lastname, firstname, Mail, + // new Date(), pk_institution); + + // OS impl Select and write + // ACHTUNG: Anzahl der Leerzeichen muss eingehalten werden: 'Windows 7 + // 32 bit" + String pk_os = sql.getOSpk(os.substring(0, nthIndexOf(os, " ", 2)), os + .substring(nthIndexOf(os, " ", 2), os.lastIndexOf(" ")) + .replace(" ", "")); + + // sql.setImageData(pk_person, license, internet, cpu, ram, + // imagename,desc, imagePath, filesize,mode,pk_os); + + sql.setImageData(login, license, internet, cpu, ram, imagename, desc, + imagePath, filesize, mode, pk_os); + log.info(new Date() + " - written VLdata"); // TODO Auto-generated method stub return true; } @Override - public List getImageListPermissionWrite(String userID) throws TException { + public List getImageListPermissionWrite(String userID) + throws TException { return sql.getImageListPermissionWrite(userID); } - + @Override - public List getImageListPermissionRead(String userID) throws TException { + public List getImageListPermissionRead(String userID) + throws TException { return sql.getImageListPermissionWrite(userID); } - - + @Override - public List getImageListPermissionLink(String userID) throws TException { + public List getImageListPermissionLink(String userID) + throws TException { return sql.getImageListPermissionWrite(userID); } @@ -228,8 +229,9 @@ public class ServerHandler implements Server.Iface { throws TException { return sql.getPersonData(Vorname, Nachname); } - - public void setPerson(String login, String lastname,String firstname, String mail, String Institution){ + + public void setPerson(String login, String lastname, String firstname, + String mail, String Institution) { sql.setPerson(login, lastname, firstname, mail, new Date(), Institution); } @@ -252,6 +254,8 @@ public class ServerHandler implements Server.Iface { imageversion = Integer.parseInt(map.get("version")); sql.setLectureData(pk_person, pk_image, imageversion, name, desc, shortdesc, startDate, endDate, isActive); + + XMLCreator xml = new XMLCreator(sql.getConnection(), name); try { xml.create(name); @@ -266,12 +270,13 @@ public class ServerHandler implements Server.Iface { // TODO Auto-generated catch block e.printStackTrace(); } + return false; } @Override public boolean startFileCopy(String filename) throws TException { - //copy file from folder temp to folder prod + // copy file from folder temp to folder prod String file = Configuration.config.getAbsolute_path() + "temp/" + filename; File tmpFile = new File(file); @@ -305,80 +310,74 @@ public class ServerHandler implements Server.Iface { } @Override - public boolean updateImageData(String name, String newName,String desc, + public boolean updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os) throws TException { - String mode=null; - - if(shareMode==0) - { - mode="only_local"; - } - else{ - mode="to_be_published"; + String mode = null; + + if (shareMode == 0) { + mode = "only_local"; + } else { + mode = "to_be_published"; } - String pk_os=sql.getOSpk(os.substring(0, nthIndexOf(os, " ", 2)),os.substring(nthIndexOf(os," ", 2), os.lastIndexOf(" ")).replace(" ", "")); - sql.UpdateImageData(name, newName,desc ,image_path, license, internet, cpu, - ram, id, version, isTemplate, filesize,mode,pk_os); + String pk_os = sql.getOSpk(os.substring(0, nthIndexOf(os, " ", 2)), os + .substring(nthIndexOf(os, " ", 2), os.lastIndexOf(" ")) + .replace(" ", "")); + sql.UpdateImageData(name, newName, desc, image_path, license, internet, + cpu, ram, id, version, isTemplate, filesize, mode, pk_os); return false; } - - - @Override public List getLectureList() throws TException { - - log.info(new Date().toString() + " - returning LectureList: " + log.info(new Date().toString() + " - returning LectureList: " + sql.getLectureList().size() + " items."); return sql.getLectureList(); - } - + @Override - public List getLectureListPermissionRead(String userID){ - log.info(new Date().toString() + " - returning LectureListRead: "+sql.getLectureListPermissionRead(userID).size()+" items"); + public List getLectureListPermissionRead(String userID) { + log.info(new Date().toString() + " - returning LectureListRead: " + + sql.getLectureListPermissionRead(userID).size() + + " items for user " + userID); return sql.getLectureListPermissionRead(userID); - }//end getLectureListPermissionRead - + }// end getLectureListPermissionRead + @Override - public List getLectureListPermissionWrite(String userID){ - log.info(new Date().toString() + " - returning LectureListWrite: "+sql.getLectureListPermissionWrite(userID).size()+" items"); + public List getLectureListPermissionWrite(String userID) { + log.info(new Date().toString() + " - returning LectureListWrite: " + + sql.getLectureListPermissionWrite(userID).size() + + " items for user " + userID); return sql.getLectureListPermissionWrite(userID); - }//end getLectureListPermissionRead - + }// end getLectureListPermissionRead + @Override - public List getLectureListPermissionAdmin(String userID){ - log.info(new Date().toString() + " - returning LectureListAdmin: "+sql.getLectureListPermissionAdmin(userID).size()+" items"); + public List getLectureListPermissionAdmin(String userID) { + log.info(new Date().toString() + " - returning LectureListAdmin: " + + sql.getLectureListPermissionAdmin(userID).size() + + " items for user " + userID); return sql.getLectureListPermissionAdmin(userID); - }//end getLectureListPermissionRead - - - - - - + }// end getLectureListPermissionRead @Override public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, - boolean isActive, String imageid,String imageversion,String user ,String firstname, - String lastname, String university, String Mail, String Tel, - String Fak, String id) throws TException { + boolean isActive, String imageid, String imageversion, String user, + String firstname, String lastname, String university, String Mail, + String Tel, String Fak, String id) throws TException { Map map = new HashMap(); map = sql.getDeleteXMLData(id); sql.updateLectureData(imageid, imageversion, lastname, newName, desc, shortdesc, startDate, endDate, isActive, id); - String path = Configuration.config.getAbsolute_path() - + "prod/" - + map.get("date") - .substring(0, map.get("date").length() - 2) + "_" - + university + "_" + user + "_" + map.get("name") + ".xml"; - File tmpFile=new File(path); + String path = Configuration.config.getAbsolute_path() + "prod/" + + map.get("date").substring(0, map.get("date").length() - 2) + + "_" + university + "_" + user + "_" + map.get("name") + + ".xml"; + File tmpFile = new File(path); try { FileUtils.forceDelete(tmpFile); } catch (IOException e1) { @@ -453,13 +452,13 @@ public class ServerHandler implements Server.Iface { return sql.deleteLecture(id); } - + @Override public List getAllUniversities() throws TException { return sql.getAllUniversities(); } - + @Override public Map getLectureData(String lectureid) throws TException { @@ -467,28 +466,24 @@ public class ServerHandler implements Server.Iface { + sql.getLectureData(lectureid).size() + "items."); return sql.getLectureData(lectureid); } - - - - - public static int nthIndexOf(final String string, final String token, - final int index) - { - int j = 0; - for (int i = 0; i < index; i++) - { - j = string.indexOf(token, j + 1); - if (j == -1) break; - } + public static int nthIndexOf(final String string, final String token, + final int index) { + int j = 0; - return j; - } + for (int i = 0; i < index; i++) { + j = string.indexOf(token, j + 1); + if (j == -1) + break; + } + + return j; + } @Override public boolean checkUser(String username) throws TException { return sql.checkUser(username); - + } @Override @@ -501,8 +496,9 @@ public class ServerHandler implements Server.Iface { } @Override - public boolean writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role) - throws TException { + public boolean writeImageRights(String imagename, String username, + String lastName, String firstName, String mail, String university, + String role) throws TException { String pk_image = null; Map map = new HashMap(); int imageversion = 0; @@ -512,38 +508,40 @@ public class ServerHandler implements Server.Iface { map = sql.getImageIDandVersion(imagename); pk_image = map.get("GUID"); imageversion = Integer.parseInt(map.get("version")); - - if(role.equals("Dozent")) { - int read=1; - int write=1; - //int changePermission=0; - int admin=1; - int linkallowed=1; - int roleID=sql.getRoleID(role); - - sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, linkallowed); - - }else if(role.equals("Admin")){ - int read=1; - int write=1; - //int changePermission=1; - int admin=1; - int linkallowed=1; - int roleID=sql.getRoleID(role); - - sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, linkallowed); - } - else{ - int read=1; - int write=0; - //int changePermission=0; - int admin=0; - int linkallowed=0; - int roleID=sql.getRoleID(role); - - sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, linkallowed); + + if (role.equals("Dozent")) { + int read = 1; + int write = 1; + // int changePermission=0; + int admin = 1; + int linkallowed = 1; + int roleID = sql.getRoleID(role); + + sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, + linkallowed); + + } else if (role.equals("Admin")) { + int read = 1; + int write = 1; + // int changePermission=1; + int admin = 1; + int linkallowed = 1; + int roleID = sql.getRoleID(role); + + sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, + linkallowed); + } else { + int read = 1; + int write = 0; + // int changePermission=0; + int admin = 0; + int linkallowed = 0; + int roleID = sql.getRoleID(role); + + sql.setImageRights(pk_person, pk_image, roleID, read, write, admin, + linkallowed); } - + log.info(new Date() + " - written image rights"); return true; } @@ -553,72 +551,104 @@ public class ServerHandler implements Server.Iface { String lastName, String firstName, String mail, String university, String role) throws TException { String pk_lecture = null; - + String pk_institution = sql.setInstitution(university); String pk_person = sql.setPerson(username, lastName, firstName, mail, new Date(), pk_institution); - pk_lecture=sql.getLectureID(lecturename); - - if(role.equals("Dozent")) { - int read=1; - int write=1; - int changePermission=0; - int admin=0; - int roleID=sql.getRoleID(role); - - sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, changePermission, admin); - - }else if(role.equals("Admin")){ - int read=1; - int write=1; - int changePermission=1; - int admin=1; - int roleID=sql.getRoleID(role); - - sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, changePermission, admin); - } - else{ - int read=0; - int write=0; - int changePermission=0; - int admin=0; - int roleID=sql.getRoleID(role); - - sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, changePermission, admin); + pk_lecture = sql.getLectureID(lecturename); + + if (role.equals("Dozent")) { + int read = 1; + int write = 1; + // int changePermission=0; + int admin = 1; + int roleID = sql.getRoleID(role); + + sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, + admin); + + } else if (role.equals("Admin")) { + int read = 1; + int write = 1; + // int changePermission=1; + int admin = 1; + int roleID = sql.getRoleID(role); + + sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, + admin); + } else { + int read = 0; + int write = 0; + // int changePermission=0; + int admin = 0; + int roleID = sql.getRoleID(role); + + sql.setLectureRights(pk_person, pk_lecture, roleID, read, write, + admin); } - + return true; } @Override - public List getAllOtherSatelliteUsers(String userID) throws TException { + public List getAllOtherSatelliteUsers(List userID) + throws TException { return sql.getAllOtherSatelliteUsers(userID); - //return null; + // return null; } - - public boolean writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin){ + public boolean writeAdditionalImageRights(String imageName, String userID, + boolean isRead, boolean isWrite, boolean isLinkAllowed, + boolean isAdmin) { boolean success = false; Map map = new HashMap(); map = sql.getImageIDandVersion(imageName); String imageID = map.get("GUID"); - - sql.writeAdditionalImageRights(imageID, userID, isRead, isWrite, isLinkAllowed, isAdmin); - log.info(new Date() + " - written additional image rights for "+userID); + + sql.writeAdditionalImageRights(imageID, userID, isRead, isWrite, + isLinkAllowed, isAdmin); + log.info(new Date() + " - written additional image rights for " + + userID); return success; } + public boolean writeAdditionalLectureRights(String lectureName, + String userID, boolean isRead, boolean isWrite, boolean isAdmin) { + + Map map = new HashMap(); + String lectureID = sql.getLectureID(lectureName); + + sql.writeAdditionalLectureRights(lectureID, userID, isRead, isWrite, + isAdmin); + log.info(new Date() + " - written additional lecture rights for " + + userID); + + return true; + } + @Override - public List getPermissionForUserAndImage(String userID, String imageID) throws TException { + public List getPermissionForUserAndImage(String userID, + String imageID) throws TException { return sql.getPermissionForUserAndImage(userID, imageID); } + public List getPermissionForUserAndLecture(String userID, + String lectureID) { + return sql.getPermissionForUserAndLecture(userID, lectureID); + } + @Override - public void deleteAllAdditionalImagePermissions(String imageID,String userID) throws TException { - - sql.deleteAllAdditionalImagePermissions(imageID,userID); + public void deleteAllAdditionalImagePermissions(String imageID, + String userID) throws TException { + sql.deleteAllAdditionalImagePermissions(imageID, userID); return; - } - + + @Override + public void deleteAllAdditionalLecturePermissions(String lectureID, + String userID) throws TException { + sql.deleteAllAdditionalLecturePermissions(lectureID, userID); + return; + } + }// end class -- cgit v1.2.3-55-g7522 From c106d54ac30727e6bd0b9e73922abcb187d163b8 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Tue, 28 Oct 2014 19:38:22 +0100 Subject: Serverseitiges Read und Write von Rechten korrigiert --- .../src/main/java/server/ServerHandler.java | 11 +- .../src/main/java/server/generated/Server.java | 1958 ++++++++++++++------ dozentenmodulserver/src/main/java/sql/SQL.java | 10 + dozentenmodulserver/thrift/server.thrift | 1 + 4 files changed, 1446 insertions(+), 534 deletions(-) (limited to 'dozentenmodulserver/src/main/java/server/ServerHandler.java') diff --git a/dozentenmodulserver/src/main/java/server/ServerHandler.java b/dozentenmodulserver/src/main/java/server/ServerHandler.java index 1247c432..d4b763cb 100644 --- a/dozentenmodulserver/src/main/java/server/ServerHandler.java +++ b/dozentenmodulserver/src/main/java/server/ServerHandler.java @@ -210,14 +210,21 @@ public class ServerHandler implements Server.Iface { @Override public List getImageListPermissionRead(String userID) throws TException { - return sql.getImageListPermissionWrite(userID); + return sql.getImageListPermissionRead(userID); } @Override public List getImageListPermissionLink(String userID) throws TException { - return sql.getImageListPermissionWrite(userID); + return sql.getImageListPermissionRead(userID); + } + + @Override + public List getImageListPermissionAdmin(String userID) + throws TException { + return sql.getImageListPermissionAdmin(userID); } + @Override public List getAllOS() throws TException { diff --git a/dozentenmodulserver/src/main/java/server/generated/Server.java b/dozentenmodulserver/src/main/java/server/generated/Server.java index 25c6496a..c87659ae 100644 --- a/dozentenmodulserver/src/main/java/server/generated/Server.java +++ b/dozentenmodulserver/src/main/java/server/generated/Server.java @@ -52,6 +52,8 @@ public class Server { public List getImageListPermissionLink(String userID) throws org.apache.thrift.TException; + public List getImageListPermissionAdmin(String userID) throws org.apache.thrift.TException; + public List getLectureList() throws org.apache.thrift.TException; public List getLectureListPermissionRead(String userID) throws org.apache.thrift.TException; @@ -130,6 +132,8 @@ public class Server { public void getImageListPermissionLink(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getImageListPermissionAdmin(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getLectureList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getLectureListPermissionRead(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -411,6 +415,29 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionLink failed: unknown result"); } + public List getImageListPermissionAdmin(String userID) throws org.apache.thrift.TException + { + send_getImageListPermissionAdmin(userID); + return recv_getImageListPermissionAdmin(); + } + + public void send_getImageListPermissionAdmin(String userID) throws org.apache.thrift.TException + { + getImageListPermissionAdmin_args args = new getImageListPermissionAdmin_args(); + args.setUserID(userID); + sendBase("getImageListPermissionAdmin", args); + } + + public List recv_getImageListPermissionAdmin() throws org.apache.thrift.TException + { + getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result(); + receiveBase(result, "getImageListPermissionAdmin"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionAdmin failed: unknown result"); + } + public List getLectureList() throws org.apache.thrift.TException { send_getLectureList(); @@ -1473,6 +1500,38 @@ public class Server { } } + public void getImageListPermissionAdmin(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getImageListPermissionAdmin_call method_call = new getImageListPermissionAdmin_call(userID, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getImageListPermissionAdmin_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userID; + public getImageListPermissionAdmin_call(String userID, 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.userID = userID; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListPermissionAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getImageListPermissionAdmin_args args = new getImageListPermissionAdmin_args(); + args.setUserID(userID); + args.write(prot); + prot.writeMessageEnd(); + } + + public List 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_getImageListPermissionAdmin(); + } + } + public void getLectureList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getLectureList_call method_call = new getLectureList_call(resultHandler, this, ___protocolFactory, ___transport); @@ -2659,6 +2718,7 @@ public class Server { processMap.put("getImageListPermissionWrite", new getImageListPermissionWrite()); processMap.put("getImageListPermissionRead", new getImageListPermissionRead()); processMap.put("getImageListPermissionLink", new getImageListPermissionLink()); + processMap.put("getImageListPermissionAdmin", new getImageListPermissionAdmin()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureListPermissionRead", new getLectureListPermissionRead()); processMap.put("getLectureListPermissionWrite", new getLectureListPermissionWrite()); @@ -2853,6 +2913,26 @@ public class Server { } } + public static class getImageListPermissionAdmin extends org.apache.thrift.ProcessFunction { + public getImageListPermissionAdmin() { + super("getImageListPermissionAdmin"); + } + + public getImageListPermissionAdmin_args getEmptyArgsInstance() { + return new getImageListPermissionAdmin_args(); + } + + protected boolean isOneway() { + return false; + } + + public getImageListPermissionAdmin_result getResult(I iface, getImageListPermissionAdmin_args args) throws org.apache.thrift.TException { + getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result(); + result.success = iface.getImageListPermissionAdmin(args.userID); + return result; + } + } + public static class getLectureList extends org.apache.thrift.ProcessFunction { public getLectureList() { super("getLectureList"); @@ -3468,6 +3548,7 @@ public class Server { processMap.put("getImageListPermissionWrite", new getImageListPermissionWrite()); processMap.put("getImageListPermissionRead", new getImageListPermissionRead()); processMap.put("getImageListPermissionLink", new getImageListPermissionLink()); + processMap.put("getImageListPermissionAdmin", new getImageListPermissionAdmin()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureListPermissionRead", new getLectureListPermissionRead()); processMap.put("getLectureListPermissionWrite", new getLectureListPermissionWrite()); @@ -3910,6 +3991,57 @@ public class Server { } } + public static class getImageListPermissionAdmin extends org.apache.thrift.AsyncProcessFunction> { + public getImageListPermissionAdmin() { + super("getImageListPermissionAdmin"); + } + + public getImageListPermissionAdmin_args getEmptyArgsInstance() { + return new getImageListPermissionAdmin_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getImageListPermissionAdmin_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getImageListPermissionAdmin(args.userID,resultHandler); + } + } + public static class getLectureList extends org.apache.thrift.AsyncProcessFunction> { public getLectureList() { super("getLectureList"); @@ -12887,20 +13019,22 @@ public class Server { } - public static class getLectureList_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("getLectureList_args"); + public static class getImageListPermissionAdmin_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("getImageListPermissionAdmin_args"); + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getImageListPermissionAdmin_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImageListPermissionAdmin_argsTupleSchemeFactory()); } + public String userID; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + USER_ID((short)1, "userID"); private static final Map byName = new HashMap(); @@ -12915,6 +13049,8 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // USER_ID + return USER_ID; default: return null; } @@ -12953,37 +13089,87 @@ public class Server { return _fieldName; } } + + // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionAdmin_args.class, metaDataMap); } - public getLectureList_args() { + public getImageListPermissionAdmin_args() { + } + + public getImageListPermissionAdmin_args( + String userID) + { + this(); + this.userID = userID; } /** * Performs a deep copy on other. */ - public getLectureList_args(getLectureList_args other) { + public getImageListPermissionAdmin_args(getImageListPermissionAdmin_args other) { + if (other.isSetUserID()) { + this.userID = other.userID; + } } - public getLectureList_args deepCopy() { - return new getLectureList_args(this); + public getImageListPermissionAdmin_args deepCopy() { + return new getImageListPermissionAdmin_args(this); } @Override public void clear() { + this.userID = null; + } + + public String getUserID() { + return this.userID; + } + + public getImageListPermissionAdmin_args setUserID(String userID) { + this.userID = userID; + return this; + } + + public void unsetUserID() { + this.userID = null; + } + + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; + } + + public void setUserIDIsSet(boolean value) { + if (!value) { + this.userID = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case USER_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case USER_ID: + return getUserID(); + } throw new IllegalStateException(); } @@ -12995,6 +13181,8 @@ public class Server { } switch (field) { + case USER_ID: + return isSetUserID(); } throw new IllegalStateException(); } @@ -13003,15 +13191,24 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureList_args) - return this.equals((getLectureList_args)that); + if (that instanceof getImageListPermissionAdmin_args) + return this.equals((getImageListPermissionAdmin_args)that); return false; } - public boolean equals(getLectureList_args that) { + public boolean equals(getImageListPermissionAdmin_args that) { if (that == null) return false; + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) + return false; + if (!this.userID.equals(that.userID)) + return false; + } + return true; } @@ -13021,13 +13218,23 @@ public class Server { } @Override - public int compareTo(getLectureList_args other) { + public int compareTo(getImageListPermissionAdmin_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -13045,9 +13252,16 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureList_args("); + StringBuilder sb = new StringBuilder("getImageListPermissionAdmin_args("); boolean first = true; + sb.append("userID:"); + if (this.userID == null) { + sb.append("null"); + } else { + sb.append(this.userID); + } + first = false; sb.append(")"); return sb.toString(); } @@ -13073,15 +13287,15 @@ public class Server { } } - private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory { - public getLectureList_argsStandardScheme getScheme() { - return new getLectureList_argsStandardScheme(); + private static class getImageListPermissionAdmin_argsStandardSchemeFactory implements SchemeFactory { + public getImageListPermissionAdmin_argsStandardScheme getScheme() { + return new getImageListPermissionAdmin_argsStandardScheme(); } } - private static class getLectureList_argsStandardScheme extends StandardScheme { + private static class getImageListPermissionAdmin_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13091,6 +13305,14 @@ public class Server { break; } switch (schemeField.id) { + case 1: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -13102,49 +13324,67 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { - public getLectureList_argsTupleScheme getScheme() { - return new getLectureList_argsTupleScheme(); + private static class getImageListPermissionAdmin_argsTupleSchemeFactory implements SchemeFactory { + public getImageListPermissionAdmin_argsTupleScheme getScheme() { + return new getImageListPermissionAdmin_argsTupleScheme(); } } - private static class getLectureList_argsTupleScheme extends TupleScheme { + private static class getImageListPermissionAdmin_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserID()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } } } } - public static class getLectureList_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("getLectureList_result"); + public static class getImageListPermissionAdmin_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("getImageListPermissionAdmin_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getImageListPermissionAdmin_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImageListPermissionAdmin_resultTupleSchemeFactory()); } - public List success; // required + public List 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 { @@ -13210,16 +13450,16 @@ public class Server { 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionAdmin_result.class, metaDataMap); } - public getLectureList_result() { + public getImageListPermissionAdmin_result() { } - public getLectureList_result( - List success) + public getImageListPermissionAdmin_result( + List success) { this(); this.success = success; @@ -13228,18 +13468,18 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureList_result(getLectureList_result other) { + public getImageListPermissionAdmin_result(getImageListPermissionAdmin_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Lecture other_element : other.success) { - __this__success.add(new Lecture(other_element)); + List __this__success = new ArrayList(other.success.size()); + for (Image other_element : other.success) { + __this__success.add(new Image(other_element)); } this.success = __this__success; } } - public getLectureList_result deepCopy() { - return new getLectureList_result(this); + public getImageListPermissionAdmin_result deepCopy() { + return new getImageListPermissionAdmin_result(this); } @Override @@ -13251,22 +13491,22 @@ public class Server { return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(Lecture elem) { + public void addToSuccess(Image elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getLectureList_result setSuccess(List success) { + public getImageListPermissionAdmin_result setSuccess(List success) { this.success = success; return this; } @@ -13292,7 +13532,7 @@ public class Server { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -13325,12 +13565,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureList_result) - return this.equals((getLectureList_result)that); + if (that instanceof getImageListPermissionAdmin_result) + return this.equals((getImageListPermissionAdmin_result)that); return false; } - public boolean equals(getLectureList_result that) { + public boolean equals(getImageListPermissionAdmin_result that) { if (that == null) return false; @@ -13352,7 +13592,7 @@ public class Server { } @Override - public int compareTo(getLectureList_result other) { + public int compareTo(getImageListPermissionAdmin_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -13386,7 +13626,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureList_result("); + StringBuilder sb = new StringBuilder("getImageListPermissionAdmin_result("); boolean first = true; sb.append("success:"); @@ -13421,15 +13661,15 @@ public class Server { } } - private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory { - public getLectureList_resultStandardScheme getScheme() { - return new getLectureList_resultStandardScheme(); + private static class getImageListPermissionAdmin_resultStandardSchemeFactory implements SchemeFactory { + public getImageListPermissionAdmin_resultStandardScheme getScheme() { + return new getImageListPermissionAdmin_resultStandardScheme(); } } - private static class getLectureList_resultStandardScheme extends StandardScheme { + private static class getImageListPermissionAdmin_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13443,11 +13683,11 @@ public class Server { if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); - struct.success = new ArrayList(_list24.size); + struct.success = new ArrayList(_list24.size); for (int _i25 = 0; _i25 < _list24.size; ++_i25) { - Lecture _elem26; - _elem26 = new Lecture(); + Image _elem26; + _elem26 = new Image(); _elem26.read(iprot); struct.success.add(_elem26); } @@ -13469,7 +13709,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -13477,7 +13717,7 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Lecture _iter27 : struct.success) + for (Image _iter27 : struct.success) { _iter27.write(oprot); } @@ -13491,16 +13731,16 @@ public class Server { } - private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory { - public getLectureList_resultTupleScheme getScheme() { - return new getLectureList_resultTupleScheme(); + private static class getImageListPermissionAdmin_resultTupleSchemeFactory implements SchemeFactory { + public getImageListPermissionAdmin_resultTupleScheme getScheme() { + return new getImageListPermissionAdmin_resultTupleScheme(); } } - private static class getLectureList_resultTupleScheme extends TupleScheme { + private static class getImageListPermissionAdmin_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -13510,7 +13750,7 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Lecture _iter28 : struct.success) + for (Image _iter28 : struct.success) { _iter28.write(oprot); } @@ -13519,17 +13759,17 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list29.size); + struct.success = new ArrayList(_list29.size); for (int _i30 = 0; _i30 < _list29.size; ++_i30) { - Lecture _elem31; - _elem31 = new Lecture(); + Image _elem31; + _elem31 = new Image(); _elem31.read(iprot); struct.success.add(_elem31); } @@ -13541,22 +13781,20 @@ public class Server { } - public static class getLectureListPermissionRead_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("getLectureListPermissionRead_args"); + public static class getLectureList_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("getLectureList_args"); - private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionRead_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionRead_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory()); } - public String userID; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_ID((short)1, "userID"); +; private static final Map byName = new HashMap(); @@ -13571,8 +13809,6 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // USER_ID - return USER_ID; default: return null; } @@ -13611,87 +13847,37 @@ public class Server { return _fieldName; } } - - // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_args.class, metaDataMap); - } - - public getLectureListPermissionRead_args() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); } - public getLectureListPermissionRead_args( - String userID) - { - this(); - this.userID = userID; + public getLectureList_args() { } /** * Performs a deep copy on other. */ - public getLectureListPermissionRead_args(getLectureListPermissionRead_args other) { - if (other.isSetUserID()) { - this.userID = other.userID; - } + public getLectureList_args(getLectureList_args other) { } - public getLectureListPermissionRead_args deepCopy() { - return new getLectureListPermissionRead_args(this); + public getLectureList_args deepCopy() { + return new getLectureList_args(this); } @Override public void clear() { - this.userID = null; - } - - public String getUserID() { - return this.userID; - } - - public getLectureListPermissionRead_args setUserID(String userID) { - this.userID = userID; - return this; - } - - public void unsetUserID() { - this.userID = null; - } - - /** Returns true if field userID is set (has been assigned a value) and false otherwise */ - public boolean isSetUserID() { - return this.userID != null; - } - - public void setUserIDIsSet(boolean value) { - if (!value) { - this.userID = null; - } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case USER_ID: - if (value == null) { - unsetUserID(); - } else { - setUserID((String)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case USER_ID: - return getUserID(); - } throw new IllegalStateException(); } @@ -13703,8 +13889,6 @@ public class Server { } switch (field) { - case USER_ID: - return isSetUserID(); } throw new IllegalStateException(); } @@ -13713,24 +13897,15 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionRead_args) - return this.equals((getLectureListPermissionRead_args)that); + if (that instanceof getLectureList_args) + return this.equals((getLectureList_args)that); return false; } - public boolean equals(getLectureListPermissionRead_args that) { + public boolean equals(getLectureList_args that) { if (that == null) return false; - boolean this_present_userID = true && this.isSetUserID(); - boolean that_present_userID = true && that.isSetUserID(); - if (this_present_userID || that_present_userID) { - if (!(this_present_userID && that_present_userID)) - return false; - if (!this.userID.equals(that.userID)) - return false; - } - return true; } @@ -13740,23 +13915,13 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionRead_args other) { + public int compareTo(getLectureList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserID()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -13774,16 +13939,9 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionRead_args("); + StringBuilder sb = new StringBuilder("getLectureList_args("); boolean first = true; - sb.append("userID:"); - if (this.userID == null) { - sb.append("null"); - } else { - sb.append(this.userID); - } - first = false; sb.append(")"); return sb.toString(); } @@ -13809,15 +13967,15 @@ public class Server { } } - private static class getLectureListPermissionRead_argsStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionRead_argsStandardScheme getScheme() { - return new getLectureListPermissionRead_argsStandardScheme(); + private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory { + public getLectureList_argsStandardScheme getScheme() { + return new getLectureList_argsStandardScheme(); } } - private static class getLectureListPermissionRead_argsStandardScheme extends StandardScheme { + private static class getLectureList_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13827,14 +13985,6 @@ public class Server { break; } switch (schemeField.id) { - case 1: // USER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userID = iprot.readString(); - struct.setUserIDIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -13846,64 +13996,46 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.userID != null) { - oprot.writeFieldBegin(USER_ID_FIELD_DESC); - oprot.writeString(struct.userID); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getLectureListPermissionRead_argsTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionRead_argsTupleScheme getScheme() { - return new getLectureListPermissionRead_argsTupleScheme(); + private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { + public getLectureList_argsTupleScheme getScheme() { + return new getLectureList_argsTupleScheme(); } } - private static class getLectureListPermissionRead_argsTupleScheme extends TupleScheme { + private static class getLectureList_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUserID()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetUserID()) { - oprot.writeString(struct.userID); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.userID = iprot.readString(); - struct.setUserIDIsSet(true); - } } } } - public static class getLectureListPermissionRead_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("getLectureListPermissionRead_result"); + public static class getLectureList_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("getLectureList_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionRead_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionRead_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); } public List success; // required @@ -13974,13 +14106,13 @@ public class Server { new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap); } - public getLectureListPermissionRead_result() { + public getLectureList_result() { } - public getLectureListPermissionRead_result( + public getLectureList_result( List success) { this(); @@ -13990,7 +14122,7 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureListPermissionRead_result(getLectureListPermissionRead_result other) { + public getLectureList_result(getLectureList_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(other.success.size()); for (Lecture other_element : other.success) { @@ -14000,8 +14132,8 @@ public class Server { } } - public getLectureListPermissionRead_result deepCopy() { - return new getLectureListPermissionRead_result(this); + public getLectureList_result deepCopy() { + return new getLectureList_result(this); } @Override @@ -14028,7 +14160,7 @@ public class Server { return this.success; } - public getLectureListPermissionRead_result setSuccess(List success) { + public getLectureList_result setSuccess(List success) { this.success = success; return this; } @@ -14087,12 +14219,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionRead_result) - return this.equals((getLectureListPermissionRead_result)that); + if (that instanceof getLectureList_result) + return this.equals((getLectureList_result)that); return false; } - public boolean equals(getLectureListPermissionRead_result that) { + public boolean equals(getLectureList_result that) { if (that == null) return false; @@ -14114,7 +14246,7 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionRead_result other) { + public int compareTo(getLectureList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -14148,7 +14280,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionRead_result("); + StringBuilder sb = new StringBuilder("getLectureList_result("); boolean first = true; sb.append("success:"); @@ -14183,15 +14315,15 @@ public class Server { } } - private static class getLectureListPermissionRead_resultStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionRead_resultStandardScheme getScheme() { - return new getLectureListPermissionRead_resultStandardScheme(); + private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory { + public getLectureList_resultStandardScheme getScheme() { + return new getLectureList_resultStandardScheme(); } } - private static class getLectureListPermissionRead_resultStandardScheme extends StandardScheme { + private static class getLectureList_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14231,7 +14363,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -14253,16 +14385,16 @@ public class Server { } - private static class getLectureListPermissionRead_resultTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionRead_resultTupleScheme getScheme() { - return new getLectureListPermissionRead_resultTupleScheme(); + private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory { + public getLectureList_resultTupleScheme getScheme() { + return new getLectureList_resultTupleScheme(); } } - private static class getLectureListPermissionRead_resultTupleScheme extends TupleScheme { + private static class getLectureList_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -14281,7 +14413,7 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -14303,15 +14435,15 @@ public class Server { } - public static class getLectureListPermissionWrite_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("getLectureListPermissionWrite_args"); + public static class getLectureListPermissionRead_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("getLectureListPermissionRead_args"); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionWrite_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionWrite_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureListPermissionRead_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionRead_argsTupleSchemeFactory()); } public String userID; // required @@ -14381,13 +14513,13 @@ public class Server { tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_args.class, metaDataMap); } - public getLectureListPermissionWrite_args() { + public getLectureListPermissionRead_args() { } - public getLectureListPermissionWrite_args( + public getLectureListPermissionRead_args( String userID) { this(); @@ -14397,14 +14529,14 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureListPermissionWrite_args(getLectureListPermissionWrite_args other) { + public getLectureListPermissionRead_args(getLectureListPermissionRead_args other) { if (other.isSetUserID()) { this.userID = other.userID; } } - public getLectureListPermissionWrite_args deepCopy() { - return new getLectureListPermissionWrite_args(this); + public getLectureListPermissionRead_args deepCopy() { + return new getLectureListPermissionRead_args(this); } @Override @@ -14416,7 +14548,7 @@ public class Server { return this.userID; } - public getLectureListPermissionWrite_args setUserID(String userID) { + public getLectureListPermissionRead_args setUserID(String userID) { this.userID = userID; return this; } @@ -14475,12 +14607,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionWrite_args) - return this.equals((getLectureListPermissionWrite_args)that); + if (that instanceof getLectureListPermissionRead_args) + return this.equals((getLectureListPermissionRead_args)that); return false; } - public boolean equals(getLectureListPermissionWrite_args that) { + public boolean equals(getLectureListPermissionRead_args that) { if (that == null) return false; @@ -14502,7 +14634,7 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionWrite_args other) { + public int compareTo(getLectureListPermissionRead_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -14536,7 +14668,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionWrite_args("); + StringBuilder sb = new StringBuilder("getLectureListPermissionRead_args("); boolean first = true; sb.append("userID:"); @@ -14571,15 +14703,15 @@ public class Server { } } - private static class getLectureListPermissionWrite_argsStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionWrite_argsStandardScheme getScheme() { - return new getLectureListPermissionWrite_argsStandardScheme(); + private static class getLectureListPermissionRead_argsStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionRead_argsStandardScheme getScheme() { + return new getLectureListPermissionRead_argsStandardScheme(); } } - private static class getLectureListPermissionWrite_argsStandardScheme extends StandardScheme { + private static class getLectureListPermissionRead_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14608,7 +14740,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -14623,16 +14755,16 @@ public class Server { } - private static class getLectureListPermissionWrite_argsTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionWrite_argsTupleScheme getScheme() { - return new getLectureListPermissionWrite_argsTupleScheme(); + private static class getLectureListPermissionRead_argsTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionRead_argsTupleScheme getScheme() { + return new getLectureListPermissionRead_argsTupleScheme(); } } - private static class getLectureListPermissionWrite_argsTupleScheme extends TupleScheme { + private static class getLectureListPermissionRead_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserID()) { @@ -14645,7 +14777,7 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -14657,15 +14789,15 @@ public class Server { } - public static class getLectureListPermissionWrite_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("getLectureListPermissionWrite_result"); + public static class getLectureListPermissionRead_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("getLectureListPermissionRead_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionWrite_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionWrite_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureListPermissionRead_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionRead_resultTupleSchemeFactory()); } public List success; // required @@ -14736,13 +14868,13 @@ public class Server { new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_result.class, metaDataMap); } - public getLectureListPermissionWrite_result() { + public getLectureListPermissionRead_result() { } - public getLectureListPermissionWrite_result( + public getLectureListPermissionRead_result( List success) { this(); @@ -14752,7 +14884,7 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureListPermissionWrite_result(getLectureListPermissionWrite_result other) { + public getLectureListPermissionRead_result(getLectureListPermissionRead_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(other.success.size()); for (Lecture other_element : other.success) { @@ -14762,8 +14894,8 @@ public class Server { } } - public getLectureListPermissionWrite_result deepCopy() { - return new getLectureListPermissionWrite_result(this); + public getLectureListPermissionRead_result deepCopy() { + return new getLectureListPermissionRead_result(this); } @Override @@ -14790,7 +14922,7 @@ public class Server { return this.success; } - public getLectureListPermissionWrite_result setSuccess(List success) { + public getLectureListPermissionRead_result setSuccess(List success) { this.success = success; return this; } @@ -14849,12 +14981,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionWrite_result) - return this.equals((getLectureListPermissionWrite_result)that); + if (that instanceof getLectureListPermissionRead_result) + return this.equals((getLectureListPermissionRead_result)that); return false; } - public boolean equals(getLectureListPermissionWrite_result that) { + public boolean equals(getLectureListPermissionRead_result that) { if (that == null) return false; @@ -14876,7 +15008,7 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionWrite_result other) { + public int compareTo(getLectureListPermissionRead_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -14910,7 +15042,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionWrite_result("); + StringBuilder sb = new StringBuilder("getLectureListPermissionRead_result("); boolean first = true; sb.append("success:"); @@ -14945,15 +15077,15 @@ public class Server { } } - private static class getLectureListPermissionWrite_resultStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionWrite_resultStandardScheme getScheme() { - return new getLectureListPermissionWrite_resultStandardScheme(); + private static class getLectureListPermissionRead_resultStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionRead_resultStandardScheme getScheme() { + return new getLectureListPermissionRead_resultStandardScheme(); } } - private static class getLectureListPermissionWrite_resultStandardScheme extends StandardScheme { + private static class getLectureListPermissionRead_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14993,7 +15125,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -15015,16 +15147,16 @@ public class Server { } - private static class getLectureListPermissionWrite_resultTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionWrite_resultTupleScheme getScheme() { - return new getLectureListPermissionWrite_resultTupleScheme(); + private static class getLectureListPermissionRead_resultTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionRead_resultTupleScheme getScheme() { + return new getLectureListPermissionRead_resultTupleScheme(); } } - private static class getLectureListPermissionWrite_resultTupleScheme extends TupleScheme { + private static class getLectureListPermissionRead_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -15043,7 +15175,7 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -15065,15 +15197,15 @@ public class Server { } - public static class getLectureListPermissionAdmin_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("getLectureListPermissionAdmin_args"); + public static class getLectureListPermissionWrite_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("getLectureListPermissionWrite_args"); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureListPermissionWrite_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionWrite_argsTupleSchemeFactory()); } public String userID; // required @@ -15143,13 +15275,13 @@ public class Server { tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_args.class, metaDataMap); } - public getLectureListPermissionAdmin_args() { + public getLectureListPermissionWrite_args() { } - public getLectureListPermissionAdmin_args( + public getLectureListPermissionWrite_args( String userID) { this(); @@ -15159,14 +15291,14 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureListPermissionAdmin_args(getLectureListPermissionAdmin_args other) { + public getLectureListPermissionWrite_args(getLectureListPermissionWrite_args other) { if (other.isSetUserID()) { this.userID = other.userID; } } - public getLectureListPermissionAdmin_args deepCopy() { - return new getLectureListPermissionAdmin_args(this); + public getLectureListPermissionWrite_args deepCopy() { + return new getLectureListPermissionWrite_args(this); } @Override @@ -15178,7 +15310,7 @@ public class Server { return this.userID; } - public getLectureListPermissionAdmin_args setUserID(String userID) { + public getLectureListPermissionWrite_args setUserID(String userID) { this.userID = userID; return this; } @@ -15237,12 +15369,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionAdmin_args) - return this.equals((getLectureListPermissionAdmin_args)that); + if (that instanceof getLectureListPermissionWrite_args) + return this.equals((getLectureListPermissionWrite_args)that); return false; } - public boolean equals(getLectureListPermissionAdmin_args that) { + public boolean equals(getLectureListPermissionWrite_args that) { if (that == null) return false; @@ -15264,7 +15396,7 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionAdmin_args other) { + public int compareTo(getLectureListPermissionWrite_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -15298,7 +15430,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionAdmin_args("); + StringBuilder sb = new StringBuilder("getLectureListPermissionWrite_args("); boolean first = true; sb.append("userID:"); @@ -15333,15 +15465,15 @@ public class Server { } } - private static class getLectureListPermissionAdmin_argsStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionAdmin_argsStandardScheme getScheme() { - return new getLectureListPermissionAdmin_argsStandardScheme(); + private static class getLectureListPermissionWrite_argsStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionWrite_argsStandardScheme getScheme() { + return new getLectureListPermissionWrite_argsStandardScheme(); } } - private static class getLectureListPermissionAdmin_argsStandardScheme extends StandardScheme { + private static class getLectureListPermissionWrite_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -15370,7 +15502,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -15385,16 +15517,16 @@ public class Server { } - private static class getLectureListPermissionAdmin_argsTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionAdmin_argsTupleScheme getScheme() { - return new getLectureListPermissionAdmin_argsTupleScheme(); + private static class getLectureListPermissionWrite_argsTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionWrite_argsTupleScheme getScheme() { + return new getLectureListPermissionWrite_argsTupleScheme(); } } - private static class getLectureListPermissionAdmin_argsTupleScheme extends TupleScheme { + private static class getLectureListPermissionWrite_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserID()) { @@ -15407,7 +15539,7 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -15419,15 +15551,15 @@ public class Server { } - public static class getLectureListPermissionAdmin_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("getLectureListPermissionAdmin_result"); + public static class getLectureListPermissionWrite_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("getLectureListPermissionWrite_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureListPermissionWrite_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionWrite_resultTupleSchemeFactory()); } public List success; // required @@ -15498,13 +15630,13 @@ public class Server { new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_result.class, metaDataMap); } - public getLectureListPermissionAdmin_result() { + public getLectureListPermissionWrite_result() { } - public getLectureListPermissionAdmin_result( + public getLectureListPermissionWrite_result( List success) { this(); @@ -15514,7 +15646,7 @@ public class Server { /** * Performs a deep copy on other. */ - public getLectureListPermissionAdmin_result(getLectureListPermissionAdmin_result other) { + public getLectureListPermissionWrite_result(getLectureListPermissionWrite_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(other.success.size()); for (Lecture other_element : other.success) { @@ -15524,8 +15656,8 @@ public class Server { } } - public getLectureListPermissionAdmin_result deepCopy() { - return new getLectureListPermissionAdmin_result(this); + public getLectureListPermissionWrite_result deepCopy() { + return new getLectureListPermissionWrite_result(this); } @Override @@ -15552,7 +15684,7 @@ public class Server { return this.success; } - public getLectureListPermissionAdmin_result setSuccess(List success) { + public getLectureListPermissionWrite_result setSuccess(List success) { this.success = success; return this; } @@ -15611,12 +15743,12 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureListPermissionAdmin_result) - return this.equals((getLectureListPermissionAdmin_result)that); + if (that instanceof getLectureListPermissionWrite_result) + return this.equals((getLectureListPermissionWrite_result)that); return false; } - public boolean equals(getLectureListPermissionAdmin_result that) { + public boolean equals(getLectureListPermissionWrite_result that) { if (that == null) return false; @@ -15638,7 +15770,7 @@ public class Server { } @Override - public int compareTo(getLectureListPermissionAdmin_result other) { + public int compareTo(getLectureListPermissionWrite_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -15672,7 +15804,7 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureListPermissionAdmin_result("); + StringBuilder sb = new StringBuilder("getLectureListPermissionWrite_result("); boolean first = true; sb.append("success:"); @@ -15707,15 +15839,15 @@ public class Server { } } - private static class getLectureListPermissionAdmin_resultStandardSchemeFactory implements SchemeFactory { - public getLectureListPermissionAdmin_resultStandardScheme getScheme() { - return new getLectureListPermissionAdmin_resultStandardScheme(); + private static class getLectureListPermissionWrite_resultStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionWrite_resultStandardScheme getScheme() { + return new getLectureListPermissionWrite_resultStandardScheme(); } } - private static class getLectureListPermissionAdmin_resultStandardScheme extends StandardScheme { + private static class getLectureListPermissionWrite_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -15755,7 +15887,7 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -15777,16 +15909,16 @@ public class Server { } - private static class getLectureListPermissionAdmin_resultTupleSchemeFactory implements SchemeFactory { - public getLectureListPermissionAdmin_resultTupleScheme getScheme() { - return new getLectureListPermissionAdmin_resultTupleScheme(); + private static class getLectureListPermissionWrite_resultTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionWrite_resultTupleScheme getScheme() { + return new getLectureListPermissionWrite_resultTupleScheme(); } } - private static class getLectureListPermissionAdmin_resultTupleScheme extends TupleScheme { + private static class getLectureListPermissionWrite_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -15805,7 +15937,7 @@ public class Server { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -15827,20 +15959,22 @@ public class Server { } - public static class getAllOS_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("getAllOS_args"); + public static class getLectureListPermissionAdmin_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("getLectureListPermissionAdmin_args"); + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllOS_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllOS_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_argsTupleSchemeFactory()); } + public String userID; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + USER_ID((short)1, "userID"); private static final Map byName = new HashMap(); @@ -15855,6 +15989,8 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // USER_ID + return USER_ID; default: return null; } @@ -15893,37 +16029,87 @@ public class Server { return _fieldName; } } + + // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOS_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_args.class, metaDataMap); } - public getAllOS_args() { + public getLectureListPermissionAdmin_args() { + } + + public getLectureListPermissionAdmin_args( + String userID) + { + this(); + this.userID = userID; } /** * Performs a deep copy on other. */ - public getAllOS_args(getAllOS_args other) { + public getLectureListPermissionAdmin_args(getLectureListPermissionAdmin_args other) { + if (other.isSetUserID()) { + this.userID = other.userID; + } } - public getAllOS_args deepCopy() { - return new getAllOS_args(this); + public getLectureListPermissionAdmin_args deepCopy() { + return new getLectureListPermissionAdmin_args(this); } @Override public void clear() { + this.userID = null; + } + + public String getUserID() { + return this.userID; + } + + public getLectureListPermissionAdmin_args setUserID(String userID) { + this.userID = userID; + return this; + } + + public void unsetUserID() { + this.userID = null; + } + + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; + } + + public void setUserIDIsSet(boolean value) { + if (!value) { + this.userID = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case USER_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case USER_ID: + return getUserID(); + } throw new IllegalStateException(); } @@ -15935,6 +16121,8 @@ public class Server { } switch (field) { + case USER_ID: + return isSetUserID(); } throw new IllegalStateException(); } @@ -15943,15 +16131,24 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllOS_args) - return this.equals((getAllOS_args)that); + if (that instanceof getLectureListPermissionAdmin_args) + return this.equals((getLectureListPermissionAdmin_args)that); return false; } - public boolean equals(getAllOS_args that) { + public boolean equals(getLectureListPermissionAdmin_args that) { if (that == null) return false; + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) + return false; + if (!this.userID.equals(that.userID)) + return false; + } + return true; } @@ -15961,13 +16158,23 @@ public class Server { } @Override - public int compareTo(getAllOS_args other) { + public int compareTo(getLectureListPermissionAdmin_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -15985,7 +16192,694 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllOS_args("); + StringBuilder sb = new StringBuilder("getLectureListPermissionAdmin_args("); + boolean first = true; + + sb.append("userID:"); + if (this.userID == null) { + sb.append("null"); + } else { + sb.append(this.userID); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureListPermissionAdmin_argsStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionAdmin_argsStandardScheme getScheme() { + return new getLectureListPermissionAdmin_argsStandardScheme(); + } + } + + private static class getLectureListPermissionAdmin_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_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: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureListPermissionAdmin_argsTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionAdmin_argsTupleScheme getScheme() { + return new getLectureListPermissionAdmin_argsTupleScheme(); + } + } + + private static class getLectureListPermissionAdmin_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserID()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + } + } + + } + + public static class getLectureListPermissionAdmin_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("getLectureListPermissionAdmin_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_resultTupleSchemeFactory()); + } + + public List 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); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_result.class, metaDataMap); + } + + public getLectureListPermissionAdmin_result() { + } + + public getLectureListPermissionAdmin_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getLectureListPermissionAdmin_result(getLectureListPermissionAdmin_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Lecture other_element : other.success) { + __this__success.add(new Lecture(other_element)); + } + this.success = __this__success; + } + } + + public getLectureListPermissionAdmin_result deepCopy() { + return new getLectureListPermissionAdmin_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Lecture elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getLectureListPermissionAdmin_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureListPermissionAdmin_result) + return this.equals((getLectureListPermissionAdmin_result)that); + return false; + } + + public boolean equals(getLectureListPermissionAdmin_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureListPermissionAdmin_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureListPermissionAdmin_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureListPermissionAdmin_resultStandardSchemeFactory implements SchemeFactory { + public getLectureListPermissionAdmin_resultStandardScheme getScheme() { + return new getLectureListPermissionAdmin_resultStandardScheme(); + } + } + + private static class getLectureListPermissionAdmin_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_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.LIST) { + { + org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); + struct.success = new ArrayList(_list56.size); + for (int _i57 = 0; _i57 < _list56.size; ++_i57) + { + Lecture _elem58; + _elem58 = new Lecture(); + _elem58.read(iprot); + struct.success.add(_elem58); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Lecture _iter59 : struct.success) + { + _iter59.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureListPermissionAdmin_resultTupleSchemeFactory implements SchemeFactory { + public getLectureListPermissionAdmin_resultTupleScheme getScheme() { + return new getLectureListPermissionAdmin_resultTupleScheme(); + } + } + + private static class getLectureListPermissionAdmin_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Lecture _iter60 : struct.success) + { + _iter60.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list61.size); + for (int _i62 = 0; _i62 < _list61.size; ++_i62) + { + Lecture _elem63; + _elem63 = new Lecture(); + _elem63.read(iprot); + struct.success.add(_elem63); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getAllOS_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("getAllOS_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllOS_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllOS_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOS_args.class, metaDataMap); + } + + public getAllOS_args() { + } + + /** + * Performs a deep copy on other. + */ + public getAllOS_args(getAllOS_args other) { + } + + public getAllOS_args deepCopy() { + return new getAllOS_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllOS_args) + return this.equals((getAllOS_args)that); + return false; + } + + public boolean equals(getAllOS_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllOS_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllOS_args("); boolean first = true; sb.append(")"); @@ -16379,13 +17273,13 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); - struct.success = new ArrayList(_list56.size); - for (int _i57 = 0; _i57 < _list56.size; ++_i57) + org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); + struct.success = new ArrayList(_list64.size); + for (int _i65 = 0; _i65 < _list64.size; ++_i65) { - String _elem58; - _elem58 = iprot.readString(); - struct.success.add(_elem58); + String _elem66; + _elem66 = iprot.readString(); + struct.success.add(_elem66); } iprot.readListEnd(); } @@ -16413,9 +17307,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter59 : struct.success) + for (String _iter67 : struct.success) { - oprot.writeString(_iter59); + oprot.writeString(_iter67); } oprot.writeListEnd(); } @@ -16446,9 +17340,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter60 : struct.success) + for (String _iter68 : struct.success) { - oprot.writeString(_iter60); + oprot.writeString(_iter68); } } } @@ -16460,13 +17354,13 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list61.size); - for (int _i62 = 0; _i62 < _list61.size; ++_i62) + org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list69.size); + for (int _i70 = 0; _i70 < _list69.size; ++_i70) { - String _elem63; - _elem63 = iprot.readString(); - struct.success.add(_elem63); + String _elem71; + _elem71 = iprot.readString(); + struct.success.add(_elem71); } } struct.setSuccessIsSet(true); @@ -17028,13 +17922,13 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.success = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) + org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); + struct.success = new ArrayList(_list72.size); + for (int _i73 = 0; _i73 < _list72.size; ++_i73) { - String _elem66; - _elem66 = iprot.readString(); - struct.success.add(_elem66); + String _elem74; + _elem74 = iprot.readString(); + struct.success.add(_elem74); } iprot.readListEnd(); } @@ -17062,9 +17956,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter67 : struct.success) + for (String _iter75 : struct.success) { - oprot.writeString(_iter67); + oprot.writeString(_iter75); } oprot.writeListEnd(); } @@ -17095,9 +17989,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter68 : struct.success) + for (String _iter76 : struct.success) { - oprot.writeString(_iter68); + oprot.writeString(_iter76); } } } @@ -17109,13 +18003,13 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list69.size); - for (int _i70 = 0; _i70 < _list69.size; ++_i70) + org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list77.size); + for (int _i78 = 0; _i78 < _list77.size; ++_i78) { - String _elem71; - _elem71 = iprot.readString(); - struct.success.add(_elem71); + String _elem79; + _elem79 = iprot.readString(); + struct.success.add(_elem79); } } struct.setSuccessIsSet(true); @@ -17882,15 +18776,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map72.size); - for (int _i73 = 0; _i73 < _map72.size; ++_i73) + org.apache.thrift.protocol.TMap _map80 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map80.size); + for (int _i81 = 0; _i81 < _map80.size; ++_i81) { - String _key74; - String _val75; - _key74 = iprot.readString(); - _val75 = iprot.readString(); - struct.success.put(_key74, _val75); + String _key82; + String _val83; + _key82 = iprot.readString(); + _val83 = iprot.readString(); + struct.success.put(_key82, _val83); } iprot.readMapEnd(); } @@ -17918,10 +18812,10 @@ public class Server { 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 _iter76 : struct.success.entrySet()) + for (Map.Entry _iter84 : struct.success.entrySet()) { - oprot.writeString(_iter76.getKey()); - oprot.writeString(_iter76.getValue()); + oprot.writeString(_iter84.getKey()); + oprot.writeString(_iter84.getValue()); } oprot.writeMapEnd(); } @@ -17952,10 +18846,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter77 : struct.success.entrySet()) + for (Map.Entry _iter85 : struct.success.entrySet()) { - oprot.writeString(_iter77.getKey()); - oprot.writeString(_iter77.getValue()); + oprot.writeString(_iter85.getKey()); + oprot.writeString(_iter85.getValue()); } } } @@ -17967,15 +18861,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map78 = 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*_map78.size); - for (int _i79 = 0; _i79 < _map78.size; ++_i79) + org.apache.thrift.protocol.TMap _map86 = 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*_map86.size); + for (int _i87 = 0; _i87 < _map86.size; ++_i87) { - String _key80; - String _val81; - _key80 = iprot.readString(); - _val81 = iprot.readString(); - struct.success.put(_key80, _val81); + String _key88; + String _val89; + _key88 = iprot.readString(); + _val89 = iprot.readString(); + struct.success.put(_key88, _val89); } } struct.setSuccessIsSet(true); @@ -22456,15 +23350,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map82 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map82.size); - for (int _i83 = 0; _i83 < _map82.size; ++_i83) + org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map90.size); + for (int _i91 = 0; _i91 < _map90.size; ++_i91) { - String _key84; - String _val85; - _key84 = iprot.readString(); - _val85 = iprot.readString(); - struct.success.put(_key84, _val85); + String _key92; + String _val93; + _key92 = iprot.readString(); + _val93 = iprot.readString(); + struct.success.put(_key92, _val93); } iprot.readMapEnd(); } @@ -22492,10 +23386,10 @@ public class Server { 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 _iter86 : struct.success.entrySet()) + for (Map.Entry _iter94 : struct.success.entrySet()) { - oprot.writeString(_iter86.getKey()); - oprot.writeString(_iter86.getValue()); + oprot.writeString(_iter94.getKey()); + oprot.writeString(_iter94.getValue()); } oprot.writeMapEnd(); } @@ -22526,10 +23420,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter87 : struct.success.entrySet()) + for (Map.Entry _iter95 : struct.success.entrySet()) { - oprot.writeString(_iter87.getKey()); - oprot.writeString(_iter87.getValue()); + oprot.writeString(_iter95.getKey()); + oprot.writeString(_iter95.getValue()); } } } @@ -22541,15 +23435,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map88 = 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*_map88.size); - for (int _i89 = 0; _i89 < _map88.size; ++_i89) + org.apache.thrift.protocol.TMap _map96 = 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*_map96.size); + for (int _i97 = 0; _i97 < _map96.size; ++_i97) { - String _key90; - String _val91; - _key90 = iprot.readString(); - _val91 = iprot.readString(); - struct.success.put(_key90, _val91); + String _key98; + String _val99; + _key98 = iprot.readString(); + _val99 = iprot.readString(); + struct.success.put(_key98, _val99); } } struct.setSuccessIsSet(true); @@ -23216,15 +24110,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map92 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map92.size); - for (int _i93 = 0; _i93 < _map92.size; ++_i93) + org.apache.thrift.protocol.TMap _map100 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map100.size); + for (int _i101 = 0; _i101 < _map100.size; ++_i101) { - String _key94; - String _val95; - _key94 = iprot.readString(); - _val95 = iprot.readString(); - struct.success.put(_key94, _val95); + String _key102; + String _val103; + _key102 = iprot.readString(); + _val103 = iprot.readString(); + struct.success.put(_key102, _val103); } iprot.readMapEnd(); } @@ -23252,10 +24146,10 @@ public class Server { 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 _iter96 : struct.success.entrySet()) + for (Map.Entry _iter104 : struct.success.entrySet()) { - oprot.writeString(_iter96.getKey()); - oprot.writeString(_iter96.getValue()); + oprot.writeString(_iter104.getKey()); + oprot.writeString(_iter104.getValue()); } oprot.writeMapEnd(); } @@ -23286,10 +24180,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter97 : struct.success.entrySet()) + for (Map.Entry _iter105 : struct.success.entrySet()) { - oprot.writeString(_iter97.getKey()); - oprot.writeString(_iter97.getValue()); + oprot.writeString(_iter105.getKey()); + oprot.writeString(_iter105.getValue()); } } } @@ -23301,15 +24195,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map98 = 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*_map98.size); - for (int _i99 = 0; _i99 < _map98.size; ++_i99) + org.apache.thrift.protocol.TMap _map106 = 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*_map106.size); + for (int _i107 = 0; _i107 < _map106.size; ++_i107) { - String _key100; - String _val101; - _key100 = iprot.readString(); - _val101 = iprot.readString(); - struct.success.put(_key100, _val101); + String _key108; + String _val109; + _key108 = iprot.readString(); + _val109 = iprot.readString(); + struct.success.put(_key108, _val109); } } struct.setSuccessIsSet(true); @@ -37947,13 +38841,13 @@ public class Server { case 1: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list102 = iprot.readListBegin(); - struct.userID = new ArrayList(_list102.size); - for (int _i103 = 0; _i103 < _list102.size; ++_i103) + org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); + struct.userID = new ArrayList(_list110.size); + for (int _i111 = 0; _i111 < _list110.size; ++_i111) { - String _elem104; - _elem104 = iprot.readString(); - struct.userID.add(_elem104); + String _elem112; + _elem112 = iprot.readString(); + struct.userID.add(_elem112); } iprot.readListEnd(); } @@ -37981,9 +38875,9 @@ public class Server { oprot.writeFieldBegin(USER_ID_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.userID.size())); - for (String _iter105 : struct.userID) + for (String _iter113 : struct.userID) { - oprot.writeString(_iter105); + oprot.writeString(_iter113); } oprot.writeListEnd(); } @@ -38014,9 +38908,9 @@ public class Server { if (struct.isSetUserID()) { { oprot.writeI32(struct.userID.size()); - for (String _iter106 : struct.userID) + for (String _iter114 : struct.userID) { - oprot.writeString(_iter106); + oprot.writeString(_iter114); } } } @@ -38028,13 +38922,13 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.userID = new ArrayList(_list107.size); - for (int _i108 = 0; _i108 < _list107.size; ++_i108) + org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.userID = new ArrayList(_list115.size); + for (int _i116 = 0; _i116 < _list115.size; ++_i116) { - String _elem109; - _elem109 = iprot.readString(); - struct.userID.add(_elem109); + String _elem117; + _elem117 = iprot.readString(); + struct.userID.add(_elem117); } } struct.setUserIDIsSet(true); @@ -38353,14 +39247,14 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); - struct.success = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) + org.apache.thrift.protocol.TList _list118 = iprot.readListBegin(); + struct.success = new ArrayList(_list118.size); + for (int _i119 = 0; _i119 < _list118.size; ++_i119) { - Person _elem112; - _elem112 = new Person(); - _elem112.read(iprot); - struct.success.add(_elem112); + Person _elem120; + _elem120 = new Person(); + _elem120.read(iprot); + struct.success.add(_elem120); } iprot.readListEnd(); } @@ -38388,9 +39282,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Person _iter113 : struct.success) + for (Person _iter121 : struct.success) { - _iter113.write(oprot); + _iter121.write(oprot); } oprot.writeListEnd(); } @@ -38421,9 +39315,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Person _iter114 : struct.success) + for (Person _iter122 : struct.success) { - _iter114.write(oprot); + _iter122.write(oprot); } } } @@ -38435,14 +39329,14 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list115.size); - for (int _i116 = 0; _i116 < _list115.size; ++_i116) + org.apache.thrift.protocol.TList _list123 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list123.size); + for (int _i124 = 0; _i124 < _list123.size; ++_i124) { - Person _elem117; - _elem117 = new Person(); - _elem117.read(iprot); - struct.success.add(_elem117); + Person _elem125; + _elem125 = new Person(); + _elem125.read(iprot); + struct.success.add(_elem125); } } struct.setSuccessIsSet(true); @@ -39215,14 +40109,14 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list118 = iprot.readListBegin(); - struct.success = new ArrayList(_list118.size); - for (int _i119 = 0; _i119 < _list118.size; ++_i119) + org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); + struct.success = new ArrayList(_list126.size); + for (int _i127 = 0; _i127 < _list126.size; ++_i127) { - Person _elem120; - _elem120 = new Person(); - _elem120.read(iprot); - struct.success.add(_elem120); + Person _elem128; + _elem128 = new Person(); + _elem128.read(iprot); + struct.success.add(_elem128); } iprot.readListEnd(); } @@ -39250,9 +40144,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Person _iter121 : struct.success) + for (Person _iter129 : struct.success) { - _iter121.write(oprot); + _iter129.write(oprot); } oprot.writeListEnd(); } @@ -39283,9 +40177,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Person _iter122 : struct.success) + for (Person _iter130 : struct.success) { - _iter122.write(oprot); + _iter130.write(oprot); } } } @@ -39297,14 +40191,14 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list123 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list123.size); - for (int _i124 = 0; _i124 < _list123.size; ++_i124) + org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list131.size); + for (int _i132 = 0; _i132 < _list131.size; ++_i132) { - Person _elem125; - _elem125 = new Person(); - _elem125.read(iprot); - struct.success.add(_elem125); + Person _elem133; + _elem133 = new Person(); + _elem133.read(iprot); + struct.success.add(_elem133); } } struct.setSuccessIsSet(true); @@ -40077,14 +40971,14 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); - struct.success = new ArrayList(_list126.size); - for (int _i127 = 0; _i127 < _list126.size; ++_i127) + org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); + struct.success = new ArrayList(_list134.size); + for (int _i135 = 0; _i135 < _list134.size; ++_i135) { - Person _elem128; - _elem128 = new Person(); - _elem128.read(iprot); - struct.success.add(_elem128); + Person _elem136; + _elem136 = new Person(); + _elem136.read(iprot); + struct.success.add(_elem136); } iprot.readListEnd(); } @@ -40112,9 +41006,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Person _iter129 : struct.success) + for (Person _iter137 : struct.success) { - _iter129.write(oprot); + _iter137.write(oprot); } oprot.writeListEnd(); } @@ -40145,9 +41039,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Person _iter130 : struct.success) + for (Person _iter138 : struct.success) { - _iter130.write(oprot); + _iter138.write(oprot); } } } @@ -40159,14 +41053,14 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list131.size); - for (int _i132 = 0; _i132 < _list131.size; ++_i132) + org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - Person _elem133; - _elem133 = new Person(); - _elem133.read(iprot); - struct.success.add(_elem133); + Person _elem141; + _elem141 = new Person(); + _elem141.read(iprot); + struct.success.add(_elem141); } } struct.setSuccessIsSet(true); diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java index c95d874c..3990bf4e 100644 --- a/dozentenmodulserver/src/main/java/sql/SQL.java +++ b/dozentenmodulserver/src/main/java/sql/SQL.java @@ -17,6 +17,8 @@ import java.util.UUID; import models.Configuration; import org.apache.log4j.Logger; +import org.apache.thrift.TException; + import server.BinaryListener; import server.generated.Image; import server.generated.Lecture; @@ -450,6 +452,14 @@ public class SQL { } return list; } + + + public List getImageListPermissionAdmin(String userID){ + //fill me + return null; + } + + public List getLectureListPermissionRead(String userID) { List list = new ArrayList(); diff --git a/dozentenmodulserver/thrift/server.thrift b/dozentenmodulserver/thrift/server.thrift index d636d1ad..3fce1ef7 100644 --- a/dozentenmodulserver/thrift/server.thrift +++ b/dozentenmodulserver/thrift/server.thrift @@ -55,6 +55,7 @@ service Server{ list getImageListPermissionWrite(1: string userID), list getImageListPermissionRead(1: string userID), list getImageListPermissionLink(1: string userID), + list getImageListPermissionAdmin(1: string userID), list getLectureList(), list getLectureListPermissionRead(1: string userID), list getLectureListPermissionWrite(1: string userID), -- cgit v1.2.3-55-g7522