From e496880dbb052324f1857a4084bca84ff1dc7aa0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 8 Dec 2018 16:20:13 +0100 Subject: Thrift: Add PresetRunScript --- .../org/openslx/bwlp/thrift/iface/LectureRead.java | 370 +++++++++++++------ .../openslx/bwlp/thrift/iface/LectureWrite.java | 402 ++++++++++++++------- .../openslx/bwlp/thrift/iface/PredefinedData.java | 241 +++++++++--- src/main/thrift/bwlp.thrift | 9 + 4 files changed, 751 insertions(+), 271 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 1075a49..a60e316 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 = "2018-06-13") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-08") public class LectureRead implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead"); @@ -67,6 +67,7 @@ public class LectureRead implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -103,6 +104,7 @@ public class LectureRead implements org.apache.thrift.TBase networkShares; // optional public List ldapFilters; // optional + public List presetScriptIds; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -134,7 +136,8 @@ public class LectureRead implements org.apache.thrift.TBase byName = new HashMap(); @@ -207,6 +210,8 @@ public class LectureRead implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -329,6 +334,9 @@ public class LectureRead implements org.apache.thrift.TBase __this__presetScriptIds = new ArrayList(other.presetScriptIds); + this.presetScriptIds = __this__presetScriptIds; + } } public LectureRead deepCopy() { @@ -537,6 +549,7 @@ public class LectureRead implements org.apache.thrift.TBase getPresetScriptIdsIterator() { + return (this.presetScriptIds == null) ? null : this.presetScriptIds.iterator(); + } + + public void addToPresetScriptIds(int elem) { + if (this.presetScriptIds == null) { + this.presetScriptIds = new ArrayList(); + } + this.presetScriptIds.add(elem); + } + + public List getPresetScriptIds() { + return this.presetScriptIds; + } + + public LectureRead setPresetScriptIds(List presetScriptIds) { + this.presetScriptIds = presetScriptIds; + return this; + } + + public void unsetPresetScriptIds() { + this.presetScriptIds = null; + } + + /** Returns true if field presetScriptIds is set (has been assigned a value) and false otherwise */ + public boolean isSetPresetScriptIds() { + return this.presetScriptIds != null; + } + + public void setPresetScriptIdsIsSet(boolean value) { + if (!value) { + this.presetScriptIds = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_ID: @@ -1546,6 +1598,14 @@ public class LectureRead implements org.apache.thrift.TBase)value); + } + break; + } } @@ -1638,6 +1698,9 @@ public class LectureRead implements org.apache.thrift.TBase(_list146.size); - String _elem147; - for (int _i148 = 0; _i148 < _list146.size; ++_i148) + org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(); + struct.nics = new ArrayList(_list186.size); + String _elem187; + for (int _i188 = 0; _i188 < _list186.size; ++_i188) { - _elem147 = iprot.readString(); - struct.nics.add(_elem147); + _elem187 = iprot.readString(); + struct.nics.add(_elem187); } iprot.readListEnd(); } @@ -2843,13 +2942,13 @@ public class LectureRead implements org.apache.thrift.TBase(_list149.size); - String _elem150; - for (int _i151 = 0; _i151 < _list149.size; ++_i151) + org.apache.thrift.protocol.TList _list189 = iprot.readListBegin(); + struct.allowedUsers = new ArrayList(_list189.size); + String _elem190; + for (int _i191 = 0; _i191 < _list189.size; ++_i191) { - _elem150 = iprot.readString(); - struct.allowedUsers.add(_elem150); + _elem190 = iprot.readString(); + struct.allowedUsers.add(_elem190); } iprot.readListEnd(); } @@ -2861,14 +2960,14 @@ public class LectureRead implements org.apache.thrift.TBase(_list152.size); - NetRule _elem153; - for (int _i154 = 0; _i154 < _list152.size; ++_i154) + org.apache.thrift.protocol.TList _list192 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList(_list192.size); + NetRule _elem193; + for (int _i194 = 0; _i194 < _list192.size; ++_i194) { - _elem153 = new NetRule(); - _elem153.read(iprot); - struct.networkExceptions.add(_elem153); + _elem193 = new NetRule(); + _elem193.read(iprot); + struct.networkExceptions.add(_elem193); } iprot.readListEnd(); } @@ -2914,13 +3013,13 @@ public class LectureRead implements org.apache.thrift.TBase(_list155.size); - int _elem156; - for (int _i157 = 0; _i157 < _list155.size; ++_i157) + org.apache.thrift.protocol.TList _list195 = iprot.readListBegin(); + struct.locationIds = new ArrayList(_list195.size); + int _elem196; + for (int _i197 = 0; _i197 < _list195.size; ++_i197) { - _elem156 = iprot.readI32(); - struct.locationIds.add(_elem156); + _elem196 = iprot.readI32(); + struct.locationIds.add(_elem196); } iprot.readListEnd(); } @@ -2956,14 +3055,14 @@ public class LectureRead implements org.apache.thrift.TBase(_list158.size); - NetShare _elem159; - for (int _i160 = 0; _i160 < _list158.size; ++_i160) + org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(); + struct.networkShares = new ArrayList(_list198.size); + NetShare _elem199; + for (int _i200 = 0; _i200 < _list198.size; ++_i200) { - _elem159 = new NetShare(); - _elem159.read(iprot); - struct.networkShares.add(_elem159); + _elem199 = new NetShare(); + _elem199.read(iprot); + struct.networkShares.add(_elem199); } iprot.readListEnd(); } @@ -2975,14 +3074,14 @@ public class LectureRead implements org.apache.thrift.TBase(_list161.size); - LdapFilter _elem162; - for (int _i163 = 0; _i163 < _list161.size; ++_i163) + org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(); + struct.ldapFilters = new ArrayList(_list201.size); + LdapFilter _elem202; + for (int _i203 = 0; _i203 < _list201.size; ++_i203) { - _elem162 = new LdapFilter(); - _elem162.read(iprot); - struct.ldapFilters.add(_elem162); + _elem202 = new LdapFilter(); + _elem202.read(iprot); + struct.ldapFilters.add(_elem202); } iprot.readListEnd(); } @@ -2991,6 +3090,24 @@ public class LectureRead implements org.apache.thrift.TBase(_list204.size); + int _elem205; + for (int _i206 = 0; _i206 < _list204.size; ++_i206) + { + _elem205 = iprot.readI32(); + struct.presetScriptIds.add(_elem205); + } + iprot.readListEnd(); + } + struct.setPresetScriptIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -3058,9 +3175,9 @@ public class LectureRead implements org.apache.thrift.TBase(_list176.size); - String _elem177; - for (int _i178 = 0; _i178 < _list176.size; ++_i178) + org.apache.thrift.protocol.TList _list221 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList(_list221.size); + String _elem222; + for (int _i223 = 0; _i223 < _list221.size; ++_i223) { - _elem177 = iprot.readString(); - struct.nics.add(_elem177); + _elem222 = iprot.readString(); + struct.nics.add(_elem222); } } struct.setNicsIsSet(true); } if (incoming.get(17)) { { - org.apache.thrift.protocol.TList _list179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.allowedUsers = new ArrayList(_list179.size); - String _elem180; - for (int _i181 = 0; _i181 < _list179.size; ++_i181) + org.apache.thrift.protocol.TList _list224 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.allowedUsers = new ArrayList(_list224.size); + String _elem225; + for (int _i226 = 0; _i226 < _list224.size; ++_i226) { - _elem180 = iprot.readString(); - struct.allowedUsers.add(_elem180); + _elem225 = iprot.readString(); + struct.allowedUsers.add(_elem225); } } struct.setAllowedUsersIsSet(true); } if (incoming.get(18)) { { - org.apache.thrift.protocol.TList _list182 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList(_list182.size); - NetRule _elem183; - for (int _i184 = 0; _i184 < _list182.size; ++_i184) + org.apache.thrift.protocol.TList _list227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList(_list227.size); + NetRule _elem228; + for (int _i229 = 0; _i229 < _list227.size; ++_i229) { - _elem183 = new NetRule(); - _elem183.read(iprot); - struct.networkExceptions.add(_elem183); + _elem228 = new NetRule(); + _elem228.read(iprot); + struct.networkExceptions.add(_elem228); } } struct.setNetworkExceptionsIsSet(true); @@ -3532,13 +3675,13 @@ public class LectureRead implements org.apache.thrift.TBase(_list185.size); - int _elem186; - for (int _i187 = 0; _i187 < _list185.size; ++_i187) + org.apache.thrift.protocol.TList _list230 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.locationIds = new ArrayList(_list230.size); + int _elem231; + for (int _i232 = 0; _i232 < _list230.size; ++_i232) { - _elem186 = iprot.readI32(); - struct.locationIds.add(_elem186); + _elem231 = iprot.readI32(); + struct.locationIds.add(_elem231); } } struct.setLocationIdsIsSet(true); @@ -3557,32 +3700,45 @@ public class LectureRead implements org.apache.thrift.TBase(_list188.size); - NetShare _elem189; - for (int _i190 = 0; _i190 < _list188.size; ++_i190) + org.apache.thrift.protocol.TList _list233 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkShares = new ArrayList(_list233.size); + NetShare _elem234; + for (int _i235 = 0; _i235 < _list233.size; ++_i235) { - _elem189 = new NetShare(); - _elem189.read(iprot); - struct.networkShares.add(_elem189); + _elem234 = new NetShare(); + _elem234.read(iprot); + struct.networkShares.add(_elem234); } } struct.setNetworkSharesIsSet(true); } if (incoming.get(28)) { { - org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.ldapFilters = new ArrayList(_list191.size); - LdapFilter _elem192; - for (int _i193 = 0; _i193 < _list191.size; ++_i193) + org.apache.thrift.protocol.TList _list236 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilters = new ArrayList(_list236.size); + LdapFilter _elem237; + for (int _i238 = 0; _i238 < _list236.size; ++_i238) { - _elem192 = new LdapFilter(); - _elem192.read(iprot); - struct.ldapFilters.add(_elem192); + _elem237 = new LdapFilter(); + _elem237.read(iprot); + struct.ldapFilters.add(_elem237); } } struct.setLdapFiltersIsSet(true); } + if (incoming.get(29)) { + { + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.presetScriptIds = new ArrayList(_list239.size); + int _elem240; + for (int _i241 = 0; _i241 < _list239.size; ++_i241) + { + _elem240 = iprot.readI32(); + struct.presetScriptIds.add(_elem240); + } + } + struct.setPresetScriptIdsIsSet(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 fc0f59d..dfdc415 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 = "2018-06-13") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-08") public class LectureWrite implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite"); @@ -59,6 +59,7 @@ public class LectureWrite implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -87,6 +88,7 @@ public class LectureWrite implements org.apache.thrift.TBase networkShares; // optional public List ldapFilters; // optional + public List presetScriptIds; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -110,7 +112,8 @@ public class LectureWrite implements org.apache.thrift.TBase byName = new HashMap(); @@ -167,6 +170,8 @@ public class LectureWrite implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -270,6 +275,9 @@ public class LectureWrite implements org.apache.thrift.TBase __this__presetScriptIds = new ArrayList(other.presetScriptIds); + this.presetScriptIds = __this__presetScriptIds; + } } public LectureWrite deepCopy() { @@ -427,6 +439,7 @@ public class LectureWrite implements org.apache.thrift.TBase getPresetScriptIdsIterator() { + return (this.presetScriptIds == null) ? null : this.presetScriptIds.iterator(); + } + + public void addToPresetScriptIds(int elem) { + if (this.presetScriptIds == null) { + this.presetScriptIds = new ArrayList(); + } + this.presetScriptIds.add(elem); + } + + public List getPresetScriptIds() { + return this.presetScriptIds; + } + + public LectureWrite setPresetScriptIds(List presetScriptIds) { + this.presetScriptIds = presetScriptIds; + return this; + } + + public void unsetPresetScriptIds() { + this.presetScriptIds = null; + } + + /** Returns true if field presetScriptIds is set (has been assigned a value) and false otherwise */ + public boolean isSetPresetScriptIds() { + return this.presetScriptIds != null; + } + + public void setPresetScriptIdsIsSet(boolean value) { + if (!value) { + this.presetScriptIds = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_NAME: @@ -1199,6 +1251,14 @@ public class LectureWrite implements org.apache.thrift.TBase)value); + } + break; + } } @@ -1267,6 +1327,9 @@ public class LectureWrite implements org.apache.thrift.TBase(_list90.size); - String _elem91; - for (int _i92 = 0; _i92 < _list90.size; ++_i92) + org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(); + struct.nics = new ArrayList(_list122.size); + String _elem123; + for (int _i124 = 0; _i124 < _list122.size; ++_i124) { - _elem91 = iprot.readString(); - struct.nics.add(_elem91); + _elem123 = iprot.readString(); + struct.nics.add(_elem123); } iprot.readListEnd(); } @@ -2153,14 +2252,14 @@ public class LectureWrite implements org.apache.thrift.TBase(_list93.size); - NetRule _elem94; - for (int _i95 = 0; _i95 < _list93.size; ++_i95) + org.apache.thrift.protocol.TList _list125 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList(_list125.size); + NetRule _elem126; + for (int _i127 = 0; _i127 < _list125.size; ++_i127) { - _elem94 = new NetRule(); - _elem94.read(iprot); - struct.networkExceptions.add(_elem94); + _elem126 = new NetRule(); + _elem126.read(iprot); + struct.networkExceptions.add(_elem126); } iprot.readListEnd(); } @@ -2197,13 +2296,13 @@ public class LectureWrite implements org.apache.thrift.TBase(_list96.size); - String _elem97; - for (int _i98 = 0; _i98 < _list96.size; ++_i98) + org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); + struct.addAllowedUsers = new ArrayList(_list128.size); + String _elem129; + for (int _i130 = 0; _i130 < _list128.size; ++_i130) { - _elem97 = iprot.readString(); - struct.addAllowedUsers.add(_elem97); + _elem129 = iprot.readString(); + struct.addAllowedUsers.add(_elem129); } iprot.readListEnd(); } @@ -2215,13 +2314,13 @@ public class LectureWrite implements org.apache.thrift.TBase(_list99.size); - String _elem100; - for (int _i101 = 0; _i101 < _list99.size; ++_i101) + org.apache.thrift.protocol.TList _list131 = iprot.readListBegin(); + struct.remAllowedUsers = new ArrayList(_list131.size); + String _elem132; + for (int _i133 = 0; _i133 < _list131.size; ++_i133) { - _elem100 = iprot.readString(); - struct.remAllowedUsers.add(_elem100); + _elem132 = iprot.readString(); + struct.remAllowedUsers.add(_elem132); } iprot.readListEnd(); } @@ -2233,13 +2332,13 @@ public class LectureWrite implements org.apache.thrift.TBase(_list102.size); - int _elem103; - for (int _i104 = 0; _i104 < _list102.size; ++_i104) + org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); + struct.locationIds = new ArrayList(_list134.size); + int _elem135; + for (int _i136 = 0; _i136 < _list134.size; ++_i136) { - _elem103 = iprot.readI32(); - struct.locationIds.add(_elem103); + _elem135 = iprot.readI32(); + struct.locationIds.add(_elem135); } iprot.readListEnd(); } @@ -2275,14 +2374,14 @@ public class LectureWrite implements org.apache.thrift.TBase(_list105.size); - NetShare _elem106; - for (int _i107 = 0; _i107 < _list105.size; ++_i107) + org.apache.thrift.protocol.TList _list137 = iprot.readListBegin(); + struct.networkShares = new ArrayList(_list137.size); + NetShare _elem138; + for (int _i139 = 0; _i139 < _list137.size; ++_i139) { - _elem106 = new NetShare(); - _elem106.read(iprot); - struct.networkShares.add(_elem106); + _elem138 = new NetShare(); + _elem138.read(iprot); + struct.networkShares.add(_elem138); } iprot.readListEnd(); } @@ -2294,14 +2393,14 @@ public class LectureWrite implements org.apache.thrift.TBase(_list108.size); - LdapFilter _elem109; - for (int _i110 = 0; _i110 < _list108.size; ++_i110) + org.apache.thrift.protocol.TList _list140 = iprot.readListBegin(); + struct.ldapFilters = new ArrayList(_list140.size); + LdapFilter _elem141; + for (int _i142 = 0; _i142 < _list140.size; ++_i142) { - _elem109 = new LdapFilter(); - _elem109.read(iprot); - struct.ldapFilters.add(_elem109); + _elem141 = new LdapFilter(); + _elem141.read(iprot); + struct.ldapFilters.add(_elem141); } iprot.readListEnd(); } @@ -2310,6 +2409,24 @@ public class LectureWrite implements org.apache.thrift.TBase(_list143.size); + int _elem144; + for (int _i145 = 0; _i145 < _list143.size; ++_i145) + { + _elem144 = iprot.readI32(); + struct.presetScriptIds.add(_elem144); + } + iprot.readListEnd(); + } + struct.setPresetScriptIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2361,9 +2478,9 @@ public class LectureWrite implements org.apache.thrift.TBase(_list125.size); - String _elem126; - for (int _i127 = 0; _i127 < _list125.size; ++_i127) + org.apache.thrift.protocol.TList _list162 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList(_list162.size); + String _elem163; + for (int _i164 = 0; _i164 < _list162.size; ++_i164) { - _elem126 = iprot.readString(); - struct.nics.add(_elem126); + _elem163 = iprot.readString(); + struct.nics.add(_elem163); } } struct.setNicsIsSet(true); } if (incoming.get(9)) { { - org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList(_list128.size); - NetRule _elem129; - for (int _i130 = 0; _i130 < _list128.size; ++_i130) + org.apache.thrift.protocol.TList _list165 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList(_list165.size); + NetRule _elem166; + for (int _i167 = 0; _i167 < _list165.size; ++_i167) { - _elem129 = new NetRule(); - _elem129.read(iprot); - struct.networkExceptions.add(_elem129); + _elem166 = new NetRule(); + _elem166.read(iprot); + struct.networkExceptions.add(_elem166); } } struct.setNetworkExceptionsIsSet(true); @@ -2738,39 +2881,39 @@ public class LectureWrite implements org.apache.thrift.TBase(_list131.size); - String _elem132; - for (int _i133 = 0; _i133 < _list131.size; ++_i133) + org.apache.thrift.protocol.TList _list168 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.addAllowedUsers = new ArrayList(_list168.size); + String _elem169; + for (int _i170 = 0; _i170 < _list168.size; ++_i170) { - _elem132 = iprot.readString(); - struct.addAllowedUsers.add(_elem132); + _elem169 = iprot.readString(); + struct.addAllowedUsers.add(_elem169); } } struct.setAddAllowedUsersIsSet(true); } if (incoming.get(14)) { { - org.apache.thrift.protocol.TList _list134 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.remAllowedUsers = new ArrayList(_list134.size); - String _elem135; - for (int _i136 = 0; _i136 < _list134.size; ++_i136) + org.apache.thrift.protocol.TList _list171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.remAllowedUsers = new ArrayList(_list171.size); + String _elem172; + for (int _i173 = 0; _i173 < _list171.size; ++_i173) { - _elem135 = iprot.readString(); - struct.remAllowedUsers.add(_elem135); + _elem172 = iprot.readString(); + struct.remAllowedUsers.add(_elem172); } } struct.setRemAllowedUsersIsSet(true); } if (incoming.get(15)) { { - org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); - struct.locationIds = new ArrayList(_list137.size); - int _elem138; - for (int _i139 = 0; _i139 < _list137.size; ++_i139) + org.apache.thrift.protocol.TList _list174 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.locationIds = new ArrayList(_list174.size); + int _elem175; + for (int _i176 = 0; _i176 < _list174.size; ++_i176) { - _elem138 = iprot.readI32(); - struct.locationIds.add(_elem138); + _elem175 = iprot.readI32(); + struct.locationIds.add(_elem175); } } struct.setLocationIdsIsSet(true); @@ -2789,32 +2932,45 @@ public class LectureWrite implements org.apache.thrift.TBase(_list140.size); - NetShare _elem141; - for (int _i142 = 0; _i142 < _list140.size; ++_i142) + org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkShares = new ArrayList(_list177.size); + NetShare _elem178; + for (int _i179 = 0; _i179 < _list177.size; ++_i179) { - _elem141 = new NetShare(); - _elem141.read(iprot); - struct.networkShares.add(_elem141); + _elem178 = new NetShare(); + _elem178.read(iprot); + struct.networkShares.add(_elem178); } } struct.setNetworkSharesIsSet(true); } if (incoming.get(20)) { { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.ldapFilters = new ArrayList(_list143.size); - LdapFilter _elem144; - for (int _i145 = 0; _i145 < _list143.size; ++_i145) + org.apache.thrift.protocol.TList _list180 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilters = new ArrayList(_list180.size); + LdapFilter _elem181; + for (int _i182 = 0; _i182 < _list180.size; ++_i182) { - _elem144 = new LdapFilter(); - _elem144.read(iprot); - struct.ldapFilters.add(_elem144); + _elem181 = new LdapFilter(); + _elem181.read(iprot); + struct.ldapFilters.add(_elem181); } } struct.setLdapFiltersIsSet(true); } + if (incoming.get(21)) { + { + org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.presetScriptIds = new ArrayList(_list183.size); + int _elem184; + for (int _i185 = 0; _i185 < _list183.size; ++_i185) + { + _elem184 = iprot.readI32(); + struct.presetScriptIds.add(_elem184); + } + } + struct.setPresetScriptIdsIsSet(true); + } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java index 67e2463..539fb0e 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java @@ -34,12 +34,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-08") public class PredefinedData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PredefinedData"); private static final org.apache.thrift.protocol.TField NET_SHARES_FIELD_DESC = new org.apache.thrift.protocol.TField("netShares", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField LDAP_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("ldapFilter", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField RUN_SCRIPTS_FIELD_DESC = new org.apache.thrift.protocol.TField("runScripts", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -49,11 +50,13 @@ public class PredefinedData implements org.apache.thrift.TBase netShares; // required public List ldapFilter; // required + public List runScripts; // 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 { NET_SHARES((short)1, "netShares"), - LDAP_FILTER((short)2, "ldapFilter"); + LDAP_FILTER((short)2, "ldapFilter"), + RUN_SCRIPTS((short)3, "runScripts"); private static final Map byName = new HashMap(); @@ -72,6 +75,8 @@ public class PredefinedData implements org.apache.thrift.TBase netShares, - List ldapFilter) + List ldapFilter, + List runScripts) { this(); this.netShares = netShares; this.ldapFilter = ldapFilter; + this.runScripts = runScripts; } /** @@ -155,6 +165,13 @@ public class PredefinedData implements org.apache.thrift.TBase __this__runScripts = new ArrayList(other.runScripts.size()); + for (PresetRunScript other_element : other.runScripts) { + __this__runScripts.add(new PresetRunScript(other_element)); + } + this.runScripts = __this__runScripts; + } } public PredefinedData deepCopy() { @@ -165,6 +182,7 @@ public class PredefinedData implements org.apache.thrift.TBase getRunScriptsIterator() { + return (this.runScripts == null) ? null : this.runScripts.iterator(); + } + + public void addToRunScripts(PresetRunScript elem) { + if (this.runScripts == null) { + this.runScripts = new ArrayList(); + } + this.runScripts.add(elem); + } + + public List getRunScripts() { + return this.runScripts; + } + + public PredefinedData setRunScripts(List runScripts) { + this.runScripts = runScripts; + return this; + } + + public void unsetRunScripts() { + this.runScripts = null; + } + + /** Returns true if field runScripts is set (has been assigned a value) and false otherwise */ + public boolean isSetRunScripts() { + return this.runScripts != null; + } + + public void setRunScriptsIsSet(boolean value) { + if (!value) { + this.runScripts = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NET_SHARES: @@ -263,6 +320,14 @@ public class PredefinedData implements org.apache.thrift.TBase)value); + } + break; + } } @@ -274,6 +339,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list90.size); - NetShare _elem91; - for (int _i92 = 0; _i92 < _list90.size; ++_i92) + org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); + struct.netShares = new ArrayList(_list98.size); + NetShare _elem99; + for (int _i100 = 0; _i100 < _list98.size; ++_i100) { - _elem91 = new NetShare(); - _elem91.read(iprot); - struct.netShares.add(_elem91); + _elem99 = new NetShare(); + _elem99.read(iprot); + struct.netShares.add(_elem99); } iprot.readListEnd(); } @@ -472,14 +574,14 @@ public class PredefinedData implements org.apache.thrift.TBase(_list93.size); - LdapFilter _elem94; - for (int _i95 = 0; _i95 < _list93.size; ++_i95) + org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(); + struct.ldapFilter = new ArrayList(_list101.size); + LdapFilter _elem102; + for (int _i103 = 0; _i103 < _list101.size; ++_i103) { - _elem94 = new LdapFilter(); - _elem94.read(iprot); - struct.ldapFilter.add(_elem94); + _elem102 = new LdapFilter(); + _elem102.read(iprot); + struct.ldapFilter.add(_elem102); } iprot.readListEnd(); } @@ -488,6 +590,25 @@ public class PredefinedData implements org.apache.thrift.TBase(_list104.size); + PresetRunScript _elem105; + for (int _i106 = 0; _i106 < _list104.size; ++_i106) + { + _elem105 = new PresetRunScript(); + _elem105.read(iprot); + struct.runScripts.add(_elem105); + } + iprot.readListEnd(); + } + struct.setRunScriptsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -507,9 +628,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list100.size); - NetShare _elem101; - for (int _i102 = 0; _i102 < _list100.size; ++_i102) + org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.netShares = new ArrayList(_list113.size); + NetShare _elem114; + for (int _i115 = 0; _i115 < _list113.size; ++_i115) { - _elem101 = new NetShare(); - _elem101.read(iprot); - struct.netShares.add(_elem101); + _elem114 = new NetShare(); + _elem114.read(iprot); + struct.netShares.add(_elem114); } } struct.setNetSharesIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.ldapFilter = new ArrayList(_list103.size); - LdapFilter _elem104; - for (int _i105 = 0; _i105 < _list103.size; ++_i105) + org.apache.thrift.protocol.TList _list116 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilter = new ArrayList(_list116.size); + LdapFilter _elem117; + for (int _i118 = 0; _i118 < _list116.size; ++_i118) { - _elem104 = new LdapFilter(); - _elem104.read(iprot); - struct.ldapFilter.add(_elem104); + _elem117 = new LdapFilter(); + _elem117.read(iprot); + struct.ldapFilter.add(_elem117); } } struct.setLdapFilterIsSet(true); } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.runScripts = new ArrayList(_list119.size); + PresetRunScript _elem120; + for (int _i121 = 0; _i121 < _list119.size; ++_i121) + { + _elem120 = new PresetRunScript(); + _elem120.read(iprot); + struct.runScripts.add(_elem120); + } + } + struct.setRunScriptsIsSet(true); + } } } diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index a9a7301..8b7af3f 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -261,9 +261,16 @@ struct LdapFilter { 4: optional string title, } +struct PresetRunScript { + 1: i32 scriptId, + 2: string displayname, + 3: list osIds, +} + struct PredefinedData { 1: list netShares, 2: list ldapFilter, + 3: list runScripts, } // Write lecture to sat. if optional fields are not set or null, their value stays unchanged @@ -289,6 +296,7 @@ struct LectureWrite { 20: bool hasUsbAccess, 21: optional list networkShares, 22: optional list ldapFilters, + 23: optional list presetScriptIds, } struct LectureSummary { @@ -341,6 +349,7 @@ struct LectureRead { 28: bool hasUsbAccess, 29: optional list networkShares, 30: optional list ldapFilters, + 31: optional list presetScriptIds, } struct MasterTag { -- cgit v1.2.3-55-g7522