diff options
| author | unknown | 2014-04-10 16:50:14 +0200 |
|---|---|---|
| committer | unknown | 2014-04-10 16:50:14 +0200 |
| commit | 236f2e7bf2c9d5cdec6da36140ee7dcac7944998 (patch) | |
| tree | 2de499a71a527c7320b2096c17c5a69d2ea8d288 /Dozentenmodulserver/src/server | |
| parent | bfg (diff) | |
| parent | cdsc (diff) | |
| download | tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.gz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.xz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
Dozentenmodul/src/GUI/SearchImage_GUI.java
Dozentenmodul/src/Models/person.java
Dozentenmodul/src/Models/vm.java
Diffstat (limited to 'Dozentenmodulserver/src/server')
| -rw-r--r-- | Dozentenmodulserver/src/server/BinaryListener.java | 7 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/Image.java | 275 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/Lecture.java | 1188 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/Server.java | 5608 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/ServerHandler.java | 119 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/User.java | 1 | ||||
| -rw-r--r-- | Dozentenmodulserver/src/server/startServer.java | 5 |
7 files changed, 6197 insertions, 1006 deletions
diff --git a/Dozentenmodulserver/src/server/BinaryListener.java b/Dozentenmodulserver/src/server/BinaryListener.java index 7c546fee..8d592992 100644 --- a/Dozentenmodulserver/src/server/BinaryListener.java +++ b/Dozentenmodulserver/src/server/BinaryListener.java @@ -1,5 +1,7 @@ package server; +import java.util.Date; + import org.apache.log4j.Logger; import org.apache.thrift.server.TServer; import org.apache.thrift.server.TServer.Args; @@ -20,12 +22,13 @@ public class BinaryListener implements Runnable final TServerTransport transport; try { transport = new TServerSocket( 9090 ); + log.info(new Date()+" - Connected to Port 9090"); } catch ( TTransportException e ) { - log.fatal( "Could not listen on port 9090" ); + log.fatal( new Date() +" - Could not listen on port 9090" ); return; } TServer server = new TSimpleServer( new Args( transport ).processor( processor ) ); - log.info("Starting TSimpleServer"); + log.info(new Date() +" - Started Running Server"); server.serve(); } diff --git a/Dozentenmodulserver/src/server/Image.java b/Dozentenmodulserver/src/server/Image.java index ec1a813f..34c2b45c 100644 --- a/Dozentenmodulserver/src/server/Image.java +++ b/Dozentenmodulserver/src/server/Image.java @@ -5,6 +5,7 @@ * @generated */ package server; + import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -34,12 +35,14 @@ import org.slf4j.LoggerFactory; public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, java.io.Serializable, Cloneable, Comparable<Image> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Image"); - private static final org.apache.thrift.protocol.TField IMAGE_NAME_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 LICENSE_RESTRICTION_FIELD_DESC = new org.apache.thrift.protocol.TField("licenseRestriction", org.apache.thrift.protocol.TType.STRING, (short)-2); - private static final org.apache.thrift.protocol.TField OS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("osName", org.apache.thrift.protocol.TType.STRING, (short)-3); - 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)-4); - 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)-5); - 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)-6); + 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)-1); + 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)-2); + private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField LICENSE_RESTRICTION_FIELD_DESC = new org.apache.thrift.protocol.TField("licenseRestriction", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField OS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("osName", org.apache.thrift.protocol.TType.STRING, (short)-5); + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -47,6 +50,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav schemes.put(TupleScheme.class, new ImageTupleSchemeFactory()); } + public String id; // required + public String version; // required public String imageName; // required public String licenseRestriction; // required public String osName; // required @@ -56,12 +61,14 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - IMAGE_NAME((short)-1, "imageName"), - LICENSE_RESTRICTION((short)-2, "licenseRestriction"), - OS_NAME((short)-3, "osName"), - LECTURE_NAME((short)-4, "lectureName"), - UPDATE_TIME((short)-5, "updateTime"), - USER_DATA((short)-6, "userData"); + ID((short)-1, "id"), + VERSION((short)-2, "version"), + IMAGE_NAME((short)-3, "imageName"), + LICENSE_RESTRICTION((short)-4, "licenseRestriction"), + OS_NAME((short)-5, "osName"), + LECTURE_NAME((short)-6, "lectureName"), + UPDATE_TIME((short)-7, "updateTime"), + USER_DATA((short)-8, "userData"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -76,17 +83,21 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case -1: // IMAGE_NAME + case -1: // ID + return ID; + case -2: // VERSION + return VERSION; + case -3: // IMAGE_NAME return IMAGE_NAME; - case -2: // LICENSE_RESTRICTION + case -4: // LICENSE_RESTRICTION return LICENSE_RESTRICTION; - case -3: // OS_NAME + case -5: // OS_NAME return OS_NAME; - case -4: // LECTURE_NAME + case -6: // LECTURE_NAME return LECTURE_NAME; - case -5: // UPDATE_TIME + case -7: // UPDATE_TIME return UPDATE_TIME; - case -6: // USER_DATA + case -8: // USER_DATA return USER_DATA; default: return null; @@ -131,6 +142,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_NAME, 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.LICENSE_RESTRICTION, new org.apache.thrift.meta_data.FieldMetaData("licenseRestriction", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -151,6 +166,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } public Image( + String id, + String version, String imageName, String licenseRestriction, String osName, @@ -159,6 +176,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav String userData) { this(); + this.id = id; + this.version = version; this.imageName = imageName; this.licenseRestriction = licenseRestriction; this.osName = osName; @@ -171,6 +190,12 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav * Performs a deep copy on <i>other</i>. */ public Image(Image other) { + if (other.isSetId()) { + this.id = other.id; + } + if (other.isSetVersion()) { + this.version = other.version; + } if (other.isSetImageName()) { this.imageName = other.imageName; } @@ -197,6 +222,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav @Override public void clear() { + this.id = null; + this.version = null; this.imageName = null; this.licenseRestriction = null; this.osName = null; @@ -205,6 +232,54 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav this.userData = null; } + public String getId() { + return this.id; + } + + public Image setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public String getVersion() { + return this.version; + } + + public Image setVersion(String version) { + this.version = version; + return this; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + public String getImageName() { return this.imageName; } @@ -351,6 +426,22 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav public void setFieldValue(_Fields field, Object value) { switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((String)value); + } + break; + case IMAGE_NAME: if (value == null) { unsetImageName(); @@ -404,6 +495,12 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav public Object getFieldValue(_Fields field) { switch (field) { + case ID: + return getId(); + + case VERSION: + return getVersion(); + case IMAGE_NAME: return getImageName(); @@ -433,6 +530,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } switch (field) { + case ID: + return isSetId(); + case VERSION: + return isSetVersion(); case IMAGE_NAME: return isSetImageName(); case LICENSE_RESTRICTION: @@ -462,6 +563,24 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav if (that == null) return false; + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + boolean this_present_imageName = true && this.isSetImageName(); boolean that_present_imageName = true && that.isSetImageName(); if (this_present_imageName || that_present_imageName) { @@ -532,6 +651,26 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); if (lastComparison != 0) { return lastComparison; @@ -612,6 +751,22 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav StringBuilder sb = new StringBuilder("Image("); boolean first = true; + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); sb.append("imageName:"); if (this.imageName == null) { sb.append("null"); @@ -702,7 +857,23 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav break; } switch (schemeField.id) { - case -1: // IMAGE_NAME + case -1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // IMAGE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageName = iprot.readString(); struct.setImageNameIsSet(true); @@ -710,7 +881,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -2: // LICENSE_RESTRICTION + case -4: // LICENSE_RESTRICTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.licenseRestriction = iprot.readString(); struct.setLicenseRestrictionIsSet(true); @@ -718,7 +889,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -3: // OS_NAME + case -5: // OS_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.osName = iprot.readString(); struct.setOsNameIsSet(true); @@ -726,7 +897,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -4: // LECTURE_NAME + case -6: // LECTURE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -734,7 +905,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -5: // UPDATE_TIME + case -7: // UPDATE_TIME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.updateTime = iprot.readString(); struct.setUpdateTimeIsSet(true); @@ -742,7 +913,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -6: // USER_DATA + case -8: // USER_DATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userData = iprot.readString(); struct.setUserDataIsSet(true); @@ -795,6 +966,16 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav oprot.writeString(struct.imageName); oprot.writeFieldEnd(); } + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -813,25 +994,37 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav public void write(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetImageName()) { + if (struct.isSetId()) { optionals.set(0); } - if (struct.isSetLicenseRestriction()) { + if (struct.isSetVersion()) { optionals.set(1); } - if (struct.isSetOsName()) { + if (struct.isSetImageName()) { optionals.set(2); } - if (struct.isSetLectureName()) { + if (struct.isSetLicenseRestriction()) { optionals.set(3); } - if (struct.isSetUpdateTime()) { + if (struct.isSetOsName()) { optionals.set(4); } - if (struct.isSetUserData()) { + if (struct.isSetLectureName()) { optionals.set(5); } - oprot.writeBitSet(optionals, 6); + if (struct.isSetUpdateTime()) { + optionals.set(6); + } + if (struct.isSetUserData()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + if (struct.isSetVersion()) { + oprot.writeString(struct.version); + } if (struct.isSetImageName()) { oprot.writeString(struct.imageName); } @@ -855,28 +1048,36 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav @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(6); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + if (incoming.get(1)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } + if (incoming.get(2)) { struct.imageName = iprot.readString(); struct.setImageNameIsSet(true); } - if (incoming.get(1)) { + if (incoming.get(3)) { struct.licenseRestriction = iprot.readString(); struct.setLicenseRestrictionIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(4)) { struct.osName = iprot.readString(); struct.setOsNameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(5)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(6)) { struct.updateTime = iprot.readString(); struct.setUpdateTimeIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(7)) { struct.userData = iprot.readString(); struct.setUserDataIsSet(true); } diff --git a/Dozentenmodulserver/src/server/Lecture.java b/Dozentenmodulserver/src/server/Lecture.java new file mode 100644 index 00000000..0c61ad84 --- /dev/null +++ b/Dozentenmodulserver/src/server/Lecture.java @@ -0,0 +1,1188 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package server; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Lecture implements org.apache.thrift.TBase<Lecture, Lecture._Fields>, java.io.Serializable, Cloneable, Comparable<Lecture> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Lecture"); + + 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)-1); + 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)-2); + private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField STARTTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("starttime", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField ENDTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endtime", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField LASTUSED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastused", org.apache.thrift.protocol.TType.STRING, (short)-6); + 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)-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 USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)-9); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LectureStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LectureTupleSchemeFactory()); + } + + public String id; // required + public String lecturename; // required + public String isActive; // required + public String starttime; // required + public String endtime; // required + public String lastused; // required + public String desc; // required + public String imagename; // required + 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 { + ID((short)-1, "id"), + LECTURENAME((short)-2, "lecturename"), + IS_ACTIVE((short)-3, "isActive"), + STARTTIME((short)-4, "starttime"), + ENDTIME((short)-5, "endtime"), + LASTUSED((short)-6, "lastused"), + DESC((short)-7, "desc"), + IMAGENAME((short)-8, "imagename"), + USERNAME((short)-9, "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: // ID + return ID; + case -2: // LECTURENAME + return LECTURENAME; + case -3: // IS_ACTIVE + return IS_ACTIVE; + case -4: // STARTTIME + return STARTTIME; + case -5: // ENDTIME + return ENDTIME; + case -6: // LASTUSED + return LASTUSED; + case -7: // DESC + return DESC; + case -8: // IMAGENAME + return IMAGENAME; + case -9: // 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.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.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.STRING))); + tmpMap.put(_Fields.STARTTIME, new org.apache.thrift.meta_data.FieldMetaData("starttime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENDTIME, new org.apache.thrift.meta_data.FieldMetaData("endtime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LASTUSED, new org.apache.thrift.meta_data.FieldMetaData("lastused", 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Lecture.class, metaDataMap); + } + + public Lecture() { + } + + public Lecture( + String id, + String lecturename, + String isActive, + String starttime, + String endtime, + String lastused, + String desc, + String imagename, + String username) + { + this(); + this.id = id; + this.lecturename = lecturename; + this.isActive = isActive; + this.starttime = starttime; + this.endtime = endtime; + this.lastused = lastused; + this.desc = desc; + this.imagename = imagename; + this.username = username; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public Lecture(Lecture other) { + if (other.isSetId()) { + this.id = other.id; + } + if (other.isSetLecturename()) { + this.lecturename = other.lecturename; + } + if (other.isSetIsActive()) { + this.isActive = other.isActive; + } + if (other.isSetStarttime()) { + this.starttime = other.starttime; + } + if (other.isSetEndtime()) { + this.endtime = other.endtime; + } + if (other.isSetLastused()) { + this.lastused = other.lastused; + } + if (other.isSetDesc()) { + this.desc = other.desc; + } + if (other.isSetImagename()) { + this.imagename = other.imagename; + } + if (other.isSetUsername()) { + this.username = other.username; + } + } + + public Lecture deepCopy() { + return new Lecture(this); + } + + @Override + public void clear() { + this.id = null; + this.lecturename = null; + this.isActive = null; + this.starttime = null; + this.endtime = null; + this.lastused = null; + this.desc = null; + this.imagename = null; + this.username = null; + } + + public String getId() { + return this.id; + } + + public Lecture setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public String getLecturename() { + return this.lecturename; + } + + public Lecture 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 getIsActive() { + return this.isActive; + } + + public Lecture setIsActive(String isActive) { + this.isActive = isActive; + return this; + } + + public void unsetIsActive() { + this.isActive = null; + } + + /** Returns true if field isActive is set (has been assigned a value) and false otherwise */ + public boolean isSetIsActive() { + return this.isActive != null; + } + + public void setIsActiveIsSet(boolean value) { + if (!value) { + this.isActive = null; + } + } + + public String getStarttime() { + return this.starttime; + } + + public Lecture setStarttime(String starttime) { + this.starttime = starttime; + return this; + } + + public void unsetStarttime() { + this.starttime = null; + } + + /** Returns true if field starttime is set (has been assigned a value) and false otherwise */ + public boolean isSetStarttime() { + return this.starttime != null; + } + + public void setStarttimeIsSet(boolean value) { + if (!value) { + this.starttime = null; + } + } + + public String getEndtime() { + return this.endtime; + } + + public Lecture setEndtime(String endtime) { + this.endtime = endtime; + return this; + } + + public void unsetEndtime() { + this.endtime = null; + } + + /** Returns true if field endtime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndtime() { + return this.endtime != null; + } + + public void setEndtimeIsSet(boolean value) { + if (!value) { + this.endtime = null; + } + } + + public String getLastused() { + return this.lastused; + } + + public Lecture setLastused(String lastused) { + this.lastused = lastused; + return this; + } + + public void unsetLastused() { + this.lastused = null; + } + + /** Returns true if field lastused is set (has been assigned a value) and false otherwise */ + public boolean isSetLastused() { + return this.lastused != null; + } + + public void setLastusedIsSet(boolean value) { + if (!value) { + this.lastused = null; + } + } + + public String getDesc() { + return this.desc; + } + + public Lecture 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 getImagename() { + return this.imagename; + } + + public Lecture 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 Lecture 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 ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + case LECTURENAME: + if (value == null) { + unsetLecturename(); + } else { + setLecturename((String)value); + } + break; + + case IS_ACTIVE: + if (value == null) { + unsetIsActive(); + } else { + setIsActive((String)value); + } + break; + + case STARTTIME: + if (value == null) { + unsetStarttime(); + } else { + setStarttime((String)value); + } + break; + + case ENDTIME: + if (value == null) { + unsetEndtime(); + } else { + setEndtime((String)value); + } + break; + + case LASTUSED: + if (value == null) { + unsetLastused(); + } else { + setLastused((String)value); + } + break; + + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + + case IMAGENAME: + if (value == null) { + unsetImagename(); + } else { + setImagename((String)value); + } + break; + + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return getId(); + + case LECTURENAME: + return getLecturename(); + + case IS_ACTIVE: + return getIsActive(); + + case STARTTIME: + return getStarttime(); + + case ENDTIME: + return getEndtime(); + + case LASTUSED: + return getLastused(); + + case DESC: + return getDesc(); + + case IMAGENAME: + return getImagename(); + + 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 ID: + return isSetId(); + case LECTURENAME: + return isSetLecturename(); + case IS_ACTIVE: + return isSetIsActive(); + case STARTTIME: + return isSetStarttime(); + case ENDTIME: + return isSetEndtime(); + case LASTUSED: + return isSetLastused(); + case DESC: + return isSetDesc(); + case IMAGENAME: + return isSetImagename(); + case USERNAME: + return isSetUsername(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Lecture) + return this.equals((Lecture)that); + return false; + } + + public boolean equals(Lecture that) { + if (that == null) + return false; + + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + boolean this_present_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_isActive = true && this.isSetIsActive(); + boolean that_present_isActive = true && that.isSetIsActive(); + if (this_present_isActive || that_present_isActive) { + if (!(this_present_isActive && that_present_isActive)) + return false; + if (!this.isActive.equals(that.isActive)) + return false; + } + + boolean this_present_starttime = true && this.isSetStarttime(); + boolean that_present_starttime = true && that.isSetStarttime(); + if (this_present_starttime || that_present_starttime) { + if (!(this_present_starttime && that_present_starttime)) + return false; + if (!this.starttime.equals(that.starttime)) + return false; + } + + boolean this_present_endtime = true && this.isSetEndtime(); + boolean that_present_endtime = true && that.isSetEndtime(); + if (this_present_endtime || that_present_endtime) { + if (!(this_present_endtime && that_present_endtime)) + return false; + if (!this.endtime.equals(that.endtime)) + return false; + } + + boolean this_present_lastused = true && this.isSetLastused(); + boolean that_present_lastused = true && that.isSetLastused(); + if (this_present_lastused || that_present_lastused) { + if (!(this_present_lastused && that_present_lastused)) + return false; + if (!this.lastused.equals(that.lastused)) + 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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(Lecture other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(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(isSetIsActive()).compareTo(other.isSetIsActive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsActive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarttime()).compareTo(other.isSetStarttime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarttime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.starttime, other.starttime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndtime()).compareTo(other.isSetEndtime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndtime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endtime, other.endtime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastused()).compareTo(other.isSetLastused()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastused()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastused, other.lastused); + if (lastComparison != 0) { + 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(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; + } + } + 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("Lecture("); + boolean first = true; + + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + first = false; + if (!first) sb.append(", "); + sb.append("lecturename:"); + if (this.lecturename == null) { + sb.append("null"); + } else { + sb.append(this.lecturename); + } + first = false; + if (!first) sb.append(", "); + sb.append("isActive:"); + if (this.isActive == null) { + sb.append("null"); + } else { + sb.append(this.isActive); + } + first = false; + if (!first) sb.append(", "); + sb.append("starttime:"); + if (this.starttime == null) { + sb.append("null"); + } else { + sb.append(this.starttime); + } + first = false; + if (!first) sb.append(", "); + sb.append("endtime:"); + if (this.endtime == null) { + sb.append("null"); + } else { + sb.append(this.endtime); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastused:"); + if (this.lastused == null) { + sb.append("null"); + } else { + sb.append(this.lastused); + } + 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("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; + 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 LectureStandardSchemeFactory implements SchemeFactory { + public LectureStandardScheme getScheme() { + return new LectureStandardScheme(); + } + } + + private static class LectureStandardScheme extends StandardScheme<Lecture> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Lecture 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: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // 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 -3: // IS_ACTIVE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.isActive = iprot.readString(); + struct.setIsActiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // STARTTIME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.starttime = iprot.readString(); + struct.setStarttimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // ENDTIME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endtime = iprot.readString(); + struct.setEndtimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // LASTUSED + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastused = iprot.readString(); + struct.setLastusedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // 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 -8: // 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 -9: // 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, Lecture 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(); + } + if (struct.imagename != null) { + oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); + oprot.writeString(struct.imagename); + oprot.writeFieldEnd(); + } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } + if (struct.lastused != null) { + oprot.writeFieldBegin(LASTUSED_FIELD_DESC); + oprot.writeString(struct.lastused); + oprot.writeFieldEnd(); + } + if (struct.endtime != null) { + oprot.writeFieldBegin(ENDTIME_FIELD_DESC); + oprot.writeString(struct.endtime); + oprot.writeFieldEnd(); + } + if (struct.starttime != null) { + oprot.writeFieldBegin(STARTTIME_FIELD_DESC); + oprot.writeString(struct.starttime); + oprot.writeFieldEnd(); + } + if (struct.isActive != null) { + oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC); + oprot.writeString(struct.isActive); + oprot.writeFieldEnd(); + } + if (struct.lecturename != null) { + oprot.writeFieldBegin(LECTURENAME_FIELD_DESC); + oprot.writeString(struct.lecturename); + oprot.writeFieldEnd(); + } + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class LectureTupleSchemeFactory implements SchemeFactory { + public LectureTupleScheme getScheme() { + return new LectureTupleScheme(); + } + } + + private static class LectureTupleScheme extends TupleScheme<Lecture> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Lecture struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetId()) { + optionals.set(0); + } + if (struct.isSetLecturename()) { + optionals.set(1); + } + if (struct.isSetIsActive()) { + optionals.set(2); + } + if (struct.isSetStarttime()) { + optionals.set(3); + } + if (struct.isSetEndtime()) { + optionals.set(4); + } + if (struct.isSetLastused()) { + optionals.set(5); + } + if (struct.isSetDesc()) { + optionals.set(6); + } + if (struct.isSetImagename()) { + optionals.set(7); + } + if (struct.isSetUsername()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + if (struct.isSetLecturename()) { + oprot.writeString(struct.lecturename); + } + if (struct.isSetIsActive()) { + oprot.writeString(struct.isActive); + } + if (struct.isSetStarttime()) { + oprot.writeString(struct.starttime); + } + if (struct.isSetEndtime()) { + oprot.writeString(struct.endtime); + } + if (struct.isSetLastused()) { + oprot.writeString(struct.lastused); + } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } + if (struct.isSetImagename()) { + oprot.writeString(struct.imagename); + } + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Lecture struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + if (incoming.get(1)) { + struct.lecturename = iprot.readString(); + struct.setLecturenameIsSet(true); + } + if (incoming.get(2)) { + struct.isActive = iprot.readString(); + struct.setIsActiveIsSet(true); + } + if (incoming.get(3)) { + struct.starttime = iprot.readString(); + struct.setStarttimeIsSet(true); + } + if (incoming.get(4)) { + struct.endtime = iprot.readString(); + struct.setEndtimeIsSet(true); + } + if (incoming.get(5)) { + struct.lastused = iprot.readString(); + struct.setLastusedIsSet(true); + } + if (incoming.get(6)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(7)) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } + if (incoming.get(8)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java index 73ffb544..d3e256df 100644 --- a/Dozentenmodulserver/src/server/Server.java +++ b/Dozentenmodulserver/src/server/Server.java @@ -5,6 +5,7 @@ * @generated */ package server; + import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -39,14 +40,14 @@ public class Server { public long DeleteFtpUser(String user) throws org.apache.thrift.TException; - public List<String> getImages() throws org.apache.thrift.TException; - - public String getPathOfImage(String name) throws org.apache.thrift.TException; + public String getPathOfImage(String image_id, String version) throws org.apache.thrift.TException; - public boolean writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException; + public boolean writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath) throws org.apache.thrift.TException; public List<Image> getImageList() throws org.apache.thrift.TException; + public List<Lecture> getLectureList() throws org.apache.thrift.TException; + public List<String> getAllOS() throws org.apache.thrift.TException; public Map<String,String> getPersonData(String Vorname, String Nachname) throws org.apache.thrift.TException; @@ -55,9 +56,13 @@ public class Server { public boolean startFileCopy(String file) throws org.apache.thrift.TException; - public Map<String,String> getImageData(String imagename) throws org.apache.thrift.TException; + public Map<String,String> getImageData(String imageid, String imageversion) throws org.apache.thrift.TException; + + public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException; + + public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException; - public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu) 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; } @@ -67,14 +72,14 @@ public class Server { public void DeleteFtpUser(String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getImages(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getPathOfImage(String image_id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getPathOfImage(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, 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; + public void getLectureList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllOS(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getPersonData(String Vorname, String Nachname, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -83,9 +88,13 @@ public class Server { public void startFileCopy(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getImageData(String imagename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + 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, boolean license, boolean internet, long ram, long cpu, String id, String version, 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, boolean license, boolean internet, long ram, long cpu, 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; } @@ -154,38 +163,17 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "DeleteFtpUser failed: unknown result"); } - public List<String> getImages() throws org.apache.thrift.TException - { - send_getImages(); - return recv_getImages(); - } - - public void send_getImages() throws org.apache.thrift.TException - { - getImages_args args = new getImages_args(); - sendBase("getImages", args); - } - - public List<String> recv_getImages() throws org.apache.thrift.TException - { - getImages_result result = new getImages_result(); - receiveBase(result, "getImages"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImages failed: unknown result"); - } - - public String getPathOfImage(String name) throws org.apache.thrift.TException + public String getPathOfImage(String image_id, String version) throws org.apache.thrift.TException { - send_getPathOfImage(name); + send_getPathOfImage(image_id, version); return recv_getPathOfImage(); } - public void send_getPathOfImage(String name) throws org.apache.thrift.TException + public void send_getPathOfImage(String image_id, String version) throws org.apache.thrift.TException { getPathOfImage_args args = new getPathOfImage_args(); - args.setName(name); + args.setImage_id(image_id); + args.setVersion(version); sendBase("getPathOfImage", args); } @@ -199,13 +187,13 @@ 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 firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException + public boolean writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath) throws org.apache.thrift.TException { - send_writeVLdata(imagename, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu); + send_writeVLdata(imagename, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath); return recv_writeVLdata(); } - public void send_writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException + public void send_writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath) throws org.apache.thrift.TException { writeVLdata_args args = new writeVLdata_args(); args.setImagename(imagename); @@ -219,6 +207,7 @@ public class Server { args.setInternet(internet); args.setRam(ram); args.setCpu(cpu); + args.setImagePath(imagePath); sendBase("writeVLdata", args); } @@ -254,6 +243,28 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result"); } + public List<Lecture> getLectureList() throws org.apache.thrift.TException + { + send_getLectureList(); + return recv_getLectureList(); + } + + public void send_getLectureList() throws org.apache.thrift.TException + { + getLectureList_args args = new getLectureList_args(); + sendBase("getLectureList", args); + } + + public List<Lecture> recv_getLectureList() throws org.apache.thrift.TException + { + getLectureList_result result = new getLectureList_result(); + receiveBase(result, "getLectureList"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result"); + } + public List<String> getAllOS() throws org.apache.thrift.TException { send_getAllOS(); @@ -358,16 +369,17 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startFileCopy failed: unknown result"); } - public Map<String,String> getImageData(String imagename) throws org.apache.thrift.TException + public Map<String,String> getImageData(String imageid, String imageversion) throws org.apache.thrift.TException { - send_getImageData(imagename); + send_getImageData(imageid, imageversion); return recv_getImageData(); } - public void send_getImageData(String imagename) throws org.apache.thrift.TException + public void send_getImageData(String imageid, String imageversion) throws org.apache.thrift.TException { getImageData_args args = new getImageData_args(); - args.setImagename(imagename); + args.setImageid(imageid); + args.setImageversion(imageversion); sendBase("getImageData", args); } @@ -381,13 +393,13 @@ 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, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException + public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException { - send_updateImageData(name, newName, license, internet, ram, cpu); + send_updateImageData(name, newName, license, internet, ram, cpu, id, version); return recv_updateImageData(); } - public void send_updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException + public void send_updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException { updateImageData_args args = new updateImageData_args(); args.setName(name); @@ -396,6 +408,8 @@ public class Server { args.setInternet(internet); args.setRam(ram); args.setCpu(cpu); + args.setId(id); + args.setVersion(version); sendBase("updateImageData", args); } @@ -409,6 +423,66 @@ 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 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 + { + send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imagename, 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 + { + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + sendBase("updateLecturedata", args); + } + + public boolean recv_updateLecturedata() throws org.apache.thrift.TException + { + updateLecturedata_result result = new updateLecturedata_result(); + receiveBase(result, "updateLecturedata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecturedata 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> { @@ -488,53 +562,27 @@ public class Server { } } - public void getImages(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getPathOfImage(String image_id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getImages_call method_call = new getImages_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getImages_call extends org.apache.thrift.async.TAsyncMethodCall { - public getImages_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImages", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getImages_args args = new getImages_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<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_getImages(); - } - } - - public void getPathOfImage(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getPathOfImage_call method_call = new getPathOfImage_call(name, resultHandler, this, ___protocolFactory, ___transport); + getPathOfImage_call method_call = new getPathOfImage_call(image_id, version, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPathOfImage_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - public getPathOfImage_call(String name, 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 image_id; + private String version; + public getPathOfImage_call(String image_id, String version, 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.image_id = image_id; + this.version = version; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathOfImage", org.apache.thrift.protocol.TMessageType.CALL, 0)); getPathOfImage_args args = new getPathOfImage_args(); - args.setName(name); + args.setImage_id(image_id); + args.setVersion(version); args.write(prot); prot.writeMessageEnd(); } @@ -549,9 +597,9 @@ public class Server { } } - public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - writeVLdata_call method_call = new writeVLdata_call(imagename, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, resultHandler, this, ___protocolFactory, ___transport); + writeVLdata_call method_call = new writeVLdata_call(imagename, firstname, lastname, university, Mail, Tel, Fak, license, internet, ram, cpu, imagePath, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -568,7 +616,8 @@ public class Server { private boolean internet; private long ram; private long cpu; - public writeVLdata_call(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, 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 imagePath; + public writeVLdata_call(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, 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.firstname = firstname; @@ -581,6 +630,7 @@ public class Server { this.internet = internet; this.ram = ram; this.cpu = cpu; + this.imagePath = imagePath; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { @@ -597,6 +647,7 @@ public class Server { args.setInternet(internet); args.setRam(ram); args.setCpu(cpu); + args.setImagePath(imagePath); args.write(prot); prot.writeMessageEnd(); } @@ -640,6 +691,35 @@ public class Server { } } + public void getLectureList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getLectureList_call method_call = new getLectureList_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall { + public getLectureList_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLectureList_args args = new getLectureList_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<Lecture> 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_getLectureList(); + } + } + public void getAllOS(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllOS_call method_call = new getAllOS_call(resultHandler, this, ___protocolFactory, ___transport); @@ -804,24 +884,27 @@ public class Server { } } - public void getImageData(String imagename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getImageData(String imageid, String imageversion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getImageData_call method_call = new getImageData_call(imagename, resultHandler, this, ___protocolFactory, ___transport); + getImageData_call method_call = new getImageData_call(imageid, imageversion, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall { - private String imagename; - public getImageData_call(String imagename, 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 imageid; + private String imageversion; + public getImageData_call(String imageid, String imageversion, 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.imageid = imageid; + this.imageversion = imageversion; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0)); getImageData_args args = new getImageData_args(); - args.setImagename(imagename); + args.setImageid(imageid); + args.setImageversion(imageversion); args.write(prot); prot.writeMessageEnd(); } @@ -836,9 +919,9 @@ public class Server { } } - public void updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - updateImageData_call method_call = new updateImageData_call(name, newName, license, internet, ram, cpu, resultHandler, this, ___protocolFactory, ___transport); + updateImageData_call method_call = new updateImageData_call(name, newName, license, internet, ram, cpu, id, version, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -850,7 +933,9 @@ public class Server { private boolean internet; private long ram; private long cpu; - public updateImageData_call(String name, String newName, boolean license, boolean internet, long ram, long cpu, 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 id; + private String version; + public updateImageData_call(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version, 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; @@ -858,6 +943,8 @@ public class Server { this.internet = internet; this.ram = ram; this.cpu = cpu; + this.id = id; + this.version = version; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { @@ -869,6 +956,8 @@ public class Server { args.setInternet(internet); args.setRam(ram); args.setCpu(cpu); + args.setId(id); + args.setVersion(version); args.write(prot); prot.writeMessageEnd(); } @@ -883,6 +972,112 @@ 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 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 { + 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); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateLecturedata_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + private String newName; + private String shortdesc; + private String desc; + private String startDate; + private String endDate; + private boolean isActive; + private String imagename; + private String firstname; + private String lastname; + private String university; + private String Mail; + 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 { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecturedata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateLecturedata_args args = new updateLecturedata_args(); + args.setName(name); + args.setNewName(newName); + args.setShortdesc(shortdesc); + args.setDesc(desc); + args.setStartDate(startDate); + args.setEndDate(endDate); + args.setIsActive(isActive); + args.setImagename(imagename); + args.setFirstname(firstname); + args.setLastname(lastname); + args.setUniversity(university); + args.setMail(Mail); + args.setTel(Tel); + args.setFak(Fak); + args.setId(id); + 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_updateLecturedata(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -898,16 +1093,18 @@ public class Server { private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("getFtpUser", new getFtpUser()); processMap.put("DeleteFtpUser", new DeleteFtpUser()); - processMap.put("getImages", new getImages()); processMap.put("getPathOfImage", new getPathOfImage()); processMap.put("writeVLdata", new writeVLdata()); processMap.put("getImageList", new getImageList()); + processMap.put("getLectureList", new getLectureList()); processMap.put("getAllOS", new getAllOS()); processMap.put("getPersonData", new getPersonData()); 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("updateLecturedata", new updateLecturedata()); return processMap; } @@ -952,26 +1149,6 @@ public class Server { } } - public static class getImages<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImages_args> { - public getImages() { - super("getImages"); - } - - public getImages_args getEmptyArgsInstance() { - return new getImages_args(); - } - - protected boolean isOneway() { - return false; - } - - public getImages_result getResult(I iface, getImages_args args) throws org.apache.thrift.TException { - getImages_result result = new getImages_result(); - result.success = iface.getImages(); - return result; - } - } - public static class getPathOfImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPathOfImage_args> { public getPathOfImage() { super("getPathOfImage"); @@ -987,7 +1164,7 @@ public class Server { public getPathOfImage_result getResult(I iface, getPathOfImage_args args) throws org.apache.thrift.TException { getPathOfImage_result result = new getPathOfImage_result(); - result.success = iface.getPathOfImage(args.name); + result.success = iface.getPathOfImage(args.image_id, args.version); return result; } } @@ -1007,7 +1184,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.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu); + result.success = iface.writeVLdata(args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath); result.setSuccessIsSet(true); return result; } @@ -1033,6 +1210,26 @@ public class Server { } } + public static class getLectureList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureList_args> { + public getLectureList() { + super("getLectureList"); + } + + public getLectureList_args getEmptyArgsInstance() { + return new getLectureList_args(); + } + + protected boolean isOneway() { + return false; + } + + public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException { + getLectureList_result result = new getLectureList_result(); + result.success = iface.getLectureList(); + return result; + } + } + public static class getAllOS<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOS_args> { public getAllOS() { super("getAllOS"); @@ -1130,7 +1327,7 @@ public class Server { public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException { getImageData_result result = new getImageData_result(); - result.success = iface.getImageData(args.imagename); + result.success = iface.getImageData(args.imageid, args.imageversion); return result; } } @@ -1150,7 +1347,48 @@ public class Server { 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.license, args.internet, args.ram, args.cpu); + result.success = iface.updateImageData(args.name, args.newName, args.license, args.internet, args.ram, args.cpu, args.id, args.version); + result.setSuccessIsSet(true); + return result; + } + } + + public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> { + public getLectureData() { + super("getLectureData"); + } + + public getLectureData_args getEmptyArgsInstance() { + return new getLectureData_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); + return result; + } + } + + public static class updateLecturedata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLecturedata_args> { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_args(); + } + + protected boolean isOneway() { + return false; + } + + 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.setSuccessIsSet(true); return result; } @@ -1171,16 +1409,18 @@ public class Server { private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("getFtpUser", new getFtpUser()); processMap.put("DeleteFtpUser", new DeleteFtpUser()); - processMap.put("getImages", new getImages()); processMap.put("getPathOfImage", new getPathOfImage()); processMap.put("writeVLdata", new writeVLdata()); processMap.put("getImageList", new getImageList()); + processMap.put("getLectureList", new getLectureList()); processMap.put("getAllOS", new getAllOS()); processMap.put("getPersonData", new getPersonData()); 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("updateLecturedata", new updateLecturedata()); return processMap; } @@ -1287,20 +1527,20 @@ public class Server { } } - public static class getImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImages_args, List<String>> { - public getImages() { - super("getImages"); + public static class getPathOfImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPathOfImage_args, String> { + public getPathOfImage() { + super("getPathOfImage"); } - public getImages_args getEmptyArgsInstance() { - return new getImages_args(); + public getPathOfImage_args getEmptyArgsInstance() { + return new getPathOfImage_args(); } - public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<String>>() { - public void onComplete(List<String> o) { - getImages_result result = new getImages_result(); + return new AsyncMethodCallback<String>() { + public void onComplete(String o) { + getPathOfImage_result result = new getPathOfImage_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -1313,7 +1553,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getImages_result result = new getImages_result(); + getPathOfImage_result result = new getPathOfImage_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()); @@ -1333,26 +1573,27 @@ public class Server { return false; } - public void start(I iface, getImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { - iface.getImages(resultHandler); + public void start(I iface, getPathOfImage_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { + iface.getPathOfImage(args.image_id, args.version,resultHandler); } } - public static class getPathOfImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPathOfImage_args, String> { - public getPathOfImage() { - super("getPathOfImage"); + public static class writeVLdata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeVLdata_args, Boolean> { + public writeVLdata() { + super("writeVLdata"); } - public getPathOfImage_args getEmptyArgsInstance() { - return new getPathOfImage_args(); + public writeVLdata_args getEmptyArgsInstance() { + return new writeVLdata_args(); } - public AsyncMethodCallback<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<String>() { - public void onComplete(String o) { - getPathOfImage_result result = new getPathOfImage_result(); + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + writeVLdata_result result = new writeVLdata_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1364,7 +1605,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getPathOfImage_result result = new getPathOfImage_result(); + writeVLdata_result result = new writeVLdata_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()); @@ -1384,27 +1625,26 @@ public class Server { return false; } - public void start(I iface, getPathOfImage_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { - iface.getPathOfImage(args.name,resultHandler); + public void start(I iface, writeVLdata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.writeVLdata(args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath,resultHandler); } } - public static class writeVLdata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeVLdata_args, Boolean> { - public writeVLdata() { - super("writeVLdata"); + public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<Image>> { + public getImageList() { + super("getImageList"); } - public writeVLdata_args getEmptyArgsInstance() { - return new writeVLdata_args(); + public getImageList_args getEmptyArgsInstance() { + return new getImageList_args(); } - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - writeVLdata_result result = new writeVLdata_result(); + return new AsyncMethodCallback<List<Image>>() { + public void onComplete(List<Image> o) { + getImageList_result result = new getImageList_result(); result.success = o; - result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -1416,7 +1656,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - writeVLdata_result result = new writeVLdata_result(); + getImageList_result result = new getImageList_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()); @@ -1436,25 +1676,25 @@ public class Server { return false; } - public void start(I iface, writeVLdata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.writeVLdata(args.imagename, args.firstname, args.lastname, args.university, args.Mail, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu,resultHandler); + public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException { + iface.getImageList(resultHandler); } } - public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<Image>> { - public getImageList() { - super("getImageList"); + public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, List<Lecture>> { + public getLectureList() { + super("getLectureList"); } - public getImageList_args getEmptyArgsInstance() { - return new getImageList_args(); + public getLectureList_args getEmptyArgsInstance() { + return new getLectureList_args(); } - public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback<List<Lecture>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<Image>>() { - public void onComplete(List<Image> o) { - getImageList_result result = new getImageList_result(); + return new AsyncMethodCallback<List<Lecture>>() { + public void onComplete(List<Lecture> o) { + getLectureList_result result = new getLectureList_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -1467,7 +1707,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getImageList_result result = new getImageList_result(); + getLectureList_result result = new getLectureList_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()); @@ -1487,8 +1727,8 @@ public class Server { return false; } - public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException { - iface.getImageList(resultHandler); + public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<Lecture>> resultHandler) throws TException { + iface.getLectureList(resultHandler); } } @@ -1745,7 +1985,7 @@ public class Server { } public void start(I iface, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { - iface.getImageData(args.imagename,resultHandler); + iface.getImageData(args.imageid, args.imageversion,resultHandler); } } @@ -1797,7 +2037,110 @@ public class Server { } public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateImageData(args.name, args.newName, args.license, args.internet, args.ram, args.cpu,resultHandler); + iface.updateImageData(args.name, args.newName, args.license, args.internet, args.ram, args.cpu, args.id, args.version,resultHandler); + } + } + + public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> { + public getLectureData() { + super("getLectureData"); + } + + public getLectureData_args getEmptyArgsInstance() { + return new getLectureData_args(); + } + + public AsyncMethodCallback<Map<String,String>> 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(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + 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()); + } + 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, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { + iface.getLectureData(args.lecturename,resultHandler); + } + } + + public static class updateLecturedata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateLecturedata_args, Boolean> { + public updateLecturedata() { + super("updateLecturedata"); + } + + public updateLecturedata_args getEmptyArgsInstance() { + return new updateLecturedata_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) { + updateLecturedata_result result = new updateLecturedata_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; + updateLecturedata_result result = new updateLecturedata_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, 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); } } @@ -3116,268 +3459,25 @@ public class Server { } - public static class getImages_args implements org.apache.thrift.TBase<getImages_args, getImages_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImages_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImages_args"); - - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getImages_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getImages_argsTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImages_args.class, metaDataMap); - } - - public getImages_args() { - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getImages_args(getImages_args other) { - } - - public getImages_args deepCopy() { - return new getImages_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getImages_args) - return this.equals((getImages_args)that); - return false; - } - - public boolean equals(getImages_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getImages_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getImages_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getImages_argsStandardSchemeFactory implements SchemeFactory { - public getImages_argsStandardScheme getScheme() { - return new getImages_argsStandardScheme(); - } - } - - private static class getImages_argsStandardScheme extends StandardScheme<getImages_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getImages_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getImages_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getImages_argsTupleSchemeFactory implements SchemeFactory { - public getImages_argsTupleScheme getScheme() { - return new getImages_argsTupleScheme(); - } - } - - private static class getImages_argsTupleScheme extends TupleScheme<getImages_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getImages_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getImages_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class getImages_result implements org.apache.thrift.TBase<getImages_result, getImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImages_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImages_result"); + public static class getPathOfImage_args implements org.apache.thrift.TBase<getPathOfImage_args, getPathOfImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPathOfImage_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathOfImage_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("image_id", org.apache.thrift.protocol.TType.STRING, (short)-1); + 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)-2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getImages_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getImages_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getPathOfImage_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getPathOfImage_argsTupleSchemeFactory()); } - public List<String> success; // required + public String image_id; // required + public String version; // 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"); + IMAGE_ID((short)-1, "image_id"), + VERSION((short)-2, "version"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -3392,8 +3492,10 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case -1: // IMAGE_ID + return IMAGE_ID; + case -2: // VERSION + return VERSION; default: return null; } @@ -3437,474 +3539,111 @@ public class Server { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("image_id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImages_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathOfImage_args.class, metaDataMap); } - public getImages_result() { + public getPathOfImage_args() { } - public getImages_result( - List<String> success) + public getPathOfImage_args( + String image_id, + String version) { this(); - this.success = success; + this.image_id = image_id; + this.version = version; } /** * Performs a deep copy on <i>other</i>. */ - public getImages_result(getImages_result other) { - if (other.isSetSuccess()) { - List<String> __this__success = new ArrayList<String>(other.success); - this.success = __this__success; + public getPathOfImage_args(getPathOfImage_args other) { + if (other.isSetImage_id()) { + this.image_id = other.image_id; + } + if (other.isSetVersion()) { + this.version = other.version; } } - public getImages_result deepCopy() { - return new getImages_result(this); + public getPathOfImage_args deepCopy() { + return new getPathOfImage_args(this); } @Override public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator<String> getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList<String>(); - } - this.success.add(elem); + this.image_id = null; + this.version = null; } - public List<String> getSuccess() { - return this.success; + public String getImage_id() { + return this.image_id; } - public getImages_result setSuccess(List<String> success) { - this.success = success; + public getPathOfImage_args setImage_id(String image_id) { + this.image_id = image_id; return this; } - public void unsetSuccess() { - this.success = null; + public void unsetImage_id() { + this.image_id = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field image_id is set (has been assigned a value) and false otherwise */ + public boolean isSetImage_id() { + return this.image_id != null; } - public void setSuccessIsSet(boolean value) { + public void setImage_idIsSet(boolean value) { if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List<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 getImages_result) - return this.equals((getImages_result)that); - return false; - } - - public boolean equals(getImages_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(getImages_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("getImages_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 getImages_resultStandardSchemeFactory implements SchemeFactory { - public getImages_resultStandardScheme getScheme() { - return new getImages_resultStandardScheme(); - } - } - - private static class getImages_resultStandardScheme extends StandardScheme<getImages_result> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getImages_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.success = new ArrayList<String>(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; - _elem2 = iprot.readString(); - struct.success.add(_elem2); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getImages_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter3 : struct.success) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + this.image_id = null; } - } - private static class getImages_resultTupleSchemeFactory implements SchemeFactory { - public getImages_resultTupleScheme getScheme() { - return new getImages_resultTupleScheme(); - } + public String getVersion() { + return this.version; } - private static class getImages_resultTupleScheme extends TupleScheme<getImages_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getImages_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 (String _iter4 : struct.success) - { - oprot.writeString(_iter4); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getImages_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList<String>(_list5.size); - for (int _i6 = 0; _i6 < _list5.size; ++_i6) - { - String _elem7; - _elem7 = iprot.readString(); - struct.success.add(_elem7); - } - } - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class getPathOfImage_args implements org.apache.thrift.TBase<getPathOfImage_args, getPathOfImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPathOfImage_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathOfImage_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getPathOfImage_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getPathOfImage_argsTupleSchemeFactory()); - } - - public String name; // 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"); - - 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: // NAME - return NAME; - 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathOfImage_args.class, metaDataMap); - } - - public getPathOfImage_args() { - } - - public getPathOfImage_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getPathOfImage_args(getPathOfImage_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - public getPathOfImage_args deepCopy() { - return new getPathOfImage_args(this); - } - - @Override - public void clear() { - this.name = null; - } - - public String getName() { - return this.name; - } - - public getPathOfImage_args setName(String name) { - this.name = name; + public getPathOfImage_args setVersion(String version) { + this.version = version; return this; } - public void unsetName() { - this.name = null; + public void unsetVersion() { + this.version = null; } - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; } - public void setNameIsSet(boolean value) { + public void setVersionIsSet(boolean value) { if (!value) { - this.name = null; + this.version = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case IMAGE_ID: if (value == null) { - unsetName(); + unsetImage_id(); } else { - setName((String)value); + setImage_id((String)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((String)value); } break; @@ -3913,8 +3652,11 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case IMAGE_ID: + return getImage_id(); + + case VERSION: + return getVersion(); } throw new IllegalStateException(); @@ -3927,8 +3669,10 @@ public class Server { } switch (field) { - case NAME: - return isSetName(); + case IMAGE_ID: + return isSetImage_id(); + case VERSION: + return isSetVersion(); } throw new IllegalStateException(); } @@ -3946,12 +3690,21 @@ public class Server { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + boolean this_present_image_id = true && this.isSetImage_id(); + boolean that_present_image_id = true && that.isSetImage_id(); + if (this_present_image_id || that_present_image_id) { + if (!(this_present_image_id && that_present_image_id)) return false; - if (!this.name.equals(that.name)) + if (!this.image_id.equals(that.image_id)) + return false; + } + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) return false; } @@ -3971,12 +3724,22 @@ public class Server { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + lastComparison = Boolean.valueOf(isSetImage_id()).compareTo(other.isSetImage_id()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (isSetImage_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_id, other.image_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); if (lastComparison != 0) { return lastComparison; } @@ -4001,11 +3764,19 @@ public class Server { StringBuilder sb = new StringBuilder("getPathOfImage_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("image_id:"); + if (this.image_id == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.image_id); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); } first = false; sb.append(")"); @@ -4051,10 +3822,18 @@ public class Server { break; } switch (schemeField.id) { - case -1: // NAME + case -1: // IMAGE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); + struct.image_id = iprot.readString(); + struct.setImage_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4074,9 +3853,14 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.image_id != null) { + oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC); + oprot.writeString(struct.image_id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4097,22 +3881,32 @@ public class Server { public void write(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetName()) { + if (struct.isSetImage_id()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetName()) { - oprot.writeString(struct.name); + if (struct.isSetVersion()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetImage_id()) { + oprot.writeString(struct.image_id); + } + if (struct.isSetVersion()) { + oprot.writeString(struct.version); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); + struct.image_id = iprot.readString(); + struct.setImage_idIsSet(true); + } + if (incoming.get(1)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); } } } @@ -4487,6 +4281,7 @@ public class Server { 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)-9); 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)-10); 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)-11); + 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)-12); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -4505,6 +4300,7 @@ public class Server { public boolean internet; // required public long ram; // required public long cpu; // required + public String imagePath; // 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 { @@ -4518,7 +4314,8 @@ public class Server { LICENSE((short)-8, "license"), INTERNET((short)-9, "internet"), RAM((short)-10, "ram"), - CPU((short)-11, "cpu"); + CPU((short)-11, "cpu"), + IMAGE_PATH((short)-12, "imagePath"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -4555,6 +4352,8 @@ public class Server { return RAM; case -11: // CPU return CPU; + case -12: // IMAGE_PATH + return IMAGE_PATH; default: return null; } @@ -4625,6 +4424,8 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("imagePath", 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); } @@ -4643,7 +4444,8 @@ public class Server { boolean license, boolean internet, long ram, - long cpu) + long cpu, + String imagePath) { this(); this.imagename = imagename; @@ -4661,6 +4463,7 @@ public class Server { setRamIsSet(true); this.cpu = cpu; setCpuIsSet(true); + this.imagePath = imagePath; } /** @@ -4693,6 +4496,9 @@ public class Server { this.internet = other.internet; this.ram = other.ram; this.cpu = other.cpu; + if (other.isSetImagePath()) { + this.imagePath = other.imagePath; + } } public writeVLdata_args deepCopy() { @@ -4716,6 +4522,7 @@ public class Server { this.ram = 0; setCpuIsSet(false); this.cpu = 0; + this.imagePath = null; } public String getImagename() { @@ -4978,6 +4785,30 @@ public class Server { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value); } + public String getImagePath() { + return this.imagePath; + } + + public writeVLdata_args setImagePath(String imagePath) { + this.imagePath = imagePath; + return this; + } + + public void unsetImagePath() { + this.imagePath = null; + } + + /** Returns true if field imagePath is set (has been assigned a value) and false otherwise */ + public boolean isSetImagePath() { + return this.imagePath != null; + } + + public void setImagePathIsSet(boolean value) { + if (!value) { + this.imagePath = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case IMAGENAME: @@ -5068,6 +4899,14 @@ public class Server { } break; + case IMAGE_PATH: + if (value == null) { + unsetImagePath(); + } else { + setImagePath((String)value); + } + break; + } } @@ -5106,6 +4945,9 @@ public class Server { case CPU: return Long.valueOf(getCpu()); + case IMAGE_PATH: + return getImagePath(); + } throw new IllegalStateException(); } @@ -5139,6 +4981,8 @@ public class Server { return isSetRam(); case CPU: return isSetCpu(); + case IMAGE_PATH: + return isSetImagePath(); } throw new IllegalStateException(); } @@ -5255,6 +5099,15 @@ public class Server { return false; } + boolean this_present_imagePath = true && this.isSetImagePath(); + boolean that_present_imagePath = true && that.isSetImagePath(); + if (this_present_imagePath || that_present_imagePath) { + if (!(this_present_imagePath && that_present_imagePath)) + return false; + if (!this.imagePath.equals(that.imagePath)) + return false; + } + return true; } @@ -5381,6 +5234,16 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetImagePath()).compareTo(other.isSetImagePath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImagePath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagePath, other.imagePath); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -5472,6 +5335,14 @@ public class Server { sb.append("cpu:"); sb.append(this.cpu); first = false; + if (!first) sb.append(", "); + sb.append("imagePath:"); + if (this.imagePath == null) { + sb.append("null"); + } else { + sb.append(this.imagePath); + } + first = false; sb.append(")"); return sb.toString(); } @@ -5605,6 +5476,14 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -12: // IMAGE_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imagePath = iprot.readString(); + struct.setImagePathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5620,6 +5499,11 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.imagePath != null) { + oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC); + oprot.writeString(struct.imagePath); + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(CPU_FIELD_DESC); oprot.writeI64(struct.cpu); oprot.writeFieldEnd(); @@ -5718,7 +5602,10 @@ public class Server { if (struct.isSetCpu()) { optionals.set(10); } - oprot.writeBitSet(optionals, 11); + if (struct.isSetImagePath()) { + optionals.set(11); + } + oprot.writeBitSet(optionals, 12); if (struct.isSetImagename()) { oprot.writeString(struct.imagename); } @@ -5752,12 +5639,15 @@ public class Server { if (struct.isSetCpu()) { oprot.writeI64(struct.cpu); } + if (struct.isSetImagePath()) { + oprot.writeString(struct.imagePath); + } } @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(11); + BitSet incoming = iprot.readBitSet(12); if (incoming.get(0)) { struct.imagename = iprot.readString(); struct.setImagenameIsSet(true); @@ -5802,6 +5692,10 @@ public class Server { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); } + if (incoming.get(11)) { + struct.imagePath = iprot.readString(); + struct.setImagePathIsSet(true); + } } } @@ -6716,14 +6610,14 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - struct.success = new ArrayList<Image>(_list8.size); - for (int _i9 = 0; _i9 < _list8.size; ++_i9) + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.success = new ArrayList<Image>(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - Image _elem10; - _elem10 = new Image(); - _elem10.read(iprot); - struct.success.add(_elem10); + Image _elem2; + _elem2 = new Image(); + _elem2.read(iprot); + struct.success.add(_elem2); } iprot.readListEnd(); } @@ -6751,9 +6645,9 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Image _iter11 : struct.success) + for (Image _iter3 : struct.success) { - _iter11.write(oprot); + _iter3.write(oprot); } oprot.writeListEnd(); } @@ -6784,9 +6678,9 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Image _iter12 : struct.success) + for (Image _iter4 : struct.success) { - _iter12.write(oprot); + _iter4.write(oprot); } } } @@ -6798,12 +6692,666 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Image>(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + Image _elem7; + _elem7 = new Image(); + _elem7.read(iprot); + struct.success.add(_elem7); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getLectureList_args implements org.apache.thrift.TBase<getLectureList_args, getLectureList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_args"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); + } + + public getLectureList_args() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getLectureList_args(getLectureList_args other) { + } + + public getLectureList_args deepCopy() { + return new getLectureList_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureList_args) + return this.equals((getLectureList_args)that); + return false; + } + + public boolean equals(getLectureList_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureList_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory { + public getLectureList_argsStandardScheme getScheme() { + return new getLectureList_argsStandardScheme(); + } + } + + private static class getLectureList_argsStandardScheme extends StandardScheme<getLectureList_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { + public getLectureList_argsTupleScheme getScheme() { + return new getLectureList_argsTupleScheme(); + } + } + + private static class getLectureList_argsTupleScheme extends TupleScheme<getLectureList_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getLectureList_result implements org.apache.thrift.TBase<getLectureList_result, getLectureList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); + } + + public List<Lecture> 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap); + } + + public getLectureList_result() { + } + + public getLectureList_result( + List<Lecture> success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getLectureList_result(getLectureList_result other) { + if (other.isSetSuccess()) { + List<Lecture> __this__success = new ArrayList<Lecture>(other.success.size()); + for (Lecture other_element : other.success) { + __this__success.add(new Lecture(other_element)); + } + this.success = __this__success; + } + } + + public getLectureList_result deepCopy() { + return new getLectureList_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator<Lecture> getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Lecture elem) { + if (this.success == null) { + this.success = new ArrayList<Lecture>(); + } + this.success.add(elem); + } + + public List<Lecture> getSuccess() { + return this.success; + } + + public getLectureList_result setSuccess(List<Lecture> success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List<Lecture>)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 getLectureList_result) + return this.equals((getLectureList_result)that); + return false; + } + + public boolean equals(getLectureList_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(getLectureList_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("getLectureList_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 getLectureList_resultStandardSchemeFactory implements SchemeFactory { + public getLectureList_resultStandardScheme getScheme() { + return new getLectureList_resultStandardScheme(); + } + } + + private static class getLectureList_resultStandardScheme extends StandardScheme<getLectureList_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.success = new ArrayList<Lecture>(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + Lecture _elem10; + _elem10 = new Lecture(); + _elem10.read(iprot); + struct.success.add(_elem10); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Lecture _iter11 : struct.success) + { + _iter11.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory { + public getLectureList_resultTupleScheme getScheme() { + return new getLectureList_resultTupleScheme(); + } + } + + private static class getLectureList_resultTupleScheme extends TupleScheme<getLectureList_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Lecture _iter12 : struct.success) + { + _iter12.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Image>(_list13.size); + struct.success = new ArrayList<Lecture>(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { - Image _elem15; - _elem15 = new Image(); + Lecture _elem15; + _elem15 = new Lecture(); _elem15.read(iprot); struct.success.add(_elem15); } @@ -10941,7 +11489,8 @@ public class Server { public static class getImageData_args implements org.apache.thrift.TBase<getImageData_args, getImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_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 IMAGEID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageid", org.apache.thrift.protocol.TType.STRING, (short)-1); + 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)-2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -10949,11 +11498,13 @@ public class Server { schemes.put(TupleScheme.class, new getImageData_argsTupleSchemeFactory()); } - public String imagename; // required + public String imageid; // required + public String imageversion; // 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"); + IMAGEID((short)-1, "imageid"), + IMAGEVERSION((short)-2, "imageversion"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -10968,8 +11519,10 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case -1: // IMAGENAME - return IMAGENAME; + case -1: // IMAGEID + return IMAGEID; + case -2: // IMAGEVERSION + return IMAGEVERSION; default: return null; } @@ -11013,7 +11566,9 @@ public class Server { 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, + 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_args.class, metaDataMap); @@ -11023,18 +11578,23 @@ public class Server { } public getImageData_args( - String imagename) + String imageid, + String imageversion) { this(); - this.imagename = imagename; + this.imageid = imageid; + this.imageversion = imageversion; } /** * Performs a deep copy on <i>other</i>. */ public getImageData_args(getImageData_args other) { - if (other.isSetImagename()) { - this.imagename = other.imagename; + if (other.isSetImageid()) { + this.imageid = other.imageid; + } + if (other.isSetImageversion()) { + this.imageversion = other.imageversion; } } @@ -11044,40 +11604,73 @@ public class Server { @Override public void clear() { - this.imagename = null; + this.imageid = null; + this.imageversion = null; } - public String getImagename() { - return this.imagename; + public String getImageid() { + return this.imageid; } - public getImageData_args setImagename(String imagename) { - this.imagename = imagename; + public getImageData_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 getImageData_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 void setFieldValue(_Fields field, Object value) { switch (field) { - 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; @@ -11086,8 +11679,11 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { - case IMAGENAME: - return getImagename(); + case IMAGEID: + return getImageid(); + + case IMAGEVERSION: + return getImageversion(); } throw new IllegalStateException(); @@ -11100,8 +11696,10 @@ public class Server { } switch (field) { - case IMAGENAME: - return isSetImagename(); + case IMAGEID: + return isSetImageid(); + case IMAGEVERSION: + return isSetImageversion(); } throw new IllegalStateException(); } @@ -11119,12 +11717,21 @@ public class Server { 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)) + 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; } @@ -11144,12 +11751,22 @@ public class Server { int lastComparison = 0; - 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; } @@ -11174,11 +11791,19 @@ public class Server { StringBuilder sb = new StringBuilder("getImageData_args("); boolean first = true; - 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; sb.append(")"); @@ -11224,10 +11849,18 @@ public class Server { break; } switch (schemeField.id) { - case -1: // IMAGENAME + case -1: // 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 -2: // 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); } @@ -11247,9 +11880,14 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.imagename != null) { - oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); - oprot.writeString(struct.imagename); + 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.writeFieldStop(); @@ -11270,22 +11908,32 @@ public class Server { public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetImagename()) { + if (struct.isSetImageid()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetImagename()) { - oprot.writeString(struct.imagename); + if (struct.isSetImageversion()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetImageid()) { + oprot.writeString(struct.imageid); + } + if (struct.isSetImageversion()) { + oprot.writeString(struct.imageversion); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.imagename = iprot.readString(); - struct.setImagenameIsSet(true); + struct.imageid = iprot.readString(); + struct.setImageidIsSet(true); + } + if (incoming.get(1)) { + struct.imageversion = iprot.readString(); + struct.setImageversionIsSet(true); } } } @@ -11707,6 +12355,8 @@ public class Server { 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)-4); 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)-5); 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)-6); + 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)-7); + 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)-8); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -11720,6 +12370,8 @@ public class Server { public boolean internet; // required public long ram; // required public long cpu; // required + public String id; // required + public String version; // 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 { @@ -11728,7 +12380,9 @@ public class Server { LICENSE((short)-3, "license"), INTERNET((short)-4, "internet"), RAM((short)-5, "ram"), - CPU((short)-6, "cpu"); + CPU((short)-6, "cpu"), + ID((short)-7, "id"), + VERSION((short)-8, "version"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -11755,6 +12409,10 @@ public class Server { return RAM; case -6: // CPU return CPU; + case -7: // ID + return ID; + case -8: // VERSION + return VERSION; default: return null; } @@ -11815,6 +12473,10 @@ public class Server { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_args.class, metaDataMap); } @@ -11828,7 +12490,9 @@ public class Server { boolean license, boolean internet, long ram, - long cpu) + long cpu, + String id, + String version) { this(); this.name = name; @@ -11841,6 +12505,8 @@ public class Server { setRamIsSet(true); this.cpu = cpu; setCpuIsSet(true); + this.id = id; + this.version = version; } /** @@ -11858,6 +12524,12 @@ public class Server { this.internet = other.internet; this.ram = other.ram; this.cpu = other.cpu; + if (other.isSetId()) { + this.id = other.id; + } + if (other.isSetVersion()) { + this.version = other.version; + } } public updateImageData_args deepCopy() { @@ -11876,6 +12548,8 @@ public class Server { this.ram = 0; setCpuIsSet(false); this.cpu = 0; + this.id = null; + this.version = null; } public String getName() { @@ -12018,6 +12692,54 @@ public class Server { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value); } + public String getId() { + return this.id; + } + + public updateImageData_args setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public String getVersion() { + return this.version; + } + + public updateImageData_args setVersion(String version) { + this.version = version; + return this; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: @@ -12068,6 +12790,22 @@ public class Server { } break; + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((String)value); + } + break; + } } @@ -12091,6 +12829,12 @@ public class Server { case CPU: return Long.valueOf(getCpu()); + case ID: + return getId(); + + case VERSION: + return getVersion(); + } throw new IllegalStateException(); } @@ -12114,6 +12858,10 @@ public class Server { return isSetRam(); case CPU: return isSetCpu(); + case ID: + return isSetId(); + case VERSION: + return isSetVersion(); } throw new IllegalStateException(); } @@ -12185,6 +12933,24 @@ public class Server { return false; } + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + return true; } @@ -12261,6 +13027,26 @@ public class Server { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -12312,6 +13098,22 @@ public class Server { sb.append("cpu:"); sb.append(this.cpu); first = false; + if (!first) sb.append(", "); + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; sb.append(")"); return sb.toString(); } @@ -12405,6 +13207,22 @@ public class Server { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case -7: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -8: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -12420,6 +13238,16 @@ public class Server { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(CPU_FIELD_DESC); oprot.writeI64(struct.cpu); oprot.writeFieldEnd(); @@ -12478,7 +13306,13 @@ public class Server { if (struct.isSetCpu()) { optionals.set(5); } - oprot.writeBitSet(optionals, 6); + if (struct.isSetId()) { + optionals.set(6); + } + if (struct.isSetVersion()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); if (struct.isSetName()) { oprot.writeString(struct.name); } @@ -12497,12 +13331,18 @@ public class Server { if (struct.isSetCpu()) { oprot.writeI64(struct.cpu); } + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + if (struct.isSetVersion()) { + oprot.writeString(struct.version); + } } @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(6); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -12527,6 +13367,14 @@ public class Server { struct.cpu = iprot.readI64(); struct.setCpuIsSet(true); } + if (incoming.get(6)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + if (incoming.get(7)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } } } @@ -12886,4 +13734,2870 @@ 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 _map44 = iprot.readMapBegin(); + struct.success = new HashMap<String,String>(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) + { + String _key46; + String _val47; + _key46 = iprot.readString(); + _val47 = iprot.readString(); + struct.success.put(_key46, _val47); + } + 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> _iter48 : struct.success.entrySet()) + { + oprot.writeString(_iter48.getKey()); + oprot.writeString(_iter48.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> _iter49 : struct.success.entrySet()) + { + oprot.writeString(_iter49.getKey()); + oprot.writeString(_iter49.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 _map50 = 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*_map50.size); + for (int _i51 = 0; _i51 < _map50.size; ++_i51) + { + String _key52; + String _val53; + _key52 = iprot.readString(); + _val53 = iprot.readString(); + struct.success.put(_key52, _val53); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class updateLecturedata_args implements org.apache.thrift.TBase<updateLecturedata_args, updateLecturedata_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_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 SHORTDESC_FIELD_DESC = new org.apache.thrift.protocol.TField("shortdesc", org.apache.thrift.protocol.TType.STRING, (short)-3); + 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)-4); + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecturedata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_argsTupleSchemeFactory()); + } + + public String name; // required + public String newName; // required + public String shortdesc; // required + public String desc; // required + public String startDate; // required + public String endDate; // required + public boolean isActive; // required + public String imagename; // required + public String firstname; // required + public String lastname; // required + public String university; // required + public String Mail; // required + public String Tel; // required + public String Fak; // required + public String id; // 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"), + SHORTDESC((short)-3, "shortdesc"), + DESC((short)-4, "desc"), + 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"); + + 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: // NAME + return NAME; + case -2: // NEW_NAME + return NEW_NAME; + case -3: // SHORTDESC + return SHORTDESC; + case -4: // DESC + return DESC; + case -5: // START_DATE + return START_DATE; + case -6: // END_DATE + return END_DATE; + case -7: // IS_ACTIVE + return IS_ACTIVE; + case -8: // IMAGENAME + return IMAGENAME; + case -9: // FIRSTNAME + return FIRSTNAME; + case -10: // LASTNAME + return LASTNAME; + case -11: // UNIVERSITY + return UNIVERSITY; + case -12: // MAIL + return MAIL; + case -13: // TEL + return TEL; + case -14: // FAK + return FAK; + case -15: // ID + return ID; + 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 __ISACTIVE_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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SHORTDESC, new org.apache.thrift.meta_data.FieldMetaData("shortdesc", 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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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, + 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))); + tmpMap.put(_Fields.LASTNAME, 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.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.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.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecturedata_args.class, metaDataMap); + } + + public updateLecturedata_args() { + } + + public updateLecturedata_args( + 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) + { + this(); + this.name = name; + this.newName = newName; + this.shortdesc = shortdesc; + this.desc = desc; + this.startDate = startDate; + this.endDate = endDate; + this.isActive = isActive; + setIsActiveIsSet(true); + this.imagename = imagename; + this.firstname = firstname; + this.lastname = lastname; + this.university = university; + this.Mail = Mail; + this.Tel = Tel; + this.Fak = Fak; + this.id = id; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public updateLecturedata_args(updateLecturedata_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetNewName()) { + this.newName = other.newName; + } + if (other.isSetShortdesc()) { + this.shortdesc = other.shortdesc; + } + if (other.isSetDesc()) { + this.desc = other.desc; + } + if (other.isSetStartDate()) { + this.startDate = other.startDate; + } + if (other.isSetEndDate()) { + this.endDate = other.endDate; + } + this.isActive = other.isActive; + if (other.isSetImagename()) { + this.imagename = other.imagename; + } + if (other.isSetFirstname()) { + this.firstname = other.firstname; + } + if (other.isSetLastname()) { + this.lastname = other.lastname; + } + if (other.isSetUniversity()) { + this.university = other.university; + } + if (other.isSetMail()) { + this.Mail = other.Mail; + } + if (other.isSetTel()) { + this.Tel = other.Tel; + } + if (other.isSetFak()) { + this.Fak = other.Fak; + } + if (other.isSetId()) { + this.id = other.id; + } + } + + public updateLecturedata_args deepCopy() { + return new updateLecturedata_args(this); + } + + @Override + public void clear() { + this.name = null; + this.newName = null; + this.shortdesc = null; + this.desc = null; + this.startDate = null; + this.endDate = null; + setIsActiveIsSet(false); + this.isActive = false; + this.imagename = null; + this.firstname = null; + this.lastname = null; + this.university = null; + this.Mail = null; + this.Tel = null; + this.Fak = null; + this.id = null; + } + + public String getName() { + return this.name; + } + + public updateLecturedata_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getNewName() { + return this.newName; + } + + public updateLecturedata_args setNewName(String newName) { + this.newName = newName; + return this; + } + + public void unsetNewName() { + this.newName = null; + } + + /** Returns true if field newName is set (has been assigned a value) and false otherwise */ + public boolean isSetNewName() { + return this.newName != null; + } + + public void setNewNameIsSet(boolean value) { + if (!value) { + this.newName = null; + } + } + + public String getShortdesc() { + return this.shortdesc; + } + + public updateLecturedata_args setShortdesc(String shortdesc) { + this.shortdesc = shortdesc; + return this; + } + + public void unsetShortdesc() { + this.shortdesc = null; + } + + /** Returns true if field shortdesc is set (has been assigned a value) and false otherwise */ + public boolean isSetShortdesc() { + return this.shortdesc != null; + } + + public void setShortdescIsSet(boolean value) { + if (!value) { + this.shortdesc = null; + } + } + + public String getDesc() { + return this.desc; + } + + public updateLecturedata_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 getStartDate() { + return this.startDate; + } + + public updateLecturedata_args setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + public void unsetStartDate() { + this.startDate = null; + } + + /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ + public boolean isSetStartDate() { + return this.startDate != null; + } + + public void setStartDateIsSet(boolean value) { + if (!value) { + this.startDate = null; + } + } + + public String getEndDate() { + return this.endDate; + } + + public updateLecturedata_args setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + public void unsetEndDate() { + this.endDate = null; + } + + /** Returns true if field endDate is set (has been assigned a value) and false otherwise */ + public boolean isSetEndDate() { + return this.endDate != null; + } + + public void setEndDateIsSet(boolean value) { + if (!value) { + this.endDate = null; + } + } + + public boolean isIsActive() { + return this.isActive; + } + + public updateLecturedata_args setIsActive(boolean isActive) { + this.isActive = isActive; + setIsActiveIsSet(true); + return this; + } + + public void unsetIsActive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + /** Returns true if field isActive is set (has been assigned a value) and false otherwise */ + public boolean isSetIsActive() { + return EncodingUtils.testBit(__isset_bitfield, __ISACTIVE_ISSET_ID); + } + + public void setIsActiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value); + } + + public String getImagename() { + return this.imagename; + } + + public updateLecturedata_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 getFirstname() { + return this.firstname; + } + + public updateLecturedata_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 getLastname() { + return this.lastname; + } + + public updateLecturedata_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 getUniversity() { + return this.university; + } + + public updateLecturedata_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 getMail() { + return this.Mail; + } + + public updateLecturedata_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 getTel() { + return this.Tel; + } + + public updateLecturedata_args setTel(String Tel) { + this.Tel = Tel; + return this; + } + + public void unsetTel() { + this.Tel = null; + } + + /** Returns true if field Tel is set (has been assigned a value) and false otherwise */ + public boolean isSetTel() { + return this.Tel != null; + } + + public void setTelIsSet(boolean value) { + if (!value) { + this.Tel = null; + } + } + + public String getFak() { + return this.Fak; + } + + public updateLecturedata_args setFak(String Fak) { + this.Fak = Fak; + return this; + } + + public void unsetFak() { + this.Fak = null; + } + + /** Returns true if field Fak is set (has been assigned a value) and false otherwise */ + public boolean isSetFak() { + return this.Fak != null; + } + + public void setFakIsSet(boolean value) { + if (!value) { + this.Fak = null; + } + } + + public String getId() { + return this.id; + } + + public updateLecturedata_args setId(String id) { + this.id = id; + return this; + } + + public void unsetId() { + this.id = null; + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return this.id != null; + } + + public void setIdIsSet(boolean value) { + if (!value) { + this.id = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case NEW_NAME: + if (value == null) { + unsetNewName(); + } else { + setNewName((String)value); + } + break; + + case SHORTDESC: + if (value == null) { + unsetShortdesc(); + } else { + setShortdesc((String)value); + } + break; + + case DESC: + if (value == null) { + unsetDesc(); + } else { + setDesc((String)value); + } + break; + + case START_DATE: + if (value == null) { + unsetStartDate(); + } else { + setStartDate((String)value); + } + break; + + case END_DATE: + if (value == null) { + unsetEndDate(); + } else { + setEndDate((String)value); + } + break; + + case IS_ACTIVE: + if (value == null) { + unsetIsActive(); + } else { + setIsActive((Boolean)value); + } + break; + + case IMAGENAME: + if (value == null) { + unsetImagename(); + } else { + setImagename((String)value); + } + break; + + case FIRSTNAME: + if (value == null) { + unsetFirstname(); + } else { + setFirstname((String)value); + } + break; + + case LASTNAME: + if (value == null) { + unsetLastname(); + } else { + setLastname((String)value); + } + break; + + case UNIVERSITY: + if (value == null) { + unsetUniversity(); + } else { + setUniversity((String)value); + } + break; + + case MAIL: + if (value == null) { + unsetMail(); + } else { + setMail((String)value); + } + break; + + case TEL: + if (value == null) { + unsetTel(); + } else { + setTel((String)value); + } + break; + + case FAK: + if (value == null) { + unsetFak(); + } else { + setFak((String)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case NEW_NAME: + return getNewName(); + + case SHORTDESC: + return getShortdesc(); + + case DESC: + return getDesc(); + + case START_DATE: + return getStartDate(); + + case END_DATE: + return getEndDate(); + + case IS_ACTIVE: + return Boolean.valueOf(isIsActive()); + + case IMAGENAME: + return getImagename(); + + case FIRSTNAME: + return getFirstname(); + + case LASTNAME: + return getLastname(); + + case UNIVERSITY: + return getUniversity(); + + case MAIL: + return getMail(); + + case TEL: + return getTel(); + + case FAK: + return getFak(); + + case ID: + return getId(); + + } + 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 NAME: + return isSetName(); + case NEW_NAME: + return isSetNewName(); + case SHORTDESC: + return isSetShortdesc(); + case DESC: + return isSetDesc(); + case START_DATE: + return isSetStartDate(); + case END_DATE: + return isSetEndDate(); + case IS_ACTIVE: + return isSetIsActive(); + case IMAGENAME: + return isSetImagename(); + case FIRSTNAME: + return isSetFirstname(); + case LASTNAME: + return isSetLastname(); + case UNIVERSITY: + return isSetUniversity(); + case MAIL: + return isSetMail(); + case TEL: + return isSetTel(); + case FAK: + return isSetFak(); + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecturedata_args) + return this.equals((updateLecturedata_args)that); + return false; + } + + public boolean equals(updateLecturedata_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_newName = true && this.isSetNewName(); + boolean that_present_newName = true && that.isSetNewName(); + if (this_present_newName || that_present_newName) { + if (!(this_present_newName && that_present_newName)) + return false; + if (!this.newName.equals(that.newName)) + return false; + } + + boolean this_present_shortdesc = true && this.isSetShortdesc(); + boolean that_present_shortdesc = true && that.isSetShortdesc(); + if (this_present_shortdesc || that_present_shortdesc) { + if (!(this_present_shortdesc && that_present_shortdesc)) + return false; + if (!this.shortdesc.equals(that.shortdesc)) + 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_startDate = true && this.isSetStartDate(); + boolean that_present_startDate = true && that.isSetStartDate(); + if (this_present_startDate || that_present_startDate) { + if (!(this_present_startDate && that_present_startDate)) + return false; + if (!this.startDate.equals(that.startDate)) + return false; + } + + boolean this_present_endDate = true && this.isSetEndDate(); + boolean that_present_endDate = true && that.isSetEndDate(); + if (this_present_endDate || that_present_endDate) { + if (!(this_present_endDate && that_present_endDate)) + return false; + if (!this.endDate.equals(that.endDate)) + return false; + } + + boolean this_present_isActive = true; + boolean that_present_isActive = true; + if (this_present_isActive || that_present_isActive) { + if (!(this_present_isActive && that_present_isActive)) + return false; + if (this.isActive != that.isActive) + 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_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_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_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_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_Tel = true && this.isSetTel(); + boolean that_present_Tel = true && that.isSetTel(); + if (this_present_Tel || that_present_Tel) { + if (!(this_present_Tel && that_present_Tel)) + return false; + if (!this.Tel.equals(that.Tel)) + return false; + } + + boolean this_present_Fak = true && this.isSetFak(); + boolean that_present_Fak = true && that.isSetFak(); + if (this_present_Fak || that_present_Fak) { + if (!(this_present_Fak && that_present_Fak)) + return false; + if (!this.Fak.equals(that.Fak)) + return false; + } + + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (!this.id.equals(that.id)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecturedata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShortdesc()).compareTo(other.isSetShortdesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShortdesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortdesc, other.shortdesc); + if (lastComparison != 0) { + 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(isSetStartDate()).compareTo(other.isSetStartDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(other.isSetEndDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, other.endDate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsActive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive); + if (lastComparison != 0) { + return lastComparison; + } + } + 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(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(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(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(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(isSetTel()).compareTo(other.isSetTel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFak()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + 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("updateLecturedata_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("newName:"); + if (this.newName == null) { + sb.append("null"); + } else { + sb.append(this.newName); + } + first = false; + if (!first) sb.append(", "); + sb.append("shortdesc:"); + if (this.shortdesc == null) { + sb.append("null"); + } else { + sb.append(this.shortdesc); + } + 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("startDate:"); + if (this.startDate == null) { + sb.append("null"); + } else { + sb.append(this.startDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("endDate:"); + if (this.endDate == null) { + sb.append("null"); + } else { + sb.append(this.endDate); + } + first = false; + if (!first) sb.append(", "); + sb.append("isActive:"); + sb.append(this.isActive); + first = false; + if (!first) sb.append(", "); + sb.append("imagename:"); + if (this.imagename == null) { + sb.append("null"); + } else { + sb.append(this.imagename); + } + 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("lastname:"); + if (this.lastname == null) { + sb.append("null"); + } else { + sb.append(this.lastname); + } + 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("Mail:"); + if (this.Mail == null) { + sb.append("null"); + } else { + sb.append(this.Mail); + } + first = false; + if (!first) sb.append(", "); + sb.append("Tel:"); + if (this.Tel == null) { + sb.append("null"); + } else { + sb.append(this.Tel); + } + first = false; + if (!first) sb.append(", "); + sb.append("Fak:"); + if (this.Fak == null) { + sb.append("null"); + } else { + sb.append(this.Fak); + } + first = false; + if (!first) sb.append(", "); + sb.append("id:"); + if (this.id == null) { + sb.append("null"); + } else { + sb.append(this.id); + } + 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 updateLecturedata_argsStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_argsStandardScheme getScheme() { + return new updateLecturedata_argsStandardScheme(); + } + } + + private static class updateLecturedata_argsStandardScheme extends StandardScheme<updateLecturedata_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // NEW_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // SHORTDESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // 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 -5: // START_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // END_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -7: // IS_ACTIVE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -8: // 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 -9: // FIRSTNAME + 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 -10: // LASTNAME + 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 -11: // 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 -12: // 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 -13: // TEL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -14: // FAK + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -15: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + 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, updateLecturedata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } + if (struct.Fak != null) { + oprot.writeFieldBegin(FAK_FIELD_DESC); + oprot.writeString(struct.Fak); + oprot.writeFieldEnd(); + } + if (struct.Tel != null) { + oprot.writeFieldBegin(TEL_FIELD_DESC); + oprot.writeString(struct.Tel); + oprot.writeFieldEnd(); + } + if (struct.Mail != null) { + oprot.writeFieldBegin(MAIL_FIELD_DESC); + oprot.writeString(struct.Mail); + oprot.writeFieldEnd(); + } + if (struct.university != null) { + oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC); + oprot.writeString(struct.university); + oprot.writeFieldEnd(); + } + if (struct.lastname != null) { + oprot.writeFieldBegin(LASTNAME_FIELD_DESC); + oprot.writeString(struct.lastname); + oprot.writeFieldEnd(); + } + if (struct.firstname != null) { + oprot.writeFieldBegin(FIRSTNAME_FIELD_DESC); + oprot.writeString(struct.firstname); + oprot.writeFieldEnd(); + } + if (struct.imagename != null) { + oprot.writeFieldBegin(IMAGENAME_FIELD_DESC); + oprot.writeString(struct.imagename); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC); + oprot.writeBool(struct.isActive); + oprot.writeFieldEnd(); + if (struct.endDate != null) { + oprot.writeFieldBegin(END_DATE_FIELD_DESC); + oprot.writeString(struct.endDate); + oprot.writeFieldEnd(); + } + if (struct.startDate != null) { + oprot.writeFieldBegin(START_DATE_FIELD_DESC); + oprot.writeString(struct.startDate); + oprot.writeFieldEnd(); + } + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + oprot.writeString(struct.desc); + oprot.writeFieldEnd(); + } + if (struct.shortdesc != null) { + oprot.writeFieldBegin(SHORTDESC_FIELD_DESC); + oprot.writeString(struct.shortdesc); + oprot.writeFieldEnd(); + } + if (struct.newName != null) { + oprot.writeFieldBegin(NEW_NAME_FIELD_DESC); + oprot.writeString(struct.newName); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecturedata_argsTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_argsTupleScheme getScheme() { + return new updateLecturedata_argsTupleScheme(); + } + } + + private static class updateLecturedata_argsTupleScheme extends TupleScheme<updateLecturedata_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetNewName()) { + optionals.set(1); + } + if (struct.isSetShortdesc()) { + optionals.set(2); + } + if (struct.isSetDesc()) { + optionals.set(3); + } + if (struct.isSetStartDate()) { + optionals.set(4); + } + if (struct.isSetEndDate()) { + optionals.set(5); + } + if (struct.isSetIsActive()) { + optionals.set(6); + } + if (struct.isSetImagename()) { + optionals.set(7); + } + if (struct.isSetFirstname()) { + optionals.set(8); + } + if (struct.isSetLastname()) { + optionals.set(9); + } + if (struct.isSetUniversity()) { + optionals.set(10); + } + if (struct.isSetMail()) { + optionals.set(11); + } + if (struct.isSetTel()) { + optionals.set(12); + } + if (struct.isSetFak()) { + optionals.set(13); + } + if (struct.isSetId()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetNewName()) { + oprot.writeString(struct.newName); + } + if (struct.isSetShortdesc()) { + oprot.writeString(struct.shortdesc); + } + if (struct.isSetDesc()) { + oprot.writeString(struct.desc); + } + if (struct.isSetStartDate()) { + oprot.writeString(struct.startDate); + } + if (struct.isSetEndDate()) { + oprot.writeString(struct.endDate); + } + if (struct.isSetIsActive()) { + oprot.writeBool(struct.isActive); + } + if (struct.isSetImagename()) { + oprot.writeString(struct.imagename); + } + if (struct.isSetFirstname()) { + oprot.writeString(struct.firstname); + } + if (struct.isSetLastname()) { + oprot.writeString(struct.lastname); + } + if (struct.isSetUniversity()) { + oprot.writeString(struct.university); + } + if (struct.isSetMail()) { + oprot.writeString(struct.Mail); + } + if (struct.isSetTel()) { + oprot.writeString(struct.Tel); + } + if (struct.isSetFak()) { + oprot.writeString(struct.Fak); + } + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + } + + @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); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.newName = iprot.readString(); + struct.setNewNameIsSet(true); + } + if (incoming.get(2)) { + struct.shortdesc = iprot.readString(); + struct.setShortdescIsSet(true); + } + if (incoming.get(3)) { + struct.desc = iprot.readString(); + struct.setDescIsSet(true); + } + if (incoming.get(4)) { + struct.startDate = iprot.readString(); + struct.setStartDateIsSet(true); + } + if (incoming.get(5)) { + struct.endDate = iprot.readString(); + struct.setEndDateIsSet(true); + } + if (incoming.get(6)) { + struct.isActive = iprot.readBool(); + struct.setIsActiveIsSet(true); + } + if (incoming.get(7)) { + struct.imagename = iprot.readString(); + struct.setImagenameIsSet(true); + } + if (incoming.get(8)) { + struct.firstname = iprot.readString(); + struct.setFirstnameIsSet(true); + } + if (incoming.get(9)) { + struct.lastname = iprot.readString(); + struct.setLastnameIsSet(true); + } + if (incoming.get(10)) { + struct.university = iprot.readString(); + struct.setUniversityIsSet(true); + } + if (incoming.get(11)) { + struct.Mail = iprot.readString(); + struct.setMailIsSet(true); + } + if (incoming.get(12)) { + struct.Tel = iprot.readString(); + struct.setTelIsSet(true); + } + if (incoming.get(13)) { + struct.Fak = iprot.readString(); + struct.setFakIsSet(true); + } + if (incoming.get(14)) { + struct.id = iprot.readString(); + struct.setIdIsSet(true); + } + } + } + + } + + public static class updateLecturedata_result implements org.apache.thrift.TBase<updateLecturedata_result, updateLecturedata_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_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 updateLecturedata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecturedata_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(updateLecturedata_result.class, metaDataMap); + } + + public updateLecturedata_result() { + } + + public updateLecturedata_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public updateLecturedata_result(updateLecturedata_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public updateLecturedata_result deepCopy() { + return new updateLecturedata_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public updateLecturedata_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 updateLecturedata_result) + return this.equals((updateLecturedata_result)that); + return false; + } + + public boolean equals(updateLecturedata_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(updateLecturedata_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("updateLecturedata_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 updateLecturedata_resultStandardSchemeFactory implements SchemeFactory { + public updateLecturedata_resultStandardScheme getScheme() { + return new updateLecturedata_resultStandardScheme(); + } + } + + private static class updateLecturedata_resultStandardScheme extends StandardScheme<updateLecturedata_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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, updateLecturedata_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 updateLecturedata_resultTupleSchemeFactory implements SchemeFactory { + public updateLecturedata_resultTupleScheme getScheme() { + return new updateLecturedata_resultTupleScheme(); + } + } + + private static class updateLecturedata_resultTupleScheme extends TupleScheme<updateLecturedata_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_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, updateLecturedata_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/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index 750943ed..9474d942 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -15,10 +15,14 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerException; + import org.apache.commons.io.FileUtils; import org.apache.thrift.TException; import sql.SQL; +import util.XMLCreator; public class ServerHandler implements Server.Iface { @@ -65,21 +69,26 @@ public class ServerHandler implements Server.Iface { } @Override - public List<String> getImages() throws TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getPathOfImage(String name) throws TException { - // TODO Auto-generated method stub + public String getPathOfImage(String image_id, String version) throws TException { + + try { + ResultSet rs=sql.getPathOfImage(con, image_id, version); + System.out.println("Path SQL erfolgreich"); + rs.next(); + System.out.println(rs.getString("image_path")); + return rs.getString("image_path"); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; } @Override public boolean writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, - String Fak, boolean license, boolean internet, long ram, long cpu) + String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath) throws TException { String login="tete"; @@ -87,8 +96,8 @@ public class ServerHandler implements Server.Iface { int pk_person=sql.setPerson(con, login, lastname, firstname, Mail, new Date(), pk_institution); - sql.setImageData(con, pk_person, license, internet, cpu, ram, imagename); - + sql.setImageData(con, pk_person, license, internet, cpu, ram, imagename, imagePath); + // TODO Auto-generated method stub return true; } @@ -104,7 +113,7 @@ public class ServerHandler implements Server.Iface { while(res.next()) { - list.add(new Image(res.getString("image_name"),res.getString("cond_hasLicenseRestriction"),res.getString("name"),res.getString("lecture"),res.getString("image_update_time"),res.getString("user"))); + list.add(new Image(res.getString("GUID_imageID"),res.getString("imageVersion"),res.getString("image_name"),res.getString("cond_hasLicenseRestriction"),res.getString("name"),res.getString("lecture"),res.getString("image_update_time"),res.getString("user"))); } @@ -189,7 +198,20 @@ public class ServerHandler implements Server.Iface { System.out.println(startDate); sql.setLectureData(con, pk_person, pk_image, imageversion, name, desc, shortdesc, startDate, endDate, isActive); - + XMLCreator xml=new XMLCreator(con, name); + try { + xml.create(name); + System.out.println(new Date() + " - Creator beendet"); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ParserConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } return false; } @@ -199,6 +221,7 @@ public class ServerHandler implements Server.Iface { System.out.println("Vor Move" +new Date()); try { + //der übergebene Filename ist falsch - hier muss der generierte name geholt werden, nicht der ursprüngliche name. wo wird dieser eingelesen? FileUtils.moveFile(tmpFile, new File("141.79.128.103:/srv/nfs4slx/"+tmpFile.getName())); } catch (IOException e) { // TODO Auto-generated catch block @@ -211,15 +234,16 @@ public class ServerHandler implements Server.Iface { @Override - public Map<String, String> getImageData(String imagename) throws TException { - System.out.println("test:"+imagename); - ResultSet data=sql.getImageData(con, imagename); + public Map<String, String> getImageData(String imageid, String imageversion) throws TException { + + ResultSet data=sql.getImageData(con, imageid, imageversion); Map<String,String> map=new HashMap<String, String>(); try { while(data.next()) { System.out.println(data.getString("cond_hasInternetRestriction")+data.getString("cond_hasLicenseRestriction")+data.getString("cond_minCPUs")+data.getString("cond_minRAM")); + map.put("name",data.getString("image_name")); map.put("internet", data.getString("cond_hasInternetRestriction")); map.put("license", data.getString("cond_hasLicenseRestriction")); map.put("cpu", data.getString("cond_minCPUs")); @@ -239,11 +263,70 @@ public class ServerHandler implements Server.Iface { @Override public boolean updateImageData(String name, String newName,boolean license, - boolean internet, long ram, long cpu) throws TException { + boolean internet, long ram, long cpu,String id, String version) throws TException { System.out.println("Server: Vor Update"); - sql.UpdateImageData(con, name, newName ,license, internet, cpu, ram); + sql.UpdateImageData(con, name, newName ,license, internet, cpu, ram, id, version); System.out.println("Update erfolgreich"); 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 { + ResultSet res=sql.getLectureList(con); + + List<Lecture> list = new ArrayList<Lecture>(); + + try { + + while(res.next()) + { + + list.add(new Lecture(res.getString("lectureID"), res.getString("name"), res.getString("isActive"), res.getString("startTime"), res.getString("endTime"), res.getString("lastUsed"), res.getString("description"), res.getString("image_name"), res.getString("user"))); + + } + + + return list; + } catch (SQLException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + return null; + } + + + @Override + 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 TException { + int pk_image=0; + int imageversion=0; + ResultSet image=sql.getImageIDandVersion(con, imagename); + + try { + while(image.next()) + { + pk_image=image.getInt("GUID_imageID"); + imageversion=image.getInt("imageVersion"); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + sql.updateLectureData(con, pk_image, imageversion, lastname, newName, desc, shortdesc, startDate, endDate, isActive, id); + return false; + } + } diff --git a/Dozentenmodulserver/src/server/User.java b/Dozentenmodulserver/src/server/User.java index 5fd2f983..7bf98cc4 100644 --- a/Dozentenmodulserver/src/server/User.java +++ b/Dozentenmodulserver/src/server/User.java @@ -5,6 +5,7 @@ * @generated */ package server; + import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; diff --git a/Dozentenmodulserver/src/server/startServer.java b/Dozentenmodulserver/src/server/startServer.java index 46b9a2f1..e1ab22c0 100644 --- a/Dozentenmodulserver/src/server/startServer.java +++ b/Dozentenmodulserver/src/server/startServer.java @@ -1,6 +1,7 @@ package server; import java.util.ArrayList; +import java.util.Date; import java.util.List; import org.apache.log4j.BasicConfigurator; @@ -22,7 +23,7 @@ public class startServer { public static void main(String[] args) { BasicConfigurator.configure(); - log.info( "Starting Application" ); + log.info( new Date() + " - starting Application\n" ); Thread t; t = new Thread(new BinaryListener()); servers.add(t); @@ -41,7 +42,7 @@ public class startServer { } } } - log.info( "All Servers shut down, exiting..." ); + log.info( new Date()+" - all Servers shut down, exiting...\n" ); } |
