summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-14 15:31:12 +0200
committerSimon Rettberg2015-08-14 15:31:12 +0200
commit19688656134b288fd981730544dde303c9c3afd9 (patch)
tree99ee404d2f08e46c024318d95169495d9b9258e3
parentUse connection pool in thrift manager, allow getting explicit sat connection (diff)
downloadmaster-sync-shared-19688656134b288fd981730544dde303c9c3afd9.tar.gz
master-sync-shared-19688656134b288fd981730544dde303c9c3afd9.tar.xz
master-sync-shared-19688656134b288fd981730544dde303c9c3afd9.zip
Thrift api changes
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java48
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java152
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java289
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java1649
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java504
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java110
-rw-r--r--src/main/java/org/openslx/thrifthelper/Comparators.java78
-rw-r--r--src/main/thrift/bwlp.thrift27
8 files changed, 2709 insertions, 148 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java b/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java
new file mode 100644
index 0000000..3163a8f
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java
@@ -0,0 +1,48 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum DateParamError implements org.apache.thrift.TEnum {
+ TOO_LOW(0),
+ TOO_HIGH(1),
+ NEGATIVE_RANGE(2);
+
+ private final int value;
+
+ private DateParamError(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static DateParamError findByValue(int value) {
+ switch (value) {
+ case 0:
+ return TOO_LOW;
+ case 1:
+ return TOO_HIGH;
+ case 2:
+ return NEGATIVE_RANGE;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
index 1e94350..e00e17c 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
@@ -42,6 +42,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)6);
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)7);
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)8);
+ private static final org.apache.thrift.protocol.TField UPLOAD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadTime", org.apache.thrift.protocol.TType.I64, (short)20);
private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)9);
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)10);
private static final org.apache.thrift.protocol.TField UPLOADER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uploaderId", org.apache.thrift.protocol.TType.STRING, (short)11);
@@ -67,6 +68,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
public String virtId; // required
public long createTime; // required
public long updateTime; // required
+ public long uploadTime; // required
public long expireTime; // required
public String ownerId; // required
public String uploaderId; // required
@@ -92,6 +94,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
VIRT_ID((short)6, "virtId"),
CREATE_TIME((short)7, "createTime"),
UPDATE_TIME((short)8, "updateTime"),
+ UPLOAD_TIME((short)20, "uploadTime"),
EXPIRE_TIME((short)9, "expireTime"),
OWNER_ID((short)10, "ownerId"),
UPLOADER_ID((short)11, "uploaderId"),
@@ -135,6 +138,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return CREATE_TIME;
case 8: // UPDATE_TIME
return UPDATE_TIME;
+ case 20: // UPLOAD_TIME
+ return UPLOAD_TIME;
case 9: // EXPIRE_TIME
return EXPIRE_TIME;
case 10: // OWNER_ID
@@ -200,12 +205,13 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
private static final int __OSID_ISSET_ID = 0;
private static final int __CREATETIME_ISSET_ID = 1;
private static final int __UPDATETIME_ISSET_ID = 2;
- private static final int __EXPIRETIME_ISSET_ID = 3;
- private static final int __FILESIZE_ISSET_ID = 4;
- private static final int __ISRESTRICTED_ISSET_ID = 5;
- private static final int __ISVALID_ISSET_ID = 6;
- private static final int __ISPROCESSED_ISSET_ID = 7;
- private static final int __ISTEMPLATE_ISSET_ID = 8;
+ private static final int __UPLOADTIME_ISSET_ID = 3;
+ private static final int __EXPIRETIME_ISSET_ID = 4;
+ private static final int __FILESIZE_ISSET_ID = 5;
+ private static final int __ISRESTRICTED_ISSET_ID = 6;
+ private static final int __ISVALID_ISSET_ID = 7;
+ private static final int __ISPROCESSED_ISSET_ID = 8;
+ private static final int __ISTEMPLATE_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;
@@ -225,6 +231,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
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.UPLOAD_TIME, new org.apache.thrift.meta_data.FieldMetaData("uploadTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
tmpMap.put(_Fields.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", 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,
@@ -262,6 +270,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
String virtId,
long createTime,
long updateTime,
+ long uploadTime,
long expireTime,
String ownerId,
String uploaderId,
@@ -284,6 +293,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
setCreateTimeIsSet(true);
this.updateTime = updateTime;
setUpdateTimeIsSet(true);
+ this.uploadTime = uploadTime;
+ setUploadTimeIsSet(true);
this.expireTime = expireTime;
setExpireTimeIsSet(true);
this.ownerId = ownerId;
@@ -322,6 +333,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
this.createTime = other.createTime;
this.updateTime = other.updateTime;
+ this.uploadTime = other.uploadTime;
this.expireTime = other.expireTime;
if (other.isSetOwnerId()) {
this.ownerId = other.ownerId;
@@ -361,6 +373,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
this.createTime = 0;
setUpdateTimeIsSet(false);
this.updateTime = 0;
+ setUploadTimeIsSet(false);
+ this.uploadTime = 0;
setExpireTimeIsSet(false);
this.expireTime = 0;
this.ownerId = null;
@@ -545,6 +559,29 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
}
+ public long getUploadTime() {
+ return this.uploadTime;
+ }
+
+ public ImageSummaryRead setUploadTime(long uploadTime) {
+ this.uploadTime = uploadTime;
+ setUploadTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUploadTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
+ }
+
+ /** Returns true if field uploadTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploadTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
+ }
+
+ public void setUploadTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPLOADTIME_ISSET_ID, value);
+ }
+
public long getExpireTime() {
return this.expireTime;
}
@@ -869,6 +906,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
break;
+ case UPLOAD_TIME:
+ if (value == null) {
+ unsetUploadTime();
+ } else {
+ setUploadTime((Long)value);
+ }
+ break;
+
case EXPIRE_TIME:
if (value == null) {
unsetExpireTime();
@@ -983,6 +1028,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
case UPDATE_TIME:
return Long.valueOf(getUpdateTime());
+ case UPLOAD_TIME:
+ return Long.valueOf(getUploadTime());
+
case EXPIRE_TIME:
return Long.valueOf(getExpireTime());
@@ -1041,6 +1089,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return isSetCreateTime();
case UPDATE_TIME:
return isSetUpdateTime();
+ case UPLOAD_TIME:
+ return isSetUploadTime();
case EXPIRE_TIME:
return isSetExpireTime();
case OWNER_ID:
@@ -1143,6 +1193,15 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return false;
}
+ boolean this_present_uploadTime = true;
+ boolean that_present_uploadTime = true;
+ if (this_present_uploadTime || that_present_uploadTime) {
+ if (!(this_present_uploadTime && that_present_uploadTime))
+ return false;
+ if (this.uploadTime != that.uploadTime)
+ return false;
+ }
+
boolean this_present_expireTime = true;
boolean that_present_expireTime = true;
if (this_present_expireTime || that_present_expireTime) {
@@ -1328,6 +1387,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetUploadTime()).compareTo(other.isSetUploadTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploadTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadTime, other.uploadTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
if (lastComparison != 0) {
return lastComparison;
@@ -1502,6 +1571,10 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
sb.append(this.updateTime);
first = false;
if (!first) sb.append(", ");
+ sb.append("uploadTime:");
+ sb.append(this.uploadTime);
+ first = false;
+ if (!first) sb.append(", ");
sb.append("expireTime:");
sb.append(this.expireTime);
first = false;
@@ -1674,6 +1747,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 20: // UPLOAD_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.uploadTime = iprot.readI64();
+ struct.setUploadTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
case 9: // EXPIRE_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.expireTime = iprot.readI64();
@@ -1853,6 +1934,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
oprot.writeFieldEnd();
}
}
+ oprot.writeFieldBegin(UPLOAD_TIME_FIELD_DESC);
+ oprot.writeI64(struct.uploadTime);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1892,40 +1976,43 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (struct.isSetUpdateTime()) {
optionals.set(6);
}
- if (struct.isSetExpireTime()) {
+ if (struct.isSetUploadTime()) {
optionals.set(7);
}
- if (struct.isSetOwnerId()) {
+ if (struct.isSetExpireTime()) {
optionals.set(8);
}
- if (struct.isSetUploaderId()) {
+ if (struct.isSetOwnerId()) {
optionals.set(9);
}
- if (struct.isSetShareMode()) {
+ if (struct.isSetUploaderId()) {
optionals.set(10);
}
- if (struct.isSetFileSize()) {
+ if (struct.isSetShareMode()) {
optionals.set(11);
}
- if (struct.isSetIsRestricted()) {
+ if (struct.isSetFileSize()) {
optionals.set(12);
}
- if (struct.isSetIsValid()) {
+ if (struct.isSetIsRestricted()) {
optionals.set(13);
}
- if (struct.isSetIsProcessed()) {
+ if (struct.isSetIsValid()) {
optionals.set(14);
}
- if (struct.isSetIsTemplate()) {
+ if (struct.isSetIsProcessed()) {
optionals.set(15);
}
- if (struct.isSetDefaultPermissions()) {
+ if (struct.isSetIsTemplate()) {
optionals.set(16);
}
- if (struct.isSetUserPermissions()) {
+ if (struct.isSetDefaultPermissions()) {
optionals.set(17);
}
- oprot.writeBitSet(optionals, 18);
+ if (struct.isSetUserPermissions()) {
+ optionals.set(18);
+ }
+ oprot.writeBitSet(optionals, 19);
if (struct.isSetImageBaseId()) {
oprot.writeString(struct.imageBaseId);
}
@@ -1947,6 +2034,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (struct.isSetUpdateTime()) {
oprot.writeI64(struct.updateTime);
}
+ if (struct.isSetUploadTime()) {
+ oprot.writeI64(struct.uploadTime);
+ }
if (struct.isSetExpireTime()) {
oprot.writeI64(struct.expireTime);
}
@@ -1985,7 +2075,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(18);
+ BitSet incoming = iprot.readBitSet(19);
if (incoming.get(0)) {
struct.imageBaseId = iprot.readString();
struct.setImageBaseIdIsSet(true);
@@ -2015,47 +2105,51 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
struct.setUpdateTimeIsSet(true);
}
if (incoming.get(7)) {
+ struct.uploadTime = iprot.readI64();
+ struct.setUploadTimeIsSet(true);
+ }
+ if (incoming.get(8)) {
struct.expireTime = iprot.readI64();
struct.setExpireTimeIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.uploaderId = iprot.readString();
struct.setUploaderIdIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(11)) {
struct.shareMode = ShareMode.findByValue(iprot.readI32());
struct.setShareModeIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(12)) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(13)) {
struct.isRestricted = iprot.readBool();
struct.setIsRestrictedIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(14)) {
struct.isValid = iprot.readBool();
struct.setIsValidIsSet(true);
}
- if (incoming.get(14)) {
+ if (incoming.get(15)) {
struct.isProcessed = iprot.readBool();
struct.setIsProcessedIsSet(true);
}
- if (incoming.get(15)) {
+ if (incoming.get(16)) {
struct.isTemplate = iprot.readBool();
struct.setIsTemplateIsSet(true);
}
- if (incoming.get(16)) {
+ if (incoming.get(17)) {
struct.defaultPermissions = new ImagePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
}
- if (incoming.get(17)) {
+ if (incoming.get(18)) {
struct.userPermissions = new ImagePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(true);
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 65f493c..fc213b5 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
@@ -38,7 +38,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ 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)23);
+ 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)24);
private static final org.apache.thrift.protocol.TField AUTO_UPDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("autoUpdate", org.apache.thrift.protocol.TType.BOOL, (short)5);
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)6);
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)7);
@@ -67,7 +68,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public String lectureId; // required
public String lectureName; // required
public String description; // required
- public ImageSummaryRead image; // required
+ public String imageVersionId; // required
+ public String imageBaseId; // required
public boolean autoUpdate; // required
public boolean isEnabled; // required
public long startTime; // required
@@ -92,7 +94,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
LECTURE_ID((short)1, "lectureId"),
LECTURE_NAME((short)2, "lectureName"),
DESCRIPTION((short)3, "description"),
- IMAGE((short)4, "image"),
+ IMAGE_VERSION_ID((short)23, "imageVersionId"),
+ IMAGE_BASE_ID((short)24, "imageBaseId"),
AUTO_UPDATE((short)5, "autoUpdate"),
IS_ENABLED((short)6, "isEnabled"),
START_TIME((short)7, "startTime"),
@@ -131,8 +134,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return LECTURE_NAME;
case 3: // DESCRIPTION
return DESCRIPTION;
- case 4: // IMAGE
- return IMAGE;
+ case 23: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_ID;
+ case 24: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
case 5: // AUTO_UPDATE
return AUTO_UPDATE;
case 6: // IS_ENABLED
@@ -230,8 +235,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class)));
+ 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)));
+ 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)));
tmpMap.put(_Fields.AUTO_UPDATE, new org.apache.thrift.meta_data.FieldMetaData("autoUpdate", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -282,7 +289,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
String lectureId,
String lectureName,
String description,
- ImageSummaryRead image,
+ String imageVersionId,
+ String imageBaseId,
boolean autoUpdate,
boolean isEnabled,
long startTime,
@@ -305,7 +313,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.lectureId = lectureId;
this.lectureName = lectureName;
this.description = description;
- this.image = image;
+ this.imageVersionId = imageVersionId;
+ this.imageBaseId = imageBaseId;
this.autoUpdate = autoUpdate;
setAutoUpdateIsSet(true);
this.isEnabled = isEnabled;
@@ -349,8 +358,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (other.isSetDescription()) {
this.description = other.description;
}
- if (other.isSetImage()) {
- this.image = new ImageSummaryRead(other.image);
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
}
this.autoUpdate = other.autoUpdate;
this.isEnabled = other.isEnabled;
@@ -403,7 +415,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.lectureId = null;
this.lectureName = null;
this.description = null;
- this.image = null;
+ this.imageVersionId = null;
+ this.imageBaseId = null;
setAutoUpdateIsSet(false);
this.autoUpdate = false;
setIsEnabledIsSet(false);
@@ -506,27 +519,51 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public ImageSummaryRead getImage() {
- return this.image;
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public LectureRead 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 String getImageBaseId() {
+ return this.imageBaseId;
}
- public LectureRead setImage(ImageSummaryRead image) {
- this.image = image;
+ public LectureRead setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
return this;
}
- public void unsetImage() {
- this.image = null;
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
}
- /** Returns true if field image is set (has been assigned a value) and false otherwise */
- public boolean isSetImage() {
- return this.image != 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 setImageIsSet(boolean value) {
+ public void setImageBaseIdIsSet(boolean value) {
if (!value) {
- this.image = null;
+ this.imageBaseId = null;
}
}
@@ -1023,11 +1060,19 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
break;
- case IMAGE:
+ case IMAGE_VERSION_ID:
if (value == null) {
- unsetImage();
+ unsetImageVersionId();
} else {
- setImage((ImageSummaryRead)value);
+ setImageVersionId((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
}
break;
@@ -1189,8 +1234,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case DESCRIPTION:
return getDescription();
- case IMAGE:
- return getImage();
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
case AUTO_UPDATE:
return Boolean.valueOf(isAutoUpdate());
@@ -1263,8 +1311,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return isSetLectureName();
case DESCRIPTION:
return isSetDescription();
- case IMAGE:
- return isSetImage();
+ case IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
case AUTO_UPDATE:
return isSetAutoUpdate();
case IS_ENABLED:
@@ -1345,12 +1395,21 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return false;
}
- boolean this_present_image = true && this.isSetImage();
- boolean that_present_image = true && that.isSetImage();
- if (this_present_image || that_present_image) {
- if (!(this_present_image && that_present_image))
+ 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;
+ }
+
+ 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.image.equals(that.image))
+ if (!this.imageBaseId.equals(that.imageBaseId))
return false;
}
@@ -1562,12 +1621,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetImage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -1796,11 +1865,19 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
first = false;
if (!first) sb.append(", ");
- sb.append("image:");
- if (this.image == null) {
+ sb.append("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
sb.append("null");
} else {
- sb.append(this.image);
+ sb.append(this.imageBaseId);
}
first = false;
if (!first) sb.append(", ");
@@ -1916,9 +1993,6 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (image != null) {
- image.validate();
- }
if (defaultPermissions != null) {
defaultPermissions.validate();
}
@@ -1987,11 +2061,18 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // IMAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.image = new ImageSummaryRead();
- struct.image.read(iprot);
- struct.setImageIsSet(true);
+ case 23: // 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;
+ case 24: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2203,11 +2284,6 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeString(struct.description);
oprot.writeFieldEnd();
}
- if (struct.image != null) {
- oprot.writeFieldBegin(IMAGE_FIELD_DESC);
- struct.image.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldBegin(AUTO_UPDATE_FIELD_DESC);
oprot.writeBool(struct.autoUpdate);
oprot.writeFieldEnd();
@@ -2301,6 +2377,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldEnd();
}
}
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2328,64 +2414,67 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetDescription()) {
optionals.set(2);
}
- if (struct.isSetImage()) {
+ if (struct.isSetImageVersionId()) {
optionals.set(3);
}
- if (struct.isSetAutoUpdate()) {
+ if (struct.isSetImageBaseId()) {
optionals.set(4);
}
- if (struct.isSetIsEnabled()) {
+ if (struct.isSetAutoUpdate()) {
optionals.set(5);
}
- if (struct.isSetStartTime()) {
+ if (struct.isSetIsEnabled()) {
optionals.set(6);
}
- if (struct.isSetEndTime()) {
+ if (struct.isSetStartTime()) {
optionals.set(7);
}
- if (struct.isSetLastUsed()) {
+ if (struct.isSetEndTime()) {
optionals.set(8);
}
- if (struct.isSetUseCount()) {
+ if (struct.isSetLastUsed()) {
optionals.set(9);
}
- if (struct.isSetCreateTime()) {
+ if (struct.isSetUseCount()) {
optionals.set(10);
}
- if (struct.isSetUpdateTime()) {
+ if (struct.isSetCreateTime()) {
optionals.set(11);
}
- if (struct.isSetOwnerId()) {
+ if (struct.isSetUpdateTime()) {
optionals.set(12);
}
- if (struct.isSetUpdaterId()) {
+ if (struct.isSetOwnerId()) {
optionals.set(13);
}
- if (struct.isSetRunscript()) {
+ if (struct.isSetUpdaterId()) {
optionals.set(14);
}
- if (struct.isSetNics()) {
+ if (struct.isSetRunscript()) {
optionals.set(15);
}
- if (struct.isSetAllowedUsers()) {
+ if (struct.isSetNics()) {
optionals.set(16);
}
- if (struct.isSetNetworkExceptions()) {
+ if (struct.isSetAllowedUsers()) {
optionals.set(17);
}
- if (struct.isSetIsExam()) {
+ if (struct.isSetNetworkExceptions()) {
optionals.set(18);
}
- if (struct.isSetHasInternetAccess()) {
+ if (struct.isSetIsExam()) {
optionals.set(19);
}
- if (struct.isSetDefaultPermissions()) {
+ if (struct.isSetHasInternetAccess()) {
optionals.set(20);
}
- if (struct.isSetUserPermissions()) {
+ if (struct.isSetDefaultPermissions()) {
optionals.set(21);
}
- oprot.writeBitSet(optionals, 22);
+ if (struct.isSetUserPermissions()) {
+ optionals.set(22);
+ }
+ oprot.writeBitSet(optionals, 23);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
@@ -2395,8 +2484,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetDescription()) {
oprot.writeString(struct.description);
}
- if (struct.isSetImage()) {
- struct.image.write(oprot);
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
}
if (struct.isSetAutoUpdate()) {
oprot.writeBool(struct.autoUpdate);
@@ -2475,7 +2567,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(22);
+ BitSet incoming = iprot.readBitSet(23);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -2489,55 +2581,58 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
struct.setDescriptionIsSet(true);
}
if (incoming.get(3)) {
- struct.image = new ImageSummaryRead();
- struct.image.read(iprot);
- struct.setImageIsSet(true);
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
}
if (incoming.get(4)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(5)) {
struct.autoUpdate = iprot.readBool();
struct.setAutoUpdateIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.isEnabled = iprot.readBool();
struct.setIsEnabledIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.lastUsed = iprot.readI64();
struct.setLastUsedIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.useCount = iprot.readI32();
struct.setUseCountIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(11)) {
struct.createTime = iprot.readI64();
struct.setCreateTimeIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(12)) {
struct.updateTime = iprot.readI64();
struct.setUpdateTimeIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(13)) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(14)) {
struct.updaterId = iprot.readString();
struct.setUpdaterIdIsSet(true);
}
- if (incoming.get(14)) {
+ if (incoming.get(15)) {
struct.runscript = iprot.readString();
struct.setRunscriptIsSet(true);
}
- if (incoming.get(15)) {
+ if (incoming.get(16)) {
{
org.apache.thrift.protocol.TList _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.nics = new ArrayList<String>(_list121.size);
@@ -2550,7 +2645,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
struct.setNicsIsSet(true);
}
- if (incoming.get(16)) {
+ if (incoming.get(17)) {
{
org.apache.thrift.protocol.TList _list124 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.allowedUsers = new ArrayList<String>(_list124.size);
@@ -2563,7 +2658,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
struct.setAllowedUsersIsSet(true);
}
- if (incoming.get(17)) {
+ if (incoming.get(18)) {
{
org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.networkExceptions = new ArrayList<NetRule>(_list127.size);
@@ -2577,20 +2672,20 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
struct.setNetworkExceptionsIsSet(true);
}
- if (incoming.get(18)) {
+ if (incoming.get(19)) {
struct.isExam = iprot.readBool();
struct.setIsExamIsSet(true);
}
- if (incoming.get(19)) {
+ if (incoming.get(20)) {
struct.hasInternetAccess = iprot.readBool();
struct.setHasInternetAccessIsSet(true);
}
- if (incoming.get(20)) {
+ if (incoming.get(21)) {
struct.defaultPermissions = new LecturePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
}
- if (incoming.get(21)) {
+ if (incoming.get(22)) {
struct.userPermissions = new LecturePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(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 9fcfd69..53b9b5d 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
@@ -84,9 +84,11 @@ public class SatelliteServer {
public void setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException;
- public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException;
+ public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException;
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException;
+ public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException;
+
+ public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException;
public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException;
@@ -152,6 +154,8 @@ public class SatelliteServer {
public void setImageOwner(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -875,7 +879,41 @@ public class SatelliteServer {
return;
}
- public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException
+ public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
+ {
+ send_setImageVersionExpiry(userToken, imageBaseId, expireTime);
+ recv_setImageVersionExpiry();
+ }
+
+ public void send_setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws org.apache.thrift.TException
+ {
+ setImageVersionExpiry_args args = new setImageVersionExpiry_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setExpireTime(expireTime);
+ sendBase("setImageVersionExpiry", args);
+ }
+
+ public void recv_setImageVersionExpiry() throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
+ {
+ setImageVersionExpiry_result result = new setImageVersionExpiry_result();
+ receiveBase(result, "setImageVersionExpiry");
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ if (result.serverError != null) {
+ throw result.serverError;
+ }
+ if (result.dateError != null) {
+ throw result.dateError;
+ }
+ return;
+ }
+
+ public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
{
send_createLecture(userToken, lecture);
return recv_createLecture();
@@ -889,7 +927,7 @@ public class SatelliteServer {
sendBase("createLecture", args);
}
- public String recv_createLecture() throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException
+ public String recv_createLecture() throws TAuthorizationException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
{
createLecture_result result = new createLecture_result();
receiveBase(result, "createLecture");
@@ -902,10 +940,13 @@ public class SatelliteServer {
if (result.serverError != null) {
throw result.serverError;
}
+ if (result.dateError != null) {
+ throw result.dateError;
+ }
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result");
}
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException
+ public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
{
send_updateLecture(userToken, lectureId, lecture);
recv_updateLecture();
@@ -920,7 +961,7 @@ public class SatelliteServer {
sendBase("updateLecture", args);
}
- public void recv_updateLecture() throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException
+ public void recv_updateLecture() throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException
{
updateLecture_result result = new updateLecture_result();
receiveBase(result, "updateLecture");
@@ -933,6 +974,9 @@ public class SatelliteServer {
if (result.serverError != null) {
throw result.serverError;
}
+ if (result.dateError != null) {
+ throw result.dateError;
+ }
return;
}
@@ -1958,6 +2002,44 @@ public class SatelliteServer {
}
}
+ public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ setImageVersionExpiry_call method_call = new setImageVersionExpiry_call(userToken, imageBaseId, expireTime, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class setImageVersionExpiry_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageBaseId;
+ private long expireTime;
+ public setImageVersionExpiry_call(String userToken, String imageBaseId, long expireTime, 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.imageBaseId = imageBaseId;
+ this.expireTime = expireTime;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionExpiry", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ setImageVersionExpiry_args args = new setImageVersionExpiry_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setExpireTime(expireTime);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, 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);
+ (new Client(prot)).recv_setImageVersionExpiry();
+ }
+ }
+
public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createLecture_call method_call = new createLecture_call(userToken, lecture, resultHandler, this, ___protocolFactory, ___transport);
@@ -1983,7 +2065,7 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws TAuthorizationException, TInternalServerError, org.apache.thrift.TException {
+ public String getResult() throws TAuthorizationException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -2021,7 +2103,7 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInternalServerError, org.apache.thrift.TException {
+ public void getResult() throws TAuthorizationException, TNotFoundException, TInternalServerError, TInvalidDateParam, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -2284,6 +2366,7 @@ public class SatelliteServer {
processMap.put("writeImagePermissions", new writeImagePermissions());
processMap.put("getImagePermissions", new getImagePermissions());
processMap.put("setImageOwner", new setImageOwner());
+ processMap.put("setImageVersionExpiry", new setImageVersionExpiry());
processMap.put("createLecture", new createLecture());
processMap.put("updateLecture", new updateLecture());
processMap.put("getLectureList", new getLectureList());
@@ -2908,6 +2991,36 @@ public class SatelliteServer {
}
}
+ public static class setImageVersionExpiry<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setImageVersionExpiry_args> {
+ public setImageVersionExpiry() {
+ super("setImageVersionExpiry");
+ }
+
+ public setImageVersionExpiry_args getEmptyArgsInstance() {
+ return new setImageVersionExpiry_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public setImageVersionExpiry_result getResult(I iface, setImageVersionExpiry_args args) throws org.apache.thrift.TException {
+ setImageVersionExpiry_result result = new setImageVersionExpiry_result();
+ try {
+ iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ } catch (TInternalServerError serverError) {
+ result.serverError = serverError;
+ } catch (TInvalidDateParam dateError) {
+ result.dateError = dateError;
+ }
+ return result;
+ }
+ }
+
public static class createLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createLecture_args> {
public createLecture() {
super("createLecture");
@@ -2929,6 +3042,8 @@ public class SatelliteServer {
result.authError = authError;
} catch (TInternalServerError serverError) {
result.serverError = serverError;
+ } catch (TInvalidDateParam dateError) {
+ result.dateError = dateError;
}
return result;
}
@@ -2957,6 +3072,8 @@ public class SatelliteServer {
result.notFound = notFound;
} catch (TInternalServerError serverError) {
result.serverError = serverError;
+ } catch (TInvalidDateParam dateError) {
+ result.dateError = dateError;
}
return result;
}
@@ -3165,6 +3282,7 @@ public class SatelliteServer {
processMap.put("writeImagePermissions", new writeImagePermissions());
processMap.put("getImagePermissions", new getImagePermissions());
processMap.put("setImageOwner", new setImageOwner());
+ processMap.put("setImageVersionExpiry", new setImageVersionExpiry());
processMap.put("createLecture", new createLecture());
processMap.put("updateLecture", new updateLecture());
processMap.put("getLectureList", new getLectureList());
@@ -4650,6 +4768,77 @@ public class SatelliteServer {
}
}
+ public static class setImageVersionExpiry<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setImageVersionExpiry_args, Void> {
+ public setImageVersionExpiry() {
+ super("setImageVersionExpiry");
+ }
+
+ public setImageVersionExpiry_args getEmptyArgsInstance() {
+ return new setImageVersionExpiry_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ setImageVersionExpiry_result result = new setImageVersionExpiry_result();
+ 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;
+ setImageVersionExpiry_result result = new setImageVersionExpiry_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 if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(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, setImageVersionExpiry_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime,resultHandler);
+ }
+ }
+
public static class createLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLecture_args, String> {
public createLecture() {
super("createLecture");
@@ -4687,6 +4876,11 @@ public class SatelliteServer {
result.setServerErrorIsSet(true);
msg = result;
}
+ else if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(true);
+ msg = result;
+ }
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
@@ -4753,6 +4947,11 @@ public class SatelliteServer {
result.setServerErrorIsSet(true);
msg = result;
}
+ else if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(true);
+ msg = result;
+ }
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
@@ -28268,6 +28467,1220 @@ public class SatelliteServer {
}
+ public static class setImageVersionExpiry_args implements org.apache.thrift.TBase<setImageVersionExpiry_args, setImageVersionExpiry_args._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionExpiry_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionExpiry_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_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setImageVersionExpiry_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setImageVersionExpiry_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageBaseId; // required
+ public long expireTime; // 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_BASE_ID((short)2, "imageBaseId"),
+ EXPIRE_TIME((short)3, "expireTime");
+
+ 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_BASE_ID
+ return IMAGE_BASE_ID;
+ case 3: // EXPIRE_TIME
+ return EXPIRE_TIME;
+ 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 __EXPIRETIME_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.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.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_args.class, metaDataMap);
+ }
+
+ public setImageVersionExpiry_args() {
+ }
+
+ public setImageVersionExpiry_args(
+ String userToken,
+ String imageBaseId,
+ long expireTime)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ this.expireTime = expireTime;
+ setExpireTimeIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setImageVersionExpiry_args(setImageVersionExpiry_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ this.expireTime = other.expireTime;
+ }
+
+ public setImageVersionExpiry_args deepCopy() {
+ return new setImageVersionExpiry_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageBaseId = null;
+ setExpireTimeIsSet(false);
+ this.expireTime = 0;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public setImageVersionExpiry_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 getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public setImageVersionExpiry_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = 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 setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public long getExpireTime() {
+ return this.expireTime;
+ }
+
+ public setImageVersionExpiry_args setExpireTime(long expireTime) {
+ this.expireTime = expireTime;
+ setExpireTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetExpireTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ }
+
+ /** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetExpireTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ }
+
+ public void setExpireTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case EXPIRE_TIME:
+ if (value == null) {
+ unsetExpireTime();
+ } else {
+ setExpireTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case EXPIRE_TIME:
+ return Long.valueOf(getExpireTime());
+
+ }
+ 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_BASE_ID:
+ return isSetImageBaseId();
+ case EXPIRE_TIME:
+ return isSetExpireTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setImageVersionExpiry_args)
+ return this.equals((setImageVersionExpiry_args)that);
+ return false;
+ }
+
+ public boolean equals(setImageVersionExpiry_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_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.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_expireTime = true;
+ boolean that_present_expireTime = true;
+ if (this_present_expireTime || that_present_expireTime) {
+ if (!(this_present_expireTime && that_present_expireTime))
+ return false;
+ if (this.expireTime != that.expireTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(setImageVersionExpiry_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(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExpireTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expireTime, other.expireTime);
+ 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("setImageVersionExpiry_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("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("expireTime:");
+ sb.append(this.expireTime);
+ 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 setImageVersionExpiry_argsStandardSchemeFactory implements SchemeFactory {
+ public setImageVersionExpiry_argsStandardScheme getScheme() {
+ return new setImageVersionExpiry_argsStandardScheme();
+ }
+ }
+
+ private static class setImageVersionExpiry_argsStandardScheme extends StandardScheme<setImageVersionExpiry_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_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_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // EXPIRE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.expireTime = iprot.readI64();
+ struct.setExpireTimeIsSet(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, setImageVersionExpiry_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.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(EXPIRE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.expireTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setImageVersionExpiry_argsTupleSchemeFactory implements SchemeFactory {
+ public setImageVersionExpiry_argsTupleScheme getScheme() {
+ return new setImageVersionExpiry_argsTupleScheme();
+ }
+ }
+
+ private static class setImageVersionExpiry_argsTupleScheme extends TupleScheme<setImageVersionExpiry_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetExpireTime()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetExpireTime()) {
+ oprot.writeI64(struct.expireTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.expireTime = iprot.readI64();
+ struct.setExpireTimeIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class setImageVersionExpiry_result implements org.apache.thrift.TBase<setImageVersionExpiry_result, setImageVersionExpiry_result._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionExpiry_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionExpiry_result");
+
+ 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 org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setImageVersionExpiry_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setImageVersionExpiry_resultTupleSchemeFactory());
+ }
+
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // required
+ public TInternalServerError serverError; // required
+ public TInvalidDateParam dateError; // 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 {
+ AUTH_ERROR((short)1, "authError"),
+ NOT_FOUND((short)2, "notFound"),
+ SERVER_ERROR((short)3, "serverError"),
+ DATE_ERROR((short)4, "dateError");
+
+ 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: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ case 3: // SERVER_ERROR
+ return SERVER_ERROR;
+ case 4: // DATE_ERROR
+ return DATE_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.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)));
+ tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", 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(setImageVersionExpiry_result.class, metaDataMap);
+ }
+
+ public setImageVersionExpiry_result() {
+ }
+
+ public setImageVersionExpiry_result(
+ TAuthorizationException authError,
+ TNotFoundException notFound,
+ TInternalServerError serverError,
+ TInvalidDateParam dateError)
+ {
+ this();
+ this.authError = authError;
+ this.notFound = notFound;
+ this.serverError = serverError;
+ this.dateError = dateError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setImageVersionExpiry_result(setImageVersionExpiry_result other) {
+ 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);
+ }
+ if (other.isSetDateError()) {
+ this.dateError = new TInvalidDateParam(other.dateError);
+ }
+ }
+
+ public setImageVersionExpiry_result deepCopy() {
+ return new setImageVersionExpiry_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.authError = null;
+ this.notFound = null;
+ this.serverError = null;
+ this.dateError = null;
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public setImageVersionExpiry_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 setImageVersionExpiry_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 setImageVersionExpiry_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 TInvalidDateParam getDateError() {
+ return this.dateError;
+ }
+
+ public setImageVersionExpiry_result setDateError(TInvalidDateParam dateError) {
+ this.dateError = dateError;
+ return this;
+ }
+
+ public void unsetDateError() {
+ this.dateError = null;
+ }
+
+ /** Returns true if field dateError is set (has been assigned a value) and false otherwise */
+ public boolean isSetDateError() {
+ return this.dateError != null;
+ }
+
+ public void setDateErrorIsSet(boolean value) {
+ if (!value) {
+ this.dateError = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ 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;
+
+ case DATE_ERROR:
+ if (value == null) {
+ unsetDateError();
+ } else {
+ setDateError((TInvalidDateParam)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ case SERVER_ERROR:
+ return getServerError();
+
+ case DATE_ERROR:
+ return getDateError();
+
+ }
+ 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 AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ case SERVER_ERROR:
+ return isSetServerError();
+ case DATE_ERROR:
+ return isSetDateError();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setImageVersionExpiry_result)
+ return this.equals((setImageVersionExpiry_result)that);
+ return false;
+ }
+
+ public boolean equals(setImageVersionExpiry_result that) {
+ if (that == null)
+ 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;
+ }
+
+ boolean this_present_dateError = true && this.isSetDateError();
+ boolean that_present_dateError = true && that.isSetDateError();
+ if (this_present_dateError || that_present_dateError) {
+ if (!(this_present_dateError && that_present_dateError))
+ return false;
+ if (!this.dateError.equals(that.dateError))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(setImageVersionExpiry_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDateError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
+ 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("setImageVersionExpiry_result(");
+ boolean first = true;
+
+ 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;
+ if (!first) sb.append(", ");
+ sb.append("dateError:");
+ if (this.dateError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dateError);
+ }
+ 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 setImageVersionExpiry_resultStandardSchemeFactory implements SchemeFactory {
+ public setImageVersionExpiry_resultStandardScheme getScheme() {
+ return new setImageVersionExpiry_resultStandardScheme();
+ }
+ }
+
+ private static class setImageVersionExpiry_resultStandardScheme extends StandardScheme<setImageVersionExpiry_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_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 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;
+ case 4: // DATE_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(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, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ 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();
+ }
+ if (struct.dateError != null) {
+ oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
+ struct.dateError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setImageVersionExpiry_resultTupleSchemeFactory implements SchemeFactory {
+ public setImageVersionExpiry_resultTupleScheme getScheme() {
+ return new setImageVersionExpiry_resultTupleScheme();
+ }
+ }
+
+ private static class setImageVersionExpiry_resultTupleScheme extends TupleScheme<setImageVersionExpiry_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAuthError()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(1);
+ }
+ if (struct.isSetServerError()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDateError()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ if (struct.isSetServerError()) {
+ struct.serverError.write(oprot);
+ }
+ if (struct.isSetDateError()) {
+ struct.dateError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.serverError = new TInternalServerError();
+ struct.serverError.read(iprot);
+ struct.setServerErrorIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
public static class createLecture_args implements org.apache.thrift.TBase<createLecture_args, createLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<createLecture_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_args");
@@ -28733,6 +30146,7 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -28743,12 +30157,14 @@ public class SatelliteServer {
public String success; // required
public TAuthorizationException authError; // required
public TInternalServerError serverError; // required
+ public TInvalidDateParam dateError; // 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"),
- SERVER_ERROR((short)2, "serverError");
+ SERVER_ERROR((short)2, "serverError"),
+ DATE_ERROR((short)3, "dateError");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -28769,6 +30185,8 @@ public class SatelliteServer {
return AUTH_ERROR;
case 2: // SERVER_ERROR
return SERVER_ERROR;
+ case 3: // DATE_ERROR
+ return DATE_ERROR;
default:
return null;
}
@@ -28818,6 +30236,8 @@ public class SatelliteServer {
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)));
+ tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", 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(createLecture_result.class, metaDataMap);
}
@@ -28828,12 +30248,14 @@ public class SatelliteServer {
public createLecture_result(
String success,
TAuthorizationException authError,
- TInternalServerError serverError)
+ TInternalServerError serverError,
+ TInvalidDateParam dateError)
{
this();
this.success = success;
this.authError = authError;
this.serverError = serverError;
+ this.dateError = dateError;
}
/**
@@ -28849,6 +30271,9 @@ public class SatelliteServer {
if (other.isSetServerError()) {
this.serverError = new TInternalServerError(other.serverError);
}
+ if (other.isSetDateError()) {
+ this.dateError = new TInvalidDateParam(other.dateError);
+ }
}
public createLecture_result deepCopy() {
@@ -28860,6 +30285,7 @@ public class SatelliteServer {
this.success = null;
this.authError = null;
this.serverError = null;
+ this.dateError = null;
}
public String getSuccess() {
@@ -28934,6 +30360,30 @@ public class SatelliteServer {
}
}
+ public TInvalidDateParam getDateError() {
+ return this.dateError;
+ }
+
+ public createLecture_result setDateError(TInvalidDateParam dateError) {
+ this.dateError = dateError;
+ return this;
+ }
+
+ public void unsetDateError() {
+ this.dateError = null;
+ }
+
+ /** Returns true if field dateError is set (has been assigned a value) and false otherwise */
+ public boolean isSetDateError() {
+ return this.dateError != null;
+ }
+
+ public void setDateErrorIsSet(boolean value) {
+ if (!value) {
+ this.dateError = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
@@ -28960,6 +30410,14 @@ public class SatelliteServer {
}
break;
+ case DATE_ERROR:
+ if (value == null) {
+ unsetDateError();
+ } else {
+ setDateError((TInvalidDateParam)value);
+ }
+ break;
+
}
}
@@ -28974,6 +30432,9 @@ public class SatelliteServer {
case SERVER_ERROR:
return getServerError();
+ case DATE_ERROR:
+ return getDateError();
+
}
throw new IllegalStateException();
}
@@ -28991,6 +30452,8 @@ public class SatelliteServer {
return isSetAuthError();
case SERVER_ERROR:
return isSetServerError();
+ case DATE_ERROR:
+ return isSetDateError();
}
throw new IllegalStateException();
}
@@ -29035,6 +30498,15 @@ public class SatelliteServer {
return false;
}
+ boolean this_present_dateError = true && this.isSetDateError();
+ boolean that_present_dateError = true && that.isSetDateError();
+ if (this_present_dateError || that_present_dateError) {
+ if (!(this_present_dateError && that_present_dateError))
+ return false;
+ if (!this.dateError.equals(that.dateError))
+ return false;
+ }
+
return true;
}
@@ -29081,6 +30553,16 @@ public class SatelliteServer {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDateError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -29124,6 +30606,14 @@ public class SatelliteServer {
sb.append(this.serverError);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("dateError:");
+ if (this.dateError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dateError);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -29193,6 +30683,15 @@ public class SatelliteServer {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 3: // DATE_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -29223,6 +30722,11 @@ public class SatelliteServer {
struct.serverError.write(oprot);
oprot.writeFieldEnd();
}
+ if (struct.dateError != null) {
+ oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
+ struct.dateError.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -29250,7 +30754,10 @@ public class SatelliteServer {
if (struct.isSetServerError()) {
optionals.set(2);
}
- oprot.writeBitSet(optionals, 3);
+ if (struct.isSetDateError()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
@@ -29260,12 +30767,15 @@ public class SatelliteServer {
if (struct.isSetServerError()) {
struct.serverError.write(oprot);
}
+ if (struct.isSetDateError()) {
+ struct.dateError.write(oprot);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -29280,6 +30790,11 @@ public class SatelliteServer {
struct.serverError.read(iprot);
struct.setServerErrorIsSet(true);
}
+ if (incoming.get(3)) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(true);
+ }
}
}
@@ -29850,6 +31365,7 @@ public class SatelliteServer {
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 org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -29860,12 +31376,14 @@ public class SatelliteServer {
public TAuthorizationException authError; // required
public TNotFoundException notFound; // required
public TInternalServerError serverError; // required
+ public TInvalidDateParam dateError; // 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 {
AUTH_ERROR((short)1, "authError"),
NOT_FOUND((short)2, "notFound"),
- SERVER_ERROR((short)3, "serverError");
+ SERVER_ERROR((short)3, "serverError"),
+ DATE_ERROR((short)4, "dateError");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -29886,6 +31404,8 @@ public class SatelliteServer {
return NOT_FOUND;
case 3: // SERVER_ERROR
return SERVER_ERROR;
+ case 4: // DATE_ERROR
+ return DATE_ERROR;
default:
return null;
}
@@ -29935,6 +31455,8 @@ public class SatelliteServer {
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)));
+ tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", 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(updateLecture_result.class, metaDataMap);
}
@@ -29945,12 +31467,14 @@ public class SatelliteServer {
public updateLecture_result(
TAuthorizationException authError,
TNotFoundException notFound,
- TInternalServerError serverError)
+ TInternalServerError serverError,
+ TInvalidDateParam dateError)
{
this();
this.authError = authError;
this.notFound = notFound;
this.serverError = serverError;
+ this.dateError = dateError;
}
/**
@@ -29966,6 +31490,9 @@ public class SatelliteServer {
if (other.isSetServerError()) {
this.serverError = new TInternalServerError(other.serverError);
}
+ if (other.isSetDateError()) {
+ this.dateError = new TInvalidDateParam(other.dateError);
+ }
}
public updateLecture_result deepCopy() {
@@ -29977,6 +31504,7 @@ public class SatelliteServer {
this.authError = null;
this.notFound = null;
this.serverError = null;
+ this.dateError = null;
}
public TAuthorizationException getAuthError() {
@@ -30051,6 +31579,30 @@ public class SatelliteServer {
}
}
+ public TInvalidDateParam getDateError() {
+ return this.dateError;
+ }
+
+ public updateLecture_result setDateError(TInvalidDateParam dateError) {
+ this.dateError = dateError;
+ return this;
+ }
+
+ public void unsetDateError() {
+ this.dateError = null;
+ }
+
+ /** Returns true if field dateError is set (has been assigned a value) and false otherwise */
+ public boolean isSetDateError() {
+ return this.dateError != null;
+ }
+
+ public void setDateErrorIsSet(boolean value) {
+ if (!value) {
+ this.dateError = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case AUTH_ERROR:
@@ -30077,6 +31629,14 @@ public class SatelliteServer {
}
break;
+ case DATE_ERROR:
+ if (value == null) {
+ unsetDateError();
+ } else {
+ setDateError((TInvalidDateParam)value);
+ }
+ break;
+
}
}
@@ -30091,6 +31651,9 @@ public class SatelliteServer {
case SERVER_ERROR:
return getServerError();
+ case DATE_ERROR:
+ return getDateError();
+
}
throw new IllegalStateException();
}
@@ -30108,6 +31671,8 @@ public class SatelliteServer {
return isSetNotFound();
case SERVER_ERROR:
return isSetServerError();
+ case DATE_ERROR:
+ return isSetDateError();
}
throw new IllegalStateException();
}
@@ -30152,6 +31717,15 @@ public class SatelliteServer {
return false;
}
+ boolean this_present_dateError = true && this.isSetDateError();
+ boolean that_present_dateError = true && that.isSetDateError();
+ if (this_present_dateError || that_present_dateError) {
+ if (!(this_present_dateError && that_present_dateError))
+ return false;
+ if (!this.dateError.equals(that.dateError))
+ return false;
+ }
+
return true;
}
@@ -30198,6 +31772,16 @@ public class SatelliteServer {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDateError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -30241,6 +31825,14 @@ public class SatelliteServer {
sb.append(this.serverError);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("dateError:");
+ if (this.dateError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dateError);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -30311,6 +31903,15 @@ public class SatelliteServer {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 4: // DATE_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -30341,6 +31942,11 @@ public class SatelliteServer {
struct.serverError.write(oprot);
oprot.writeFieldEnd();
}
+ if (struct.dateError != null) {
+ oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
+ struct.dateError.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -30368,7 +31974,10 @@ public class SatelliteServer {
if (struct.isSetServerError()) {
optionals.set(2);
}
- oprot.writeBitSet(optionals, 3);
+ if (struct.isSetDateError()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
if (struct.isSetAuthError()) {
struct.authError.write(oprot);
}
@@ -30378,12 +31987,15 @@ public class SatelliteServer {
if (struct.isSetServerError()) {
struct.serverError.write(oprot);
}
+ if (struct.isSetDateError()) {
+ struct.dateError.write(oprot);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -30399,6 +32011,11 @@ public class SatelliteServer {
struct.serverError.read(iprot);
struct.setServerErrorIsSet(true);
}
+ if (incoming.get(3)) {
+ struct.dateError = new TInvalidDateParam();
+ struct.dateError.read(iprot);
+ struct.setDateErrorIsSet(true);
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java
new file mode 100644
index 0000000..8a5eae0
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java
@@ -0,0 +1,504 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TInvalidDateParam extends TException implements org.apache.thrift.TBase<TInvalidDateParam, TInvalidDateParam._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidDateParam> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInvalidDateParam");
+
+ private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 TInvalidDateParamStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TInvalidDateParamTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see DateParamError
+ */
+ public DateParamError number; // required
+ public String message; // 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 {
+ /**
+ *
+ * @see DateParamError
+ */
+ NUMBER((short)1, "number"),
+ MESSAGE((short)2, "message");
+
+ 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: // NUMBER
+ return NUMBER;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DateParamError.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInvalidDateParam.class, metaDataMap);
+ }
+
+ public TInvalidDateParam() {
+ }
+
+ public TInvalidDateParam(
+ DateParamError number,
+ String message)
+ {
+ this();
+ this.number = number;
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TInvalidDateParam(TInvalidDateParam other) {
+ if (other.isSetNumber()) {
+ this.number = other.number;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public TInvalidDateParam deepCopy() {
+ return new TInvalidDateParam(this);
+ }
+
+ @Override
+ public void clear() {
+ this.number = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see DateParamError
+ */
+ public DateParamError getNumber() {
+ return this.number;
+ }
+
+ /**
+ *
+ * @see DateParamError
+ */
+ public TInvalidDateParam setNumber(DateParamError number) {
+ this.number = number;
+ return this;
+ }
+
+ public void unsetNumber() {
+ this.number = null;
+ }
+
+ /** Returns true if field number is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumber() {
+ return this.number != null;
+ }
+
+ public void setNumberIsSet(boolean value) {
+ if (!value) {
+ this.number = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public TInvalidDateParam setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NUMBER:
+ if (value == null) {
+ unsetNumber();
+ } else {
+ setNumber((DateParamError)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NUMBER:
+ return getNumber();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 NUMBER:
+ return isSetNumber();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TInvalidDateParam)
+ return this.equals((TInvalidDateParam)that);
+ return false;
+ }
+
+ public boolean equals(TInvalidDateParam that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_number = true && this.isSetNumber();
+ boolean that_present_number = true && that.isSetNumber();
+ if (this_present_number || that_present_number) {
+ if (!(this_present_number && that_present_number))
+ return false;
+ if (!this.number.equals(that.number))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TInvalidDateParam other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("TInvalidDateParam(");
+ boolean first = true;
+
+ sb.append("number:");
+ if (this.number == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.number);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ 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 TInvalidDateParamStandardSchemeFactory implements SchemeFactory {
+ public TInvalidDateParamStandardScheme getScheme() {
+ return new TInvalidDateParamStandardScheme();
+ }
+ }
+
+ private static class TInvalidDateParamStandardScheme extends StandardScheme<TInvalidDateParam> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TInvalidDateParam 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: // NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.number = DateParamError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, TInvalidDateParam struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.number != null) {
+ oprot.writeFieldBegin(NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.number.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TInvalidDateParamTupleSchemeFactory implements SchemeFactory {
+ public TInvalidDateParamTupleScheme getScheme() {
+ return new TInvalidDateParamTupleScheme();
+ }
+ }
+
+ private static class TInvalidDateParamTupleScheme extends TupleScheme<TInvalidDateParam> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TInvalidDateParam struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNumber()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMessage()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetNumber()) {
+ oprot.writeI32(struct.number.getValue());
+ }
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TInvalidDateParam struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.number = DateParamError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
index 25690bd..03c0643 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
public class TNotFoundException extends TException implements org.apache.thrift.TBase<TNotFoundException, TNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TNotFoundException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNotFoundException");
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -42,10 +43,11 @@ public class TNotFoundException extends TException implements org.apache.thrift.
schemes.put(TupleScheme.class, new TNotFoundExceptionTupleSchemeFactory());
}
+ public String message; // 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 {
-;
+ MESSAGE((short)1, "message");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -60,6 +62,8 @@ public class TNotFoundException extends TException implements org.apache.thrift.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // MESSAGE
+ return MESSAGE;
default:
return null;
}
@@ -98,9 +102,13 @@ public class TNotFoundException extends TException implements org.apache.thrift.
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNotFoundException.class, metaDataMap);
}
@@ -108,10 +116,20 @@ public class TNotFoundException extends TException implements org.apache.thrift.
public TNotFoundException() {
}
+ public TNotFoundException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
/**
* Performs a deep copy on <i>other</i>.
*/
public TNotFoundException(TNotFoundException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
}
public TNotFoundException deepCopy() {
@@ -120,15 +138,51 @@ public class TNotFoundException extends TException implements org.apache.thrift.
@Override
public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public TNotFoundException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case MESSAGE:
+ return getMessage();
+
}
throw new IllegalStateException();
}
@@ -140,6 +194,8 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
switch (field) {
+ case MESSAGE:
+ return isSetMessage();
}
throw new IllegalStateException();
}
@@ -157,6 +213,15 @@ public class TNotFoundException extends TException implements org.apache.thrift.
if (that == null)
return false;
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
return true;
}
@@ -173,6 +238,16 @@ public class TNotFoundException extends TException implements org.apache.thrift.
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -193,6 +268,13 @@ public class TNotFoundException extends TException implements org.apache.thrift.
StringBuilder sb = new StringBuilder("TNotFoundException(");
boolean first = true;
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -236,6 +318,14 @@ public class TNotFoundException extends TException implements org.apache.thrift.
break;
}
switch (schemeField.id) {
+ case 1: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -251,6 +341,11 @@ public class TNotFoundException extends TException implements org.apache.thrift.
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -268,11 +363,24 @@ public class TNotFoundException extends TException implements org.apache.thrift.
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TNotFoundException struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TNotFoundException struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
}
}
diff --git a/src/main/java/org/openslx/thrifthelper/Comparators.java b/src/main/java/org/openslx/thrifthelper/Comparators.java
new file mode 100644
index 0000000..5580cf6
--- /dev/null
+++ b/src/main/java/org/openslx/thrifthelper/Comparators.java
@@ -0,0 +1,78 @@
+package org.openslx.thrifthelper;
+
+import java.util.Comparator;
+
+import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
+import org.openslx.bwlp.thrift.iface.ImageVersionDetails;
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.bwlp.thrift.iface.Organization;
+import org.openslx.bwlp.thrift.iface.Virtualizer;
+
+/**
+ * A bunch of comparators for thrift classes. They will compare on what would be considered the
+ * identifier ("primary key") of a struct, unless stated otherwise.
+ */
+public class Comparators
+{
+
+ public static final Comparator<ImageVersionDetails> imageVersionDetails = new Comparator<ImageVersionDetails>() {
+ @Override
+ public int compare( ImageVersionDetails o1, ImageVersionDetails o2 )
+ {
+ if ( o1 == null || o1.versionId == null )
+ return o2 == null || o2.versionId == null ? 0 : 1;
+ if ( o2 == null || o2.versionId == null )
+ return -1;
+ return o1.versionId.compareTo( o2.versionId );
+ }
+ };
+
+ public static final Comparator<ImageSummaryRead> imageSummaryRead = new Comparator<ImageSummaryRead>() {
+ @Override
+ public int compare( ImageSummaryRead o1, ImageSummaryRead o2 )
+ {
+ if ( o1 == null || o1.imageBaseId == null )
+ return o2 == null || o2.imageBaseId == null ? 0 : 1;
+ if ( o2 == null || o2.imageBaseId == null )
+ return -1;
+ return o1.imageBaseId.compareTo( o2.imageBaseId );
+ }
+ };
+
+ public static final Comparator<OperatingSystem> operatingSystem = new Comparator<OperatingSystem>() {
+ @Override
+ public int compare( OperatingSystem o1, OperatingSystem o2 )
+ {
+ if ( o1 == null )
+ return o2 == null ? 0 : 1;
+ if ( o2 == null )
+ return -1;
+ return o1.osId - o2.osId;
+ }
+ };
+
+ public static final Comparator<Virtualizer> virtualizer = new Comparator<Virtualizer>() {
+ @Override
+ public int compare( Virtualizer o1, Virtualizer o2 )
+ {
+ if ( o1 == null || o1.virtId == null )
+ return o2 == null || o2.virtId == null ? 0 : 1;
+ if ( o2 == null || o2.virtId == null )
+ return -1;
+ return o1.virtId.compareTo( o2.virtId );
+ }
+ };
+
+ public static final Comparator<Organization> organization = new Comparator<Organization>() {
+ @Override
+ public int compare( Organization o1, Organization o2 )
+ {
+ if ( o1 == null || o1.organizationId == null )
+ return o2 == null || o2.organizationId == null ? 0 : 1;
+ if ( o2 == null || o2.organizationId == null )
+ return -1;
+ return o1.organizationId.compareTo( o2.organizationId );
+ }
+ };
+
+}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index fb29e9f..e392a81 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -61,6 +61,12 @@ enum TransferState {
ERROR
}
+enum DateParamError {
+ TOO_LOW,
+ TOO_HIGH,
+ NEGATIVE_RANGE
+}
+
// ############## STRUCT ###############
struct UserInfo {
@@ -171,11 +177,12 @@ struct ImageSummaryRead {
6: string virtId,
7: UnixTimestamp createTime,
8: UnixTimestamp updateTime,
+ 20: UnixTimestamp uploadTime, // Time when the latest version was uploaded
9: UnixTimestamp expireTime,
10: UUID ownerId,
- 11: UUID uploaderId,
+ 11: UUID uploaderId, // Uploader of the latest version
12: ShareMode shareMode,
- 13: i64 fileSize,
+ 13: i64 fileSize, // Size of the latest version
14: bool isRestricted,
15: bool isValid,
16: bool isProcessed,
@@ -264,7 +271,8 @@ struct LectureRead {
1: UUID lectureId,
2: string lectureName,
3: string description,
- 4: ImageSummaryRead image,
+ 23: string imageVersionId,
+ 24: string imageBaseId,
5: bool autoUpdate,
6: bool isEnabled,
7: UnixTimestamp startTime,
@@ -337,11 +345,17 @@ exception TInvalidTokenException {
}
exception TNotFoundException {
+ 1: string message
}
exception TInternalServerError {
}
+exception TInvalidDateParam {
+ 1: DateParamError number,
+ 2: string message,
+}
+
exception TImageDataException {
1: ImageDataError number,
2: string message
@@ -431,16 +445,19 @@ service SatelliteServer {
// Set new owner of image
void setImageOwner(1: Token userToken, 2: UUID imageBaseId 3: UUID newOwnerId)
throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError),
+ // Set image version valid and change expiry date (super user action)
+ void setImageVersionExpiry(1: Token userToken, 2: UUID imageBaseId 3: UnixTimestamp expireTime)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError, 4:TInvalidDateParam dateError),
/*
* Lecture related
*/
// Create new lecture
UUID createLecture(1: Token userToken, 2: LectureWrite lecture)
- throws (1:TAuthorizationException authError, 2:TInternalServerError serverError),
+ throws (1:TAuthorizationException authError, 2:TInternalServerError serverError, 3:TInvalidDateParam dateError),
// Update existing lecture
void updateLecture(1: Token userToken, 2: UUID lectureId, 3: LectureWrite lecture)
- throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError),
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError, 4:TInvalidDateParam dateError),
// Get list of all lectures
list<LectureSummary> getLectureList(1: Token userToken, 2: i32 page)
throws (1:TAuthorizationException authError, 2:TInternalServerError serverError),