summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2016-03-03 17:56:31 +0100
committerJonathan Bauer2016-03-03 17:56:31 +0100
commite25460f7133cfeb2e30bebbe6d55c29589627992 (patch)
tree5e40c0f26e2d1285a1bf3a84aea42b5e4b09b72e
parent[vmware] Add addCdrom function (diff)
downloadmaster-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.tar.gz
master-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.tar.xz
master-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.zip
added hasUsbAccess field to Lecture* Struct
* TODO refactor NetRules
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java109
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java111
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java111
-rw-r--r--src/main/thrift/bwlp.thrift3
4 files changed, 317 insertions, 17 deletions
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 2d872f9..3c5d305 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-18")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-02")
public class LectureRead implements org.apache.thrift.TBase<LectureRead, LectureRead._Fields>, java.io.Serializable, Cloneable, Comparable<LectureRead> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead");
@@ -64,6 +64,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final org.apache.thrift.protocol.TField LOCATION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("locationIds", org.apache.thrift.protocol.TType.LIST, (short)25);
private static final org.apache.thrift.protocol.TField LIMIT_TO_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToLocations", org.apache.thrift.protocol.TType.BOOL, (short)26);
private static final org.apache.thrift.protocol.TField LIMIT_TO_ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToAllowedUsers", org.apache.thrift.protocol.TType.BOOL, (short)27);
+ private static final org.apache.thrift.protocol.TField HAS_USB_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUsbAccess", org.apache.thrift.protocol.TType.BOOL, (short)28);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -97,6 +98,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public List<Integer> locationIds; // required
public boolean limitToLocations; // required
public boolean limitToAllowedUsers; // required
+ public boolean hasUsbAccess; // 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 {
@@ -125,7 +127,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
USER_PERMISSIONS((short)22, "userPermissions"),
LOCATION_IDS((short)25, "locationIds"),
LIMIT_TO_LOCATIONS((short)26, "limitToLocations"),
- LIMIT_TO_ALLOWED_USERS((short)27, "limitToAllowedUsers");
+ LIMIT_TO_ALLOWED_USERS((short)27, "limitToAllowedUsers"),
+ HAS_USB_ACCESS((short)28, "hasUsbAccess");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -192,6 +195,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return LIMIT_TO_LOCATIONS;
case 27: // LIMIT_TO_ALLOWED_USERS
return LIMIT_TO_ALLOWED_USERS;
+ case 28: // HAS_USB_ACCESS
+ return HAS_USB_ACCESS;
default:
return null;
}
@@ -244,6 +249,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final int __HASINTERNETACCESS_ISSET_ID = 9;
private static final int __LIMITTOLOCATIONS_ISSET_ID = 10;
private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 11;
+ private static final int __HASUSBACCESS_ISSET_ID = 12;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
@@ -305,6 +311,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.LIMIT_TO_ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("limitToAllowedUsers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_USB_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasUsbAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureRead.class, metaDataMap);
}
@@ -337,7 +345,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
LecturePermissions defaultPermissions,
List<Integer> locationIds,
boolean limitToLocations,
- boolean limitToAllowedUsers)
+ boolean limitToAllowedUsers,
+ boolean hasUsbAccess)
{
this();
this.lectureId = lectureId;
@@ -377,6 +386,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
setLimitToLocationsIsSet(true);
this.limitToAllowedUsers = limitToAllowedUsers;
setLimitToAllowedUsersIsSet(true);
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
}
/**
@@ -445,6 +456,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
this.limitToLocations = other.limitToLocations;
this.limitToAllowedUsers = other.limitToAllowedUsers;
+ this.hasUsbAccess = other.hasUsbAccess;
}
public LectureRead deepCopy() {
@@ -491,6 +503,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.limitToLocations = false;
setLimitToAllowedUsersIsSet(false);
this.limitToAllowedUsers = false;
+ setHasUsbAccessIsSet(false);
+ this.hasUsbAccess = false;
}
public String getLectureId() {
@@ -1165,6 +1179,29 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
}
+ public boolean isHasUsbAccess() {
+ return this.hasUsbAccess;
+ }
+
+ public LectureRead setHasUsbAccess(boolean hasUsbAccess) {
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasUsbAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasUsbAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ public void setHasUsbAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LECTURE_ID:
@@ -1375,6 +1412,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
break;
+ case HAS_USB_ACCESS:
+ if (value == null) {
+ unsetHasUsbAccess();
+ } else {
+ setHasUsbAccess((Boolean)value);
+ }
+ break;
+
}
}
@@ -1458,6 +1503,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case LIMIT_TO_ALLOWED_USERS:
return isLimitToAllowedUsers();
+ case HAS_USB_ACCESS:
+ return isHasUsbAccess();
+
}
throw new IllegalStateException();
}
@@ -1521,6 +1569,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return isSetLimitToLocations();
case LIMIT_TO_ALLOWED_USERS:
return isSetLimitToAllowedUsers();
+ case HAS_USB_ACCESS:
+ return isSetHasUsbAccess();
}
throw new IllegalStateException();
}
@@ -1772,6 +1822,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return false;
}
+ boolean this_present_hasUsbAccess = true;
+ boolean that_present_hasUsbAccess = true;
+ if (this_present_hasUsbAccess || that_present_hasUsbAccess) {
+ if (!(this_present_hasUsbAccess && that_present_hasUsbAccess))
+ return false;
+ if (this.hasUsbAccess != that.hasUsbAccess)
+ return false;
+ }
+
return true;
}
@@ -1909,6 +1968,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (present_limitToAllowedUsers)
list.add(limitToAllowedUsers);
+ boolean present_hasUsbAccess = true;
+ list.add(present_hasUsbAccess);
+ if (present_hasUsbAccess)
+ list.add(hasUsbAccess);
+
return list.hashCode();
}
@@ -2180,6 +2244,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasUsbAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUsbAccess, other.hasUsbAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -2361,6 +2435,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
sb.append("limitToAllowedUsers:");
sb.append(this.limitToAllowedUsers);
first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasUsbAccess:");
+ sb.append(this.hasUsbAccess);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -2663,6 +2741,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 28: // HAS_USB_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2814,6 +2900,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(LIMIT_TO_ALLOWED_USERS_FIELD_DESC);
oprot.writeBool(struct.limitToAllowedUsers);
oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasUsbAccess);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2910,7 +2999,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetLimitToAllowedUsers()) {
optionals.set(25);
}
- oprot.writeBitSet(optionals, 26);
+ if (struct.isSetHasUsbAccess()) {
+ optionals.set(26);
+ }
+ oprot.writeBitSet(optionals, 27);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
@@ -3013,12 +3105,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetLimitToAllowedUsers()) {
oprot.writeBool(struct.limitToAllowedUsers);
}
+ if (struct.isSetHasUsbAccess()) {
+ oprot.writeBool(struct.hasUsbAccess);
+ }
}
@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(26);
+ BitSet incoming = iprot.readBitSet(27);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -3162,6 +3257,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
struct.limitToAllowedUsers = iprot.readBool();
struct.setLimitToAllowedUsersIsSet(true);
}
+ if (incoming.get(26)) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
index d2edeab..d63885e 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-02")
public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, LectureSummary._Fields>, java.io.Serializable, Cloneable, Comparable<LectureSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureSummary");
@@ -54,6 +54,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)14);
private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)15);
private static final org.apache.thrift.protocol.TField IS_IMAGE_VERSION_USABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("isImageVersionUsable", org.apache.thrift.protocol.TType.BOOL, (short)16);
+ private static final org.apache.thrift.protocol.TField HAS_USB_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUsbAccess", org.apache.thrift.protocol.TType.BOOL, (short)17);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -77,6 +78,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
public LecturePermissions defaultPermissions; // required
public LecturePermissions userPermissions; // optional
public boolean isImageVersionUsable; // required
+ public boolean hasUsbAccess; // 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 {
@@ -95,7 +97,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
HAS_INTERNET_ACCESS((short)13, "hasInternetAccess"),
DEFAULT_PERMISSIONS((short)14, "defaultPermissions"),
USER_PERMISSIONS((short)15, "userPermissions"),
- IS_IMAGE_VERSION_USABLE((short)16, "isImageVersionUsable");
+ IS_IMAGE_VERSION_USABLE((short)16, "isImageVersionUsable"),
+ HAS_USB_ACCESS((short)17, "hasUsbAccess");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -142,6 +145,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return USER_PERMISSIONS;
case 16: // IS_IMAGE_VERSION_USABLE
return IS_IMAGE_VERSION_USABLE;
+ case 17: // HAS_USB_ACCESS
+ return HAS_USB_ACCESS;
default:
return null;
}
@@ -190,7 +195,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
private static final int __ISEXAM_ISSET_ID = 5;
private static final int __HASINTERNETACCESS_ISSET_ID = 6;
private static final int __ISIMAGEVERSIONUSABLE_ISSET_ID = 7;
- private byte __isset_bitfield = 0;
+ private static final int __HASUSBACCESS_ISSET_ID = 8;
+ private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
@@ -227,6 +233,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)));
tmpMap.put(_Fields.IS_IMAGE_VERSION_USABLE, new org.apache.thrift.meta_data.FieldMetaData("isImageVersionUsable", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_USB_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasUsbAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureSummary.class, metaDataMap);
}
@@ -249,7 +257,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions,
- boolean isImageVersionUsable)
+ boolean isImageVersionUsable,
+ boolean hasUsbAccess)
{
this();
this.lectureId = lectureId;
@@ -275,6 +284,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
this.defaultPermissions = defaultPermissions;
this.isImageVersionUsable = isImageVersionUsable;
setIsImageVersionUsableIsSet(true);
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
}
/**
@@ -314,6 +325,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
this.userPermissions = new LecturePermissions(other.userPermissions);
}
this.isImageVersionUsable = other.isImageVersionUsable;
+ this.hasUsbAccess = other.hasUsbAccess;
}
public LectureSummary deepCopy() {
@@ -346,6 +358,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
this.userPermissions = null;
setIsImageVersionUsableIsSet(false);
this.isImageVersionUsable = false;
+ setHasUsbAccessIsSet(false);
+ this.hasUsbAccess = false;
}
public String getLectureId() {
@@ -724,6 +738,29 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID, value);
}
+ public boolean isHasUsbAccess() {
+ return this.hasUsbAccess;
+ }
+
+ public LectureSummary setHasUsbAccess(boolean hasUsbAccess) {
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasUsbAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasUsbAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ public void setHasUsbAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LECTURE_ID:
@@ -854,6 +891,14 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
break;
+ case HAS_USB_ACCESS:
+ if (value == null) {
+ unsetHasUsbAccess();
+ } else {
+ setHasUsbAccess((Boolean)value);
+ }
+ break;
+
}
}
@@ -907,6 +952,9 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
case IS_IMAGE_VERSION_USABLE:
return isIsImageVersionUsable();
+ case HAS_USB_ACCESS:
+ return isHasUsbAccess();
+
}
throw new IllegalStateException();
}
@@ -950,6 +998,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return isSetUserPermissions();
case IS_IMAGE_VERSION_USABLE:
return isSetIsImageVersionUsable();
+ case HAS_USB_ACCESS:
+ return isSetHasUsbAccess();
}
throw new IllegalStateException();
}
@@ -1111,6 +1161,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return false;
}
+ boolean this_present_hasUsbAccess = true;
+ boolean that_present_hasUsbAccess = true;
+ if (this_present_hasUsbAccess || that_present_hasUsbAccess) {
+ if (!(this_present_hasUsbAccess && that_present_hasUsbAccess))
+ return false;
+ if (this.hasUsbAccess != that.hasUsbAccess)
+ return false;
+ }
+
return true;
}
@@ -1198,6 +1257,11 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (present_isImageVersionUsable)
list.add(isImageVersionUsable);
+ boolean present_hasUsbAccess = true;
+ list.add(present_hasUsbAccess);
+ if (present_hasUsbAccess)
+ list.add(hasUsbAccess);
+
return list.hashCode();
}
@@ -1369,6 +1433,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasUsbAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUsbAccess, other.hasUsbAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1486,6 +1560,10 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
sb.append("isImageVersionUsable:");
sb.append(this.isImageVersionUsable);
first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasUsbAccess:");
+ sb.append(this.hasUsbAccess);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -1667,6 +1745,14 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 17: // HAS_USB_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1748,6 +1834,9 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
oprot.writeFieldBegin(IS_IMAGE_VERSION_USABLE_FIELD_DESC);
oprot.writeBool(struct.isImageVersionUsable);
oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasUsbAccess);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1814,7 +1903,10 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (struct.isSetIsImageVersionUsable()) {
optionals.set(15);
}
- oprot.writeBitSet(optionals, 16);
+ if (struct.isSetHasUsbAccess()) {
+ optionals.set(16);
+ }
+ oprot.writeBitSet(optionals, 17);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
@@ -1863,12 +1955,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (struct.isSetIsImageVersionUsable()) {
oprot.writeBool(struct.isImageVersionUsable);
}
+ if (struct.isSetHasUsbAccess()) {
+ oprot.writeBool(struct.hasUsbAccess);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(16);
+ BitSet incoming = iprot.readBitSet(17);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -1935,6 +2030,10 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
struct.isImageVersionUsable = iprot.readBool();
struct.setIsImageVersionUsableIsSet(true);
}
+ if (incoming.get(16)) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
index 217e4f7..8635d41 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-13")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-02")
public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, LectureWrite._Fields>, java.io.Serializable, Cloneable, Comparable<LectureWrite> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite");
@@ -56,6 +56,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
private static final org.apache.thrift.protocol.TField LOCATION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("locationIds", org.apache.thrift.protocol.TType.LIST, (short)17);
private static final org.apache.thrift.protocol.TField LIMIT_TO_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToLocations", org.apache.thrift.protocol.TType.BOOL, (short)18);
private static final org.apache.thrift.protocol.TField LIMIT_TO_ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToAllowedUsers", org.apache.thrift.protocol.TType.BOOL, (short)19);
+ private static final org.apache.thrift.protocol.TField HAS_USB_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUsbAccess", org.apache.thrift.protocol.TType.BOOL, (short)20);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -81,6 +82,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
public List<Integer> locationIds; // required
public boolean limitToLocations; // required
public boolean limitToAllowedUsers; // required
+ public boolean hasUsbAccess; // 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 {
@@ -101,7 +103,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
REM_ALLOWED_USERS((short)16, "remAllowedUsers"),
LOCATION_IDS((short)17, "locationIds"),
LIMIT_TO_LOCATIONS((short)18, "limitToLocations"),
- LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers");
+ LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers"),
+ HAS_USB_ACCESS((short)20, "hasUsbAccess");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -152,6 +155,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return LIMIT_TO_LOCATIONS;
case 19: // LIMIT_TO_ALLOWED_USERS
return LIMIT_TO_ALLOWED_USERS;
+ case 20: // HAS_USB_ACCESS
+ return HAS_USB_ACCESS;
default:
return null;
}
@@ -200,7 +205,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
private static final int __HASINTERNETACCESS_ISSET_ID = 5;
private static final int __LIMITTOLOCATIONS_ISSET_ID = 6;
private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 7;
- private byte __isset_bitfield = 0;
+ private static final int __HASUSBACCESS_ISSET_ID = 8;
+ private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NETWORK_EXCEPTIONS,_Fields.ADD_ALLOWED_USERS,_Fields.REM_ALLOWED_USERS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
@@ -246,6 +252,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.LIMIT_TO_ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("limitToAllowedUsers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_USB_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasUsbAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureWrite.class, metaDataMap);
}
@@ -268,7 +276,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
LecturePermissions defaultPermissions,
List<Integer> locationIds,
boolean limitToLocations,
- boolean limitToAllowedUsers)
+ boolean limitToAllowedUsers,
+ boolean hasUsbAccess)
{
this();
this.lectureName = lectureName;
@@ -294,6 +303,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
setLimitToLocationsIsSet(true);
this.limitToAllowedUsers = limitToAllowedUsers;
setLimitToAllowedUsersIsSet(true);
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
}
/**
@@ -347,6 +358,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
this.limitToLocations = other.limitToLocations;
this.limitToAllowedUsers = other.limitToAllowedUsers;
+ this.hasUsbAccess = other.hasUsbAccess;
}
public LectureWrite deepCopy() {
@@ -381,6 +393,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
this.limitToLocations = false;
setLimitToAllowedUsersIsSet(false);
this.limitToAllowedUsers = false;
+ setHasUsbAccessIsSet(false);
+ this.hasUsbAccess = false;
}
public String getLectureName() {
@@ -882,6 +896,29 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
}
+ public boolean isHasUsbAccess() {
+ return this.hasUsbAccess;
+ }
+
+ public LectureWrite setHasUsbAccess(boolean hasUsbAccess) {
+ this.hasUsbAccess = hasUsbAccess;
+ setHasUsbAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasUsbAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasUsbAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ }
+
+ public void setHasUsbAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LECTURE_NAME:
@@ -1028,6 +1065,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
break;
+ case HAS_USB_ACCESS:
+ if (value == null) {
+ unsetHasUsbAccess();
+ } else {
+ setHasUsbAccess((Boolean)value);
+ }
+ break;
+
}
}
@@ -1087,6 +1132,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case LIMIT_TO_ALLOWED_USERS:
return isLimitToAllowedUsers();
+ case HAS_USB_ACCESS:
+ return isHasUsbAccess();
+
}
throw new IllegalStateException();
}
@@ -1134,6 +1182,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return isSetLimitToLocations();
case LIMIT_TO_ALLOWED_USERS:
return isSetLimitToAllowedUsers();
+ case HAS_USB_ACCESS:
+ return isSetHasUsbAccess();
}
throw new IllegalStateException();
}
@@ -1313,6 +1363,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return false;
}
+ boolean this_present_hasUsbAccess = true;
+ boolean that_present_hasUsbAccess = true;
+ if (this_present_hasUsbAccess || that_present_hasUsbAccess) {
+ if (!(this_present_hasUsbAccess && that_present_hasUsbAccess))
+ return false;
+ if (this.hasUsbAccess != that.hasUsbAccess)
+ return false;
+ }
+
return true;
}
@@ -1410,6 +1469,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (present_limitToAllowedUsers)
list.add(limitToAllowedUsers);
+ boolean present_hasUsbAccess = true;
+ list.add(present_hasUsbAccess);
+ if (present_hasUsbAccess)
+ list.add(hasUsbAccess);
+
return list.hashCode();
}
@@ -1601,6 +1665,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasUsbAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUsbAccess, other.hasUsbAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1738,6 +1812,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
sb.append("limitToAllowedUsers:");
sb.append(this.limitToAllowedUsers);
first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasUsbAccess:");
+ sb.append(this.hasUsbAccess);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -1982,6 +2060,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 20: // HAS_USB_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2112,6 +2198,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(LIMIT_TO_ALLOWED_USERS_FIELD_DESC);
oprot.writeBool(struct.limitToAllowedUsers);
oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasUsbAccess);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2184,7 +2273,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (struct.isSetLimitToAllowedUsers()) {
optionals.set(17);
}
- oprot.writeBitSet(optionals, 18);
+ if (struct.isSetHasUsbAccess()) {
+ optionals.set(18);
+ }
+ oprot.writeBitSet(optionals, 19);
if (struct.isSetLectureName()) {
oprot.writeString(struct.lectureName);
}
@@ -2269,12 +2361,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (struct.isSetLimitToAllowedUsers()) {
oprot.writeBool(struct.limitToAllowedUsers);
}
+ if (struct.isSetHasUsbAccess()) {
+ oprot.writeBool(struct.hasUsbAccess);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureWrite 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.lectureName = iprot.readString();
struct.setLectureNameIsSet(true);
@@ -2394,6 +2489,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
struct.limitToAllowedUsers = iprot.readBool();
struct.setLimitToAllowedUsersIsSet(true);
}
+ if (incoming.get(18)) {
+ struct.hasUsbAccess = iprot.readBool();
+ struct.setHasUsbAccessIsSet(true);
+ }
}
}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index b0d54bc..b0a7bb3 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -256,6 +256,7 @@ struct LectureWrite {
17: list<i32> locationIds,
18: bool limitToLocations,
19: bool limitToAllowedUsers,
+ 20: bool hasUsbAccess,
}
struct LectureSummary {
@@ -275,6 +276,7 @@ struct LectureSummary {
14: LecturePermissions defaultPermissions,
15: optional LecturePermissions userPermissions,
16: bool isImageVersionUsable, // Is the linked image version valid and enabled?
+ 17: bool hasUsbAccess,
}
struct LectureRead {
@@ -304,6 +306,7 @@ struct LectureRead {
25: list<i32> locationIds,
26: bool limitToLocations,
27: bool limitToAllowedUsers,
+ 28: bool hasUsbAccess,
}
struct MasterTag {