diff options
author | Simon Rettberg | 2015-07-03 16:43:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-07-03 16:43:24 +0200 |
commit | dd3affd5ce50ae8469b9a76a3f48d1fdf911706f (patch) | |
tree | 60b29833dc00f0d3601a413848763d35b264ecb7 /src/main/java/org/openslx/bwlp/thrift | |
parent | API... (diff) | |
download | master-sync-shared-dd3affd5ce50ae8469b9a76a3f48d1fdf911706f.tar.gz master-sync-shared-dd3affd5ce50ae8469b9a76a3f48d1fdf911706f.tar.xz master-sync-shared-dd3affd5ce50ae8469b9a76a3f48d1fdf911706f.zip |
API UPSDTE
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift')
6 files changed, 1392 insertions, 1601 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java index 4567fe7..c0ce32f 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java @@ -13,7 +13,8 @@ import org.apache.thrift.TEnum; public enum ImageDataError implements org.apache.thrift.TEnum { INVALID_DATA(0), - UNKNOWN_IMAGE(1); + UNKNOWN_IMAGE(1), + INVALID_SHARE_MODE(2); private final int value; @@ -38,6 +39,8 @@ public enum ImageDataError implements org.apache.thrift.TEnum { return INVALID_DATA; case 1: return UNKNOWN_IMAGE; + case 2: + return INVALID_SHARE_MODE; default: return null; } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java index 8f65fc9..6c2bbb1 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java @@ -45,6 +45,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)8); private static final org.apache.thrift.protocol.TField LAST_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUsed", org.apache.thrift.protocol.TType.I64, (short)9); private static final org.apache.thrift.protocol.TField USE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("useCount", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)20); + private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)21); private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)11); private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)12); private static final org.apache.thrift.protocol.TField RUNSCRIPT_FIELD_DESC = new org.apache.thrift.protocol.TField("runscript", org.apache.thrift.protocol.TType.STRING, (short)13); @@ -54,7 +56,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)17); private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)18); private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)19); - private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)20); + private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)22); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -72,6 +74,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture public long endTime; // required public long lastUsed; // required public int useCount; // required + public long createTime; // required + public long updateTime; // required public String ownerId; // required public String updaterId; // required public String runscript; // required @@ -95,6 +99,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture END_TIME((short)8, "endTime"), LAST_USED((short)9, "lastUsed"), USE_COUNT((short)10, "useCount"), + CREATE_TIME((short)20, "createTime"), + UPDATE_TIME((short)21, "updateTime"), OWNER_ID((short)11, "ownerId"), UPDATER_ID((short)12, "updaterId"), RUNSCRIPT((short)13, "runscript"), @@ -104,7 +110,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture IS_EXAM((short)17, "isExam"), HAS_INTERNET_ACCESS((short)18, "hasInternetAccess"), DEFAULT_PERMISSIONS((short)19, "defaultPermissions"), - USER_PERMISSIONS((short)20, "userPermissions"); + USER_PERMISSIONS((short)22, "userPermissions"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -139,6 +145,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return LAST_USED; case 10: // USE_COUNT return USE_COUNT; + case 20: // CREATE_TIME + return CREATE_TIME; + case 21: // UPDATE_TIME + return UPDATE_TIME; case 11: // OWNER_ID return OWNER_ID; case 12: // UPDATER_ID @@ -157,7 +167,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return HAS_INTERNET_ACCESS; case 19: // DEFAULT_PERMISSIONS return DEFAULT_PERMISSIONS; - case 20: // USER_PERMISSIONS + case 22: // USER_PERMISSIONS return USER_PERMISSIONS; default: return null; @@ -205,9 +215,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture private static final int __ENDTIME_ISSET_ID = 3; private static final int __LASTUSED_ISSET_ID = 4; private static final int __USECOUNT_ISSET_ID = 5; - private static final int __ISEXAM_ISSET_ID = 6; - private static final int __HASINTERNETACCESS_ISSET_ID = 7; - private byte __isset_bitfield = 0; + private static final int __CREATETIME_ISSET_ID = 6; + private static final int __UPDATETIME_ISSET_ID = 7; + private static final int __ISEXAM_ISSET_ID = 8; + private static final int __HASINTERNETACCESS_ISSET_ID = 9; + private short __isset_bitfield = 0; private _Fields optionals[] = {_Fields.USER_PERMISSIONS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -232,6 +244,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); tmpMap.put(_Fields.USE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("useCount", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -273,6 +289,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture long endTime, long lastUsed, int useCount, + long createTime, + long updateTime, String ownerId, String updaterId, String runscript, @@ -300,6 +318,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture setLastUsedIsSet(true); this.useCount = useCount; setUseCountIsSet(true); + this.createTime = createTime; + setCreateTimeIsSet(true); + this.updateTime = updateTime; + setUpdateTimeIsSet(true); this.ownerId = ownerId; this.updaterId = updaterId; this.runscript = runscript; @@ -336,6 +358,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture this.endTime = other.endTime; this.lastUsed = other.lastUsed; this.useCount = other.useCount; + this.createTime = other.createTime; + this.updateTime = other.updateTime; if (other.isSetOwnerId()) { this.ownerId = other.ownerId; } @@ -392,6 +416,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture this.lastUsed = 0; setUseCountIsSet(false); this.useCount = 0; + setCreateTimeIsSet(false); + this.createTime = 0; + setUpdateTimeIsSet(false); + this.updateTime = 0; this.ownerId = null; this.updaterId = null; this.runscript = null; @@ -640,6 +668,52 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value); } + public long getCreateTime() { + return this.createTime; + } + + public LectureRead setCreateTime(long createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + return this; + } + + public void unsetCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public long getUpdateTime() { + return this.updateTime; + } + + public LectureRead setUpdateTime(long updateTime) { + this.updateTime = updateTime; + setUpdateTimeIsSet(true); + return this; + } + + public void unsetUpdateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID); + } + + /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */ + public boolean isSetUpdateTime() { + return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID); + } + + public void setUpdateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value); + } + public String getOwnerId() { return this.ownerId; } @@ -1005,6 +1079,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } break; + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Long)value); + } + break; + + case UPDATE_TIME: + if (value == null) { + unsetUpdateTime(); + } else { + setUpdateTime((Long)value); + } + break; + case OWNER_ID: if (value == null) { unsetOwnerId(); @@ -1120,6 +1210,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture case USE_COUNT: return Integer.valueOf(getUseCount()); + case CREATE_TIME: + return Long.valueOf(getCreateTime()); + + case UPDATE_TIME: + return Long.valueOf(getUpdateTime()); + case OWNER_ID: return getOwnerId(); @@ -1181,6 +1277,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return isSetLastUsed(); case USE_COUNT: return isSetUseCount(); + case CREATE_TIME: + return isSetCreateTime(); + case UPDATE_TIME: + return isSetUpdateTime(); case OWNER_ID: return isSetOwnerId(); case UPDATER_ID: @@ -1308,6 +1408,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return false; } + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_updateTime = true; + boolean that_present_updateTime = true; + if (this_present_updateTime || that_present_updateTime) { + if (!(this_present_updateTime && that_present_updateTime)) + return false; + if (this.updateTime != that.updateTime) + return false; + } + boolean this_present_ownerId = true && this.isSetOwnerId(); boolean that_present_ownerId = true && that.isSetOwnerId(); if (this_present_ownerId || that_present_ownerId) { @@ -1514,6 +1632,26 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return lastComparison; } } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUpdateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId()); if (lastComparison != 0) { return lastComparison; @@ -1690,6 +1828,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture sb.append(this.useCount); first = false; if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("updateTime:"); + sb.append(this.updateTime); + first = false; + if (!first) sb.append(", "); sb.append("ownerId:"); if (this.ownerId == null) { sb.append("null"); @@ -1898,6 +2044,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 20: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 21: // UPDATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.updateTime = iprot.readI64(); + struct.setUpdateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 11: // OWNER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ownerId = iprot.readString(); @@ -2002,7 +2164,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 20: // USER_PERMISSIONS + case 22: // USER_PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userPermissions = new LecturePermissions(); struct.userPermissions.read(iprot); @@ -2126,6 +2288,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture struct.defaultPermissions.write(oprot); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC); + oprot.writeI64(struct.updateTime); + oprot.writeFieldEnd(); if (struct.userPermissions != null) { if (struct.isSetUserPermissions()) { oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC); @@ -2181,37 +2349,43 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (struct.isSetUseCount()) { optionals.set(9); } - if (struct.isSetOwnerId()) { + if (struct.isSetCreateTime()) { optionals.set(10); } - if (struct.isSetUpdaterId()) { + if (struct.isSetUpdateTime()) { optionals.set(11); } - if (struct.isSetRunscript()) { + if (struct.isSetOwnerId()) { optionals.set(12); } - if (struct.isSetNics()) { + if (struct.isSetUpdaterId()) { optionals.set(13); } - if (struct.isSetAllowedUsers()) { + if (struct.isSetRunscript()) { optionals.set(14); } - if (struct.isSetNetworkExceptions()) { + if (struct.isSetNics()) { optionals.set(15); } - if (struct.isSetIsExam()) { + if (struct.isSetAllowedUsers()) { optionals.set(16); } - if (struct.isSetHasInternetAccess()) { + if (struct.isSetNetworkExceptions()) { optionals.set(17); } - if (struct.isSetDefaultPermissions()) { + if (struct.isSetIsExam()) { optionals.set(18); } - if (struct.isSetUserPermissions()) { + if (struct.isSetHasInternetAccess()) { optionals.set(19); } - oprot.writeBitSet(optionals, 20); + if (struct.isSetDefaultPermissions()) { + optionals.set(20); + } + if (struct.isSetUserPermissions()) { + optionals.set(21); + } + oprot.writeBitSet(optionals, 22); if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } @@ -2242,6 +2416,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (struct.isSetUseCount()) { oprot.writeI32(struct.useCount); } + if (struct.isSetCreateTime()) { + oprot.writeI64(struct.createTime); + } + if (struct.isSetUpdateTime()) { + oprot.writeI64(struct.updateTime); + } if (struct.isSetOwnerId()) { oprot.writeString(struct.ownerId); } @@ -2295,7 +2475,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture @Override public void read(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(20); + BitSet incoming = iprot.readBitSet(22); if (incoming.get(0)) { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); @@ -2338,18 +2518,26 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture struct.setUseCountIsSet(true); } if (incoming.get(10)) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(11)) { + struct.updateTime = iprot.readI64(); + struct.setUpdateTimeIsSet(true); + } + if (incoming.get(12)) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(13)) { struct.updaterId = iprot.readString(); struct.setUpdaterIdIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(14)) { struct.runscript = iprot.readString(); struct.setRunscriptIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(15)) { { org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.nics = new ArrayList<String>(_list97.size); @@ -2362,7 +2550,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } struct.setNicsIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(16)) { { org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.allowedUsers = new ArrayList<String>(_list100.size); @@ -2375,7 +2563,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } struct.setAllowedUsersIsSet(true); } - if (incoming.get(15)) { + if (incoming.get(17)) { { org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.networkExceptions = new ArrayList<NetRule>(_list103.size); @@ -2389,20 +2577,20 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } struct.setNetworkExceptionsIsSet(true); } - if (incoming.get(16)) { + if (incoming.get(18)) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); } - if (incoming.get(17)) { + if (incoming.get(19)) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); } - if (incoming.get(18)) { + if (incoming.get(20)) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); struct.setDefaultPermissionsIsSet(true); } - if (incoming.get(19)) { + if (incoming.get(21)) { struct.userPermissions = new LecturePermissions(); struct.userPermissions.read(iprot); struct.setUserPermissionsIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java index c3a45e8..646f9f5 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java @@ -38,7 +38,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)1); 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)2); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)7); @@ -61,7 +61,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L public String lectureId; // required public String lectureName; // required public String imageVersionId; // required - public String imageName; // required + public String imageBaseId; // required public boolean isEnabled; // required public long startTime; // required public long endTime; // required @@ -80,7 +80,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L LECTURE_ID((short)1, "lectureId"), LECTURE_NAME((short)2, "lectureName"), IMAGE_VERSION_ID((short)3, "imageVersionId"), - IMAGE_NAME((short)4, "imageName"), + IMAGE_BASE_ID((short)4, "imageBaseId"), IS_ENABLED((short)5, "isEnabled"), START_TIME((short)6, "startTime"), END_TIME((short)7, "endTime"), @@ -113,8 +113,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L return LECTURE_NAME; case 3: // IMAGE_VERSION_ID return IMAGE_VERSION_ID; - case 4: // IMAGE_NAME - return IMAGE_NAME; + case 4: // IMAGE_BASE_ID + return IMAGE_BASE_ID; case 5: // IS_ENABLED return IS_ENABLED; case 6: // START_TIME @@ -198,8 +198,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - 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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -235,7 +235,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L String lectureId, String lectureName, String imageVersionId, - String imageName, + String imageBaseId, boolean isEnabled, long startTime, long endTime, @@ -252,7 +252,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L this.lectureId = lectureId; this.lectureName = lectureName; this.imageVersionId = imageVersionId; - this.imageName = imageName; + this.imageBaseId = imageBaseId; this.isEnabled = isEnabled; setIsEnabledIsSet(true); this.startTime = startTime; @@ -288,8 +288,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } - if (other.isSetImageName()) { - this.imageName = other.imageName; + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; } this.isEnabled = other.isEnabled; this.startTime = other.startTime; @@ -322,7 +322,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L this.lectureId = null; this.lectureName = null; this.imageVersionId = null; - this.imageName = null; + this.imageBaseId = null; setIsEnabledIsSet(false); this.isEnabled = false; setStartTimeIsSet(false); @@ -417,27 +417,27 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L } } - public String getImageName() { - return this.imageName; + public String getImageBaseId() { + return this.imageBaseId; } - public LectureSummary setImageName(String imageName) { - this.imageName = imageName; + public LectureSummary setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; return this; } - public void unsetImageName() { - this.imageName = null; + public void unsetImageBaseId() { + this.imageBaseId = 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 imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; } - public void setImageNameIsSet(boolean value) { + public void setImageBaseIdIsSet(boolean value) { if (!value) { - this.imageName = null; + this.imageBaseId = null; } } @@ -747,11 +747,11 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L } break; - case IMAGE_NAME: + case IMAGE_BASE_ID: if (value == null) { - unsetImageName(); + unsetImageBaseId(); } else { - setImageName((String)value); + setImageBaseId((String)value); } break; @@ -865,8 +865,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L case IMAGE_VERSION_ID: return getImageVersionId(); - case IMAGE_NAME: - return getImageName(); + case IMAGE_BASE_ID: + return getImageBaseId(); case IS_ENABLED: return Boolean.valueOf(isIsEnabled()); @@ -921,8 +921,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L return isSetLectureName(); case IMAGE_VERSION_ID: return isSetImageVersionId(); - case IMAGE_NAME: - return isSetImageName(); + case IMAGE_BASE_ID: + return isSetImageBaseId(); case IS_ENABLED: return isSetIsEnabled(); case START_TIME: @@ -991,12 +991,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L 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_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; - if (!this.imageName.equals(that.imageName)) + if (!this.imageBaseId.equals(that.imageBaseId)) return false; } @@ -1154,12 +1154,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); if (lastComparison != 0) { return lastComparison; } - if (isSetImageName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); if (lastComparison != 0) { return lastComparison; } @@ -1328,11 +1328,11 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L } first = false; if (!first) sb.append(", "); - sb.append("imageName:"); - if (this.imageName == null) { + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { sb.append("null"); } else { - sb.append(this.imageName); + sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); @@ -1476,10 +1476,10 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // IMAGE_NAME + case 4: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imageName = iprot.readString(); - struct.setImageNameIsSet(true); + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1612,9 +1612,9 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } - if (struct.imageName != null) { - oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); - oprot.writeString(struct.imageName); + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC); @@ -1690,7 +1690,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L if (struct.isSetImageVersionId()) { optionals.set(2); } - if (struct.isSetImageName()) { + if (struct.isSetImageBaseId()) { optionals.set(3); } if (struct.isSetIsEnabled()) { @@ -1739,8 +1739,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } - if (struct.isSetImageName()) { - oprot.writeString(struct.imageName); + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); } if (struct.isSetIsEnabled()) { oprot.writeBool(struct.isEnabled); @@ -1797,8 +1797,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L struct.setImageVersionIdIsSet(true); } if (incoming.get(3)) { - struct.imageName = iprot.readString(); - struct.setImageNameIsSet(true); + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); } if (incoming.get(4)) { struct.isEnabled = iprot.readBool(); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java index 7c57bc0..193a95e 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java @@ -5787,14 +5787,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); - struct.success = new ArrayList<UserInfo>(_list218.size); - for (int _i219 = 0; _i219 < _list218.size; ++_i219) + org.apache.thrift.protocol.TList _list210 = iprot.readListBegin(); + struct.success = new ArrayList<UserInfo>(_list210.size); + for (int _i211 = 0; _i211 < _list210.size; ++_i211) { - UserInfo _elem220; - _elem220 = new UserInfo(); - _elem220.read(iprot); - struct.success.add(_elem220); + UserInfo _elem212; + _elem212 = new UserInfo(); + _elem212.read(iprot); + struct.success.add(_elem212); } iprot.readListEnd(); } @@ -5831,9 +5831,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (UserInfo _iter221 : struct.success) + for (UserInfo _iter213 : struct.success) { - _iter221.write(oprot); + _iter213.write(oprot); } oprot.writeListEnd(); } @@ -5872,9 +5872,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (UserInfo _iter222 : struct.success) + for (UserInfo _iter214 : struct.success) { - _iter222.write(oprot); + _iter214.write(oprot); } } } @@ -5889,14 +5889,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<UserInfo>(_list223.size); - for (int _i224 = 0; _i224 < _list223.size; ++_i224) + org.apache.thrift.protocol.TList _list215 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<UserInfo>(_list215.size); + for (int _i216 = 0; _i216 < _list215.size; ++_i216) { - UserInfo _elem225; - _elem225 = new UserInfo(); - _elem225.read(iprot); - struct.success.add(_elem225); + UserInfo _elem217; + _elem217 = new UserInfo(); + _elem217.read(iprot); + struct.success.add(_elem217); } } struct.setSuccessIsSet(true); @@ -6749,14 +6749,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); - struct.success = new ArrayList<ImagePublishData>(_list226.size); - for (int _i227 = 0; _i227 < _list226.size; ++_i227) + org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); + struct.success = new ArrayList<ImagePublishData>(_list218.size); + for (int _i219 = 0; _i219 < _list218.size; ++_i219) { - ImagePublishData _elem228; - _elem228 = new ImagePublishData(); - _elem228.read(iprot); - struct.success.add(_elem228); + ImagePublishData _elem220; + _elem220 = new ImagePublishData(); + _elem220.read(iprot); + struct.success.add(_elem220); } iprot.readListEnd(); } @@ -6793,9 +6793,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImagePublishData _iter229 : struct.success) + for (ImagePublishData _iter221 : struct.success) { - _iter229.write(oprot); + _iter221.write(oprot); } oprot.writeListEnd(); } @@ -6834,9 +6834,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImagePublishData _iter230 : struct.success) + for (ImagePublishData _iter222 : struct.success) { - _iter230.write(oprot); + _iter222.write(oprot); } } } @@ -6851,14 +6851,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<ImagePublishData>(_list231.size); - for (int _i232 = 0; _i232 < _list231.size; ++_i232) + org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<ImagePublishData>(_list223.size); + for (int _i224 = 0; _i224 < _list223.size; ++_i224) { - ImagePublishData _elem233; - _elem233 = new ImagePublishData(); - _elem233.read(iprot); - struct.success.add(_elem233); + ImagePublishData _elem225; + _elem225 = new ImagePublishData(); + _elem225.read(iprot); + struct.success.add(_elem225); } } struct.setSuccessIsSet(true); @@ -10623,13 +10623,13 @@ public class MasterServer { case 3: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); - struct.blockHashes = new ArrayList<ByteBuffer>(_list234.size); - for (int _i235 = 0; _i235 < _list234.size; ++_i235) + org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); + struct.blockHashes = new ArrayList<ByteBuffer>(_list226.size); + for (int _i227 = 0; _i227 < _list226.size; ++_i227) { - ByteBuffer _elem236; - _elem236 = iprot.readBinary(); - struct.blockHashes.add(_elem236); + ByteBuffer _elem228; + _elem228 = iprot.readBinary(); + struct.blockHashes.add(_elem228); } iprot.readListEnd(); } @@ -10667,9 +10667,9 @@ public class MasterServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter237 : struct.blockHashes) + for (ByteBuffer _iter229 : struct.blockHashes) { - oprot.writeBinary(_iter237); + oprot.writeBinary(_iter229); } oprot.writeListEnd(); } @@ -10712,9 +10712,9 @@ public class MasterServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter238 : struct.blockHashes) + for (ByteBuffer _iter230 : struct.blockHashes) { - oprot.writeBinary(_iter238); + oprot.writeBinary(_iter230); } } } @@ -10735,13 +10735,13 @@ public class MasterServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList<ByteBuffer>(_list239.size); - for (int _i240 = 0; _i240 < _list239.size; ++_i240) + org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList<ByteBuffer>(_list231.size); + for (int _i232 = 0; _i232 < _list231.size; ++_i232) { - ByteBuffer _elem241; - _elem241 = iprot.readBinary(); - struct.blockHashes.add(_elem241); + ByteBuffer _elem233; + _elem233 = iprot.readBinary(); + struct.blockHashes.add(_elem233); } } struct.setBlockHashesIsSet(true); @@ -14804,14 +14804,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); - struct.success = new ArrayList<Organization>(_list242.size); - for (int _i243 = 0; _i243 < _list242.size; ++_i243) + org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); + struct.success = new ArrayList<Organization>(_list234.size); + for (int _i235 = 0; _i235 < _list234.size; ++_i235) { - Organization _elem244; - _elem244 = new Organization(); - _elem244.read(iprot); - struct.success.add(_elem244); + Organization _elem236; + _elem236 = new Organization(); + _elem236.read(iprot); + struct.success.add(_elem236); } iprot.readListEnd(); } @@ -14839,9 +14839,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter245 : struct.success) + for (Organization _iter237 : struct.success) { - _iter245.write(oprot); + _iter237.write(oprot); } oprot.writeListEnd(); } @@ -14872,9 +14872,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter246 : struct.success) + for (Organization _iter238 : struct.success) { - _iter246.write(oprot); + _iter238.write(oprot); } } } @@ -14886,14 +14886,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Organization>(_list247.size); - for (int _i248 = 0; _i248 < _list247.size; ++_i248) + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Organization>(_list239.size); + for (int _i240 = 0; _i240 < _list239.size; ++_i240) { - Organization _elem249; - _elem249 = new Organization(); - _elem249.read(iprot); - struct.success.add(_elem249); + Organization _elem241; + _elem241 = new Organization(); + _elem241.read(iprot); + struct.success.add(_elem241); } } struct.setSuccessIsSet(true); @@ -15458,14 +15458,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); - struct.success = new ArrayList<OperatingSystem>(_list250.size); - for (int _i251 = 0; _i251 < _list250.size; ++_i251) + org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); + struct.success = new ArrayList<OperatingSystem>(_list242.size); + for (int _i243 = 0; _i243 < _list242.size; ++_i243) { - OperatingSystem _elem252; - _elem252 = new OperatingSystem(); - _elem252.read(iprot); - struct.success.add(_elem252); + OperatingSystem _elem244; + _elem244 = new OperatingSystem(); + _elem244.read(iprot); + struct.success.add(_elem244); } iprot.readListEnd(); } @@ -15493,9 +15493,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter253 : struct.success) + for (OperatingSystem _iter245 : struct.success) { - _iter253.write(oprot); + _iter245.write(oprot); } oprot.writeListEnd(); } @@ -15526,9 +15526,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter254 : struct.success) + for (OperatingSystem _iter246 : struct.success) { - _iter254.write(oprot); + _iter246.write(oprot); } } } @@ -15540,14 +15540,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<OperatingSystem>(_list255.size); - for (int _i256 = 0; _i256 < _list255.size; ++_i256) + org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<OperatingSystem>(_list247.size); + for (int _i248 = 0; _i248 < _list247.size; ++_i248) { - OperatingSystem _elem257; - _elem257 = new OperatingSystem(); - _elem257.read(iprot); - struct.success.add(_elem257); + OperatingSystem _elem249; + _elem249 = new OperatingSystem(); + _elem249.read(iprot); + struct.success.add(_elem249); } } struct.setSuccessIsSet(true); @@ -16112,14 +16112,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); - struct.success = new ArrayList<Virtualizer>(_list258.size); - for (int _i259 = 0; _i259 < _list258.size; ++_i259) + org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); + struct.success = new ArrayList<Virtualizer>(_list250.size); + for (int _i251 = 0; _i251 < _list250.size; ++_i251) { - Virtualizer _elem260; - _elem260 = new Virtualizer(); - _elem260.read(iprot); - struct.success.add(_elem260); + Virtualizer _elem252; + _elem252 = new Virtualizer(); + _elem252.read(iprot); + struct.success.add(_elem252); } iprot.readListEnd(); } @@ -16147,9 +16147,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter261 : struct.success) + for (Virtualizer _iter253 : struct.success) { - _iter261.write(oprot); + _iter253.write(oprot); } oprot.writeListEnd(); } @@ -16180,9 +16180,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter262 : struct.success) + for (Virtualizer _iter254 : struct.success) { - _iter262.write(oprot); + _iter254.write(oprot); } } } @@ -16194,14 +16194,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Virtualizer>(_list263.size); - for (int _i264 = 0; _i264 < _list263.size; ++_i264) + org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Virtualizer>(_list255.size); + for (int _i256 = 0; _i256 < _list255.size; ++_i256) { - Virtualizer _elem265; - _elem265 = new Virtualizer(); - _elem265.read(iprot); - struct.success.add(_elem265); + Virtualizer _elem257; + _elem257 = new Virtualizer(); + _elem257.read(iprot); + struct.success.add(_elem257); } } struct.setSuccessIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java index ba52f7d..4c6196f 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java @@ -38,6 +38,8 @@ public class SatelliteServer { public long getVersion() throws org.apache.thrift.TException; + public int getPageSize() throws org.apache.thrift.TException; + public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException; public void cancelUpload(String uploadToken) throws org.apache.thrift.TException; @@ -60,7 +62,7 @@ public class SatelliteServer { public List<Organization> getAllOrganizations() throws org.apache.thrift.TException; - public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException; + public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException; public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; @@ -82,12 +84,10 @@ public class SatelliteServer { public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; - public List<LectureSummary> getLectureList(String userToken) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException; + public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException; public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; - public List<LectureSummary> getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; - public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException; @@ -102,6 +102,8 @@ public class SatelliteServer { public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getPageSize(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -124,7 +126,7 @@ public class SatelliteServer { public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getImageList(String userToken, List<String> tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -146,12 +148,10 @@ public class SatelliteServer { public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -204,6 +204,28 @@ public class SatelliteServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result"); } + public int getPageSize() throws org.apache.thrift.TException + { + send_getPageSize(); + return recv_getPageSize(); + } + + public void send_getPageSize() throws org.apache.thrift.TException + { + getPageSize_args args = new getPageSize_args(); + sendBase("getPageSize", args); + } + + public int recv_getPageSize() throws org.apache.thrift.TException + { + getPageSize_result result = new getPageSize_result(); + receiveBase(result, "getPageSize"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPageSize failed: unknown result"); + } + public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException { send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes); @@ -468,17 +490,18 @@ public class SatelliteServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOrganizations failed: unknown result"); } - public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException + public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException { - send_getImageList(userToken, tagSearch); + send_getImageList(userToken, tagSearch, page); return recv_getImageList(); } - public void send_getImageList(String userToken, List<String> tagSearch) throws org.apache.thrift.TException + public void send_getImageList(String userToken, List<String> tagSearch, int page) throws org.apache.thrift.TException { getImageList_args args = new getImageList_args(); args.setUserToken(userToken); args.setTagSearch(tagSearch); + args.setPage(page); sendBase("getImageList", args); } @@ -818,16 +841,17 @@ public class SatelliteServer { return; } - public List<LectureSummary> getLectureList(String userToken) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException + public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException { - send_getLectureList(userToken); + send_getLectureList(userToken, page); return recv_getLectureList(); } - public void send_getLectureList(String userToken) throws org.apache.thrift.TException + public void send_getLectureList(String userToken, int page) throws org.apache.thrift.TException { getLectureList_args args = new getLectureList_args(); args.setUserToken(userToken); + args.setPage(page); sendBase("getLectureList", args); } @@ -880,39 +904,6 @@ public class SatelliteServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result"); } - public List<LectureSummary> getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException - { - send_getLecturesByImageVersion(userToken, imageVersionId); - return recv_getLecturesByImageVersion(); - } - - public void send_getLecturesByImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException - { - getLecturesByImageVersion_args args = new getLecturesByImageVersion_args(); - args.setUserToken(userToken); - args.setImageVersionId(imageVersionId); - sendBase("getLecturesByImageVersion", args); - } - - public List<LectureSummary> recv_getLecturesByImageVersion() throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException - { - getLecturesByImageVersion_result result = new getLecturesByImageVersion_result(); - receiveBase(result, "getLecturesByImageVersion"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.authError != null) { - throw result.authError; - } - if (result.notFound != null) { - throw result.notFound; - } - if (result.serverError != null) { - throw result.serverError; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturesByImageVersion failed: unknown result"); - } - public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException { send_deleteLecture(userToken, lectureId); @@ -1085,6 +1076,35 @@ public class SatelliteServer { } } + public void getPageSize(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getPageSize_call method_call = new getPageSize_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getPageSize_call extends org.apache.thrift.async.TAsyncMethodCall { + public getPageSize_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("getPageSize", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getPageSize_args args = new getPageSize_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public int 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_getPageSize(); + } + } + public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, resultHandler, this, ___protocolFactory, ___transport); @@ -1443,9 +1463,9 @@ public class SatelliteServer { } } - public void getImageList(String userToken, List<String> tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getImageList_call method_call = new getImageList_call(userToken, tagSearch, resultHandler, this, ___protocolFactory, ___transport); + getImageList_call method_call = new getImageList_call(userToken, tagSearch, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -1453,10 +1473,12 @@ public class SatelliteServer { public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall { private String userToken; private List<String> tagSearch; - public getImageList_call(String userToken, List<String> tagSearch, 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 int page; + public getImageList_call(String userToken, List<String> tagSearch, int page, 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.userToken = userToken; this.tagSearch = tagSearch; + this.page = page; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { @@ -1464,6 +1486,7 @@ public class SatelliteServer { getImageList_args args = new getImageList_args(); args.setUserToken(userToken); args.setTagSearch(tagSearch); + args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @@ -1843,24 +1866,27 @@ public class SatelliteServer { } } - public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getLectureList_call method_call = new getLectureList_call(userToken, resultHandler, this, ___protocolFactory, ___transport); + getLectureList_call method_call = new getLectureList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall { private String userToken; - public getLectureList_call(String userToken, 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 int page; + public getLectureList_call(String userToken, int page, 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.userToken = userToken; + this.page = page; } 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.setUserToken(userToken); + args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @@ -1910,41 +1936,6 @@ public class SatelliteServer { } } - public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getLecturesByImageVersion_call method_call = new getLecturesByImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getLecturesByImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall { - private String userToken; - private String imageVersionId; - public getLecturesByImageVersion_call(String userToken, String imageVersionId, 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.userToken = userToken; - this.imageVersionId = imageVersionId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturesByImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getLecturesByImageVersion_args args = new getLecturesByImageVersion_args(); - args.setUserToken(userToken); - args.setImageVersionId(imageVersionId); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<LectureSummary> getResult() throws TAuthorizationException, TNotFoundException, TInternalServerError, 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_getLecturesByImageVersion(); - } - } - public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteLecture_call method_call = new deleteLecture_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport); @@ -2105,6 +2096,7 @@ public class SatelliteServer { 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("getVersion", new getVersion()); + processMap.put("getPageSize", new getPageSize()); processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); processMap.put("cancelUpload", new cancelUpload()); processMap.put("queryUploadStatus", new queryUploadStatus()); @@ -2129,7 +2121,6 @@ public class SatelliteServer { processMap.put("updateLecture", new updateLecture()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureDetails", new getLectureDetails()); - processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion()); processMap.put("deleteLecture", new deleteLecture()); processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); @@ -2158,6 +2149,27 @@ public class SatelliteServer { } } + public static class getPageSize<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPageSize_args> { + public getPageSize() { + super("getPageSize"); + } + + public getPageSize_args getEmptyArgsInstance() { + return new getPageSize_args(); + } + + protected boolean isOneway() { + return false; + } + + public getPageSize_result getResult(I iface, getPageSize_args args) throws org.apache.thrift.TException { + getPageSize_result result = new getPageSize_result(); + result.success = iface.getPageSize(); + result.setSuccessIsSet(true); + return result; + } + } + public static class requestImageVersionUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestImageVersionUpload_args> { public requestImageVersionUpload() { super("requestImageVersionUpload"); @@ -2415,7 +2427,7 @@ public class SatelliteServer { public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException { getImageList_result result = new getImageList_result(); try { - result.success = iface.getImageList(args.userToken, args.tagSearch); + result.success = iface.getImageList(args.userToken, args.tagSearch, args.page); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInternalServerError serverError) { @@ -2723,7 +2735,7 @@ public class SatelliteServer { public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException { getLectureList_result result = new getLectureList_result(); try { - result.success = iface.getLectureList(args.userToken); + result.success = iface.getLectureList(args.userToken, args.page); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInternalServerError serverError) { @@ -2761,34 +2773,6 @@ public class SatelliteServer { } } - public static class getLecturesByImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLecturesByImageVersion_args> { - public getLecturesByImageVersion() { - super("getLecturesByImageVersion"); - } - - public getLecturesByImageVersion_args getEmptyArgsInstance() { - return new getLecturesByImageVersion_args(); - } - - protected boolean isOneway() { - return false; - } - - public getLecturesByImageVersion_result getResult(I iface, getLecturesByImageVersion_args args) throws org.apache.thrift.TException { - getLecturesByImageVersion_result result = new getLecturesByImageVersion_result(); - try { - result.success = iface.getLecturesByImageVersion(args.userToken, args.imageVersionId); - } catch (TAuthorizationException authError) { - result.authError = authError; - } catch (TNotFoundException notFound) { - result.notFound = notFound; - } catch (TInternalServerError serverError) { - result.serverError = serverError; - } - return result; - } - } - public static class deleteLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteLecture_args> { public deleteLecture() { super("deleteLecture"); @@ -2915,6 +2899,7 @@ public class SatelliteServer { 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("getVersion", new getVersion()); + processMap.put("getPageSize", new getPageSize()); processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); processMap.put("cancelUpload", new cancelUpload()); processMap.put("queryUploadStatus", new queryUploadStatus()); @@ -2939,7 +2924,6 @@ public class SatelliteServer { processMap.put("updateLecture", new updateLecture()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureDetails", new getLectureDetails()); - processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion()); processMap.put("deleteLecture", new deleteLecture()); processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); @@ -2999,6 +2983,58 @@ public class SatelliteServer { } } + public static class getPageSize<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPageSize_args, Integer> { + public getPageSize() { + super("getPageSize"); + } + + public getPageSize_args getEmptyArgsInstance() { + return new getPageSize_args(); + } + + public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Integer>() { + public void onComplete(Integer o) { + getPageSize_result result = new getPageSize_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; + getPageSize_result result = new getPageSize_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, getPageSize_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { + iface.getPageSize(resultHandler); + } + } + public static class requestImageVersionUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageVersionUpload_args, TransferInformation> { public requestImageVersionUpload() { super("requestImageVersionUpload"); @@ -3650,7 +3686,7 @@ public class SatelliteServer { } public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException { - iface.getImageList(args.userToken, args.tagSearch,resultHandler); + iface.getImageList(args.userToken, args.tagSearch, args.page,resultHandler); } } @@ -4381,7 +4417,7 @@ public class SatelliteServer { } public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException { - iface.getLectureList(args.userToken,resultHandler); + iface.getLectureList(args.userToken, args.page,resultHandler); } } @@ -4452,73 +4488,6 @@ public class SatelliteServer { } } - public static class getLecturesByImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturesByImageVersion_args, List<LectureSummary>> { - public getLecturesByImageVersion() { - super("getLecturesByImageVersion"); - } - - public getLecturesByImageVersion_args getEmptyArgsInstance() { - return new getLecturesByImageVersion_args(); - } - - public AsyncMethodCallback<List<LectureSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<LectureSummary>>() { - public void onComplete(List<LectureSummary> o) { - getLecturesByImageVersion_result result = new getLecturesByImageVersion_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; - getLecturesByImageVersion_result result = new getLecturesByImageVersion_result(); - if (e instanceof TAuthorizationException) { - result.authError = (TAuthorizationException) e; - result.setAuthErrorIsSet(true); - msg = result; - } - else if (e instanceof TNotFoundException) { - result.notFound = (TNotFoundException) e; - result.setNotFoundIsSet(true); - msg = result; - } - else if (e instanceof TInternalServerError) { - result.serverError = (TInternalServerError) e; - result.setServerErrorIsSet(true); - msg = result; - } - else - { - 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, getLecturesByImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException { - iface.getLecturesByImageVersion(args.userToken, args.imageVersionId,resultHandler); - } - } - public static class deleteLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteLecture_args, Void> { public deleteLecture() { super("deleteLecture"); @@ -5386,6 +5355,606 @@ public class SatelliteServer { } + public static class getPageSize_args implements org.apache.thrift.TBase<getPageSize_args, getPageSize_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPageSize_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPageSize_args"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getPageSize_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getPageSize_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(getPageSize_args.class, metaDataMap); + } + + public getPageSize_args() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getPageSize_args(getPageSize_args other) { + } + + public getPageSize_args deepCopy() { + return new getPageSize_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 getPageSize_args) + return this.equals((getPageSize_args)that); + return false; + } + + public boolean equals(getPageSize_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getPageSize_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("getPageSize_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 getPageSize_argsStandardSchemeFactory implements SchemeFactory { + public getPageSize_argsStandardScheme getScheme() { + return new getPageSize_argsStandardScheme(); + } + } + + private static class getPageSize_argsStandardScheme extends StandardScheme<getPageSize_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getPageSize_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, getPageSize_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getPageSize_argsTupleSchemeFactory implements SchemeFactory { + public getPageSize_argsTupleScheme getScheme() { + return new getPageSize_argsTupleScheme(); + } + } + + private static class getPageSize_argsTupleScheme extends TupleScheme<getPageSize_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getPageSize_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getPageSize_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getPageSize_result implements org.apache.thrift.TBase<getPageSize_result, getPageSize_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPageSize_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPageSize_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getPageSize_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getPageSize_resultTupleSchemeFactory()); + } + + public int 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.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPageSize_result.class, metaDataMap); + } + + public getPageSize_result() { + } + + public getPageSize_result( + int success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getPageSize_result(getPageSize_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public getPageSize_result deepCopy() { + return new getPageSize_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + } + + public int getSuccess() { + return this.success; + } + + public getPageSize_result setSuccess(int 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((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(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 getPageSize_result) + return this.equals((getPageSize_result)that); + return false; + } + + public boolean equals(getPageSize_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(getPageSize_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("getPageSize_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 getPageSize_resultStandardSchemeFactory implements SchemeFactory { + public getPageSize_resultStandardScheme getScheme() { + return new getPageSize_resultStandardScheme(); + } + } + + private static class getPageSize_resultStandardScheme extends StandardScheme<getPageSize_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getPageSize_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.I32) { + struct.success = iprot.readI32(); + 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, getPageSize_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getPageSize_resultTupleSchemeFactory implements SchemeFactory { + public getPageSize_resultTupleScheme getScheme() { + return new getPageSize_resultTupleScheme(); + } + } + + private static class getPageSize_resultTupleScheme extends TupleScheme<getPageSize_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getPageSize_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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getPageSize_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + } + } + + } + public static class requestImageVersionUpload_args implements org.apache.thrift.TBase<requestImageVersionUpload_args, requestImageVersionUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageVersionUpload_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_args"); @@ -13919,6 +14488,7 @@ public class SatelliteServer { private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TAG_SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("tagSearch", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -13928,11 +14498,13 @@ public class SatelliteServer { public String userToken; // required public List<String> tagSearch; // required + public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), - TAG_SEARCH((short)2, "tagSearch"); + TAG_SEARCH((short)2, "tagSearch"), + PAGE((short)3, "page"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -13951,6 +14523,8 @@ public class SatelliteServer { return USER_TOKEN; case 2: // TAG_SEARCH return TAG_SEARCH; + case 3: // PAGE + return PAGE; default: return null; } @@ -13991,6 +14565,8 @@ public class SatelliteServer { } // isset id assignments + private static final int __PAGE_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); @@ -13999,6 +14575,8 @@ public class SatelliteServer { tmpMap.put(_Fields.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", 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.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap); } @@ -14008,17 +14586,21 @@ public class SatelliteServer { public getImageList_args( String userToken, - List<String> tagSearch) + List<String> tagSearch, + int page) { this(); this.userToken = userToken; this.tagSearch = tagSearch; + this.page = page; + setPageIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public getImageList_args(getImageList_args other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } @@ -14026,6 +14608,7 @@ public class SatelliteServer { List<String> __this__tagSearch = new ArrayList<String>(other.tagSearch); this.tagSearch = __this__tagSearch; } + this.page = other.page; } public getImageList_args deepCopy() { @@ -14036,6 +14619,8 @@ public class SatelliteServer { public void clear() { this.userToken = null; this.tagSearch = null; + setPageIsSet(false); + this.page = 0; } public String getUserToken() { @@ -14101,6 +14686,29 @@ public class SatelliteServer { } } + public int getPage() { + return this.page; + } + + public getImageList_args setPage(int page) { + this.page = page; + setPageIsSet(true); + return this; + } + + public void unsetPage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + /** Returns true if field page is set (has been assigned a value) and false otherwise */ + public boolean isSetPage() { + return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + public void setPageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -14119,6 +14727,14 @@ public class SatelliteServer { } break; + case PAGE: + if (value == null) { + unsetPage(); + } else { + setPage((Integer)value); + } + break; + } } @@ -14130,6 +14746,9 @@ public class SatelliteServer { case TAG_SEARCH: return getTagSearch(); + case PAGE: + return Integer.valueOf(getPage()); + } throw new IllegalStateException(); } @@ -14145,6 +14764,8 @@ public class SatelliteServer { return isSetUserToken(); case TAG_SEARCH: return isSetTagSearch(); + case PAGE: + return isSetPage(); } throw new IllegalStateException(); } @@ -14180,6 +14801,15 @@ public class SatelliteServer { return false; } + boolean this_present_page = true; + boolean that_present_page = true; + if (this_present_page || that_present_page) { + if (!(this_present_page && that_present_page)) + return false; + if (this.page != that.page) + return false; + } + return true; } @@ -14216,6 +14846,16 @@ public class SatelliteServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -14251,6 +14891,10 @@ public class SatelliteServer { sb.append(this.tagSearch); } first = false; + if (!first) sb.append(", "); + sb.append("page:"); + sb.append(this.page); + first = false; sb.append(")"); return sb.toString(); } @@ -14270,6 +14914,8 @@ public class SatelliteServer { 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); @@ -14320,6 +14966,14 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // PAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14352,6 +15006,9 @@ public class SatelliteServer { } oprot.writeFieldEnd(); } + oprot.writeFieldBegin(PAGE_FIELD_DESC); + oprot.writeI32(struct.page); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -14376,7 +15033,10 @@ public class SatelliteServer { if (struct.isSetTagSearch()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetPage()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } @@ -14389,12 +15049,15 @@ public class SatelliteServer { } } } + if (struct.isSetPage()) { + oprot.writeI32(struct.page); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); @@ -14412,6 +15075,10 @@ public class SatelliteServer { } struct.setTagSearchIsSet(true); } + if (incoming.get(2)) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } } } @@ -26330,6 +26997,7 @@ public class SatelliteServer { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -26338,10 +27006,12 @@ public class SatelliteServer { } public String userToken; // required + public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_TOKEN((short)1, "userToken"); + USER_TOKEN((short)1, "userToken"), + PAGE((short)2, "page"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -26358,6 +27028,8 @@ public class SatelliteServer { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; + case 2: // PAGE + return PAGE; default: return null; } @@ -26398,11 +27070,15 @@ public class SatelliteServer { } // isset id assignments + private static final int __PAGE_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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); } @@ -26411,19 +27087,24 @@ public class SatelliteServer { } public getLectureList_args( - String userToken) + String userToken, + int page) { this(); this.userToken = userToken; + this.page = page; + setPageIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public getLectureList_args(getLectureList_args other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } + this.page = other.page; } public getLectureList_args deepCopy() { @@ -26433,6 +27114,8 @@ public class SatelliteServer { @Override public void clear() { this.userToken = null; + setPageIsSet(false); + this.page = 0; } public String getUserToken() { @@ -26459,6 +27142,29 @@ public class SatelliteServer { } } + public int getPage() { + return this.page; + } + + public getLectureList_args setPage(int page) { + this.page = page; + setPageIsSet(true); + return this; + } + + public void unsetPage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + /** Returns true if field page is set (has been assigned a value) and false otherwise */ + public boolean isSetPage() { + return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + public void setPageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -26469,6 +27175,14 @@ public class SatelliteServer { } break; + case PAGE: + if (value == null) { + unsetPage(); + } else { + setPage((Integer)value); + } + break; + } } @@ -26477,6 +27191,9 @@ public class SatelliteServer { case USER_TOKEN: return getUserToken(); + case PAGE: + return Integer.valueOf(getPage()); + } throw new IllegalStateException(); } @@ -26490,6 +27207,8 @@ public class SatelliteServer { switch (field) { case USER_TOKEN: return isSetUserToken(); + case PAGE: + return isSetPage(); } throw new IllegalStateException(); } @@ -26516,6 +27235,15 @@ public class SatelliteServer { return false; } + boolean this_present_page = true; + boolean that_present_page = true; + if (this_present_page || that_present_page) { + if (!(this_present_page && that_present_page)) + return false; + if (this.page != that.page) + return false; + } + return true; } @@ -26542,6 +27270,16 @@ public class SatelliteServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -26569,6 +27307,10 @@ public class SatelliteServer { sb.append(this.userToken); } first = false; + if (!first) sb.append(", "); + sb.append("page:"); + sb.append(this.page); + first = false; sb.append(")"); return sb.toString(); } @@ -26588,6 +27330,8 @@ public class SatelliteServer { 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); @@ -26620,6 +27364,14 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 2: // PAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -26640,6 +27392,9 @@ public class SatelliteServer { oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(PAGE_FIELD_DESC); + oprot.writeI32(struct.page); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -26661,20 +27416,30 @@ public class SatelliteServer { if (struct.isSetUserToken()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetPage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } + if (struct.isSetPage()) { + oprot.writeI32(struct.page); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } + if (incoming.get(1)) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } } } @@ -28411,1174 +29176,6 @@ public class SatelliteServer { } - public static class getLecturesByImageVersion_args implements org.apache.thrift.TBase<getLecturesByImageVersion_args, getLecturesByImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturesByImageVersion_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_args"); - - private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", 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 getLecturesByImageVersion_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLecturesByImageVersion_argsTupleSchemeFactory()); - } - - public String userToken; // required - public String imageVersionId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_TOKEN((short)1, "userToken"), - IMAGE_VERSION_ID((short)2, "imageVersionId"); - - 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: // USER_TOKEN - return USER_TOKEN; - case 2: // IMAGE_VERSION_ID - return IMAGE_VERSION_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 - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); - tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturesByImageVersion_args.class, metaDataMap); - } - - public getLecturesByImageVersion_args() { - } - - public getLecturesByImageVersion_args( - String userToken, - String imageVersionId) - { - this(); - this.userToken = userToken; - this.imageVersionId = imageVersionId; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getLecturesByImageVersion_args(getLecturesByImageVersion_args other) { - if (other.isSetUserToken()) { - this.userToken = other.userToken; - } - if (other.isSetImageVersionId()) { - this.imageVersionId = other.imageVersionId; - } - } - - public getLecturesByImageVersion_args deepCopy() { - return new getLecturesByImageVersion_args(this); - } - - @Override - public void clear() { - this.userToken = null; - this.imageVersionId = null; - } - - public String getUserToken() { - return this.userToken; - } - - public getLecturesByImageVersion_args setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - public void unsetUserToken() { - this.userToken = null; - } - - /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ - public boolean isSetUserToken() { - return this.userToken != null; - } - - public void setUserTokenIsSet(boolean value) { - if (!value) { - this.userToken = null; - } - } - - public String getImageVersionId() { - return this.imageVersionId; - } - - public getLecturesByImageVersion_args setImageVersionId(String imageVersionId) { - this.imageVersionId = imageVersionId; - return this; - } - - public void unsetImageVersionId() { - this.imageVersionId = null; - } - - /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ - public boolean isSetImageVersionId() { - return this.imageVersionId != null; - } - - public void setImageVersionIdIsSet(boolean value) { - if (!value) { - this.imageVersionId = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case USER_TOKEN: - if (value == null) { - unsetUserToken(); - } else { - setUserToken((String)value); - } - break; - - case IMAGE_VERSION_ID: - if (value == null) { - unsetImageVersionId(); - } else { - setImageVersionId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case USER_TOKEN: - return getUserToken(); - - case IMAGE_VERSION_ID: - return getImageVersionId(); - - } - 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 USER_TOKEN: - return isSetUserToken(); - case IMAGE_VERSION_ID: - return isSetImageVersionId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLecturesByImageVersion_args) - return this.equals((getLecturesByImageVersion_args)that); - return false; - } - - public boolean equals(getLecturesByImageVersion_args that) { - if (that == null) - return false; - - boolean this_present_userToken = true && this.isSetUserToken(); - boolean that_present_userToken = true && that.isSetUserToken(); - if (this_present_userToken || that_present_userToken) { - if (!(this_present_userToken && that_present_userToken)) - return false; - if (!this.userToken.equals(that.userToken)) - return false; - } - - boolean this_present_imageVersionId = true && this.isSetImageVersionId(); - boolean that_present_imageVersionId = true && that.isSetImageVersionId(); - if (this_present_imageVersionId || that_present_imageVersionId) { - if (!(this_present_imageVersionId && that_present_imageVersionId)) - return false; - if (!this.imageVersionId.equals(that.imageVersionId)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLecturesByImageVersion_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetImageVersionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId); - 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("getLecturesByImageVersion_args("); - boolean first = true; - - sb.append("userToken:"); - if (this.userToken == null) { - sb.append("null"); - } else { - sb.append(this.userToken); - } - first = false; - if (!first) sb.append(", "); - sb.append("imageVersionId:"); - if (this.imageVersionId == null) { - sb.append("null"); - } else { - sb.append(this.imageVersionId); - } - 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 getLecturesByImageVersion_argsStandardSchemeFactory implements SchemeFactory { - public getLecturesByImageVersion_argsStandardScheme getScheme() { - return new getLecturesByImageVersion_argsStandardScheme(); - } - } - - private static class getLecturesByImageVersion_argsStandardScheme extends StandardScheme<getLecturesByImageVersion_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // USER_TOKEN - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userToken = iprot.readString(); - struct.setUserTokenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IMAGE_VERSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imageVersionId = iprot.readString(); - struct.setImageVersionIdIsSet(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, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.userToken != null) { - oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); - oprot.writeString(struct.userToken); - oprot.writeFieldEnd(); - } - if (struct.imageVersionId != null) { - oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); - oprot.writeString(struct.imageVersionId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLecturesByImageVersion_argsTupleSchemeFactory implements SchemeFactory { - public getLecturesByImageVersion_argsTupleScheme getScheme() { - return new getLecturesByImageVersion_argsTupleScheme(); - } - } - - private static class getLecturesByImageVersion_argsTupleScheme extends TupleScheme<getLecturesByImageVersion_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUserToken()) { - optionals.set(0); - } - if (struct.isSetImageVersionId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetUserToken()) { - oprot.writeString(struct.userToken); - } - if (struct.isSetImageVersionId()) { - oprot.writeString(struct.imageVersionId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.userToken = iprot.readString(); - struct.setUserTokenIsSet(true); - } - if (incoming.get(1)) { - struct.imageVersionId = iprot.readString(); - struct.setImageVersionIdIsSet(true); - } - } - } - - } - - public static class getLecturesByImageVersion_result implements org.apache.thrift.TBase<getLecturesByImageVersion_result, getLecturesByImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturesByImageVersion_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_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 org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLecturesByImageVersion_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLecturesByImageVersion_resultTupleSchemeFactory()); - } - - public List<LectureSummary> success; // required - public TAuthorizationException authError; // required - public TNotFoundException notFound; // required - public TInternalServerError serverError; // 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"), - AUTH_ERROR((short)1, "authError"), - NOT_FOUND((short)2, "notFound"), - SERVER_ERROR((short)3, "serverError"); - - 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; - case 1: // AUTH_ERROR - return AUTH_ERROR; - case 2: // NOT_FOUND - return NOT_FOUND; - case 3: // SERVER_ERROR - return SERVER_ERROR; - 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, LectureSummary.class)))); - tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturesByImageVersion_result.class, metaDataMap); - } - - public getLecturesByImageVersion_result() { - } - - public getLecturesByImageVersion_result( - List<LectureSummary> success, - TAuthorizationException authError, - TNotFoundException notFound, - TInternalServerError serverError) - { - this(); - this.success = success; - this.authError = authError; - this.notFound = notFound; - this.serverError = serverError; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getLecturesByImageVersion_result(getLecturesByImageVersion_result other) { - if (other.isSetSuccess()) { - List<LectureSummary> __this__success = new ArrayList<LectureSummary>(other.success.size()); - for (LectureSummary other_element : other.success) { - __this__success.add(new LectureSummary(other_element)); - } - this.success = __this__success; - } - if (other.isSetAuthError()) { - this.authError = new TAuthorizationException(other.authError); - } - if (other.isSetNotFound()) { - this.notFound = new TNotFoundException(other.notFound); - } - if (other.isSetServerError()) { - this.serverError = new TInternalServerError(other.serverError); - } - } - - public getLecturesByImageVersion_result deepCopy() { - return new getLecturesByImageVersion_result(this); - } - - @Override - public void clear() { - this.success = null; - this.authError = null; - this.notFound = null; - this.serverError = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator<LectureSummary> getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(LectureSummary elem) { - if (this.success == null) { - this.success = new ArrayList<LectureSummary>(); - } - this.success.add(elem); - } - - public List<LectureSummary> getSuccess() { - return this.success; - } - - public getLecturesByImageVersion_result setSuccess(List<LectureSummary> 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 TAuthorizationException getAuthError() { - return this.authError; - } - - public getLecturesByImageVersion_result setAuthError(TAuthorizationException authError) { - this.authError = authError; - return this; - } - - public void unsetAuthError() { - this.authError = null; - } - - /** Returns true if field authError is set (has been assigned a value) and false otherwise */ - public boolean isSetAuthError() { - return this.authError != null; - } - - public void setAuthErrorIsSet(boolean value) { - if (!value) { - this.authError = null; - } - } - - public TNotFoundException getNotFound() { - return this.notFound; - } - - public getLecturesByImageVersion_result setNotFound(TNotFoundException notFound) { - this.notFound = notFound; - return this; - } - - public void unsetNotFound() { - this.notFound = null; - } - - /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ - public boolean isSetNotFound() { - return this.notFound != null; - } - - public void setNotFoundIsSet(boolean value) { - if (!value) { - this.notFound = null; - } - } - - public TInternalServerError getServerError() { - return this.serverError; - } - - public getLecturesByImageVersion_result setServerError(TInternalServerError serverError) { - this.serverError = serverError; - return this; - } - - public void unsetServerError() { - this.serverError = null; - } - - /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ - public boolean isSetServerError() { - return this.serverError != null; - } - - public void setServerErrorIsSet(boolean value) { - if (!value) { - this.serverError = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List<LectureSummary>)value); - } - break; - - case AUTH_ERROR: - if (value == null) { - unsetAuthError(); - } else { - setAuthError((TAuthorizationException)value); - } - break; - - case NOT_FOUND: - if (value == null) { - unsetNotFound(); - } else { - setNotFound((TNotFoundException)value); - } - break; - - case SERVER_ERROR: - if (value == null) { - unsetServerError(); - } else { - setServerError((TInternalServerError)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case AUTH_ERROR: - return getAuthError(); - - case NOT_FOUND: - return getNotFound(); - - case SERVER_ERROR: - return getServerError(); - - } - 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(); - case AUTH_ERROR: - return isSetAuthError(); - case NOT_FOUND: - return isSetNotFound(); - case SERVER_ERROR: - return isSetServerError(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLecturesByImageVersion_result) - return this.equals((getLecturesByImageVersion_result)that); - return false; - } - - public boolean equals(getLecturesByImageVersion_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; - } - - boolean this_present_authError = true && this.isSetAuthError(); - boolean that_present_authError = true && that.isSetAuthError(); - if (this_present_authError || that_present_authError) { - if (!(this_present_authError && that_present_authError)) - return false; - if (!this.authError.equals(that.authError)) - return false; - } - - boolean this_present_notFound = true && this.isSetNotFound(); - boolean that_present_notFound = true && that.isSetNotFound(); - if (this_present_notFound || that_present_notFound) { - if (!(this_present_notFound && that_present_notFound)) - return false; - if (!this.notFound.equals(that.notFound)) - return false; - } - - boolean this_present_serverError = true && this.isSetServerError(); - boolean that_present_serverError = true && that.isSetServerError(); - if (this_present_serverError || that_present_serverError) { - if (!(this_present_serverError && that_present_serverError)) - return false; - if (!this.serverError.equals(that.serverError)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLecturesByImageVersion_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; - } - } - lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAuthError()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNotFound()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServerError()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); - 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("getLecturesByImageVersion_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("authError:"); - if (this.authError == null) { - sb.append("null"); - } else { - sb.append(this.authError); - } - first = false; - if (!first) sb.append(", "); - sb.append("notFound:"); - if (this.notFound == null) { - sb.append("null"); - } else { - sb.append(this.notFound); - } - first = false; - if (!first) sb.append(", "); - sb.append("serverError:"); - if (this.serverError == null) { - sb.append("null"); - } else { - sb.append(this.serverError); - } - 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 getLecturesByImageVersion_resultStandardSchemeFactory implements SchemeFactory { - public getLecturesByImageVersion_resultStandardScheme getScheme() { - return new getLecturesByImageVersion_resultStandardScheme(); - } - } - - private static class getLecturesByImageVersion_resultStandardScheme extends StandardScheme<getLecturesByImageVersion_result> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_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 _list190 = iprot.readListBegin(); - struct.success = new ArrayList<LectureSummary>(_list190.size); - for (int _i191 = 0; _i191 < _list190.size; ++_i191) - { - LectureSummary _elem192; - _elem192 = new LectureSummary(); - _elem192.read(iprot); - struct.success.add(_elem192); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // AUTH_ERROR - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.authError = new TAuthorizationException(); - struct.authError.read(iprot); - struct.setAuthErrorIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NOT_FOUND - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.notFound = new TNotFoundException(); - struct.notFound.read(iprot); - struct.setNotFoundIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SERVER_ERROR - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.serverError = new TInternalServerError(); - struct.serverError.read(iprot); - struct.setServerErrorIsSet(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, getLecturesByImageVersion_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 (LectureSummary _iter193 : struct.success) - { - _iter193.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.authError != null) { - oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); - struct.authError.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.notFound != null) { - oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); - struct.notFound.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.serverError != null) { - oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); - struct.serverError.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLecturesByImageVersion_resultTupleSchemeFactory implements SchemeFactory { - public getLecturesByImageVersion_resultTupleScheme getScheme() { - return new getLecturesByImageVersion_resultTupleScheme(); - } - } - - private static class getLecturesByImageVersion_resultTupleScheme extends TupleScheme<getLecturesByImageVersion_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetAuthError()) { - optionals.set(1); - } - if (struct.isSetNotFound()) { - optionals.set(2); - } - if (struct.isSetServerError()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (LectureSummary _iter194 : struct.success) - { - _iter194.write(oprot); - } - } - } - if (struct.isSetAuthError()) { - struct.authError.write(oprot); - } - if (struct.isSetNotFound()) { - struct.notFound.write(oprot); - } - if (struct.isSetServerError()) { - struct.serverError.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<LectureSummary>(_list195.size); - for (int _i196 = 0; _i196 < _list195.size; ++_i196) - { - LectureSummary _elem197; - _elem197 = new LectureSummary(); - _elem197.read(iprot); - struct.success.add(_elem197); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.authError = new TAuthorizationException(); - struct.authError.read(iprot); - struct.setAuthErrorIsSet(true); - } - if (incoming.get(2)) { - struct.notFound = new TNotFoundException(); - struct.notFound.read(iprot); - struct.setNotFoundIsSet(true); - } - if (incoming.get(3)) { - struct.serverError = new TInternalServerError(); - struct.serverError.read(iprot); - struct.setServerErrorIsSet(true); - } - } - } - - } - public static class deleteLecture_args implements org.apache.thrift.TBase<deleteLecture_args, deleteLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args"); @@ -31077,16 +30674,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map198 = iprot.readMapBegin(); - struct.permissions = new HashMap<String,LecturePermissions>(2*_map198.size); - for (int _i199 = 0; _i199 < _map198.size; ++_i199) + org.apache.thrift.protocol.TMap _map190 = iprot.readMapBegin(); + struct.permissions = new HashMap<String,LecturePermissions>(2*_map190.size); + for (int _i191 = 0; _i191 < _map190.size; ++_i191) { - String _key200; - LecturePermissions _val201; - _key200 = iprot.readString(); - _val201 = new LecturePermissions(); - _val201.read(iprot); - struct.permissions.put(_key200, _val201); + String _key192; + LecturePermissions _val193; + _key192 = iprot.readString(); + _val193 = new LecturePermissions(); + _val193.read(iprot); + struct.permissions.put(_key192, _val193); } iprot.readMapEnd(); } @@ -31124,10 +30721,10 @@ public class SatelliteServer { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry<String, LecturePermissions> _iter202 : struct.permissions.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter194 : struct.permissions.entrySet()) { - oprot.writeString(_iter202.getKey()); - _iter202.getValue().write(oprot); + oprot.writeString(_iter194.getKey()); + _iter194.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -31170,10 +30767,10 @@ public class SatelliteServer { if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry<String, LecturePermissions> _iter203 : struct.permissions.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter195 : struct.permissions.entrySet()) { - oprot.writeString(_iter203.getKey()); - _iter203.getValue().write(oprot); + oprot.writeString(_iter195.getKey()); + _iter195.getValue().write(oprot); } } } @@ -31193,16 +30790,16 @@ public class SatelliteServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map204 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap<String,LecturePermissions>(2*_map204.size); - for (int _i205 = 0; _i205 < _map204.size; ++_i205) + org.apache.thrift.protocol.TMap _map196 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap<String,LecturePermissions>(2*_map196.size); + for (int _i197 = 0; _i197 < _map196.size; ++_i197) { - String _key206; - LecturePermissions _val207; - _key206 = iprot.readString(); - _val207 = new LecturePermissions(); - _val207.read(iprot); - struct.permissions.put(_key206, _val207); + String _key198; + LecturePermissions _val199; + _key198 = iprot.readString(); + _val199 = new LecturePermissions(); + _val199.read(iprot); + struct.permissions.put(_key198, _val199); } } struct.setPermissionsIsSet(true); @@ -32771,16 +32368,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map208 = iprot.readMapBegin(); - struct.success = new HashMap<String,LecturePermissions>(2*_map208.size); - for (int _i209 = 0; _i209 < _map208.size; ++_i209) + org.apache.thrift.protocol.TMap _map200 = iprot.readMapBegin(); + struct.success = new HashMap<String,LecturePermissions>(2*_map200.size); + for (int _i201 = 0; _i201 < _map200.size; ++_i201) { - String _key210; - LecturePermissions _val211; - _key210 = iprot.readString(); - _val211 = new LecturePermissions(); - _val211.read(iprot); - struct.success.put(_key210, _val211); + String _key202; + LecturePermissions _val203; + _key202 = iprot.readString(); + _val203 = new LecturePermissions(); + _val203.read(iprot); + struct.success.put(_key202, _val203); } iprot.readMapEnd(); } @@ -32835,10 +32432,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry<String, LecturePermissions> _iter212 : struct.success.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter204 : struct.success.entrySet()) { - oprot.writeString(_iter212.getKey()); - _iter212.getValue().write(oprot); + oprot.writeString(_iter204.getKey()); + _iter204.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -32893,10 +32490,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, LecturePermissions> _iter213 : struct.success.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter205 : struct.success.entrySet()) { - oprot.writeString(_iter213.getKey()); - _iter213.getValue().write(oprot); + oprot.writeString(_iter205.getKey()); + _iter205.getValue().write(oprot); } } } @@ -32917,16 +32514,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map214 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap<String,LecturePermissions>(2*_map214.size); - for (int _i215 = 0; _i215 < _map214.size; ++_i215) + org.apache.thrift.protocol.TMap _map206 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap<String,LecturePermissions>(2*_map206.size); + for (int _i207 = 0; _i207 < _map206.size; ++_i207) { - String _key216; - LecturePermissions _val217; - _key216 = iprot.readString(); - _val217 = new LecturePermissions(); - _val217.read(iprot); - struct.success.put(_key216, _val217); + String _key208; + LecturePermissions _val209; + _key208 = iprot.readString(); + _val209 = new LecturePermissions(); + _val209.read(iprot); + struct.success.put(_key208, _val209); } } struct.setSuccessIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java index 668d513..8e4486c 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java @@ -14,7 +14,8 @@ import org.apache.thrift.TEnum; public enum ShareMode implements org.apache.thrift.TEnum { LOCAL(0), PUBLISH(1), - DOWNLOAD(2); + DOWNLOAD(2), + FROZEN(3); private final int value; @@ -41,6 +42,8 @@ public enum ShareMode implements org.apache.thrift.TEnum { return PUBLISH; case 2: return DOWNLOAD; + case 3: + return FROZEN; default: return null; } |