diff options
| author | Jonathan Bauer | 2014-09-10 14:54:40 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-09-10 14:54:40 +0200 |
| commit | 61e8e600dd1c9d6066711dfb9874e0117b87baf6 (patch) | |
| tree | c5321291edcc9286fbe75f1cbf1a0548fb78da1d /Dozentenmodulserver/src/main/java/server | |
| parent | Merge branch 'maven' of git.openslx.org:openslx-ng/tutor-module into maven (diff) | |
| download | tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.tar.gz tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.tar.xz tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.zip | |
mavenization v2
Diffstat (limited to 'Dozentenmodulserver/src/main/java/server')
| -rw-r--r-- | Dozentenmodulserver/src/main/java/server/Image.java | 108 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/main/java/server/Server.java | 7938 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/main/java/server/ServerHandler.java | 190 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/main/java/server/StartServer.java | 70 |
4 files changed, 7088 insertions, 1218 deletions
diff --git a/Dozentenmodulserver/src/main/java/server/Image.java b/Dozentenmodulserver/src/main/java/server/Image.java index 34c2b45c..16fc1ef5 100644 --- a/Dozentenmodulserver/src/main/java/server/Image.java +++ b/Dozentenmodulserver/src/main/java/server/Image.java @@ -43,6 +43,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)-6); private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.STRING, (short)-7); private static final org.apache.thrift.protocol.TField USER_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userData", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.STRING, (short)-9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -58,6 +59,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav public String lectureName; // required public String updateTime; // required public String userData; // required + public String isTemplate; // 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 { @@ -68,7 +70,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav OS_NAME((short)-5, "osName"), LECTURE_NAME((short)-6, "lectureName"), UPDATE_TIME((short)-7, "updateTime"), - USER_DATA((short)-8, "userData"); + USER_DATA((short)-8, "userData"), + IS_TEMPLATE((short)-9, "isTemplate"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -99,6 +102,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav return UPDATE_TIME; case -8: // USER_DATA return USER_DATA; + case -9: // IS_TEMPLATE + return IS_TEMPLATE; default: return null; } @@ -158,6 +163,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.USER_DATA, new org.apache.thrift.meta_data.FieldMetaData("userData", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Image.class, metaDataMap); } @@ -173,7 +180,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav String osName, String lectureName, String updateTime, - String userData) + String userData, + String isTemplate) { this(); this.id = id; @@ -184,6 +192,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav this.lectureName = lectureName; this.updateTime = updateTime; this.userData = userData; + this.isTemplate = isTemplate; } /** @@ -214,6 +223,9 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav if (other.isSetUserData()) { this.userData = other.userData; } + if (other.isSetIsTemplate()) { + this.isTemplate = other.isTemplate; + } } public Image deepCopy() { @@ -230,6 +242,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav this.lectureName = null; this.updateTime = null; this.userData = null; + this.isTemplate = null; } public String getId() { @@ -424,6 +437,30 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } } + public String getIsTemplate() { + return this.isTemplate; + } + + public Image setIsTemplate(String isTemplate) { + this.isTemplate = isTemplate; + return this; + } + + public void unsetIsTemplate() { + this.isTemplate = null; + } + + /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTemplate() { + return this.isTemplate != null; + } + + public void setIsTemplateIsSet(boolean value) { + if (!value) { + this.isTemplate = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: @@ -490,6 +527,14 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } break; + case IS_TEMPLATE: + if (value == null) { + unsetIsTemplate(); + } else { + setIsTemplate((String)value); + } + break; + } } @@ -519,6 +564,9 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav case USER_DATA: return getUserData(); + case IS_TEMPLATE: + return getIsTemplate(); + } throw new IllegalStateException(); } @@ -546,6 +594,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav return isSetUpdateTime(); case USER_DATA: return isSetUserData(); + case IS_TEMPLATE: + return isSetIsTemplate(); } throw new IllegalStateException(); } @@ -635,6 +685,15 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav return false; } + boolean this_present_isTemplate = true && this.isSetIsTemplate(); + boolean that_present_isTemplate = true && that.isSetIsTemplate(); + if (this_present_isTemplate || that_present_isTemplate) { + if (!(this_present_isTemplate && that_present_isTemplate)) + return false; + if (!this.isTemplate.equals(that.isTemplate)) + return false; + } + return true; } @@ -731,6 +790,16 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav return lastComparison; } } + lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTemplate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -814,6 +883,14 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav sb.append(this.userData); } first = false; + if (!first) sb.append(", "); + sb.append("isTemplate:"); + if (this.isTemplate == null) { + sb.append("null"); + } else { + sb.append(this.isTemplate); + } + first = false; sb.append(")"); return sb.toString(); } @@ -921,6 +998,14 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -9: // IS_TEMPLATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.isTemplate = iprot.readString(); + struct.setIsTemplateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -936,6 +1021,11 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.isTemplate != null) { + oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); + oprot.writeString(struct.isTemplate); + oprot.writeFieldEnd(); + } if (struct.userData != null) { oprot.writeFieldBegin(USER_DATA_FIELD_DESC); oprot.writeString(struct.userData); @@ -1018,7 +1108,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav if (struct.isSetUserData()) { optionals.set(7); } - oprot.writeBitSet(optionals, 8); + if (struct.isSetIsTemplate()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); if (struct.isSetId()) { oprot.writeString(struct.id); } @@ -1043,12 +1136,15 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav if (struct.isSetUserData()) { oprot.writeString(struct.userData); } + if (struct.isSetIsTemplate()) { + oprot.writeString(struct.isTemplate); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.id = iprot.readString(); struct.setIdIsSet(true); @@ -1081,6 +1177,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav struct.userData = iprot.readString(); struct.setUserDataIsSet(true); } + if (incoming.get(8)) { + struct.isTemplate = iprot.readString(); + struct.setIsTemplateIsSet(true); + } } } diff --git a/Dozentenmodulserver/src/main/java/server/Server.java b/Dozentenmodulserver/src/main/java/server/Server.java index 8e36bd49..ab527168 100644 --- a/Dozentenmodulserver/src/main/java/server/Server.java +++ b/Dozentenmodulserver/src/main/java/server/Server.java @@ -42,7 +42,7 @@ public class Server { public String getPathOfImage(String image_id, String version) throws org.apache.thrift.TException; - public boolean writeVLdata(String imagename, 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) throws org.apache.thrift.TException; + public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException; public List<Image> getImageList() throws org.apache.thrift.TException; @@ -60,13 +60,13 @@ public class Server { public Map<String,String> getImageData(String imageid, String imageversion) throws org.apache.thrift.TException; - public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode) throws org.apache.thrift.TException; + public Map<String,String> getLectureData(String lectureid) throws org.apache.thrift.TException; - public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException; + public boolean updateImageData(String name, String newName, String 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 org.apache.thrift.TException; public boolean deleteImageData(String id, String version) throws org.apache.thrift.TException; - public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException; + public 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 org.apache.thrift.TException; public boolean deleteImageServer(String id, String version) throws org.apache.thrift.TException; @@ -74,6 +74,14 @@ public class Server { public boolean deleteLecture(String id, String hs, String user) throws org.apache.thrift.TException; + public boolean checkUser(String username) throws org.apache.thrift.TException; + + public boolean createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException; + + public boolean writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException; + + public boolean writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -84,7 +92,7 @@ public class Server { public void getPathOfImage(String image_id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void writeVLdata(String imagename, 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, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImageList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -102,13 +110,13 @@ public class Server { public void getImageData(String imageid, String imageversion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getLectureData(String lectureid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteImageData(String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void 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, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteImageServer(String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -116,6 +124,14 @@ public class Server { public void deleteLecture(String id, String hs, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void checkUser(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createUser(String loginName, String lastName, String firstName, String mail, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -207,16 +223,17 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathOfImage failed: unknown result"); } - public boolean writeVLdata(String imagename, 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) throws org.apache.thrift.TException + public boolean writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException { - send_writeVLdata(imagename, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode); + send_writeVLdata(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os); return recv_writeVLdata(); } - public void send_writeVLdata(String imagename, 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) throws org.apache.thrift.TException + public void send_writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os) throws org.apache.thrift.TException { writeVLdata_args args = new writeVLdata_args(); args.setImagename(imagename); + args.setDesc(desc); args.setLogin(login); args.setFirstname(firstname); args.setLastname(lastname); @@ -232,6 +249,7 @@ public class Server { args.setIsTemplate(isTemplate); args.setFilesize(filesize); args.setShareMode(shareMode); + args.setOs(os); sendBase("writeVLdata", args); } @@ -440,17 +458,41 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result"); } - public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode) throws org.apache.thrift.TException + public Map<String,String> getLectureData(String lectureid) throws org.apache.thrift.TException + { + send_getLectureData(lectureid); + return recv_getLectureData(); + } + + public void send_getLectureData(String lectureid) throws org.apache.thrift.TException { - send_updateImageData(name, newName, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode); + getLectureData_args args = new getLectureData_args(); + args.setLectureid(lectureid); + sendBase("getLectureData", args); + } + + public Map<String,String> recv_getLectureData() throws org.apache.thrift.TException + { + getLectureData_result result = new getLectureData_result(); + receiveBase(result, "getLectureData"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result"); + } + + public boolean updateImageData(String name, String newName, String 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 org.apache.thrift.TException + { + send_updateImageData(name, newName, desc, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os); return recv_updateImageData(); } - public void send_updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode) throws org.apache.thrift.TException + public void send_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 org.apache.thrift.TException { updateImageData_args args = new updateImageData_args(); args.setName(name); args.setNewName(newName); + args.setDesc(desc); args.setImage_path(image_path); args.setLicense(license); args.setInternet(internet); @@ -461,6 +503,7 @@ public class Server { args.setIsTemplate(isTemplate); args.setFilesize(filesize); args.setShareMode(shareMode); + args.setOs(os); sendBase("updateImageData", args); } @@ -474,29 +517,6 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageData failed: unknown result"); } - public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException - { - send_getLectureData(lecturename); - return recv_getLectureData(); - } - - public void send_getLectureData(String lecturename) throws org.apache.thrift.TException - { - getLectureData_args args = new getLectureData_args(); - args.setLecturename(lecturename); - sendBase("getLectureData", args); - } - - public Map<String,String> recv_getLectureData() throws org.apache.thrift.TException - { - getLectureData_result result = new getLectureData_result(); - receiveBase(result, "getLectureData"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result"); - } - public boolean deleteImageData(String id, String version) throws org.apache.thrift.TException { send_deleteImageData(id, version); @@ -521,13 +541,13 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageData failed: unknown result"); } - public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + public 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 org.apache.thrift.TException { - send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id); + send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imageid, imageversion, user, firstname, lastname, university, Mail, Tel, Fak, id); return recv_updateLecturedata(); } - public void send_updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws org.apache.thrift.TException + public void send_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 org.apache.thrift.TException { updateLecturedata_args args = new updateLecturedata_args(); args.setName(name); @@ -537,7 +557,9 @@ public class Server { args.setStartDate(startDate); args.setEndDate(endDate); args.setIsActive(isActive); - args.setImagename(imagename); + args.setImageid(imageid); + args.setImageversion(imageversion); + args.setUser(user); args.setFirstname(firstname); args.setLastname(lastname); args.setUniversity(university); @@ -631,6 +653,114 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLecture failed: unknown result"); } + public boolean checkUser(String username) throws org.apache.thrift.TException + { + send_checkUser(username); + return recv_checkUser(); + } + + public void send_checkUser(String username) throws org.apache.thrift.TException + { + checkUser_args args = new checkUser_args(); + args.setUsername(username); + sendBase("checkUser", args); + } + + public boolean recv_checkUser() throws org.apache.thrift.TException + { + checkUser_result result = new checkUser_result(); + receiveBase(result, "checkUser"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkUser failed: unknown result"); + } + + public boolean createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException + { + send_createUser(loginName, lastName, firstName, mail, university); + return recv_createUser(); + } + + public void send_createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException + { + createUser_args args = new createUser_args(); + args.setLoginName(loginName); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + sendBase("createUser", args); + } + + public boolean recv_createUser() throws org.apache.thrift.TException + { + createUser_result result = new createUser_result(); + receiveBase(result, "createUser"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser failed: unknown result"); + } + + public boolean writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException + { + send_writeImageRights(imagename, username, lastName, firstName, mail, university, role); + return recv_writeImageRights(); + } + + public void send_writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException + { + writeImageRights_args args = new writeImageRights_args(); + args.setImagename(imagename); + args.setUsername(username); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + args.setRole(role); + sendBase("writeImageRights", args); + } + + public boolean recv_writeImageRights() throws org.apache.thrift.TException + { + writeImageRights_result result = new writeImageRights_result(); + receiveBase(result, "writeImageRights"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeImageRights failed: unknown result"); + } + + public boolean writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException + { + send_writeLectureRights(lecturename, username, lastName, firstName, mail, university, role); + return recv_writeLectureRights(); + } + + public void send_writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException + { + writeLectureRights_args args = new writeLectureRights_args(); + args.setLecturename(lecturename); + args.setUsername(username); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + args.setRole(role); + sendBase("writeLectureRights", args); + } + + public boolean recv_writeLectureRights() throws org.apache.thrift.TException + { + writeLectureRights_result result = new writeLectureRights_result(); + receiveBase(result, "writeLectureRights"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLectureRights failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { @@ -745,15 +875,16 @@ public class Server { } } - public void writeVLdata(String imagename, 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, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void writeVLdata(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - writeVLdata_call method_call = new writeVLdata_call(imagename, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, resultHandler, this, ___protocolFactory, ___transport); + writeVLdata_call method_call = new writeVLdata_call(imagename, desc, login, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class writeVLdata_call extends org.apache.thrift.async.TAsyncMethodCall { private String imagename; + private String desc; private String login; private String firstname; private String lastname; @@ -769,9 +900,11 @@ public class Server { private boolean isTemplate; private long filesize; private long shareMode; - public writeVLdata_call(String imagename, 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, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private String os; + public writeVLdata_call(String imagename, String desc, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.imagename = imagename; + this.desc = desc; this.login = login; this.firstname = firstname; this.lastname = lastname; @@ -787,12 +920,14 @@ public class Server { this.isTemplate = isTemplate; this.filesize = filesize; this.shareMode = shareMode; + this.os = os; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeVLdata", org.apache.thrift.protocol.TMessageType.CALL, 0)); writeVLdata_args args = new writeVLdata_args(); args.setImagename(imagename); + args.setDesc(desc); args.setLogin(login); args.setFirstname(firstname); args.setLastname(lastname); @@ -808,6 +943,7 @@ public class Server { args.setIsTemplate(isTemplate); args.setFilesize(filesize); args.setShareMode(shareMode); + args.setOs(os); args.write(prot); prot.writeMessageEnd(); } @@ -1111,9 +1247,41 @@ public class Server { } } - public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getLectureData(String lectureid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - updateImageData_call method_call = new updateImageData_call(name, newName, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, resultHandler, this, ___protocolFactory, ___transport); + getLectureData_call method_call = new getLectureData_call(lectureid, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLectureData_call extends org.apache.thrift.async.TAsyncMethodCall { + private String lectureid; + public getLectureData_call(String lectureid, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.lectureid = lectureid; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureData", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLectureData_args args = new getLectureData_args(); + args.setLectureid(lectureid); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map<String,String> getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getLectureData(); + } + } + + public void updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateImageData_call method_call = new updateImageData_call(name, newName, desc, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -1121,6 +1289,7 @@ public class Server { public static class updateImageData_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; private String newName; + private String desc; private String image_path; private boolean license; private boolean internet; @@ -1131,10 +1300,12 @@ public class Server { private boolean isTemplate; private long filesize; private long shareMode; - public updateImageData_call(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private String os; + public updateImageData_call(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, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.newName = newName; + this.desc = desc; this.image_path = image_path; this.license = license; this.internet = internet; @@ -1145,6 +1316,7 @@ public class Server { this.isTemplate = isTemplate; this.filesize = filesize; this.shareMode = shareMode; + this.os = os; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { @@ -1152,6 +1324,7 @@ public class Server { updateImageData_args args = new updateImageData_args(); args.setName(name); args.setNewName(newName); + args.setDesc(desc); args.setImage_path(image_path); args.setLicense(license); args.setInternet(internet); @@ -1162,6 +1335,7 @@ public class Server { args.setIsTemplate(isTemplate); args.setFilesize(filesize); args.setShareMode(shareMode); + args.setOs(os); args.write(prot); prot.writeMessageEnd(); } @@ -1176,38 +1350,6 @@ public class Server { } } - public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getLectureData_call method_call = new getLectureData_call(lecturename, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getLectureData_call extends org.apache.thrift.async.TAsyncMethodCall { - private String lecturename; - public getLectureData_call(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.lecturename = lecturename; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getLectureData_args args = new getLectureData_args(); - args.setLecturename(lecturename); - args.write(prot); - prot.writeMessageEnd(); - } - - public Map<String,String> getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getLectureData(); - } - } - public void deleteImageData(String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteImageData_call method_call = new deleteImageData_call(id, version, resultHandler, this, ___protocolFactory, ___transport); @@ -1243,9 +1385,9 @@ public class Server { } } - public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void 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, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - updateLecturedata_call method_call = new updateLecturedata_call(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, firstname, lastname, university, Mail, Tel, Fak, id, resultHandler, this, ___protocolFactory, ___transport); + updateLecturedata_call method_call = new updateLecturedata_call(name, newName, shortdesc, desc, startDate, endDate, isActive, imageid, imageversion, user, firstname, lastname, university, Mail, Tel, Fak, id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -1258,7 +1400,9 @@ public class Server { private String startDate; private String endDate; private boolean isActive; - private String imagename; + private String imageid; + private String imageversion; + private String user; private String firstname; private String lastname; private String university; @@ -1266,7 +1410,7 @@ public class Server { private String Tel; private String Fak; private String id; - public updateLecturedata_call(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public updateLecturedata_call(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, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.newName = newName; @@ -1275,7 +1419,9 @@ public class Server { this.startDate = startDate; this.endDate = endDate; this.isActive = isActive; - this.imagename = imagename; + this.imageid = imageid; + this.imageversion = imageversion; + this.user = user; this.firstname = firstname; this.lastname = lastname; this.university = university; @@ -1295,7 +1441,9 @@ public class Server { args.setStartDate(startDate); args.setEndDate(endDate); args.setIsActive(isActive); - args.setImagename(imagename); + args.setImageid(imageid); + args.setImageversion(imageversion); + args.setUser(user); args.setFirstname(firstname); args.setLastname(lastname); args.setUniversity(university); @@ -1425,6 +1573,182 @@ public class Server { } } + public void checkUser(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + checkUser_call method_call = new checkUser_call(username, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class checkUser_call extends org.apache.thrift.async.TAsyncMethodCall { + private String username; + public checkUser_call(String username, 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.username = username; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); + checkUser_args args = new checkUser_args(); + args.setUsername(username); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_checkUser(); + } + } + + public void createUser(String loginName, String lastName, String firstName, String mail, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createUser_call method_call = new createUser_call(loginName, lastName, firstName, mail, university, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall { + private String loginName; + private String lastName; + private String firstName; + private String mail; + private String university; + public createUser_call(String loginName, String lastName, String firstName, String mail, String university, 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.loginName = loginName; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createUser_args args = new createUser_args(); + args.setLoginName(loginName); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createUser(); + } + } + + public void writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + writeImageRights_call method_call = new writeImageRights_call(imagename, username, lastName, firstName, mail, university, role, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class writeImageRights_call extends org.apache.thrift.async.TAsyncMethodCall { + private String imagename; + private String username; + private String lastName; + private String firstName; + private String mail; + private String university; + private String role; + public writeImageRights_call(String imagename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.imagename = imagename; + this.username = username; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + this.role = role; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImageRights", org.apache.thrift.protocol.TMessageType.CALL, 0)); + writeImageRights_args args = new writeImageRights_args(); + args.setImagename(imagename); + args.setUsername(username); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + args.setRole(role); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_writeImageRights(); + } + } + + public void writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + writeLectureRights_call method_call = new writeLectureRights_call(lecturename, username, lastName, firstName, mail, university, role, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class writeLectureRights_call extends org.apache.thrift.async.TAsyncMethodCall { + private String lecturename; + private String username; + private String lastName; + private String firstName; + private String mail; + private String university; + private String role; + public writeLectureRights_call(String lecturename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.lecturename = lecturename; + this.username = username; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + this.role = role; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLectureRights", org.apache.thrift.protocol.TMessageType.CALL, 0)); + writeLectureRights_args args = new writeLectureRights_args(); + args.setLecturename(lecturename); + args.setUsername(username); + args.setLastName(lastName); + args.setFirstName(firstName); + args.setMail(mail); + args.setUniversity(university); + args.setRole(role); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_writeLectureRights(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -1450,13 +1774,17 @@ public class Server { processMap.put("writeLecturedata", new writeLecturedata()); processMap.put("startFileCopy", new startFileCopy()); processMap.put("getImageData", new getImageData()); - processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateImageData", new updateImageData()); processMap.put("deleteImageData", new deleteImageData()); processMap.put("updateLecturedata", new updateLecturedata()); processMap.put("deleteImageServer", new deleteImageServer()); processMap.put("connectedToLecture", new connectedToLecture()); processMap.put("deleteLecture", new deleteLecture()); + processMap.put("checkUser", new checkUser()); + processMap.put("createUser", new createUser()); + processMap.put("writeImageRights", new writeImageRights()); + processMap.put("writeLectureRights", new writeLectureRights()); return processMap; } @@ -1536,7 +1864,7 @@ public class Server { public writeVLdata_result getResult(I iface, writeVLdata_args args) throws org.apache.thrift.TException { writeVLdata_result result = new writeVLdata_result(); - result.success = iface.writeVLdata(args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode); + result.success = iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os); result.setSuccessIsSet(true); return result; } @@ -1704,43 +2032,43 @@ public class Server { } } - public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> { - public updateImageData() { - super("updateImageData"); + public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> { + public getLectureData() { + super("getLectureData"); } - public updateImageData_args getEmptyArgsInstance() { - return new updateImageData_args(); + public getLectureData_args getEmptyArgsInstance() { + return new getLectureData_args(); } protected boolean isOneway() { return false; } - public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException { - updateImageData_result result = new updateImageData_result(); - result.success = iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode); - result.setSuccessIsSet(true); + public getLectureData_result getResult(I iface, getLectureData_args args) throws org.apache.thrift.TException { + getLectureData_result result = new getLectureData_result(); + result.success = iface.getLectureData(args.lectureid); return result; } } - public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> { - public getLectureData() { - super("getLectureData"); + public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> { + public updateImageData() { + super("updateImageData"); } - public getLectureData_args getEmptyArgsInstance() { - return new getLectureData_args(); + public updateImageData_args getEmptyArgsInstance() { + return new updateImageData_args(); } protected boolean isOneway() { return false; } - public getLectureData_result getResult(I iface, getLectureData_args args) throws org.apache.thrift.TException { - getLectureData_result result = new getLectureData_result(); - result.success = iface.getLectureData(args.lecturename); + public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException { + updateImageData_result result = new updateImageData_result(); + result.success = iface.updateImageData(args.name, args.newName, args.desc, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os); + result.setSuccessIsSet(true); return result; } } @@ -1781,7 +2109,7 @@ public class Server { public updateLecturedata_result getResult(I iface, updateLecturedata_args args) throws org.apache.thrift.TException { updateLecturedata_result result = new updateLecturedata_result(); - result.success = iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id); + result.success = iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imageid, args.imageversion, args.user, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id); result.setSuccessIsSet(true); return result; } @@ -1850,6 +2178,90 @@ public class Server { } } + public static class checkUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkUser_args> { + public checkUser() { + super("checkUser"); + } + + public checkUser_args getEmptyArgsInstance() { + return new checkUser_args(); + } + + protected boolean isOneway() { + return false; + } + + public checkUser_result getResult(I iface, checkUser_args args) throws org.apache.thrift.TException { + checkUser_result result = new checkUser_result(); + result.success = iface.checkUser(args.username); + result.setSuccessIsSet(true); + return result; + } + } + + public static class createUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createUser_args> { + public createUser() { + super("createUser"); + } + + public createUser_args getEmptyArgsInstance() { + return new createUser_args(); + } + + protected boolean isOneway() { + return false; + } + + public createUser_result getResult(I iface, createUser_args args) throws org.apache.thrift.TException { + createUser_result result = new createUser_result(); + result.success = iface.createUser(args.loginName, args.lastName, args.firstName, args.mail, args.university); + result.setSuccessIsSet(true); + return result; + } + } + + public static class writeImageRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeImageRights_args> { + public writeImageRights() { + super("writeImageRights"); + } + + public writeImageRights_args getEmptyArgsInstance() { + return new writeImageRights_args(); + } + + protected boolean isOneway() { + return false; + } + + public writeImageRights_result getResult(I iface, writeImageRights_args args) throws org.apache.thrift.TException { + writeImageRights_result result = new writeImageRights_result(); + result.success = iface.writeImageRights(args.imagename, args.username, args.lastName, args.firstName, args.mail, args.university, args.role); + result.setSuccessIsSet(true); + return result; + } + } + + public static class writeLectureRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeLectureRights_args> { + public writeLectureRights() { + super("writeLectureRights"); + } + + public writeLectureRights_args getEmptyArgsInstance() { + return new writeLectureRights_args(); + } + + protected boolean isOneway() { + return false; + } + + public writeLectureRights_result getResult(I iface, writeLectureRights_args args) throws org.apache.thrift.TException { + writeLectureRights_result result = new writeLectureRights_result(); + result.success = iface.writeLectureRights(args.lecturename, args.username, args.lastName, args.firstName, args.mail, args.university, args.role); + result.setSuccessIsSet(true); + return result; + } + } + } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { @@ -1875,13 +2287,17 @@ public class Server { processMap.put("writeLecturedata", new writeLecturedata()); processMap.put("startFileCopy", new startFileCopy()); processMap.put("getImageData", new getImageData()); - processMap.put("updateImageData", new updateImageData()); processMap.put("getLectureData", new getLectureData()); + processMap.put("updateImageData", new updateImageData()); processMap.put("deleteImageData", new deleteImageData()); processMap.put("updateLecturedata", new updateLecturedata()); processMap.put("deleteImageServer", new deleteImageServer()); processMap.put("connectedToLecture", new connectedToLecture()); processMap.put("deleteLecture", new deleteLecture()); + processMap.put("checkUser", new checkUser()); + processMap.put("createUser", new createUser()); + processMap.put("writeImageRights", new writeImageRights()); + processMap.put("writeLectureRights", new writeLectureRights()); return processMap; } @@ -2087,7 +2503,7 @@ public class Server { } public void start(I iface, writeVLdata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.writeVLdata(args.imagename, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode,resultHandler); + iface.writeVLdata(args.imagename, args.desc, args.login, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os,resultHandler); } } @@ -2501,22 +2917,21 @@ public class Server { } } - public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> { - public updateImageData() { - super("updateImageData"); + public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> { + public getLectureData() { + super("getLectureData"); } - public updateImageData_args getEmptyArgsInstance() { - return new updateImageData_args(); + public getLectureData_args getEmptyArgsInstance() { + return new getLectureData_args(); } - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - updateImageData_result result = new updateImageData_result(); + return new AsyncMethodCallback<Map<String,String>>() { + public void onComplete(Map<String,String> o) { + getLectureData_result result = new getLectureData_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2528,7 +2943,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - updateImageData_result result = new updateImageData_result(); + getLectureData_result result = new getLectureData_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -2548,26 +2963,27 @@ public class Server { return false; } - public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode,resultHandler); + public void start(I iface, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { + iface.getLectureData(args.lectureid,resultHandler); } } - public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> { - public getLectureData() { - super("getLectureData"); + public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> { + public updateImageData() { + super("updateImageData"); } - public getLectureData_args getEmptyArgsInstance() { - return new getLectureData_args(); + public updateImageData_args getEmptyArgsInstance() { + return new updateImageData_args(); } - public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Map<String,String>>() { - public void onComplete(Map<String,String> o) { - getLectureData_result result = new getLectureData_result(); + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + updateImageData_result result = new updateImageData_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -2579,7 +2995,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getLectureData_result result = new getLectureData_result(); + updateImageData_result result = new updateImageData_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -2599,8 +3015,8 @@ public class Server { return false; } - public void start(I iface, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { - iface.getLectureData(args.lecturename,resultHandler); + public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.updateImageData(args.name, args.newName, args.desc, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os,resultHandler); } } @@ -2704,7 +3120,7 @@ public class Server { } public void start(I iface, updateLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id,resultHandler); + iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imageid, args.imageversion, args.user, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.id,resultHandler); } } @@ -2864,6 +3280,214 @@ public class Server { } } + public static class checkUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkUser_args, Boolean> { + public checkUser() { + super("checkUser"); + } + + public checkUser_args getEmptyArgsInstance() { + return new checkUser_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + checkUser_result result = new checkUser_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + checkUser_result result = new checkUser_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, checkUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.checkUser(args.username,resultHandler); + } + } + + public static class createUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createUser_args, Boolean> { + public createUser() { + super("createUser"); + } + + public createUser_args getEmptyArgsInstance() { + return new createUser_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + createUser_result result = new createUser_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createUser_result result = new createUser_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, createUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.createUser(args.loginName, args.lastName, args.firstName, args.mail, args.university,resultHandler); + } + } + + public static class writeImageRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeImageRights_args, Boolean> { + public writeImageRights() { + super("writeImageRights"); + } + + public writeImageRights_args getEmptyArgsInstance() { + return new writeImageRights_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + writeImageRights_result result = new writeImageRights_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + writeImageRights_result result = new writeImageRights_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, writeImageRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.writeImageRights(args.imagename, args.username, args.lastName, args.firstName, args.mail, args.university, args.role,resultHandler); + } + } + + public static class writeLectureRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeLectureRights_args, Boolean> { + public writeLectureRights() { + super("writeLectureRights"); + } + + public writeLectureRights_args getEmptyArgsInstance() { + return new writeLectureRights_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + writeLectureRights_result result = new writeLectureRights_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + writeLectureRights_result result = new writeLectureRights_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, writeLectureRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.writeLectureRights(args.lecturename, args.username, args.lastName, args.firstName, args.mail, args.university, args.role,resultHandler); + } + } + } public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> { @@ -4991,21 +5615,23 @@ public class Server { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeVLdata_args"); private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-1); - private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)-2); - private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-3); - private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-4); - private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-5); - private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-6); - private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-7); - private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-8); - private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-9); - private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-10); - private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-11); - private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-12); - private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("imagePath", org.apache.thrift.protocol.TType.STRING, (short)-13); - private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-14); - private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)-15); - private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)-16); + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-6); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-7); + private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-10); + private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-11); + private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-12); + private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-13); + private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("imagePath", org.apache.thrift.protocol.TType.STRING, (short)-14); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-15); + private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)-16); + private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)-17); + private static final org.apache.thrift.protocol.TField OS_FIELD_DESC = new org.apache.thrift.protocol.TField("os", org.apache.thrift.protocol.TType.STRING, (short)-18); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -5014,6 +5640,7 @@ public class Server { } public String imagename; // required + public String desc; // required public String login; // required public String firstname; // required public String lastname; // required @@ -5029,25 +5656,28 @@ public class Server { public boolean isTemplate; // required public long filesize; // required public long shareMode; // required + public String os; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IMAGENAME((short)-1, "imagename"), - LOGIN((short)-2, "login"), - FIRSTNAME((short)-3, "firstname"), - LASTNAME((short)-4, "lastname"), - UNIVERSITY((short)-5, "university"), - MAIL((short)-6, "Mail"), - TEL((short)-7, "Tel"), - FAK((short)-8, "Fak"), - LICENSE((short)-9, "license"), - INTERNET((short)-10, "internet"), - RAM((short)-11, "ram"), - CPU((short)-12, "cpu"), - IMAGE_PATH((short)-13, "imagePath"), - IS_TEMPLATE((short)-14, "isTemplate"), - FILESIZE((short)-15, "filesize"), - SHARE_MODE((short)-16, "shareMode"); + DESC((short)-2, "desc"), + LOGIN((short)-3, "login"), + FIRSTNAME((short)-4, "firstname"), + LASTNAME((short)-5, "lastname"), + UNIVERSITY((short)-6, "university"), + MAIL((short)-7, "Mail"), + TEL((short)-8, "Tel"), + FAK((short)-9, "Fak"), + LICENSE((short)-10, "license"), + INTERNET((short)-11, "internet"), + RAM((short)-12, "ram"), + CPU((short)-13, "cpu"), + IMAGE_PATH((short)-14, "imagePath"), + IS_TEMPLATE((short)-15, "isTemplate"), + FILESIZE((short)-16, "filesize"), + SHARE_MODE((short)-17, "shareMode"), + OS((short)-18, "os"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -5064,36 +5694,40 @@ public class Server { switch(fieldId) { case -1: // IMAGENAME return IMAGENAME; - case -2: // LOGIN + case -2: // DESC + return DESC; + case -3: // LOGIN return LOGIN; - case -3: // FIRSTNAME + case -4: // FIRSTNAME return FIRSTNAME; - case -4: // LASTNAME + case -5: // LASTNAME return LASTNAME; - case -5: // UNIVERSITY + case -6: // UNIVERSITY return UNIVERSITY; - case -6: // MAIL + case -7: // MAIL return MAIL; - case -7: // TEL + case -8: // TEL return TEL; - case -8: // FAK + case -9: // FAK return FAK; - case -9: // LICENSE + case -10: // LICENSE return LICENSE; - case -10: // INTERNET + case -11: // INTERNET return INTERNET; - case -11: // RAM + case -12: // RAM return RAM; - case -12: // CPU + case -13: // CPU return CPU; - case -13: // IMAGE_PATH + case -14: // IMAGE_PATH return IMAGE_PATH; - case -14: // IS_TEMPLATE + case -15: // IS_TEMPLATE return IS_TEMPLATE; - case -15: // FILESIZE + case -16: // FILESIZE return FILESIZE; - case -16: // SHARE_MODE + case -17: // SHARE_MODE return SHARE_MODE; + case -18: // OS + return OS; default: return null; } @@ -5147,6 +5781,8 @@ 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.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FIRSTNAME, new org.apache.thrift.meta_data.FieldMetaData("firstname", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -5177,6 +5813,8 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.OS, new org.apache.thrift.meta_data.FieldMetaData("os", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeVLdata_args.class, metaDataMap); } @@ -5186,6 +5824,7 @@ public class Server { public writeVLdata_args( String imagename, + String desc, String login, String firstname, String lastname, @@ -5200,10 +5839,12 @@ public class Server { String imagePath, boolean isTemplate, long filesize, - long shareMode) + long shareMode, + String os) { this(); this.imagename = imagename; + this.desc = desc; this.login = login; this.firstname = firstname; this.lastname = lastname; @@ -5226,6 +5867,7 @@ public class Server { setFilesizeIsSet(true); this.shareMode = shareMode; setShareModeIsSet(true); + this.os = os; } /** @@ -5236,6 +5878,9 @@ public class Server { if (other.isSetImagename()) { this.imagename = other.imagename; } + if (other.isSetDesc()) { + this.desc = other.desc; + } if (other.isSetLogin()) { this.login = other.login; } @@ -5267,6 +5912,9 @@ public class Server { this.isTemplate = other.isTemplate; this.filesize = other.filesize; this.shareMode = other.shareMode; + if (other.isSetOs()) { + this.os = other.os; + } } public writeVLdata_args deepCopy() { @@ -5276,6 +5924,7 @@ public class Server { @Override public void clear() { this.imagename = null; + this.desc = null; this.login = null; this.firstname = null; this.lastname = null; @@ -5298,6 +5947,7 @@ public class Server { this.filesize = 0; setShareModeIsSet(false); this.shareMode = 0; + this.os = null; } public String getImagename() { @@ -5324,6 +5974,30 @@ public class Server { } } + public String getDesc() { + return this.desc; + } + + public writeVLdata_args setDesc(String desc) { + this.desc = desc; + return this; + } + + public void unsetDesc() { + this.desc = null; + } + + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; + } + + public void setDescIsSet(boolean value) { + if (!value) { + this.desc = null; + } + } + public String getLogin() { return this.login; } @@ -5677,6 +6351,30 @@ public class Server { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value); } + public String getOs() { + return this.os; + } + + public writeVLdata_args setOs(String os) { + this.os = os; + return this; + } + + public void unsetOs() { + this.os = null; + } + + /** Returns true if field os is set (has been assigned a value) and false otherwise */ + public boolean isSetOs() { + return this.os != null; + } + + public void setOsIsSet(boolean value) { + if (!value) { + this.os = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case IMAGENAME: @@ -5687,6 +6385,14 @@ public class Server { } break; + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + case LOGIN: if (value == null) { unsetLogin(); @@ -5807,6 +6513,14 @@ public class Server { } break; + case OS: + if (value == null) { + unsetOs(); + } else { + setOs((String)value); + } + break; + } } @@ -5815,6 +6529,9 @@ public class Server { case IMAGENAME: return getImagename(); + case DESC: + return getDesc(); + case LOGIN: return getLogin(); @@ -5860,6 +6577,9 @@ public class Server { case SHARE_MODE: return Long.valueOf(getShareMode()); + case OS: + return getOs(); + } throw new IllegalStateException(); } @@ -5873,6 +6593,8 @@ public class Server { switch (field) { case IMAGENAME: return isSetImagename(); + case DESC: + return isSetDesc(); case LOGIN: return isSetLogin(); case FIRSTNAME: @@ -5903,6 +6625,8 @@ public class Server { return isSetFilesize(); case SHARE_MODE: return isSetShareMode(); + case OS: + return isSetOs(); } throw new IllegalStateException(); } @@ -5929,6 +6653,15 @@ public class Server { return false; } + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) + return false; + if (!this.desc.equals(that.desc)) + return false; + } + boolean this_present_login = true && this.isSetLogin(); boolean that_present_login = true && that.isSetLogin(); if (this_present_login || that_present_login) { @@ -6064,6 +6797,15 @@ public class Server { return false; } + boolean this_present_os = true && this.isSetOs(); + boolean that_present_os = true && that.isSetOs(); + if (this_present_os || that_present_os) { + if (!(this_present_os && that_present_os)) + return false; + if (!this.os.equals(that.os)) + return false; + } + return true; } @@ -6090,6 +6832,16 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin()); if (lastComparison != 0) { return lastComparison; @@ -6240,6 +6992,16 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -6268,6 +7030,14 @@ public class Server { } first = false; if (!first) sb.append(", "); + sb.append("desc:"); + if (this.desc == null) { + sb.append("null"); + } else { + sb.append(this.desc); + } + first = false; + if (!first) sb.append(", "); sb.append("login:"); if (this.login == null) { sb.append("null"); @@ -6359,6 +7129,14 @@ public class Server { sb.append("shareMode:"); sb.append(this.shareMode); first = false; + if (!first) sb.append(", "); + sb.append("os:"); + if (this.os == null) { + sb.append("null"); + } else { + sb.append(this.os); + } + first = false; sb.append(")"); return sb.toString(); } @@ -6412,7 +7190,15 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -2: // LOGIN + case -2: // DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // LOGIN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.login = iprot.readString(); struct.setLoginIsSet(true); @@ -6420,7 +7206,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -3: // FIRSTNAME + case -4: // FIRSTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.firstname = iprot.readString(); struct.setFirstnameIsSet(true); @@ -6428,7 +7214,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -4: // LASTNAME + case -5: // LASTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.lastname = iprot.readString(); struct.setLastnameIsSet(true); @@ -6436,7 +7222,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -5: // UNIVERSITY + case -6: // UNIVERSITY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.university = iprot.readString(); struct.setUniversityIsSet(true); @@ -6444,7 +7230,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -6: // MAIL + case -7: // MAIL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Mail = iprot.readString(); struct.setMailIsSet(true); @@ -6452,7 +7238,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -7: // TEL + case -8: // TEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Tel = iprot.readString(); struct.setTelIsSet(true); @@ -6460,7 +7246,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -8: // FAK + case -9: // FAK if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Fak = iprot.readString(); struct.setFakIsSet(true); @@ -6468,7 +7254,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -9: // LICENSE + case -10: // LICENSE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.license = iprot.readBool(); struct.setLicenseIsSet(true); @@ -6476,7 +7262,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -10: // INTERNET + case -11: // INTERNET if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.internet = iprot.readBool(); struct.setInternetIsSet(true); @@ -6484,7 +7270,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -11: // RAM + case -12: // RAM if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.ram = iprot.readI64(); struct.setRamIsSet(true); @@ -6492,7 +7278,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -12: // CPU + case -13: // CPU if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); @@ -6500,7 +7286,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -13: // IMAGE_PATH + case -14: // IMAGE_PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imagePath = iprot.readString(); struct.setImagePathIsSet(true); @@ -6508,7 +7294,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -14: // IS_TEMPLATE + case -15: // IS_TEMPLATE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isTemplate = iprot.readBool(); struct.setIsTemplateIsSet(true); @@ -6516,7 +7302,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -15: // FILESIZE + case -16: // FILESIZE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.filesize = iprot.readI64(); struct.setFilesizeIsSet(true); @@ -6524,7 +7310,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -16: // SHARE_MODE + case -17: // SHARE_MODE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.shareMode = iprot.readI64(); struct.setShareModeIsSet(true); @@ -6532,6 +7318,14 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -18: // OS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.os = iprot.readString(); + struct.setOsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6547,6 +7341,11 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.os != null) { + oprot.writeFieldBegin(OS_FIELD_DESC); + oprot.writeString(struct.os); + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC); oprot.writeI64(struct.shareMode); oprot.writeFieldEnd(); @@ -6608,6 +7407,11 @@ public class Server { oprot.writeString(struct.login); oprot.writeFieldEnd(); } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } if (struct.imagename != null) { oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); oprot.writeString(struct.imagename); @@ -6634,55 +7438,64 @@ public class Server { if (struct.isSetImagename()) { optionals.set(0); } - if (struct.isSetLogin()) { + if (struct.isSetDesc()) { optionals.set(1); } - if (struct.isSetFirstname()) { + if (struct.isSetLogin()) { optionals.set(2); } - if (struct.isSetLastname()) { + if (struct.isSetFirstname()) { optionals.set(3); } - if (struct.isSetUniversity()) { + if (struct.isSetLastname()) { optionals.set(4); } - if (struct.isSetMail()) { + if (struct.isSetUniversity()) { optionals.set(5); } - if (struct.isSetTel()) { + if (struct.isSetMail()) { optionals.set(6); } - if (struct.isSetFak()) { + if (struct.isSetTel()) { optionals.set(7); } - if (struct.isSetLicense()) { + if (struct.isSetFak()) { optionals.set(8); } - if (struct.isSetInternet()) { + if (struct.isSetLicense()) { optionals.set(9); } - if (struct.isSetRam()) { + if (struct.isSetInternet()) { optionals.set(10); } - if (struct.isSetCpu()) { + if (struct.isSetRam()) { optionals.set(11); } - if (struct.isSetImagePath()) { + if (struct.isSetCpu()) { optionals.set(12); } - if (struct.isSetIsTemplate()) { + if (struct.isSetImagePath()) { optionals.set(13); } - if (struct.isSetFilesize()) { + if (struct.isSetIsTemplate()) { optionals.set(14); } - if (struct.isSetShareMode()) { + if (struct.isSetFilesize()) { optionals.set(15); } - oprot.writeBitSet(optionals, 16); + if (struct.isSetShareMode()) { + optionals.set(16); + } + if (struct.isSetOs()) { + optionals.set(17); + } + oprot.writeBitSet(optionals, 18); if (struct.isSetImagename()) { oprot.writeString(struct.imagename); } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } if (struct.isSetLogin()) { oprot.writeString(struct.login); } @@ -6728,76 +7541,87 @@ public class Server { if (struct.isSetShareMode()) { oprot.writeI64(struct.shareMode); } + if (struct.isSetOs()) { + oprot.writeString(struct.os); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, writeVLdata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(16); + BitSet incoming = iprot.readBitSet(18); if (incoming.get(0)) { struct.imagename = iprot.readString(); struct.setImagenameIsSet(true); } if (incoming.get(1)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(2)) { struct.login = iprot.readString(); struct.setLoginIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(3)) { struct.firstname = iprot.readString(); struct.setFirstnameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.lastname = iprot.readString(); struct.setLastnameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.university = iprot.readString(); struct.setUniversityIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.Mail = iprot.readString(); struct.setMailIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.Tel = iprot.readString(); struct.setTelIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.Fak = iprot.readString(); struct.setFakIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(9)) { struct.license = iprot.readBool(); struct.setLicenseIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(10)) { struct.internet = iprot.readBool(); struct.setInternetIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(11)) { struct.ram = iprot.readI64(); struct.setRamIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(12)) { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(13)) { struct.imagePath = iprot.readString(); struct.setImagePathIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(14)) { struct.isTemplate = iprot.readBool(); struct.setIsTemplateIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(15)) { struct.filesize = iprot.readI64(); struct.setFilesizeIsSet(true); } - if (incoming.get(15)) { + if (incoming.get(16)) { struct.shareMode = iprot.readI64(); struct.setShareModeIsSet(true); } + if (incoming.get(17)) { + struct.os = iprot.readString(); + struct.setOsIsSet(true); + } } } @@ -14197,21 +15021,783 @@ public class Server { } + public static class getLectureData_args implements org.apache.thrift.TBase<getLectureData_args, getLectureData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args"); + + private static final org.apache.thrift.protocol.TField LECTUREID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureid", org.apache.thrift.protocol.TType.STRING, (short)-1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory()); + } + + public String lectureid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LECTUREID((short)-1, "lectureid"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // LECTUREID + return LECTUREID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LECTUREID, new org.apache.thrift.meta_data.FieldMetaData("lectureid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_args.class, metaDataMap); + } + + public getLectureData_args() { + } + + public getLectureData_args( + String lectureid) + { + this(); + this.lectureid = lectureid; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getLectureData_args(getLectureData_args other) { + if (other.isSetLectureid()) { + this.lectureid = other.lectureid; + } + } + + public getLectureData_args deepCopy() { + return new getLectureData_args(this); + } + + @Override + public void clear() { + this.lectureid = null; + } + + public String getLectureid() { + return this.lectureid; + } + + public getLectureData_args setLectureid(String lectureid) { + this.lectureid = lectureid; + return this; + } + + public void unsetLectureid() { + this.lectureid = null; + } + + /** Returns true if field lectureid is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureid() { + return this.lectureid != null; + } + + public void setLectureidIsSet(boolean value) { + if (!value) { + this.lectureid = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LECTUREID: + if (value == null) { + unsetLectureid(); + } else { + setLectureid((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LECTUREID: + return getLectureid(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LECTUREID: + return isSetLectureid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureData_args) + return this.equals((getLectureData_args)that); + return false; + } + + public boolean equals(getLectureData_args that) { + if (that == null) + return false; + + boolean this_present_lectureid = true && this.isSetLectureid(); + boolean that_present_lectureid = true && that.isSetLectureid(); + if (this_present_lectureid || that_present_lectureid) { + if (!(this_present_lectureid && that_present_lectureid)) + return false; + if (!this.lectureid.equals(that.lectureid)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureData_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLectureid()).compareTo(other.isSetLectureid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureid, other.lectureid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureData_args("); + boolean first = true; + + sb.append("lectureid:"); + if (this.lectureid == null) { + sb.append("null"); + } else { + sb.append(this.lectureid); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureData_argsStandardSchemeFactory implements SchemeFactory { + public getLectureData_argsStandardScheme getScheme() { + return new getLectureData_argsStandardScheme(); + } + } + + private static class getLectureData_argsStandardScheme extends StandardScheme<getLectureData_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // LECTUREID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureid = iprot.readString(); + struct.setLectureidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.lectureid != null) { + oprot.writeFieldBegin(LECTUREID_FIELD_DESC); + oprot.writeString(struct.lectureid); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory { + public getLectureData_argsTupleScheme getScheme() { + return new getLectureData_argsTupleScheme(); + } + } + + private static class getLectureData_argsTupleScheme extends TupleScheme<getLectureData_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLectureid()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetLectureid()) { + oprot.writeString(struct.lectureid); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.lectureid = iprot.readString(); + struct.setLectureidIsSet(true); + } + } + } + + } + + public static class getLectureData_result implements org.apache.thrift.TBase<getLectureData_result, getLectureData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory()); + } + + public Map<String,String> success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap); + } + + public getLectureData_result() { + } + + public getLectureData_result( + Map<String,String> success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getLectureData_result(getLectureData_result other) { + if (other.isSetSuccess()) { + Map<String,String> __this__success = new HashMap<String,String>(other.success); + this.success = __this__success; + } + } + + public getLectureData_result deepCopy() { + return new getLectureData_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap<String,String>(); + } + this.success.put(key, val); + } + + public Map<String,String> getSuccess() { + return this.success; + } + + public getLectureData_result setSuccess(Map<String,String> success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map<String,String>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureData_result) + return this.equals((getLectureData_result)that); + return false; + } + + public boolean equals(getLectureData_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureData_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureData_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureData_resultStandardSchemeFactory implements SchemeFactory { + public getLectureData_resultStandardScheme getScheme() { + return new getLectureData_resultStandardScheme(); + } + } + + private static class getLectureData_resultStandardScheme extends StandardScheme<getLectureData_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin(); + struct.success = new HashMap<String,String>(2*_map52.size); + for (int _i53 = 0; _i53 < _map52.size; ++_i53) + { + String _key54; + String _val55; + _key54 = iprot.readString(); + _val55 = iprot.readString(); + struct.success.put(_key54, _val55); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (Map.Entry<String, String> _iter56 : struct.success.entrySet()) + { + oprot.writeString(_iter56.getKey()); + oprot.writeString(_iter56.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory { + public getLectureData_resultTupleScheme getScheme() { + return new getLectureData_resultTupleScheme(); + } + } + + private static class getLectureData_resultTupleScheme extends TupleScheme<getLectureData_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry<String, String> _iter57 : struct.success.entrySet()) + { + oprot.writeString(_iter57.getKey()); + oprot.writeString(_iter57.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap<String,String>(2*_map58.size); + for (int _i59 = 0; _i59 < _map58.size; ++_i59) + { + String _key60; + String _val61; + _key60 = iprot.readString(); + _val61 = iprot.readString(); + struct.success.put(_key60, _val61); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + public static class updateImageData_args implements org.apache.thrift.TBase<updateImageData_args, updateImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1); private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2); - private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)-3); - private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-4); - private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-5); - private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-6); - private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-7); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-8); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-9); - private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-10); - private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)-11); - private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)-12); + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-5); + private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-6); + private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-7); + private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-8); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-10); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)-11); + private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)-12); + private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)-13); + private static final org.apache.thrift.protocol.TField OS_FIELD_DESC = new org.apache.thrift.protocol.TField("os", org.apache.thrift.protocol.TType.STRING, (short)-14); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -14221,6 +15807,7 @@ public class Server { public String name; // required public String newName; // required + public String desc; // required public String image_path; // required public boolean license; // required public boolean internet; // required @@ -14231,21 +15818,24 @@ public class Server { public boolean isTemplate; // required public long filesize; // required public long shareMode; // required + public String os; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)-1, "name"), NEW_NAME((short)-2, "newName"), - IMAGE_PATH((short)-3, "image_path"), - LICENSE((short)-4, "license"), - INTERNET((short)-5, "internet"), - RAM((short)-6, "ram"), - CPU((short)-7, "cpu"), - ID((short)-8, "id"), - VERSION((short)-9, "version"), - IS_TEMPLATE((short)-10, "isTemplate"), - FILESIZE((short)-11, "filesize"), - SHARE_MODE((short)-12, "shareMode"); + DESC((short)-3, "desc"), + IMAGE_PATH((short)-4, "image_path"), + LICENSE((short)-5, "license"), + INTERNET((short)-6, "internet"), + RAM((short)-7, "ram"), + CPU((short)-8, "cpu"), + ID((short)-9, "id"), + VERSION((short)-10, "version"), + IS_TEMPLATE((short)-11, "isTemplate"), + FILESIZE((short)-12, "filesize"), + SHARE_MODE((short)-13, "shareMode"), + OS((short)-14, "os"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -14264,26 +15854,30 @@ public class Server { return NAME; case -2: // NEW_NAME return NEW_NAME; - case -3: // IMAGE_PATH + case -3: // DESC + return DESC; + case -4: // IMAGE_PATH return IMAGE_PATH; - case -4: // LICENSE + case -5: // LICENSE return LICENSE; - case -5: // INTERNET + case -6: // INTERNET return INTERNET; - case -6: // RAM + case -7: // RAM return RAM; - case -7: // CPU + case -8: // CPU return CPU; - case -8: // ID + case -9: // ID return ID; - case -9: // VERSION + case -10: // VERSION return VERSION; - case -10: // IS_TEMPLATE + case -11: // IS_TEMPLATE return IS_TEMPLATE; - case -11: // FILESIZE + case -12: // FILESIZE return FILESIZE; - case -12: // SHARE_MODE + case -13: // SHARE_MODE return SHARE_MODE; + case -14: // OS + return OS; default: return null; } @@ -14339,6 +15933,8 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -14359,6 +15955,8 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.OS, new org.apache.thrift.meta_data.FieldMetaData("os", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_args.class, metaDataMap); } @@ -14369,6 +15967,7 @@ public class Server { public updateImageData_args( String name, String newName, + String desc, String image_path, boolean license, boolean internet, @@ -14378,11 +15977,13 @@ public class Server { String version, boolean isTemplate, long filesize, - long shareMode) + long shareMode, + String os) { this(); this.name = name; this.newName = newName; + this.desc = desc; this.image_path = image_path; this.license = license; setLicenseIsSet(true); @@ -14400,6 +16001,7 @@ public class Server { setFilesizeIsSet(true); this.shareMode = shareMode; setShareModeIsSet(true); + this.os = os; } /** @@ -14413,6 +16015,9 @@ public class Server { if (other.isSetNewName()) { this.newName = other.newName; } + if (other.isSetDesc()) { + this.desc = other.desc; + } if (other.isSetImage_path()) { this.image_path = other.image_path; } @@ -14429,6 +16034,9 @@ public class Server { this.isTemplate = other.isTemplate; this.filesize = other.filesize; this.shareMode = other.shareMode; + if (other.isSetOs()) { + this.os = other.os; + } } public updateImageData_args deepCopy() { @@ -14439,6 +16047,7 @@ public class Server { public void clear() { this.name = null; this.newName = null; + this.desc = null; this.image_path = null; setLicenseIsSet(false); this.license = false; @@ -14456,6 +16065,7 @@ public class Server { this.filesize = 0; setShareModeIsSet(false); this.shareMode = 0; + this.os = null; } public String getName() { @@ -14506,6 +16116,30 @@ public class Server { } } + public String getDesc() { + return this.desc; + } + + public updateImageData_args setDesc(String desc) { + this.desc = desc; + return this; + } + + public void unsetDesc() { + this.desc = null; + } + + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; + } + + public void setDescIsSet(boolean value) { + if (!value) { + this.desc = null; + } + } + public String getImage_path() { return this.image_path; } @@ -14739,6 +16373,30 @@ public class Server { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value); } + public String getOs() { + return this.os; + } + + public updateImageData_args setOs(String os) { + this.os = os; + return this; + } + + public void unsetOs() { + this.os = null; + } + + /** Returns true if field os is set (has been assigned a value) and false otherwise */ + public boolean isSetOs() { + return this.os != null; + } + + public void setOsIsSet(boolean value) { + if (!value) { + this.os = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: @@ -14757,6 +16415,14 @@ public class Server { } break; + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + case IMAGE_PATH: if (value == null) { unsetImage_path(); @@ -14837,6 +16503,14 @@ public class Server { } break; + case OS: + if (value == null) { + unsetOs(); + } else { + setOs((String)value); + } + break; + } } @@ -14848,6 +16522,9 @@ public class Server { case NEW_NAME: return getNewName(); + case DESC: + return getDesc(); + case IMAGE_PATH: return getImage_path(); @@ -14878,6 +16555,9 @@ public class Server { case SHARE_MODE: return Long.valueOf(getShareMode()); + case OS: + return getOs(); + } throw new IllegalStateException(); } @@ -14893,6 +16573,8 @@ public class Server { return isSetName(); case NEW_NAME: return isSetNewName(); + case DESC: + return isSetDesc(); case IMAGE_PATH: return isSetImage_path(); case LICENSE: @@ -14913,6 +16595,8 @@ public class Server { return isSetFilesize(); case SHARE_MODE: return isSetShareMode(); + case OS: + return isSetOs(); } throw new IllegalStateException(); } @@ -14948,6 +16632,15 @@ public class Server { return false; } + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) + return false; + if (!this.desc.equals(that.desc)) + return false; + } + boolean this_present_image_path = true && this.isSetImage_path(); boolean that_present_image_path = true && that.isSetImage_path(); if (this_present_image_path || that_present_image_path) { @@ -15038,6 +16731,15 @@ public class Server { return false; } + boolean this_present_os = true && this.isSetOs(); + boolean that_present_os = true && that.isSetOs(); + if (this_present_os || that_present_os) { + if (!(this_present_os && that_present_os)) + return false; + if (!this.os.equals(that.os)) + return false; + } + return true; } @@ -15074,6 +16776,16 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path()); if (lastComparison != 0) { return lastComparison; @@ -15174,6 +16886,16 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -15210,6 +16932,14 @@ public class Server { } first = false; if (!first) sb.append(", "); + sb.append("desc:"); + if (this.desc == null) { + sb.append("null"); + } else { + sb.append(this.desc); + } + first = false; + if (!first) sb.append(", "); sb.append("image_path:"); if (this.image_path == null) { sb.append("null"); @@ -15261,6 +16991,14 @@ public class Server { sb.append("shareMode:"); sb.append(this.shareMode); first = false; + if (!first) sb.append(", "); + sb.append("os:"); + if (this.os == null) { + sb.append("null"); + } else { + sb.append(this.os); + } + first = false; sb.append(")"); return sb.toString(); } @@ -15322,7 +17060,15 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -3: // IMAGE_PATH + case -3: // DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // IMAGE_PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.image_path = iprot.readString(); struct.setImage_pathIsSet(true); @@ -15330,7 +17076,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -4: // LICENSE + case -5: // LICENSE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.license = iprot.readBool(); struct.setLicenseIsSet(true); @@ -15338,7 +17084,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -5: // INTERNET + case -6: // INTERNET if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.internet = iprot.readBool(); struct.setInternetIsSet(true); @@ -15346,7 +17092,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -6: // RAM + case -7: // RAM if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.ram = iprot.readI64(); struct.setRamIsSet(true); @@ -15354,7 +17100,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -7: // CPU + case -8: // CPU if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); @@ -15362,7 +17108,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -8: // ID + case -9: // ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.id = iprot.readString(); struct.setIdIsSet(true); @@ -15370,7 +17116,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -9: // VERSION + case -10: // VERSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.version = iprot.readString(); struct.setVersionIsSet(true); @@ -15378,7 +17124,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -10: // IS_TEMPLATE + case -11: // IS_TEMPLATE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isTemplate = iprot.readBool(); struct.setIsTemplateIsSet(true); @@ -15386,7 +17132,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -11: // FILESIZE + case -12: // FILESIZE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.filesize = iprot.readI64(); struct.setFilesizeIsSet(true); @@ -15394,7 +17140,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -12: // SHARE_MODE + case -13: // SHARE_MODE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.shareMode = iprot.readI64(); struct.setShareModeIsSet(true); @@ -15402,6 +17148,14 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -14: // OS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.os = iprot.readString(); + struct.setOsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -15417,6 +17171,11 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.os != null) { + oprot.writeFieldBegin(OS_FIELD_DESC); + oprot.writeString(struct.os); + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC); oprot.writeI64(struct.shareMode); oprot.writeFieldEnd(); @@ -15453,6 +17212,11 @@ public class Server { oprot.writeString(struct.image_path); oprot.writeFieldEnd(); } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } if (struct.newName != null) { oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); oprot.writeString(struct.newName); @@ -15487,43 +17251,52 @@ public class Server { if (struct.isSetNewName()) { optionals.set(1); } - if (struct.isSetImage_path()) { + if (struct.isSetDesc()) { optionals.set(2); } - if (struct.isSetLicense()) { + if (struct.isSetImage_path()) { optionals.set(3); } - if (struct.isSetInternet()) { + if (struct.isSetLicense()) { optionals.set(4); } - if (struct.isSetRam()) { + if (struct.isSetInternet()) { optionals.set(5); } - if (struct.isSetCpu()) { + if (struct.isSetRam()) { optionals.set(6); } - if (struct.isSetId()) { + if (struct.isSetCpu()) { optionals.set(7); } - if (struct.isSetVersion()) { + if (struct.isSetId()) { optionals.set(8); } - if (struct.isSetIsTemplate()) { + if (struct.isSetVersion()) { optionals.set(9); } - if (struct.isSetFilesize()) { + if (struct.isSetIsTemplate()) { optionals.set(10); } - if (struct.isSetShareMode()) { + if (struct.isSetFilesize()) { optionals.set(11); } - oprot.writeBitSet(optionals, 12); + if (struct.isSetShareMode()) { + optionals.set(12); + } + if (struct.isSetOs()) { + optionals.set(13); + } + oprot.writeBitSet(optionals, 14); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetNewName()) { oprot.writeString(struct.newName); } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } if (struct.isSetImage_path()) { oprot.writeString(struct.image_path); } @@ -15554,12 +17327,15 @@ public class Server { if (struct.isSetShareMode()) { oprot.writeI64(struct.shareMode); } + if (struct.isSetOs()) { + oprot.writeString(struct.os); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(12); + BitSet incoming = iprot.readBitSet(14); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -15569,45 +17345,53 @@ public class Server { struct.setNewNameIsSet(true); } if (incoming.get(2)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(3)) { struct.image_path = iprot.readString(); struct.setImage_pathIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.license = iprot.readBool(); struct.setLicenseIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.internet = iprot.readBool(); struct.setInternetIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.ram = iprot.readI64(); struct.setRamIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.id = iprot.readString(); struct.setIdIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(9)) { struct.version = iprot.readString(); struct.setVersionIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(10)) { struct.isTemplate = iprot.readBool(); struct.setIsTemplateIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(11)) { struct.filesize = iprot.readI64(); struct.setFilesizeIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(12)) { struct.shareMode = iprot.readI64(); struct.setShareModeIsSet(true); } + if (incoming.get(13)) { + struct.os = iprot.readString(); + struct.setOsIsSet(true); + } } } @@ -15967,766 +17751,6 @@ public class Server { } - public static class getLectureData_args implements org.apache.thrift.TBase<getLectureData_args, getLectureData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args"); - - private static final org.apache.thrift.protocol.TField LECTURENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lecturename", org.apache.thrift.protocol.TType.STRING, (short)-1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory()); - } - - public String lecturename; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - LECTURENAME((short)-1, "lecturename"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case -1: // LECTURENAME - return LECTURENAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LECTURENAME, new org.apache.thrift.meta_data.FieldMetaData("lecturename", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_args.class, metaDataMap); - } - - public getLectureData_args() { - } - - public getLectureData_args( - String lecturename) - { - this(); - this.lecturename = lecturename; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getLectureData_args(getLectureData_args other) { - if (other.isSetLecturename()) { - this.lecturename = other.lecturename; - } - } - - public getLectureData_args deepCopy() { - return new getLectureData_args(this); - } - - @Override - public void clear() { - this.lecturename = null; - } - - public String getLecturename() { - return this.lecturename; - } - - public getLectureData_args setLecturename(String lecturename) { - this.lecturename = lecturename; - return this; - } - - public void unsetLecturename() { - this.lecturename = null; - } - - /** Returns true if field lecturename is set (has been assigned a value) and false otherwise */ - public boolean isSetLecturename() { - return this.lecturename != null; - } - - public void setLecturenameIsSet(boolean value) { - if (!value) { - this.lecturename = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LECTURENAME: - if (value == null) { - unsetLecturename(); - } else { - setLecturename((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LECTURENAME: - return getLecturename(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LECTURENAME: - return isSetLecturename(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLectureData_args) - return this.equals((getLectureData_args)that); - return false; - } - - public boolean equals(getLectureData_args that) { - if (that == null) - return false; - - boolean this_present_lecturename = true && this.isSetLecturename(); - boolean that_present_lecturename = true && that.isSetLecturename(); - if (this_present_lecturename || that_present_lecturename) { - if (!(this_present_lecturename && that_present_lecturename)) - return false; - if (!this.lecturename.equals(that.lecturename)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLectureData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLecturename()).compareTo(other.isSetLecturename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLecturename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecturename, other.lecturename); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getLectureData_args("); - boolean first = true; - - sb.append("lecturename:"); - if (this.lecturename == null) { - sb.append("null"); - } else { - sb.append(this.lecturename); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getLectureData_argsStandardSchemeFactory implements SchemeFactory { - public getLectureData_argsStandardScheme getScheme() { - return new getLectureData_argsStandardScheme(); - } - } - - private static class getLectureData_argsStandardScheme extends StandardScheme<getLectureData_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // LECTURENAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.lecturename = iprot.readString(); - struct.setLecturenameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.lecturename != null) { - oprot.writeFieldBegin(LECTURENAME_FIELD_DESC); - oprot.writeString(struct.lecturename); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory { - public getLectureData_argsTupleScheme getScheme() { - return new getLectureData_argsTupleScheme(); - } - } - - private static class getLectureData_argsTupleScheme extends TupleScheme<getLectureData_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetLecturename()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetLecturename()) { - oprot.writeString(struct.lecturename); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.lecturename = iprot.readString(); - struct.setLecturenameIsSet(true); - } - } - } - - } - - public static class getLectureData_result implements org.apache.thrift.TBase<getLectureData_result, getLectureData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory()); - } - - public Map<String,String> success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap); - } - - public getLectureData_result() { - } - - public getLectureData_result( - Map<String,String> success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getLectureData_result(getLectureData_result other) { - if (other.isSetSuccess()) { - Map<String,String> __this__success = new HashMap<String,String>(other.success); - this.success = __this__success; - } - } - - public getLectureData_result deepCopy() { - return new getLectureData_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap<String,String>(); - } - this.success.put(key, val); - } - - public Map<String,String> getSuccess() { - return this.success; - } - - public getLectureData_result setSuccess(Map<String,String> success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map<String,String>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLectureData_result) - return this.equals((getLectureData_result)that); - return false; - } - - public boolean equals(getLectureData_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLectureData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getLectureData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getLectureData_resultStandardSchemeFactory implements SchemeFactory { - public getLectureData_resultStandardScheme getScheme() { - return new getLectureData_resultStandardScheme(); - } - } - - private static class getLectureData_resultStandardScheme extends StandardScheme<getLectureData_result> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin(); - struct.success = new HashMap<String,String>(2*_map52.size); - for (int _i53 = 0; _i53 < _map52.size; ++_i53) - { - String _key54; - String _val55; - _key54 = iprot.readString(); - _val55 = iprot.readString(); - struct.success.put(_key54, _val55); - } - iprot.readMapEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (Map.Entry<String, String> _iter56 : struct.success.entrySet()) - { - oprot.writeString(_iter56.getKey()); - oprot.writeString(_iter56.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory { - public getLectureData_resultTupleScheme getScheme() { - return new getLectureData_resultTupleScheme(); - } - } - - private static class getLectureData_resultTupleScheme extends TupleScheme<getLectureData_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Map.Entry<String, String> _iter57 : struct.success.entrySet()) - { - oprot.writeString(_iter57.getKey()); - oprot.writeString(_iter57.getValue()); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new HashMap<String,String>(2*_map58.size); - for (int _i59 = 0; _i59 < _map58.size; ++_i59) - { - String _key60; - String _val61; - _key60 = iprot.readString(); - _val61 = iprot.readString(); - struct.success.put(_key60, _val61); - } - } - struct.setSuccessIsSet(true); - } - } - } - - } - public static class deleteImageData_args implements org.apache.thrift.TBase<deleteImageData_args, deleteImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageData_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageData_args"); @@ -17545,14 +18569,16 @@ public class Server { private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.STRING, (short)-5); private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.STRING, (short)-6); private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)-7); - private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-8); - private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-9); - private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-10); - private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-11); - private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-12); - private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-13); - private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-14); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-15); + private static final org.apache.thrift.protocol.TField IMAGEID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageid", org.apache.thrift.protocol.TType.STRING, (short)-8); + private static final org.apache.thrift.protocol.TField IMAGEVERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageversion", org.apache.thrift.protocol.TType.STRING, (short)-9); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)-10); + private static final org.apache.thrift.protocol.TField FIRSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstname", org.apache.thrift.protocol.TType.STRING, (short)-11); + private static final org.apache.thrift.protocol.TField LASTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastname", org.apache.thrift.protocol.TType.STRING, (short)-12); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-13); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("Mail", org.apache.thrift.protocol.TType.STRING, (short)-14); + private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)-15); + private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)-16); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-17); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -17567,7 +18593,9 @@ public class Server { public String startDate; // required public String endDate; // required public boolean isActive; // required - public String imagename; // required + public String imageid; // required + public String imageversion; // required + public String user; // required public String firstname; // required public String lastname; // required public String university; // required @@ -17585,14 +18613,16 @@ public class Server { START_DATE((short)-5, "startDate"), END_DATE((short)-6, "endDate"), IS_ACTIVE((short)-7, "isActive"), - IMAGENAME((short)-8, "imagename"), - FIRSTNAME((short)-9, "firstname"), - LASTNAME((short)-10, "lastname"), - UNIVERSITY((short)-11, "university"), - MAIL((short)-12, "Mail"), - TEL((short)-13, "Tel"), - FAK((short)-14, "Fak"), - ID((short)-15, "id"); + IMAGEID((short)-8, "imageid"), + IMAGEVERSION((short)-9, "imageversion"), + USER((short)-10, "user"), + FIRSTNAME((short)-11, "firstname"), + LASTNAME((short)-12, "lastname"), + UNIVERSITY((short)-13, "university"), + MAIL((short)-14, "Mail"), + TEL((short)-15, "Tel"), + FAK((short)-16, "Fak"), + ID((short)-17, "id"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -17621,21 +18651,25 @@ public class Server { return END_DATE; case -7: // IS_ACTIVE return IS_ACTIVE; - case -8: // IMAGENAME - return IMAGENAME; - case -9: // FIRSTNAME + case -8: // IMAGEID + return IMAGEID; + case -9: // IMAGEVERSION + return IMAGEVERSION; + case -10: // USER + return USER; + case -11: // FIRSTNAME return FIRSTNAME; - case -10: // LASTNAME + case -12: // LASTNAME return LASTNAME; - case -11: // UNIVERSITY + case -13: // UNIVERSITY return UNIVERSITY; - case -12: // MAIL + case -14: // MAIL return MAIL; - case -13: // TEL + case -15: // TEL return TEL; - case -14: // FAK + case -16: // FAK return FAK; - case -15: // ID + case -17: // ID return ID; default: return null; @@ -17696,7 +18730,11 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IMAGEID, new org.apache.thrift.meta_data.FieldMetaData("imageid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMAGEVERSION, new org.apache.thrift.meta_data.FieldMetaData("imageversion", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FIRSTNAME, new org.apache.thrift.meta_data.FieldMetaData("firstname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); @@ -17727,7 +18765,9 @@ public class Server { String startDate, String endDate, boolean isActive, - String imagename, + String imageid, + String imageversion, + String user, String firstname, String lastname, String university, @@ -17745,7 +18785,9 @@ public class Server { this.endDate = endDate; this.isActive = isActive; setIsActiveIsSet(true); - this.imagename = imagename; + this.imageid = imageid; + this.imageversion = imageversion; + this.user = user; this.firstname = firstname; this.lastname = lastname; this.university = university; @@ -17779,8 +18821,14 @@ public class Server { this.endDate = other.endDate; } this.isActive = other.isActive; - if (other.isSetImagename()) { - this.imagename = other.imagename; + if (other.isSetImageid()) { + this.imageid = other.imageid; + } + if (other.isSetImageversion()) { + this.imageversion = other.imageversion; + } + if (other.isSetUser()) { + this.user = other.user; } if (other.isSetFirstname()) { this.firstname = other.firstname; @@ -17819,7 +18867,9 @@ public class Server { this.endDate = null; setIsActiveIsSet(false); this.isActive = false; - this.imagename = null; + this.imageid = null; + this.imageversion = null; + this.user = null; this.firstname = null; this.lastname = null; this.university = null; @@ -17996,27 +19046,75 @@ public class Server { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value); } - public String getImagename() { - return this.imagename; + public String getImageid() { + return this.imageid; } - public updateLecturedata_args setImagename(String imagename) { - this.imagename = imagename; + public updateLecturedata_args setImageid(String imageid) { + this.imageid = imageid; return this; } - public void unsetImagename() { - this.imagename = null; + public void unsetImageid() { + this.imageid = null; } - /** Returns true if field imagename is set (has been assigned a value) and false otherwise */ - public boolean isSetImagename() { - return this.imagename != null; + /** Returns true if field imageid is set (has been assigned a value) and false otherwise */ + public boolean isSetImageid() { + return this.imageid != null; } - public void setImagenameIsSet(boolean value) { + public void setImageidIsSet(boolean value) { if (!value) { - this.imagename = null; + this.imageid = null; + } + } + + public String getImageversion() { + return this.imageversion; + } + + public updateLecturedata_args setImageversion(String imageversion) { + this.imageversion = imageversion; + return this; + } + + public void unsetImageversion() { + this.imageversion = null; + } + + /** Returns true if field imageversion is set (has been assigned a value) and false otherwise */ + public boolean isSetImageversion() { + return this.imageversion != null; + } + + public void setImageversionIsSet(boolean value) { + if (!value) { + this.imageversion = null; + } + } + + public String getUser() { + return this.user; + } + + public updateLecturedata_args setUser(String user) { + this.user = user; + return this; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; } } @@ -18246,11 +19344,27 @@ public class Server { } break; - case IMAGENAME: + case IMAGEID: if (value == null) { - unsetImagename(); + unsetImageid(); } else { - setImagename((String)value); + setImageid((String)value); + } + break; + + case IMAGEVERSION: + if (value == null) { + unsetImageversion(); + } else { + setImageversion((String)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); } break; @@ -18336,8 +19450,14 @@ public class Server { case IS_ACTIVE: return Boolean.valueOf(isIsActive()); - case IMAGENAME: - return getImagename(); + case IMAGEID: + return getImageid(); + + case IMAGEVERSION: + return getImageversion(); + + case USER: + return getUser(); case FIRSTNAME: return getFirstname(); @@ -18385,8 +19505,12 @@ public class Server { return isSetEndDate(); case IS_ACTIVE: return isSetIsActive(); - case IMAGENAME: - return isSetImagename(); + case IMAGEID: + return isSetImageid(); + case IMAGEVERSION: + return isSetImageversion(); + case USER: + return isSetUser(); case FIRSTNAME: return isSetFirstname(); case LASTNAME: @@ -18481,12 +19605,30 @@ public class Server { return false; } - boolean this_present_imagename = true && this.isSetImagename(); - boolean that_present_imagename = true && that.isSetImagename(); - if (this_present_imagename || that_present_imagename) { - if (!(this_present_imagename && that_present_imagename)) + boolean this_present_imageid = true && this.isSetImageid(); + boolean that_present_imageid = true && that.isSetImageid(); + if (this_present_imageid || that_present_imageid) { + if (!(this_present_imageid && that_present_imageid)) return false; - if (!this.imagename.equals(that.imagename)) + if (!this.imageid.equals(that.imageid)) + return false; + } + + boolean this_present_imageversion = true && this.isSetImageversion(); + boolean that_present_imageversion = true && that.isSetImageversion(); + if (this_present_imageversion || that_present_imageversion) { + if (!(this_present_imageversion && that_present_imageversion)) + return false; + if (!this.imageversion.equals(that.imageversion)) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) return false; } @@ -18639,12 +19781,32 @@ public class Server { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename()); + lastComparison = Boolean.valueOf(isSetImageid()).compareTo(other.isSetImageid()); if (lastComparison != 0) { return lastComparison; } - if (isSetImagename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename); + if (isSetImageid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageid, other.imageid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageversion()).compareTo(other.isSetImageversion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageversion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageversion, other.imageversion); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); if (lastComparison != 0) { return lastComparison; } @@ -18791,11 +19953,27 @@ public class Server { sb.append(this.isActive); first = false; if (!first) sb.append(", "); - sb.append("imagename:"); - if (this.imagename == null) { + sb.append("imageid:"); + if (this.imageid == null) { sb.append("null"); } else { - sb.append(this.imagename); + sb.append(this.imageid); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageversion:"); + if (this.imageversion == null) { + sb.append("null"); + } else { + sb.append(this.imageversion); + } + first = false; + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); } first = false; if (!first) sb.append(", "); @@ -18955,15 +20133,31 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -8: // IMAGENAME + case -8: // IMAGEID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imagename = iprot.readString(); - struct.setImagenameIsSet(true); + struct.imageid = iprot.readString(); + struct.setImageidIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -9: // FIRSTNAME + case -9: // IMAGEVERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageversion = iprot.readString(); + struct.setImageversionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -10: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -11: // FIRSTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.firstname = iprot.readString(); struct.setFirstnameIsSet(true); @@ -18971,7 +20165,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -10: // LASTNAME + case -12: // LASTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.lastname = iprot.readString(); struct.setLastnameIsSet(true); @@ -18979,7 +20173,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -11: // UNIVERSITY + case -13: // UNIVERSITY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.university = iprot.readString(); struct.setUniversityIsSet(true); @@ -18987,7 +20181,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -12: // MAIL + case -14: // MAIL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Mail = iprot.readString(); struct.setMailIsSet(true); @@ -18995,7 +20189,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -13: // TEL + case -15: // TEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Tel = iprot.readString(); struct.setTelIsSet(true); @@ -19003,7 +20197,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -14: // FAK + case -16: // FAK if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Fak = iprot.readString(); struct.setFakIsSet(true); @@ -19011,7 +20205,7 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -15: // ID + case -17: // ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.id = iprot.readString(); struct.setIdIsSet(true); @@ -19069,9 +20263,19 @@ public class Server { oprot.writeString(struct.firstname); oprot.writeFieldEnd(); } - if (struct.imagename != null) { - oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); - oprot.writeString(struct.imagename); + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + if (struct.imageversion != null) { + oprot.writeFieldBegin(IMAGEVERSION_FIELD_DESC); + oprot.writeString(struct.imageversion); + oprot.writeFieldEnd(); + } + if (struct.imageid != null) { + oprot.writeFieldBegin(IMAGEID_FIELD_DESC); + oprot.writeString(struct.imageid); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC); @@ -19146,31 +20350,37 @@ public class Server { if (struct.isSetIsActive()) { optionals.set(6); } - if (struct.isSetImagename()) { + if (struct.isSetImageid()) { optionals.set(7); } - if (struct.isSetFirstname()) { + if (struct.isSetImageversion()) { optionals.set(8); } - if (struct.isSetLastname()) { + if (struct.isSetUser()) { optionals.set(9); } - if (struct.isSetUniversity()) { + if (struct.isSetFirstname()) { optionals.set(10); } - if (struct.isSetMail()) { + if (struct.isSetLastname()) { optionals.set(11); } - if (struct.isSetTel()) { + if (struct.isSetUniversity()) { optionals.set(12); } - if (struct.isSetFak()) { + if (struct.isSetMail()) { optionals.set(13); } - if (struct.isSetId()) { + if (struct.isSetTel()) { optionals.set(14); } - oprot.writeBitSet(optionals, 15); + if (struct.isSetFak()) { + optionals.set(15); + } + if (struct.isSetId()) { + optionals.set(16); + } + oprot.writeBitSet(optionals, 17); if (struct.isSetName()) { oprot.writeString(struct.name); } @@ -19192,8 +20402,14 @@ public class Server { if (struct.isSetIsActive()) { oprot.writeBool(struct.isActive); } - if (struct.isSetImagename()) { - oprot.writeString(struct.imagename); + if (struct.isSetImageid()) { + oprot.writeString(struct.imageid); + } + if (struct.isSetImageversion()) { + oprot.writeString(struct.imageversion); + } + if (struct.isSetUser()) { + oprot.writeString(struct.user); } if (struct.isSetFirstname()) { oprot.writeString(struct.firstname); @@ -19221,7 +20437,7 @@ public class Server { @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(15); + BitSet incoming = iprot.readBitSet(17); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -19251,34 +20467,42 @@ public class Server { struct.setIsActiveIsSet(true); } if (incoming.get(7)) { - struct.imagename = iprot.readString(); - struct.setImagenameIsSet(true); + struct.imageid = iprot.readString(); + struct.setImageidIsSet(true); } if (incoming.get(8)) { + struct.imageversion = iprot.readString(); + struct.setImageversionIsSet(true); + } + if (incoming.get(9)) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } + if (incoming.get(10)) { struct.firstname = iprot.readString(); struct.setFirstnameIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(11)) { struct.lastname = iprot.readString(); struct.setLastnameIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(12)) { struct.university = iprot.readString(); struct.setUniversityIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(13)) { struct.Mail = iprot.readString(); struct.setMailIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(14)) { struct.Tel = iprot.readString(); struct.setTelIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(15)) { struct.Fak = iprot.readString(); struct.setFakIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(16)) { struct.id = iprot.readString(); struct.setIdIsSet(true); } @@ -22165,4 +23389,4436 @@ public class Server { } + public static class checkUser_args implements org.apache.thrift.TBase<checkUser_args, checkUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkUser_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkUser_args"); + + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)-1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkUser_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkUser_argsTupleSchemeFactory()); + } + + public String username; // 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 { + USERNAME((short)-1, "username"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // USERNAME + return USERNAME; + 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.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", 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(checkUser_args.class, metaDataMap); + } + + public checkUser_args() { + } + + public checkUser_args( + String username) + { + this(); + this.username = username; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public checkUser_args(checkUser_args other) { + if (other.isSetUsername()) { + this.username = other.username; + } + } + + public checkUser_args deepCopy() { + return new checkUser_args(this); + } + + @Override + public void clear() { + this.username = null; + } + + public String getUsername() { + return this.username; + } + + public checkUser_args setUsername(String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USERNAME: + return getUsername(); + + } + 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 USERNAME: + return isSetUsername(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkUser_args) + return this.equals((checkUser_args)that); + return false; + } + + public boolean equals(checkUser_args that) { + if (that == null) + return false; + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(checkUser_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + 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("checkUser_args("); + boolean first = true; + + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + 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 checkUser_argsStandardSchemeFactory implements SchemeFactory { + public checkUser_argsStandardScheme getScheme() { + return new checkUser_argsStandardScheme(); + } + } + + private static class checkUser_argsStandardScheme extends StandardScheme<checkUser_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkUser_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: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(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, checkUser_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkUser_argsTupleSchemeFactory implements SchemeFactory { + public checkUser_argsTupleScheme getScheme() { + return new checkUser_argsTupleScheme(); + } + } + + private static class checkUser_argsTupleScheme extends TupleScheme<checkUser_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUsername()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + } + } + + } + + public static class checkUser_result implements org.apache.thrift.TBase<checkUser_result, checkUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkUser_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkUser_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkUser_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkUser_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkUser_result.class, metaDataMap); + } + + public checkUser_result() { + } + + public checkUser_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public checkUser_result(checkUser_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public checkUser_result deepCopy() { + return new checkUser_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public checkUser_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkUser_result) + return this.equals((checkUser_result)that); + return false; + } + + public boolean equals(checkUser_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(checkUser_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("checkUser_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkUser_resultStandardSchemeFactory implements SchemeFactory { + public checkUser_resultStandardScheme getScheme() { + return new checkUser_resultStandardScheme(); + } + } + + private static class checkUser_resultStandardScheme extends StandardScheme<checkUser_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkUser_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkUser_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkUser_resultTupleSchemeFactory implements SchemeFactory { + public checkUser_resultTupleScheme getScheme() { + return new checkUser_resultTupleScheme(); + } + } + + private static class checkUser_resultTupleScheme extends TupleScheme<checkUser_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class createUser_args implements org.apache.thrift.TBase<createUser_args, createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_args"); + + private static final org.apache.thrift.protocol.TField LOGIN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("loginName", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-5); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createUser_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createUser_argsTupleSchemeFactory()); + } + + public String loginName; // required + public String lastName; // required + public String firstName; // required + public String mail; // required + public String university; // 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 { + LOGIN_NAME((short)-1, "loginName"), + LAST_NAME((short)-2, "lastName"), + FIRST_NAME((short)-3, "firstName"), + MAIL((short)-4, "mail"), + UNIVERSITY((short)-5, "university"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // LOGIN_NAME + return LOGIN_NAME; + case -2: // LAST_NAME + return LAST_NAME; + case -3: // FIRST_NAME + return FIRST_NAME; + case -4: // MAIL + return MAIL; + case -5: // UNIVERSITY + return UNIVERSITY; + 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.LOGIN_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap); + } + + public createUser_args() { + } + + public createUser_args( + String loginName, + String lastName, + String firstName, + String mail, + String university) + { + this(); + this.loginName = loginName; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public createUser_args(createUser_args other) { + if (other.isSetLoginName()) { + this.loginName = other.loginName; + } + if (other.isSetLastName()) { + this.lastName = other.lastName; + } + if (other.isSetFirstName()) { + this.firstName = other.firstName; + } + if (other.isSetMail()) { + this.mail = other.mail; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + } + + public createUser_args deepCopy() { + return new createUser_args(this); + } + + @Override + public void clear() { + this.loginName = null; + this.lastName = null; + this.firstName = null; + this.mail = null; + this.university = null; + } + + public String getLoginName() { + return this.loginName; + } + + public createUser_args setLoginName(String loginName) { + this.loginName = loginName; + return this; + } + + public void unsetLoginName() { + this.loginName = null; + } + + /** Returns true if field loginName is set (has been assigned a value) and false otherwise */ + public boolean isSetLoginName() { + return this.loginName != null; + } + + public void setLoginNameIsSet(boolean value) { + if (!value) { + this.loginName = null; + } + } + + public String getLastName() { + return this.lastName; + } + + public createUser_args setLastName(String lastName) { + this.lastName = lastName; + return this; + } + + public void unsetLastName() { + this.lastName = null; + } + + /** Returns true if field lastName is set (has been assigned a value) and false otherwise */ + public boolean isSetLastName() { + return this.lastName != null; + } + + public void setLastNameIsSet(boolean value) { + if (!value) { + this.lastName = null; + } + } + + public String getFirstName() { + return this.firstName; + } + + public createUser_args setFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + public void unsetFirstName() { + this.firstName = null; + } + + /** Returns true if field firstName is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstName() { + return this.firstName != null; + } + + public void setFirstNameIsSet(boolean value) { + if (!value) { + this.firstName = null; + } + } + + public String getMail() { + return this.mail; + } + + public createUser_args setMail(String mail) { + this.mail = mail; + return this; + } + + public void unsetMail() { + this.mail = null; + } + + /** Returns true if field mail is set (has been assigned a value) and false otherwise */ + public boolean isSetMail() { + return this.mail != null; + } + + public void setMailIsSet(boolean value) { + if (!value) { + this.mail = null; + } + } + + public String getUniversity() { + return this.university; + } + + public createUser_args setUniversity(String university) { + this.university = university; + return this; + } + + public void unsetUniversity() { + this.university = null; + } + + /** Returns true if field university is set (has been assigned a value) and false otherwise */ + public boolean isSetUniversity() { + return this.university != null; + } + + public void setUniversityIsSet(boolean value) { + if (!value) { + this.university = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOGIN_NAME: + if (value == null) { + unsetLoginName(); + } else { + setLoginName((String)value); + } + break; + + case LAST_NAME: + if (value == null) { + unsetLastName(); + } else { + setLastName((String)value); + } + break; + + case FIRST_NAME: + if (value == null) { + unsetFirstName(); + } else { + setFirstName((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOGIN_NAME: + return getLoginName(); + + case LAST_NAME: + return getLastName(); + + case FIRST_NAME: + return getFirstName(); + + case MAIL: + return getMail(); + + case UNIVERSITY: + return getUniversity(); + + } + 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 LOGIN_NAME: + return isSetLoginName(); + case LAST_NAME: + return isSetLastName(); + case FIRST_NAME: + return isSetFirstName(); + case MAIL: + return isSetMail(); + case UNIVERSITY: + return isSetUniversity(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createUser_args) + return this.equals((createUser_args)that); + return false; + } + + public boolean equals(createUser_args that) { + if (that == null) + return false; + + boolean this_present_loginName = true && this.isSetLoginName(); + boolean that_present_loginName = true && that.isSetLoginName(); + if (this_present_loginName || that_present_loginName) { + if (!(this_present_loginName && that_present_loginName)) + return false; + if (!this.loginName.equals(that.loginName)) + return false; + } + + boolean this_present_lastName = true && this.isSetLastName(); + boolean that_present_lastName = true && that.isSetLastName(); + if (this_present_lastName || that_present_lastName) { + if (!(this_present_lastName && that_present_lastName)) + return false; + if (!this.lastName.equals(that.lastName)) + return false; + } + + boolean this_present_firstName = true && this.isSetFirstName(); + boolean that_present_firstName = true && that.isSetFirstName(); + if (this_present_firstName || that_present_firstName) { + if (!(this_present_firstName && that_present_firstName)) + return false; + if (!this.firstName.equals(that.firstName)) + return false; + } + + boolean this_present_mail = true && this.isSetMail(); + boolean that_present_mail = true && that.isSetMail(); + if (this_present_mail || that_present_mail) { + if (!(this_present_mail && that_present_mail)) + return false; + if (!this.mail.equals(that.mail)) + return false; + } + + boolean this_present_university = true && this.isSetUniversity(); + boolean that_present_university = true && that.isSetUniversity(); + if (this_present_university || that_present_university) { + if (!(this_present_university && that_present_university)) + return false; + if (!this.university.equals(that.university)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(createUser_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLoginName()).compareTo(other.isSetLoginName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLoginName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loginName, other.loginName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniversity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university); + if (lastComparison != 0) { + return lastComparison; + } + } + 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("createUser_args("); + boolean first = true; + + sb.append("loginName:"); + if (this.loginName == null) { + sb.append("null"); + } else { + sb.append(this.loginName); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastName:"); + if (this.lastName == null) { + sb.append("null"); + } else { + sb.append(this.lastName); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstName:"); + if (this.firstName == null) { + sb.append("null"); + } else { + sb.append(this.firstName); + } + first = false; + if (!first) sb.append(", "); + sb.append("mail:"); + if (this.mail == null) { + sb.append("null"); + } else { + sb.append(this.mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("university:"); + if (this.university == null) { + sb.append("null"); + } else { + sb.append(this.university); + } + 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 createUser_argsStandardSchemeFactory implements SchemeFactory { + public createUser_argsStandardScheme getScheme() { + return new createUser_argsStandardScheme(); + } + } + + private static class createUser_argsStandardScheme extends StandardScheme<createUser_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_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: // LOGIN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.loginName = iprot.readString(); + struct.setLoginNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // LAST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // FIRST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // UNIVERSITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + 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, createUser_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.mail); + oprot.writeFieldEnd(); + } + if (struct.firstName != null) { + oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC); + oprot.writeString(struct.firstName); + oprot.writeFieldEnd(); + } + if (struct.lastName != null) { + oprot.writeFieldBegin(LAST_NAME_FIELD_DESC); + oprot.writeString(struct.lastName); + oprot.writeFieldEnd(); + } + if (struct.loginName != null) { + oprot.writeFieldBegin(LOGIN_NAME_FIELD_DESC); + oprot.writeString(struct.loginName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createUser_argsTupleSchemeFactory implements SchemeFactory { + public createUser_argsTupleScheme getScheme() { + return new createUser_argsTupleScheme(); + } + } + + private static class createUser_argsTupleScheme extends TupleScheme<createUser_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLoginName()) { + optionals.set(0); + } + if (struct.isSetLastName()) { + optionals.set(1); + } + if (struct.isSetFirstName()) { + optionals.set(2); + } + if (struct.isSetMail()) { + optionals.set(3); + } + if (struct.isSetUniversity()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetLoginName()) { + oprot.writeString(struct.loginName); + } + if (struct.isSetLastName()) { + oprot.writeString(struct.lastName); + } + if (struct.isSetFirstName()) { + oprot.writeString(struct.firstName); + } + if (struct.isSetMail()) { + oprot.writeString(struct.mail); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.loginName = iprot.readString(); + struct.setLoginNameIsSet(true); + } + if (incoming.get(1)) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } + if (incoming.get(2)) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } + if (incoming.get(3)) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(4)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + } + } + + } + + public static class createUser_result implements org.apache.thrift.TBase<createUser_result, createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createUser_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createUser_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap); + } + + public createUser_result() { + } + + public createUser_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public createUser_result(createUser_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public createUser_result deepCopy() { + return new createUser_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public createUser_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createUser_result) + return this.equals((createUser_result)that); + return false; + } + + public boolean equals(createUser_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(createUser_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("createUser_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createUser_resultStandardSchemeFactory implements SchemeFactory { + public createUser_resultStandardScheme getScheme() { + return new createUser_resultStandardScheme(); + } + } + + private static class createUser_resultStandardScheme extends StandardScheme<createUser_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createUser_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createUser_resultTupleSchemeFactory implements SchemeFactory { + public createUser_resultTupleScheme getScheme() { + return new createUser_resultTupleScheme(); + } + } + + private static class createUser_resultTupleScheme extends TupleScheme<createUser_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class writeImageRights_args implements org.apache.thrift.TBase<writeImageRights_args, writeImageRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeImageRights_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImageRights_args"); + + private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-6); + private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)-7); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeImageRights_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeImageRights_argsTupleSchemeFactory()); + } + + public String imagename; // required + public String username; // required + public String lastName; // required + public String firstName; // required + public String mail; // required + public String university; // required + public String role; // 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 { + IMAGENAME((short)-1, "imagename"), + USERNAME((short)-2, "username"), + LAST_NAME((short)-3, "lastName"), + FIRST_NAME((short)-4, "firstName"), + MAIL((short)-5, "mail"), + UNIVERSITY((short)-6, "university"), + ROLE((short)-7, "role"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // IMAGENAME + return IMAGENAME; + case -2: // USERNAME + return USERNAME; + case -3: // LAST_NAME + return LAST_NAME; + case -4: // FIRST_NAME + return FIRST_NAME; + case -5: // MAIL + return MAIL; + case -6: // UNIVERSITY + return UNIVERSITY; + case -7: // ROLE + return ROLE; + 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.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", 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(writeImageRights_args.class, metaDataMap); + } + + public writeImageRights_args() { + } + + public writeImageRights_args( + String imagename, + String username, + String lastName, + String firstName, + String mail, + String university, + String role) + { + this(); + this.imagename = imagename; + this.username = username; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + this.role = role; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeImageRights_args(writeImageRights_args other) { + if (other.isSetImagename()) { + this.imagename = other.imagename; + } + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetLastName()) { + this.lastName = other.lastName; + } + if (other.isSetFirstName()) { + this.firstName = other.firstName; + } + if (other.isSetMail()) { + this.mail = other.mail; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + if (other.isSetRole()) { + this.role = other.role; + } + } + + public writeImageRights_args deepCopy() { + return new writeImageRights_args(this); + } + + @Override + public void clear() { + this.imagename = null; + this.username = null; + this.lastName = null; + this.firstName = null; + this.mail = null; + this.university = null; + this.role = null; + } + + public String getImagename() { + return this.imagename; + } + + public writeImageRights_args setImagename(String imagename) { + this.imagename = imagename; + return this; + } + + public void unsetImagename() { + this.imagename = null; + } + + /** Returns true if field imagename is set (has been assigned a value) and false otherwise */ + public boolean isSetImagename() { + return this.imagename != null; + } + + public void setImagenameIsSet(boolean value) { + if (!value) { + this.imagename = null; + } + } + + public String getUsername() { + return this.username; + } + + public writeImageRights_args setUsername(String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public String getLastName() { + return this.lastName; + } + + public writeImageRights_args setLastName(String lastName) { + this.lastName = lastName; + return this; + } + + public void unsetLastName() { + this.lastName = null; + } + + /** Returns true if field lastName is set (has been assigned a value) and false otherwise */ + public boolean isSetLastName() { + return this.lastName != null; + } + + public void setLastNameIsSet(boolean value) { + if (!value) { + this.lastName = null; + } + } + + public String getFirstName() { + return this.firstName; + } + + public writeImageRights_args setFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + public void unsetFirstName() { + this.firstName = null; + } + + /** Returns true if field firstName is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstName() { + return this.firstName != null; + } + + public void setFirstNameIsSet(boolean value) { + if (!value) { + this.firstName = null; + } + } + + public String getMail() { + return this.mail; + } + + public writeImageRights_args setMail(String mail) { + this.mail = mail; + return this; + } + + public void unsetMail() { + this.mail = null; + } + + /** Returns true if field mail is set (has been assigned a value) and false otherwise */ + public boolean isSetMail() { + return this.mail != null; + } + + public void setMailIsSet(boolean value) { + if (!value) { + this.mail = null; + } + } + + public String getUniversity() { + return this.university; + } + + public writeImageRights_args setUniversity(String university) { + this.university = university; + return this; + } + + public void unsetUniversity() { + this.university = null; + } + + /** Returns true if field university is set (has been assigned a value) and false otherwise */ + public boolean isSetUniversity() { + return this.university != null; + } + + public void setUniversityIsSet(boolean value) { + if (!value) { + this.university = null; + } + } + + public String getRole() { + return this.role; + } + + public writeImageRights_args setRole(String role) { + this.role = role; + return this; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IMAGENAME: + if (value == null) { + unsetImagename(); + } else { + setImagename((String)value); + } + break; + + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + case LAST_NAME: + if (value == null) { + unsetLastName(); + } else { + setLastName((String)value); + } + break; + + case FIRST_NAME: + if (value == null) { + unsetFirstName(); + } else { + setFirstName((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGENAME: + return getImagename(); + + case USERNAME: + return getUsername(); + + case LAST_NAME: + return getLastName(); + + case FIRST_NAME: + return getFirstName(); + + case MAIL: + return getMail(); + + case UNIVERSITY: + return getUniversity(); + + case ROLE: + return getRole(); + + } + 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 IMAGENAME: + return isSetImagename(); + case USERNAME: + return isSetUsername(); + case LAST_NAME: + return isSetLastName(); + case FIRST_NAME: + return isSetFirstName(); + case MAIL: + return isSetMail(); + case UNIVERSITY: + return isSetUniversity(); + case ROLE: + return isSetRole(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeImageRights_args) + return this.equals((writeImageRights_args)that); + return false; + } + + public boolean equals(writeImageRights_args that) { + if (that == null) + return false; + + boolean this_present_imagename = true && this.isSetImagename(); + boolean that_present_imagename = true && that.isSetImagename(); + if (this_present_imagename || that_present_imagename) { + if (!(this_present_imagename && that_present_imagename)) + return false; + if (!this.imagename.equals(that.imagename)) + return false; + } + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_lastName = true && this.isSetLastName(); + boolean that_present_lastName = true && that.isSetLastName(); + if (this_present_lastName || that_present_lastName) { + if (!(this_present_lastName && that_present_lastName)) + return false; + if (!this.lastName.equals(that.lastName)) + return false; + } + + boolean this_present_firstName = true && this.isSetFirstName(); + boolean that_present_firstName = true && that.isSetFirstName(); + if (this_present_firstName || that_present_firstName) { + if (!(this_present_firstName && that_present_firstName)) + return false; + if (!this.firstName.equals(that.firstName)) + return false; + } + + boolean this_present_mail = true && this.isSetMail(); + boolean that_present_mail = true && that.isSetMail(); + if (this_present_mail || that_present_mail) { + if (!(this_present_mail && that_present_mail)) + return false; + if (!this.mail.equals(that.mail)) + return false; + } + + boolean this_present_university = true && this.isSetUniversity(); + boolean that_present_university = true && that.isSetUniversity(); + if (this_present_university || that_present_university) { + if (!(this_present_university && that_present_university)) + return false; + if (!this.university.equals(that.university)) + return false; + } + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeImageRights_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImagename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniversity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + 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("writeImageRights_args("); + boolean first = true; + + sb.append("imagename:"); + if (this.imagename == null) { + sb.append("null"); + } else { + sb.append(this.imagename); + } + first = false; + if (!first) sb.append(", "); + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastName:"); + if (this.lastName == null) { + sb.append("null"); + } else { + sb.append(this.lastName); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstName:"); + if (this.firstName == null) { + sb.append("null"); + } else { + sb.append(this.firstName); + } + first = false; + if (!first) sb.append(", "); + sb.append("mail:"); + if (this.mail == null) { + sb.append("null"); + } else { + sb.append(this.mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("university:"); + if (this.university == null) { + sb.append("null"); + } else { + sb.append(this.university); + } + first = false; + if (!first) sb.append(", "); + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + 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 writeImageRights_argsStandardSchemeFactory implements SchemeFactory { + public writeImageRights_argsStandardScheme getScheme() { + return new writeImageRights_argsStandardScheme(); + } + } + + private static class writeImageRights_argsStandardScheme extends StandardScheme<writeImageRights_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeImageRights_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: // IMAGENAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // LAST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // FIRST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // UNIVERSITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role = iprot.readString(); + struct.setRoleIsSet(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, writeImageRights_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role != null) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + oprot.writeString(struct.role); + oprot.writeFieldEnd(); + } + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.mail); + oprot.writeFieldEnd(); + } + if (struct.firstName != null) { + oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC); + oprot.writeString(struct.firstName); + oprot.writeFieldEnd(); + } + if (struct.lastName != null) { + oprot.writeFieldBegin(LAST_NAME_FIELD_DESC); + oprot.writeString(struct.lastName); + oprot.writeFieldEnd(); + } + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + if (struct.imagename != null) { + oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); + oprot.writeString(struct.imagename); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeImageRights_argsTupleSchemeFactory implements SchemeFactory { + public writeImageRights_argsTupleScheme getScheme() { + return new writeImageRights_argsTupleScheme(); + } + } + + private static class writeImageRights_argsTupleScheme extends TupleScheme<writeImageRights_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeImageRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImagename()) { + optionals.set(0); + } + if (struct.isSetUsername()) { + optionals.set(1); + } + if (struct.isSetLastName()) { + optionals.set(2); + } + if (struct.isSetFirstName()) { + optionals.set(3); + } + if (struct.isSetMail()) { + optionals.set(4); + } + if (struct.isSetUniversity()) { + optionals.set(5); + } + if (struct.isSetRole()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetImagename()) { + oprot.writeString(struct.imagename); + } + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetLastName()) { + oprot.writeString(struct.lastName); + } + if (struct.isSetFirstName()) { + oprot.writeString(struct.firstName); + } + if (struct.isSetMail()) { + oprot.writeString(struct.mail); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + if (struct.isSetRole()) { + oprot.writeString(struct.role); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeImageRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } + if (incoming.get(1)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + if (incoming.get(2)) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } + if (incoming.get(3)) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } + if (incoming.get(4)) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(5)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + if (incoming.get(6)) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } + } + } + + } + + public static class writeImageRights_result implements org.apache.thrift.TBase<writeImageRights_result, writeImageRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeImageRights_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImageRights_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeImageRights_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeImageRights_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImageRights_result.class, metaDataMap); + } + + public writeImageRights_result() { + } + + public writeImageRights_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeImageRights_result(writeImageRights_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public writeImageRights_result deepCopy() { + return new writeImageRights_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public writeImageRights_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeImageRights_result) + return this.equals((writeImageRights_result)that); + return false; + } + + public boolean equals(writeImageRights_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeImageRights_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("writeImageRights_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeImageRights_resultStandardSchemeFactory implements SchemeFactory { + public writeImageRights_resultStandardScheme getScheme() { + return new writeImageRights_resultStandardScheme(); + } + } + + private static class writeImageRights_resultStandardScheme extends StandardScheme<writeImageRights_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeImageRights_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeImageRights_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeImageRights_resultTupleSchemeFactory implements SchemeFactory { + public writeImageRights_resultTupleScheme getScheme() { + return new writeImageRights_resultTupleScheme(); + } + } + + private static class writeImageRights_resultTupleScheme extends TupleScheme<writeImageRights_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeImageRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeImageRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class writeLectureRights_args implements org.apache.thrift.TBase<writeLectureRights_args, writeLectureRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeLectureRights_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLectureRights_args"); + + private static final org.apache.thrift.protocol.TField LECTURENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lecturename", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-6); + private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)-7); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeLectureRights_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLectureRights_argsTupleSchemeFactory()); + } + + public String lecturename; // required + public String username; // required + public String lastName; // required + public String firstName; // required + public String mail; // required + public String university; // required + public String role; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LECTURENAME((short)-1, "lecturename"), + USERNAME((short)-2, "username"), + LAST_NAME((short)-3, "lastName"), + FIRST_NAME((short)-4, "firstName"), + MAIL((short)-5, "mail"), + UNIVERSITY((short)-6, "university"), + ROLE((short)-7, "role"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // LECTURENAME + return LECTURENAME; + case -2: // USERNAME + return USERNAME; + case -3: // LAST_NAME + return LAST_NAME; + case -4: // FIRST_NAME + return FIRST_NAME; + case -5: // MAIL + return MAIL; + case -6: // UNIVERSITY + return UNIVERSITY; + case -7: // ROLE + return ROLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LECTURENAME, new org.apache.thrift.meta_data.FieldMetaData("lecturename", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", 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(writeLectureRights_args.class, metaDataMap); + } + + public writeLectureRights_args() { + } + + public writeLectureRights_args( + String lecturename, + String username, + String lastName, + String firstName, + String mail, + String university, + String role) + { + this(); + this.lecturename = lecturename; + this.username = username; + this.lastName = lastName; + this.firstName = firstName; + this.mail = mail; + this.university = university; + this.role = role; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeLectureRights_args(writeLectureRights_args other) { + if (other.isSetLecturename()) { + this.lecturename = other.lecturename; + } + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetLastName()) { + this.lastName = other.lastName; + } + if (other.isSetFirstName()) { + this.firstName = other.firstName; + } + if (other.isSetMail()) { + this.mail = other.mail; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + if (other.isSetRole()) { + this.role = other.role; + } + } + + public writeLectureRights_args deepCopy() { + return new writeLectureRights_args(this); + } + + @Override + public void clear() { + this.lecturename = null; + this.username = null; + this.lastName = null; + this.firstName = null; + this.mail = null; + this.university = null; + this.role = null; + } + + public String getLecturename() { + return this.lecturename; + } + + public writeLectureRights_args setLecturename(String lecturename) { + this.lecturename = lecturename; + return this; + } + + public void unsetLecturename() { + this.lecturename = null; + } + + /** Returns true if field lecturename is set (has been assigned a value) and false otherwise */ + public boolean isSetLecturename() { + return this.lecturename != null; + } + + public void setLecturenameIsSet(boolean value) { + if (!value) { + this.lecturename = null; + } + } + + public String getUsername() { + return this.username; + } + + public writeLectureRights_args setUsername(String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public String getLastName() { + return this.lastName; + } + + public writeLectureRights_args setLastName(String lastName) { + this.lastName = lastName; + return this; + } + + public void unsetLastName() { + this.lastName = null; + } + + /** Returns true if field lastName is set (has been assigned a value) and false otherwise */ + public boolean isSetLastName() { + return this.lastName != null; + } + + public void setLastNameIsSet(boolean value) { + if (!value) { + this.lastName = null; + } + } + + public String getFirstName() { + return this.firstName; + } + + public writeLectureRights_args setFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + public void unsetFirstName() { + this.firstName = null; + } + + /** Returns true if field firstName is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstName() { + return this.firstName != null; + } + + public void setFirstNameIsSet(boolean value) { + if (!value) { + this.firstName = null; + } + } + + public String getMail() { + return this.mail; + } + + public writeLectureRights_args setMail(String mail) { + this.mail = mail; + return this; + } + + public void unsetMail() { + this.mail = null; + } + + /** Returns true if field mail is set (has been assigned a value) and false otherwise */ + public boolean isSetMail() { + return this.mail != null; + } + + public void setMailIsSet(boolean value) { + if (!value) { + this.mail = null; + } + } + + public String getUniversity() { + return this.university; + } + + public writeLectureRights_args setUniversity(String university) { + this.university = university; + return this; + } + + public void unsetUniversity() { + this.university = null; + } + + /** Returns true if field university is set (has been assigned a value) and false otherwise */ + public boolean isSetUniversity() { + return this.university != null; + } + + public void setUniversityIsSet(boolean value) { + if (!value) { + this.university = null; + } + } + + public String getRole() { + return this.role; + } + + public writeLectureRights_args setRole(String role) { + this.role = role; + return this; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LECTURENAME: + if (value == null) { + unsetLecturename(); + } else { + setLecturename((String)value); + } + break; + + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + case LAST_NAME: + if (value == null) { + unsetLastName(); + } else { + setLastName((String)value); + } + break; + + case FIRST_NAME: + if (value == null) { + unsetFirstName(); + } else { + setFirstName((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LECTURENAME: + return getLecturename(); + + case USERNAME: + return getUsername(); + + case LAST_NAME: + return getLastName(); + + case FIRST_NAME: + return getFirstName(); + + case MAIL: + return getMail(); + + case UNIVERSITY: + return getUniversity(); + + case ROLE: + return getRole(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LECTURENAME: + return isSetLecturename(); + case USERNAME: + return isSetUsername(); + case LAST_NAME: + return isSetLastName(); + case FIRST_NAME: + return isSetFirstName(); + case MAIL: + return isSetMail(); + case UNIVERSITY: + return isSetUniversity(); + case ROLE: + return isSetRole(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeLectureRights_args) + return this.equals((writeLectureRights_args)that); + return false; + } + + public boolean equals(writeLectureRights_args that) { + if (that == null) + return false; + + boolean this_present_lecturename = true && this.isSetLecturename(); + boolean that_present_lecturename = true && that.isSetLecturename(); + if (this_present_lecturename || that_present_lecturename) { + if (!(this_present_lecturename && that_present_lecturename)) + return false; + if (!this.lecturename.equals(that.lecturename)) + return false; + } + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_lastName = true && this.isSetLastName(); + boolean that_present_lastName = true && that.isSetLastName(); + if (this_present_lastName || that_present_lastName) { + if (!(this_present_lastName && that_present_lastName)) + return false; + if (!this.lastName.equals(that.lastName)) + return false; + } + + boolean this_present_firstName = true && this.isSetFirstName(); + boolean that_present_firstName = true && that.isSetFirstName(); + if (this_present_firstName || that_present_firstName) { + if (!(this_present_firstName && that_present_firstName)) + return false; + if (!this.firstName.equals(that.firstName)) + return false; + } + + boolean this_present_mail = true && this.isSetMail(); + boolean that_present_mail = true && that.isSetMail(); + if (this_present_mail || that_present_mail) { + if (!(this_present_mail && that_present_mail)) + return false; + if (!this.mail.equals(that.mail)) + return false; + } + + boolean this_present_university = true && this.isSetUniversity(); + boolean that_present_university = true && that.isSetUniversity(); + if (this_present_university || that_present_university) { + if (!(this_present_university && that_present_university)) + return false; + if (!this.university.equals(that.university)) + return false; + } + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeLectureRights_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLecturename()).compareTo(other.isSetLecturename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLecturename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecturename, other.lecturename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniversity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + 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("writeLectureRights_args("); + boolean first = true; + + sb.append("lecturename:"); + if (this.lecturename == null) { + sb.append("null"); + } else { + sb.append(this.lecturename); + } + first = false; + if (!first) sb.append(", "); + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastName:"); + if (this.lastName == null) { + sb.append("null"); + } else { + sb.append(this.lastName); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstName:"); + if (this.firstName == null) { + sb.append("null"); + } else { + sb.append(this.firstName); + } + first = false; + if (!first) sb.append(", "); + sb.append("mail:"); + if (this.mail == null) { + sb.append("null"); + } else { + sb.append(this.mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("university:"); + if (this.university == null) { + sb.append("null"); + } else { + sb.append(this.university); + } + first = false; + if (!first) sb.append(", "); + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + 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 writeLectureRights_argsStandardSchemeFactory implements SchemeFactory { + public writeLectureRights_argsStandardScheme getScheme() { + return new writeLectureRights_argsStandardScheme(); + } + } + + private static class writeLectureRights_argsStandardScheme extends StandardScheme<writeLectureRights_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLectureRights_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // LECTURENAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lecturename = iprot.readString(); + struct.setLecturenameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // LAST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // FIRST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // UNIVERSITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role = iprot.readString(); + struct.setRoleIsSet(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, writeLectureRights_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role != null) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + oprot.writeString(struct.role); + oprot.writeFieldEnd(); + } + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.mail); + oprot.writeFieldEnd(); + } + if (struct.firstName != null) { + oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC); + oprot.writeString(struct.firstName); + oprot.writeFieldEnd(); + } + if (struct.lastName != null) { + oprot.writeFieldBegin(LAST_NAME_FIELD_DESC); + oprot.writeString(struct.lastName); + oprot.writeFieldEnd(); + } + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + if (struct.lecturename != null) { + oprot.writeFieldBegin(LECTURENAME_FIELD_DESC); + oprot.writeString(struct.lecturename); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeLectureRights_argsTupleSchemeFactory implements SchemeFactory { + public writeLectureRights_argsTupleScheme getScheme() { + return new writeLectureRights_argsTupleScheme(); + } + } + + private static class writeLectureRights_argsTupleScheme extends TupleScheme<writeLectureRights_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLecturename()) { + optionals.set(0); + } + if (struct.isSetUsername()) { + optionals.set(1); + } + if (struct.isSetLastName()) { + optionals.set(2); + } + if (struct.isSetFirstName()) { + optionals.set(3); + } + if (struct.isSetMail()) { + optionals.set(4); + } + if (struct.isSetUniversity()) { + optionals.set(5); + } + if (struct.isSetRole()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetLecturename()) { + oprot.writeString(struct.lecturename); + } + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetLastName()) { + oprot.writeString(struct.lastName); + } + if (struct.isSetFirstName()) { + oprot.writeString(struct.firstName); + } + if (struct.isSetMail()) { + oprot.writeString(struct.mail); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + if (struct.isSetRole()) { + oprot.writeString(struct.role); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.lecturename = iprot.readString(); + struct.setLecturenameIsSet(true); + } + if (incoming.get(1)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + if (incoming.get(2)) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } + if (incoming.get(3)) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } + if (incoming.get(4)) { + struct.mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(5)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + if (incoming.get(6)) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } + } + } + + } + + public static class writeLectureRights_result implements org.apache.thrift.TBase<writeLectureRights_result, writeLectureRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeLectureRights_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLectureRights_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeLectureRights_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLectureRights_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLectureRights_result.class, metaDataMap); + } + + public writeLectureRights_result() { + } + + public writeLectureRights_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeLectureRights_result(writeLectureRights_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public writeLectureRights_result deepCopy() { + return new writeLectureRights_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public writeLectureRights_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeLectureRights_result) + return this.equals((writeLectureRights_result)that); + return false; + } + + public boolean equals(writeLectureRights_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeLectureRights_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("writeLectureRights_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeLectureRights_resultStandardSchemeFactory implements SchemeFactory { + public writeLectureRights_resultStandardScheme getScheme() { + return new writeLectureRights_resultStandardScheme(); + } + } + + private static class writeLectureRights_resultStandardScheme extends StandardScheme<writeLectureRights_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLectureRights_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeLectureRights_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeLectureRights_resultTupleSchemeFactory implements SchemeFactory { + public writeLectureRights_resultTupleScheme getScheme() { + return new writeLectureRights_resultTupleScheme(); + } + } + + private static class writeLectureRights_resultTupleScheme extends TupleScheme<writeLectureRights_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + } diff --git a/Dozentenmodulserver/src/main/java/server/ServerHandler.java b/Dozentenmodulserver/src/main/java/server/ServerHandler.java index 6534ca3d..35b9579a 100644 --- a/Dozentenmodulserver/src/main/java/server/ServerHandler.java +++ b/Dozentenmodulserver/src/main/java/server/ServerHandler.java @@ -20,6 +20,9 @@ import models.Configuration; import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.apache.thrift.TException; + +import com.mysql.jdbc.StringUtils; + import sql.SQL; import util.XMLCreator; @@ -156,11 +159,11 @@ public class ServerHandler implements Server.Iface { } @Override - public boolean writeVLdata(String imagename, 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) throws TException { + long filesize, long shareMode, String os) throws TException { String mode=null; @@ -177,8 +180,12 @@ public class ServerHandler implements Server.Iface { String pk_person = sql.setPerson(login, lastname, firstname, Mail, new Date(), pk_institution); - sql.setImageData(pk_person, license, internet, cpu, ram, imagename, - imagePath, isTemplate, filesize,mode); + //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, isTemplate, filesize,mode,pk_os); log.info(new Date() + " - written VLdata"); // TODO Auto-generated method stub @@ -276,10 +283,10 @@ public class ServerHandler implements Server.Iface { } @Override - public boolean updateImageData(String name, String newName, + 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) throws TException { + long filesize, long shareMode, String os) throws TException { String mode=null; if(shareMode==0) @@ -289,17 +296,14 @@ public class ServerHandler implements Server.Iface { else{ mode="to_be_published"; } - sql.UpdateImageData(name, newName, image_path, license, internet, cpu, - ram, id, version, isTemplate, filesize,mode); + 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 Map<String, String> getLectureData(String lecturename) - throws TException { - // TODO Auto-generated method stub - return null; - } + + @Override public List<Lecture> getLectureList() throws TException { @@ -315,18 +319,26 @@ public class ServerHandler implements Server.Iface { @Override public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, - boolean isActive, String imagename, String firstname, + boolean isActive, String imageid,String imageversion,String user ,String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws TException { - String pk_image = ""; - int imageversion = 0; - Map<String, String> image = sql.getImageIDandVersion(imagename); - - pk_image = image.get("GUID"); - imageversion = Integer.parseInt(image.get("version")); - sql.updateLectureData(pk_image, imageversion, lastname, newName, desc, + Map<String, String> map = new HashMap<String, String>(); + 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); + try { + FileUtils.forceDelete(tmpFile); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } XMLCreator xml = new XMLCreator(sql.getConnection(), newName); try { xml.create(newName); @@ -336,8 +348,6 @@ public class ServerHandler implements Server.Iface { e.printStackTrace(); } - // sql.updateLectureData(con, pk_image, imageversion, lastname, newName, - // desc, shortdesc, startDate, endDate, isActive, id); return false; } @@ -384,7 +394,7 @@ public class ServerHandler implements Server.Iface { try { String path = Configuration.config.getAbsolute_path() - + "temp/" + + "prod/" + map.get("date") .substring(0, map.get("date").length() - 2) + "_" + hs + "_" + user + "_" + map.get("name") + ".xml"; @@ -403,5 +413,135 @@ public class ServerHandler implements Server.Iface { return sql.getAllUniversities(); } + + @Override + public Map<String, String> getLectureData(String lectureid) + throws TException { + log.info(new Date() + " - returning LectureData: " + + sql.getLectureData(lectureid).size() + "items."); + return sql.getLectureData(lectureid); + } + + + + + public static int nthIndexOf(final String string, final String token, + final int index) + { + int j = 0; + + 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 + public boolean createUser(String loginName, String lastName, + String firstName, String mail, String university) throws TException { + String pk_institution = sql.setInstitution(university); + String pk_person = sql.setPerson(loginName, lastName, firstName, mail, + new Date(), pk_institution); + return true; + } + + @Override + public boolean writeImageRights(String imagename, String username, String lastName, String firstName, String mail, String university, String role) + throws TException { + String pk_image = null; + Map<String, String> map = new HashMap<String, String>(); + int imageversion = 0; + String pk_institution = sql.setInstitution(university); + String pk_person = sql.setPerson(username, lastName, firstName, mail, + new Date(), pk_institution); + 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=0; + int linkallowed=1; + int roleID=sql.getRoleID(role); + + sql.setImageRights(pk_person, pk_image, roleID, read, write, changePermission, 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, changePermission, 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, changePermission, admin, linkallowed); + } + + return true; + } + + @Override + public boolean writeLectureRights(String lecturename, String username, + 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); + } + + return true; + } + } diff --git a/Dozentenmodulserver/src/main/java/server/StartServer.java b/Dozentenmodulserver/src/main/java/server/StartServer.java index 4d5019e6..7280ee99 100644 --- a/Dozentenmodulserver/src/main/java/server/StartServer.java +++ b/Dozentenmodulserver/src/main/java/server/StartServer.java @@ -5,62 +5,44 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.List; - import models.Configuration; - import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import org.ini4j.InvalidFileFormatException; import org.ini4j.Wini; - - import server.BinaryListener; -import org.apache.thrift.protocol.TProtocolFactory; -import org.apache.thrift.server.TServer; -import org.apache.thrift.server.TThreadPoolServer; -import org.apache.thrift.transport.TServerSocket; -import org.apache.thrift.transport.TServerTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.thrift.server.TThreadPoolServer.Args; + public class StartServer { /** * @param args */ - - private static Logger log = Logger.getLogger( StartServer.class ); + + private static Logger log = Logger.getLogger(StartServer.class); private static List<Thread> servers = new ArrayList<>(); - - + public static void main(String[] args) { - - - //final ImageServerHandler handler = new ImageServerHandler(); - //final ImageServer.Processor<ImageServerHandler> processor = new ImageServer.Processor<ImageServerHandler>(handler); - - /* - try{ - TServerTransport serverTransport = new TServerSocket(9090); - //TServer server = new TSimpleServer(new Args(serverTransport).processor(processor)); - TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor)); - server.serve(); - } catch (Exception e){ - e.printStackTrace(); - } - */ - - //deprecated + String version = "Version: 1.03"; + String buildDate = "Build Date: 09.09.2014"; + + //get going and show basic information in logfile + BasicConfigurator.configure(); + log.info("***** " + new Date() + " - starting Application *****"); + log.info(new Date() + " - "+version+" , "+buildDate); - //get Configuration + // get Configuration try { - Wini ini=new Wini(new File("Server_Config.ini")); - Configuration.config.setAbsolute_path(ini.get("ftp", "path_absolute")); - Configuration.config.setSql_connection(ini.get("sql", "connection")); + log.info(new Date() + " - Getting config from .ini-file"); + Wini ini = new Wini(new File("Server_Config.ini")); + Configuration.config.setAbsolute_path(ini.get("ftp", + "path_absolute")); + Configuration.config + .setSql_connection(ini.get("sql", "connection")); Configuration.config.setSql_pass(ini.get("sql", "pass")); Configuration.config.setSql_user(ini.get("sql", "user")); } catch (InvalidFileFormatException e1) { @@ -70,32 +52,24 @@ public class StartServer { // TODO Auto-generated catch block e1.printStackTrace(); } - //Start Server - - BasicConfigurator.configure(); - log.info("***** "+ new Date() + " - starting Application *****" ); + // Start Server Thread t; t = new Thread(new BinaryListener()); servers.add(t); t.start(); - //information - //log.info( new Date()+" - new thread created. Now "+servers.size()+" thread(s).\n" ); - // Run more servers - // ... - // Wait for all servers to die for (Thread wait : servers) { boolean success = false; while (!success) { try { wait.join(); success = true; - } catch ( InterruptedException e ) { + } catch (InterruptedException e) { // Do nothing... } } } - log.info( new Date()+" - all Servers shut down, exiting...\n" ); - + log.info(new Date() + " - all Servers shut down, exiting...\n"); + } } |
