From 7675cf0b3f9e0cb7805a008684ba620aaa5b1fc1 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Fri, 21 Nov 2014 14:08:53 +0100 Subject: • Only allow permission changes for users who are authorized to do so --- .../src/main/java/server/ServerHandler.java | 26 + .../src/main/java/server/generated/Server.java | 2918 ++++++++++++++++---- dozentenmodulserver/src/main/java/sql/SQL.java | 52 + 3 files changed, 2483 insertions(+), 513 deletions(-) (limited to 'dozentenmodulserver/src/main/java') diff --git a/dozentenmodulserver/src/main/java/server/ServerHandler.java b/dozentenmodulserver/src/main/java/server/ServerHandler.java index 5579e0ca..a0809546 100644 --- a/dozentenmodulserver/src/main/java/server/ServerHandler.java +++ b/dozentenmodulserver/src/main/java/server/ServerHandler.java @@ -899,4 +899,30 @@ public class ServerHandler implements Server.Iface + @Override + public boolean userIsImageAdmin(String userID, String imageID) + throws TException { + + if(authenticated()) + { + return sql.userIsImageAdmin(userID,imageID); + } + return false; + + } + + + + @Override + public boolean userIsLectureAdmin(String userID, String lectureID) + throws TException { + if(authenticated()) + { + return sql.userIsLectureAdmin(userID,lectureID); + } + return false; + } + + + }// end class diff --git a/dozentenmodulserver/src/main/java/server/generated/Server.java b/dozentenmodulserver/src/main/java/server/generated/Server.java index b827546e..0b6092ad 100644 --- a/dozentenmodulserver/src/main/java/server/generated/Server.java +++ b/dozentenmodulserver/src/main/java/server/generated/Server.java @@ -124,6 +124,10 @@ public class Server { public String getOsNameForGuestOs(String guestOS) throws org.apache.thrift.TException; + public boolean userIsImageAdmin(String userID, String imageID) throws org.apache.thrift.TException; + + public boolean userIsLectureAdmin(String userID, String lectureID) throws org.apache.thrift.TException; + public String createRandomUUID() throws org.apache.thrift.TException; } @@ -218,6 +222,10 @@ public class Server { public void getOsNameForGuestOs(String guestOS, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void userIsImageAdmin(String userID, String imageID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void userIsLectureAdmin(String userID, String lectureID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void createRandomUUID(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -1339,6 +1347,54 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOsNameForGuestOs failed: unknown result"); } + public boolean userIsImageAdmin(String userID, String imageID) throws org.apache.thrift.TException + { + send_userIsImageAdmin(userID, imageID); + return recv_userIsImageAdmin(); + } + + public void send_userIsImageAdmin(String userID, String imageID) throws org.apache.thrift.TException + { + userIsImageAdmin_args args = new userIsImageAdmin_args(); + args.setUserID(userID); + args.setImageID(imageID); + sendBase("userIsImageAdmin", args); + } + + public boolean recv_userIsImageAdmin() throws org.apache.thrift.TException + { + userIsImageAdmin_result result = new userIsImageAdmin_result(); + receiveBase(result, "userIsImageAdmin"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userIsImageAdmin failed: unknown result"); + } + + public boolean userIsLectureAdmin(String userID, String lectureID) throws org.apache.thrift.TException + { + send_userIsLectureAdmin(userID, lectureID); + return recv_userIsLectureAdmin(); + } + + public void send_userIsLectureAdmin(String userID, String lectureID) throws org.apache.thrift.TException + { + userIsLectureAdmin_args args = new userIsLectureAdmin_args(); + args.setUserID(userID); + args.setLectureID(lectureID); + sendBase("userIsLectureAdmin", args); + } + + public boolean recv_userIsLectureAdmin() throws org.apache.thrift.TException + { + userIsLectureAdmin_result result = new userIsLectureAdmin_result(); + receiveBase(result, "userIsLectureAdmin"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userIsLectureAdmin failed: unknown result"); + } + public String createRandomUUID() throws org.apache.thrift.TException { send_createRandomUUID(); @@ -3078,6 +3134,76 @@ public class Server { } } + public void userIsImageAdmin(String userID, String imageID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + userIsImageAdmin_call method_call = new userIsImageAdmin_call(userID, imageID, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class userIsImageAdmin_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userID; + private String imageID; + public userIsImageAdmin_call(String userID, String imageID, 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.userID = userID; + this.imageID = imageID; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userIsImageAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0)); + userIsImageAdmin_args args = new userIsImageAdmin_args(); + args.setUserID(userID); + args.setImageID(imageID); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_userIsImageAdmin(); + } + } + + public void userIsLectureAdmin(String userID, String lectureID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + userIsLectureAdmin_call method_call = new userIsLectureAdmin_call(userID, lectureID, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class userIsLectureAdmin_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userID; + private String lectureID; + public userIsLectureAdmin_call(String userID, String lectureID, 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.userID = userID; + this.lectureID = lectureID; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userIsLectureAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0)); + userIsLectureAdmin_args args = new userIsLectureAdmin_args(); + args.setUserID(userID); + args.setLectureID(lectureID); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_userIsLectureAdmin(); + } + } + public void createRandomUUID(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); createRandomUUID_call method_call = new createRandomUUID_call(resultHandler, this, ___protocolFactory, ___transport); @@ -3164,6 +3290,8 @@ public class Server { processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions()); processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions()); processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs()); + processMap.put("userIsImageAdmin", new userIsImageAdmin()); + processMap.put("userIsLectureAdmin", new userIsLectureAdmin()); processMap.put("createRandomUUID", new createRandomUUID()); return processMap; } @@ -4064,6 +4192,48 @@ public class Server { } } + public static class userIsImageAdmin extends org.apache.thrift.ProcessFunction { + public userIsImageAdmin() { + super("userIsImageAdmin"); + } + + public userIsImageAdmin_args getEmptyArgsInstance() { + return new userIsImageAdmin_args(); + } + + protected boolean isOneway() { + return false; + } + + public userIsImageAdmin_result getResult(I iface, userIsImageAdmin_args args) throws org.apache.thrift.TException { + userIsImageAdmin_result result = new userIsImageAdmin_result(); + result.success = iface.userIsImageAdmin(args.userID, args.imageID); + result.setSuccessIsSet(true); + return result; + } + } + + public static class userIsLectureAdmin extends org.apache.thrift.ProcessFunction { + public userIsLectureAdmin() { + super("userIsLectureAdmin"); + } + + public userIsLectureAdmin_args getEmptyArgsInstance() { + return new userIsLectureAdmin_args(); + } + + protected boolean isOneway() { + return false; + } + + public userIsLectureAdmin_result getResult(I iface, userIsLectureAdmin_args args) throws org.apache.thrift.TException { + userIsLectureAdmin_result result = new userIsLectureAdmin_result(); + result.success = iface.userIsLectureAdmin(args.userID, args.lectureID); + result.setSuccessIsSet(true); + return result; + } + } + public static class createRandomUUID extends org.apache.thrift.ProcessFunction { public createRandomUUID() { super("createRandomUUID"); @@ -4141,6 +4311,8 @@ public class Server { processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions()); processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions()); processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs()); + processMap.put("userIsImageAdmin", new userIsImageAdmin()); + processMap.put("userIsLectureAdmin", new userIsLectureAdmin()); processMap.put("createRandomUUID", new createRandomUUID()); return processMap; } @@ -6401,21 +6573,22 @@ public class Server { } } - public static class createRandomUUID extends org.apache.thrift.AsyncProcessFunction { - public createRandomUUID() { - super("createRandomUUID"); + public static class userIsImageAdmin extends org.apache.thrift.AsyncProcessFunction { + public userIsImageAdmin() { + super("userIsImageAdmin"); } - public createRandomUUID_args getEmptyArgsInstance() { - return new createRandomUUID_args(); + public userIsImageAdmin_args getEmptyArgsInstance() { + return new userIsImageAdmin_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - createRandomUUID_result result = new createRandomUUID_result(); + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + userIsImageAdmin_result result = new userIsImageAdmin_result(); result.success = o; + result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -6427,7 +6600,7 @@ public class Server { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - createRandomUUID_result result = new createRandomUUID_result(); + userIsImageAdmin_result result = new userIsImageAdmin_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -6447,275 +6620,130 @@ public class Server { return false; } - public void start(I iface, createRandomUUID_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.createRandomUUID(resultHandler); - } - } - - } - - public static class getFtpUser_args 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("getFtpUser_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getFtpUser_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFtpUser_argsTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFtpUser_args.class, metaDataMap); - } - - public getFtpUser_args() { - } - - /** - * Performs a deep copy on other. - */ - public getFtpUser_args(getFtpUser_args other) { - } - - public getFtpUser_args deepCopy() { - return new getFtpUser_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { + public void start(I iface, userIsImageAdmin_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.userIsImageAdmin(args.userID, args.imageID,resultHandler); } } - public Object getFieldValue(_Fields field) { - switch (field) { + public static class userIsLectureAdmin extends org.apache.thrift.AsyncProcessFunction { + public userIsLectureAdmin() { + super("userIsLectureAdmin"); } - 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(); + public userIsLectureAdmin_args getEmptyArgsInstance() { + return new userIsLectureAdmin_args(); } - switch (field) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + userIsLectureAdmin_result result = new userIsLectureAdmin_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + userIsLectureAdmin_result result = new userIsLectureAdmin_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; } - throw new IllegalStateException(); - } - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getFtpUser_args) - return this.equals((getFtpUser_args)that); - return false; - } - - public boolean equals(getFtpUser_args that) { - if (that == null) + protected boolean isOneway() { return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getFtpUser_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); } - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getFtpUser_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + public void start(I iface, userIsLectureAdmin_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.userIsLectureAdmin(args.userID, args.lectureID,resultHandler); } } - 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); + public static class createRandomUUID extends org.apache.thrift.AsyncProcessFunction { + public createRandomUUID() { + super("createRandomUUID"); } - } - private static class getFtpUser_argsStandardSchemeFactory implements SchemeFactory { - public getFtpUser_argsStandardScheme getScheme() { - return new getFtpUser_argsStandardScheme(); + public createRandomUUID_args getEmptyArgsInstance() { + return new createRandomUUID_args(); } - } - private static class getFtpUser_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getFtpUser_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; + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + createRandomUUID_result result = new createRandomUUID_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createRandomUUID_result result = new createRandomUUID_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); } - 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, getFtpUser_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getFtpUser_argsTupleSchemeFactory implements SchemeFactory { - public getFtpUser_argsTupleScheme getScheme() { - return new getFtpUser_argsTupleScheme(); + }; } - } - - private static class getFtpUser_argsTupleScheme extends TupleScheme { - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + protected boolean isOneway() { + return false; } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + public void start(I iface, createRandomUUID_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createRandomUUID(resultHandler); } } } - public static class getFtpUser_result 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("getFtpUser_result"); + public static class getFtpUser_args 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("getFtpUser_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getFtpUser_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getFtpUser_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getFtpUser_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFtpUser_argsTupleSchemeFactory()); } - public User success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); +; private static final Map byName = new HashMap(); @@ -6730,8 +6758,256 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFtpUser_args.class, metaDataMap); + } + + public getFtpUser_args() { + } + + /** + * Performs a deep copy on other. + */ + public getFtpUser_args(getFtpUser_args other) { + } + + public getFtpUser_args deepCopy() { + return new getFtpUser_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getFtpUser_args) + return this.equals((getFtpUser_args)that); + return false; + } + + public boolean equals(getFtpUser_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getFtpUser_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getFtpUser_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getFtpUser_argsStandardSchemeFactory implements SchemeFactory { + public getFtpUser_argsStandardScheme getScheme() { + return new getFtpUser_argsStandardScheme(); + } + } + + private static class getFtpUser_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getFtpUser_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getFtpUser_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getFtpUser_argsTupleSchemeFactory implements SchemeFactory { + public getFtpUser_argsTupleScheme getScheme() { + return new getFtpUser_argsTupleScheme(); + } + } + + private static class getFtpUser_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getFtpUser_result 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("getFtpUser_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getFtpUser_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getFtpUser_resultTupleSchemeFactory()); + } + + public User success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -46503,111 +46779,1519 @@ public class Server { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", 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(deleteAllAdditionalLecturePermissions_args.class, metaDataMap); + } + + public deleteAllAdditionalLecturePermissions_args() { + } + + public deleteAllAdditionalLecturePermissions_args( + String lectureID, + String userID) + { + this(); + this.lectureID = lectureID; + this.userID = userID; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllAdditionalLecturePermissions_args(deleteAllAdditionalLecturePermissions_args other) { + if (other.isSetLectureID()) { + this.lectureID = other.lectureID; + } + if (other.isSetUserID()) { + this.userID = other.userID; + } + } + + public deleteAllAdditionalLecturePermissions_args deepCopy() { + return new deleteAllAdditionalLecturePermissions_args(this); + } + + @Override + public void clear() { + this.lectureID = null; + this.userID = null; + } + + public String getLectureID() { + return this.lectureID; + } + + public deleteAllAdditionalLecturePermissions_args setLectureID(String lectureID) { + this.lectureID = lectureID; + return this; + } + + public void unsetLectureID() { + this.lectureID = null; + } + + /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureID() { + return this.lectureID != null; + } + + public void setLectureIDIsSet(boolean value) { + if (!value) { + this.lectureID = null; + } + } + + public String getUserID() { + return this.userID; + } + + public deleteAllAdditionalLecturePermissions_args setUserID(String userID) { + this.userID = userID; + return this; + } + + public void unsetUserID() { + this.userID = null; + } + + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; + } + + public void setUserIDIsSet(boolean value) { + if (!value) { + this.userID = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LECTURE_ID: + if (value == null) { + unsetLectureID(); + } else { + setLectureID((String)value); + } + break; + + case USER_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LECTURE_ID: + return getLectureID(); + + case USER_ID: + return getUserID(); + + } + 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 LECTURE_ID: + return isSetLectureID(); + case USER_ID: + return isSetUserID(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllAdditionalLecturePermissions_args) + return this.equals((deleteAllAdditionalLecturePermissions_args)that); + return false; + } + + public boolean equals(deleteAllAdditionalLecturePermissions_args that) { + if (that == null) + return false; + + boolean this_present_lectureID = true && this.isSetLectureID(); + boolean that_present_lectureID = true && that.isSetLectureID(); + if (this_present_lectureID || that_present_lectureID) { + if (!(this_present_lectureID && that_present_lectureID)) + return false; + if (!this.lectureID.equals(that.lectureID)) + return false; + } + + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) + return false; + if (!this.userID.equals(that.userID)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteAllAdditionalLecturePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + 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("deleteAllAdditionalLecturePermissions_args("); + boolean first = true; + + sb.append("lectureID:"); + if (this.lectureID == null) { + sb.append("null"); + } else { + sb.append(this.lectureID); + } + first = false; + if (!first) sb.append(", "); + sb.append("userID:"); + if (this.userID == null) { + sb.append("null"); + } else { + sb.append(this.userID); + } + 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 deleteAllAdditionalLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { + public deleteAllAdditionalLecturePermissions_argsStandardScheme getScheme() { + return new deleteAllAdditionalLecturePermissions_argsStandardScheme(); + } + } + + private static class deleteAllAdditionalLecturePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_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: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureID = iprot.readString(); + struct.setLectureIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(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, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.lectureID != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureID); + oprot.writeFieldEnd(); + } + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllAdditionalLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { + public deleteAllAdditionalLecturePermissions_argsTupleScheme getScheme() { + return new deleteAllAdditionalLecturePermissions_argsTupleScheme(); + } + } + + private static class deleteAllAdditionalLecturePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLectureID()) { + optionals.set(0); + } + if (struct.isSetUserID()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetLectureID()) { + oprot.writeString(struct.lectureID); + } + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.lectureID = iprot.readString(); + struct.setLectureIDIsSet(true); + } + if (incoming.get(1)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + } + } + + } + + public static class deleteAllAdditionalLecturePermissions_result 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("deleteAllAdditionalLecturePermissions_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalLecturePermissions_result.class, metaDataMap); + } + + public deleteAllAdditionalLecturePermissions_result() { + } + + /** + * Performs a deep copy on other. + */ + public deleteAllAdditionalLecturePermissions_result(deleteAllAdditionalLecturePermissions_result other) { + } + + public deleteAllAdditionalLecturePermissions_result deepCopy() { + return new deleteAllAdditionalLecturePermissions_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllAdditionalLecturePermissions_result) + return this.equals((deleteAllAdditionalLecturePermissions_result)that); + return false; + } + + public boolean equals(deleteAllAdditionalLecturePermissions_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteAllAdditionalLecturePermissions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllAdditionalLecturePermissions_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { + public deleteAllAdditionalLecturePermissions_resultStandardScheme getScheme() { + return new deleteAllAdditionalLecturePermissions_resultStandardScheme(); + } + } + + private static class deleteAllAdditionalLecturePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_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) { + 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, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { + public deleteAllAdditionalLecturePermissions_resultTupleScheme getScheme() { + return new deleteAllAdditionalLecturePermissions_resultTupleScheme(); + } + } + + private static class deleteAllAdditionalLecturePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getOsNameForGuestOs_args 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("getOsNameForGuestOs_args"); + + private static final org.apache.thrift.protocol.TField GUEST_OS_FIELD_DESC = new org.apache.thrift.protocol.TField("guestOS", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getOsNameForGuestOs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getOsNameForGuestOs_argsTupleSchemeFactory()); + } + + public String guestOS; // 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 { + GUEST_OS((short)1, "guestOS"); + + private static final Map byName = new HashMap(); + + 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: // GUEST_OS + return GUEST_OS; + 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.GUEST_OS, new org.apache.thrift.meta_data.FieldMetaData("guestOS", 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(getOsNameForGuestOs_args.class, metaDataMap); + } + + public getOsNameForGuestOs_args() { + } + + public getOsNameForGuestOs_args( + String guestOS) + { + this(); + this.guestOS = guestOS; + } + + /** + * Performs a deep copy on other. + */ + public getOsNameForGuestOs_args(getOsNameForGuestOs_args other) { + if (other.isSetGuestOS()) { + this.guestOS = other.guestOS; + } + } + + public getOsNameForGuestOs_args deepCopy() { + return new getOsNameForGuestOs_args(this); + } + + @Override + public void clear() { + this.guestOS = null; + } + + public String getGuestOS() { + return this.guestOS; + } + + public getOsNameForGuestOs_args setGuestOS(String guestOS) { + this.guestOS = guestOS; + return this; + } + + public void unsetGuestOS() { + this.guestOS = null; + } + + /** Returns true if field guestOS is set (has been assigned a value) and false otherwise */ + public boolean isSetGuestOS() { + return this.guestOS != null; + } + + public void setGuestOSIsSet(boolean value) { + if (!value) { + this.guestOS = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case GUEST_OS: + if (value == null) { + unsetGuestOS(); + } else { + setGuestOS((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case GUEST_OS: + return getGuestOS(); + + } + 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 GUEST_OS: + return isSetGuestOS(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getOsNameForGuestOs_args) + return this.equals((getOsNameForGuestOs_args)that); + return false; + } + + public boolean equals(getOsNameForGuestOs_args that) { + if (that == null) + return false; + + boolean this_present_guestOS = true && this.isSetGuestOS(); + boolean that_present_guestOS = true && that.isSetGuestOS(); + if (this_present_guestOS || that_present_guestOS) { + if (!(this_present_guestOS && that_present_guestOS)) + return false; + if (!this.guestOS.equals(that.guestOS)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getOsNameForGuestOs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetGuestOS()).compareTo(other.isSetGuestOS()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGuestOS()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guestOS, other.guestOS); + 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("getOsNameForGuestOs_args("); + boolean first = true; + + sb.append("guestOS:"); + if (this.guestOS == null) { + sb.append("null"); + } else { + sb.append(this.guestOS); + } + 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 getOsNameForGuestOs_argsStandardSchemeFactory implements SchemeFactory { + public getOsNameForGuestOs_argsStandardScheme getScheme() { + return new getOsNameForGuestOs_argsStandardScheme(); + } + } + + private static class getOsNameForGuestOs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_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: // GUEST_OS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.guestOS = iprot.readString(); + struct.setGuestOSIsSet(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, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.guestOS != null) { + oprot.writeFieldBegin(GUEST_OS_FIELD_DESC); + oprot.writeString(struct.guestOS); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getOsNameForGuestOs_argsTupleSchemeFactory implements SchemeFactory { + public getOsNameForGuestOs_argsTupleScheme getScheme() { + return new getOsNameForGuestOs_argsTupleScheme(); + } + } + + private static class getOsNameForGuestOs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetGuestOS()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetGuestOS()) { + oprot.writeString(struct.guestOS); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.guestOS = iprot.readString(); + struct.setGuestOSIsSet(true); + } + } + } + + } + + public static class getOsNameForGuestOs_result 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("getOsNameForGuestOs_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getOsNameForGuestOs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getOsNameForGuestOs_resultTupleSchemeFactory()); + } + + public String success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOsNameForGuestOs_result.class, metaDataMap); + } + + public getOsNameForGuestOs_result() { + } + + public getOsNameForGuestOs_result( + String success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getOsNameForGuestOs_result(getOsNameForGuestOs_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + } + + public getOsNameForGuestOs_result deepCopy() { + return new getOsNameForGuestOs_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public String getSuccess() { + return this.success; + } + + public getOsNameForGuestOs_result setSuccess(String success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getOsNameForGuestOs_result) + return this.equals((getOsNameForGuestOs_result)that); + return false; + } + + public boolean equals(getOsNameForGuestOs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getOsNameForGuestOs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getOsNameForGuestOs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getOsNameForGuestOs_resultStandardSchemeFactory implements SchemeFactory { + public getOsNameForGuestOs_resultStandardScheme getScheme() { + return new getOsNameForGuestOs_resultStandardScheme(); + } + } + + private static class getOsNameForGuestOs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getOsNameForGuestOs_resultTupleSchemeFactory implements SchemeFactory { + public getOsNameForGuestOs_resultTupleScheme getScheme() { + return new getOsNameForGuestOs_resultTupleScheme(); + } + } + + private static class getOsNameForGuestOs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class userIsImageAdmin_args 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("userIsImageAdmin_args"); + + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageID", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new userIsImageAdmin_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new userIsImageAdmin_argsTupleSchemeFactory()); + } + + public String userID; // required + public String imageID; // 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_ID((short)1, "userID"), + IMAGE_ID((short)2, "imageID"); + + private static final Map byName = new HashMap(); + + 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_ID + return USER_ID; + case 2: // IMAGE_ID + return IMAGE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageID", 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(deleteAllAdditionalLecturePermissions_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsImageAdmin_args.class, metaDataMap); } - public deleteAllAdditionalLecturePermissions_args() { + public userIsImageAdmin_args() { } - public deleteAllAdditionalLecturePermissions_args( - String lectureID, - String userID) + public userIsImageAdmin_args( + String userID, + String imageID) { this(); - this.lectureID = lectureID; this.userID = userID; + this.imageID = imageID; } /** * Performs a deep copy on other. */ - public deleteAllAdditionalLecturePermissions_args(deleteAllAdditionalLecturePermissions_args other) { - if (other.isSetLectureID()) { - this.lectureID = other.lectureID; - } + public userIsImageAdmin_args(userIsImageAdmin_args other) { if (other.isSetUserID()) { this.userID = other.userID; } + if (other.isSetImageID()) { + this.imageID = other.imageID; + } } - public deleteAllAdditionalLecturePermissions_args deepCopy() { - return new deleteAllAdditionalLecturePermissions_args(this); + public userIsImageAdmin_args deepCopy() { + return new userIsImageAdmin_args(this); } @Override public void clear() { - this.lectureID = null; this.userID = null; + this.imageID = null; } - public String getLectureID() { - return this.lectureID; + public String getUserID() { + return this.userID; } - public deleteAllAdditionalLecturePermissions_args setLectureID(String lectureID) { - this.lectureID = lectureID; + public userIsImageAdmin_args setUserID(String userID) { + this.userID = userID; return this; } - public void unsetLectureID() { - this.lectureID = null; + public void unsetUserID() { + this.userID = null; } - /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */ - public boolean isSetLectureID() { - return this.lectureID != null; + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; } - public void setLectureIDIsSet(boolean value) { + public void setUserIDIsSet(boolean value) { if (!value) { - this.lectureID = null; + this.userID = null; } } - public String getUserID() { - return this.userID; + public String getImageID() { + return this.imageID; } - public deleteAllAdditionalLecturePermissions_args setUserID(String userID) { - this.userID = userID; + public userIsImageAdmin_args setImageID(String imageID) { + this.imageID = imageID; return this; } - public void unsetUserID() { - this.userID = null; + public void unsetImageID() { + this.imageID = null; } - /** Returns true if field userID is set (has been assigned a value) and false otherwise */ - public boolean isSetUserID() { - return this.userID != null; + /** Returns true if field imageID is set (has been assigned a value) and false otherwise */ + public boolean isSetImageID() { + return this.imageID != null; } - public void setUserIDIsSet(boolean value) { + public void setImageIDIsSet(boolean value) { if (!value) { - this.userID = null; + this.imageID = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case LECTURE_ID: + case USER_ID: if (value == null) { - unsetLectureID(); + unsetUserID(); } else { - setLectureID((String)value); + setUserID((String)value); } break; - case USER_ID: + case IMAGE_ID: if (value == null) { - unsetUserID(); + unsetImageID(); } else { - setUserID((String)value); + setImageID((String)value); } break; @@ -46616,12 +48300,12 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { - case LECTURE_ID: - return getLectureID(); - case USER_ID: return getUserID(); + case IMAGE_ID: + return getImageID(); + } throw new IllegalStateException(); } @@ -46633,10 +48317,10 @@ public class Server { } switch (field) { - case LECTURE_ID: - return isSetLectureID(); case USER_ID: return isSetUserID(); + case IMAGE_ID: + return isSetImageID(); } throw new IllegalStateException(); } @@ -46645,24 +48329,15 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteAllAdditionalLecturePermissions_args) - return this.equals((deleteAllAdditionalLecturePermissions_args)that); + if (that instanceof userIsImageAdmin_args) + return this.equals((userIsImageAdmin_args)that); return false; } - public boolean equals(deleteAllAdditionalLecturePermissions_args that) { + public boolean equals(userIsImageAdmin_args that) { if (that == null) return false; - boolean this_present_lectureID = true && this.isSetLectureID(); - boolean that_present_lectureID = true && that.isSetLectureID(); - if (this_present_lectureID || that_present_lectureID) { - if (!(this_present_lectureID && that_present_lectureID)) - return false; - if (!this.lectureID.equals(that.lectureID)) - return false; - } - boolean this_present_userID = true && this.isSetUserID(); boolean that_present_userID = true && that.isSetUserID(); if (this_present_userID || that_present_userID) { @@ -46672,6 +48347,15 @@ public class Server { return false; } + boolean this_present_imageID = true && this.isSetImageID(); + boolean that_present_imageID = true && that.isSetImageID(); + if (this_present_imageID || that_present_imageID) { + if (!(this_present_imageID && that_present_imageID)) + return false; + if (!this.imageID.equals(that.imageID)) + return false; + } + return true; } @@ -46681,29 +48365,29 @@ public class Server { } @Override - public int compareTo(deleteAllAdditionalLecturePermissions_args other) { + public int compareTo(userIsImageAdmin_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID()); + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); if (lastComparison != 0) { return lastComparison; } - if (isSetLectureID()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID); + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID()); if (lastComparison != 0) { return lastComparison; } - if (isSetUserID()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (isSetImageID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID); if (lastComparison != 0) { return lastComparison; } @@ -46725,22 +48409,22 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteAllAdditionalLecturePermissions_args("); + StringBuilder sb = new StringBuilder("userIsImageAdmin_args("); boolean first = true; - sb.append("lectureID:"); - if (this.lectureID == null) { + sb.append("userID:"); + if (this.userID == null) { sb.append("null"); } else { - sb.append(this.lectureID); + sb.append(this.userID); } first = false; if (!first) sb.append(", "); - sb.append("userID:"); - if (this.userID == null) { + sb.append("imageID:"); + if (this.imageID == null) { sb.append("null"); } else { - sb.append(this.userID); + sb.append(this.imageID); } first = false; sb.append(")"); @@ -46768,15 +48452,15 @@ public class Server { } } - private static class deleteAllAdditionalLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { - public deleteAllAdditionalLecturePermissions_argsStandardScheme getScheme() { - return new deleteAllAdditionalLecturePermissions_argsStandardScheme(); + private static class userIsImageAdmin_argsStandardSchemeFactory implements SchemeFactory { + public userIsImageAdmin_argsStandardScheme getScheme() { + return new userIsImageAdmin_argsStandardScheme(); } } - private static class deleteAllAdditionalLecturePermissions_argsStandardScheme extends StandardScheme { + private static class userIsImageAdmin_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, userIsImageAdmin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -46786,18 +48470,18 @@ public class Server { break; } switch (schemeField.id) { - case 1: // LECTURE_ID + case 1: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.lectureID = iprot.readString(); - struct.setLectureIDIsSet(true); + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // USER_ID + case 2: // IMAGE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userID = iprot.readString(); - struct.setUserIDIsSet(true); + struct.imageID = iprot.readString(); + struct.setImageIDIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -46813,84 +48497,86 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, userIsImageAdmin_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.lectureID != null) { - oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); - oprot.writeString(struct.lectureID); - oprot.writeFieldEnd(); - } if (struct.userID != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userID); oprot.writeFieldEnd(); } + if (struct.imageID != null) { + oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC); + oprot.writeString(struct.imageID); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class deleteAllAdditionalLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { - public deleteAllAdditionalLecturePermissions_argsTupleScheme getScheme() { - return new deleteAllAdditionalLecturePermissions_argsTupleScheme(); + private static class userIsImageAdmin_argsTupleSchemeFactory implements SchemeFactory { + public userIsImageAdmin_argsTupleScheme getScheme() { + return new userIsImageAdmin_argsTupleScheme(); } } - private static class deleteAllAdditionalLecturePermissions_argsTupleScheme extends TupleScheme { + private static class userIsImageAdmin_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetLectureID()) { + if (struct.isSetUserID()) { optionals.set(0); } - if (struct.isSetUserID()) { + if (struct.isSetImageID()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetLectureID()) { - oprot.writeString(struct.lectureID); - } if (struct.isSetUserID()) { oprot.writeString(struct.userID); } + if (struct.isSetImageID()) { + oprot.writeString(struct.imageID); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.lectureID = iprot.readString(); - struct.setLectureIDIsSet(true); - } - if (incoming.get(1)) { struct.userID = iprot.readString(); struct.setUserIDIsSet(true); } + if (incoming.get(1)) { + struct.imageID = iprot.readString(); + struct.setImageIDIsSet(true); + } } } } - public static class deleteAllAdditionalLecturePermissions_result 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("deleteAllAdditionalLecturePermissions_result"); + public static class userIsImageAdmin_result 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("userIsImageAdmin_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new userIsImageAdmin_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new userIsImageAdmin_resultTupleSchemeFactory()); } + public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -46905,6 +48591,8 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -46943,37 +48631,89 @@ public class Server { return _fieldName; } } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalLecturePermissions_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsImageAdmin_result.class, metaDataMap); } - public deleteAllAdditionalLecturePermissions_result() { + public userIsImageAdmin_result() { + } + + public userIsImageAdmin_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public deleteAllAdditionalLecturePermissions_result(deleteAllAdditionalLecturePermissions_result other) { + public userIsImageAdmin_result(userIsImageAdmin_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public deleteAllAdditionalLecturePermissions_result deepCopy() { - return new deleteAllAdditionalLecturePermissions_result(this); + public userIsImageAdmin_result deepCopy() { + return new userIsImageAdmin_result(this); } @Override public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public userIsImageAdmin_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + } throw new IllegalStateException(); } @@ -46985,6 +48725,8 @@ public class Server { } switch (field) { + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -46993,15 +48735,24 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteAllAdditionalLecturePermissions_result) - return this.equals((deleteAllAdditionalLecturePermissions_result)that); + if (that instanceof userIsImageAdmin_result) + return this.equals((userIsImageAdmin_result)that); return false; } - public boolean equals(deleteAllAdditionalLecturePermissions_result that) { + public boolean equals(userIsImageAdmin_result that) { if (that == null) return false; + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + return true; } @@ -47011,13 +48762,23 @@ public class Server { } @Override - public int compareTo(deleteAllAdditionalLecturePermissions_result other) { + public int compareTo(userIsImageAdmin_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -47035,9 +48796,12 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteAllAdditionalLecturePermissions_result("); + StringBuilder sb = new StringBuilder("userIsImageAdmin_result("); boolean first = true; + sb.append("success:"); + sb.append(this.success); + first = false; sb.append(")"); return sb.toString(); } @@ -47057,21 +48821,23 @@ public class Server { 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 deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { - public deleteAllAdditionalLecturePermissions_resultStandardScheme getScheme() { - return new deleteAllAdditionalLecturePermissions_resultStandardScheme(); + private static class userIsImageAdmin_resultStandardSchemeFactory implements SchemeFactory { + public userIsImageAdmin_resultStandardScheme getScheme() { + return new userIsImageAdmin_resultStandardScheme(); } } - private static class deleteAllAdditionalLecturePermissions_resultStandardScheme extends StandardScheme { + private static class userIsImageAdmin_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, userIsImageAdmin_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -47081,6 +48847,14 @@ public class Server { break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -47092,53 +48866,74 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, userIsImageAdmin_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { - public deleteAllAdditionalLecturePermissions_resultTupleScheme getScheme() { - return new deleteAllAdditionalLecturePermissions_resultTupleScheme(); + private static class userIsImageAdmin_resultTupleSchemeFactory implements SchemeFactory { + public userIsImageAdmin_resultTupleScheme getScheme() { + return new userIsImageAdmin_resultTupleScheme(); } } - private static class deleteAllAdditionalLecturePermissions_resultTupleScheme extends TupleScheme { + private static class userIsImageAdmin_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } } } } - public static class getOsNameForGuestOs_args 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("getOsNameForGuestOs_args"); + public static class userIsLectureAdmin_args 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("userIsLectureAdmin_args"); - private static final org.apache.thrift.protocol.TField GUEST_OS_FIELD_DESC = new org.apache.thrift.protocol.TField("guestOS", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); + 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)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getOsNameForGuestOs_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getOsNameForGuestOs_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new userIsLectureAdmin_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new userIsLectureAdmin_argsTupleSchemeFactory()); } - public String guestOS; // required + public String userID; // required + public String lectureID; // 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 { - GUEST_OS((short)1, "guestOS"); + USER_ID((short)1, "userID"), + LECTURE_ID((short)2, "lectureID"); private static final Map byName = new HashMap(); @@ -47153,8 +48948,10 @@ public class Server { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GUEST_OS - return GUEST_OS; + case 1: // USER_ID + return USER_ID; + case 2: // LECTURE_ID + return LECTURE_ID; default: return null; } @@ -47198,71 +48995,111 @@ public class Server { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.GUEST_OS, new org.apache.thrift.meta_data.FieldMetaData("guestOS", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", 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(getOsNameForGuestOs_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsLectureAdmin_args.class, metaDataMap); } - public getOsNameForGuestOs_args() { + public userIsLectureAdmin_args() { } - public getOsNameForGuestOs_args( - String guestOS) + public userIsLectureAdmin_args( + String userID, + String lectureID) { this(); - this.guestOS = guestOS; + this.userID = userID; + this.lectureID = lectureID; } /** * Performs a deep copy on other. */ - public getOsNameForGuestOs_args(getOsNameForGuestOs_args other) { - if (other.isSetGuestOS()) { - this.guestOS = other.guestOS; + public userIsLectureAdmin_args(userIsLectureAdmin_args other) { + if (other.isSetUserID()) { + this.userID = other.userID; + } + if (other.isSetLectureID()) { + this.lectureID = other.lectureID; } } - public getOsNameForGuestOs_args deepCopy() { - return new getOsNameForGuestOs_args(this); + public userIsLectureAdmin_args deepCopy() { + return new userIsLectureAdmin_args(this); } @Override public void clear() { - this.guestOS = null; + this.userID = null; + this.lectureID = null; } - public String getGuestOS() { - return this.guestOS; + public String getUserID() { + return this.userID; } - public getOsNameForGuestOs_args setGuestOS(String guestOS) { - this.guestOS = guestOS; + public userIsLectureAdmin_args setUserID(String userID) { + this.userID = userID; return this; } - public void unsetGuestOS() { - this.guestOS = null; + public void unsetUserID() { + this.userID = null; } - /** Returns true if field guestOS is set (has been assigned a value) and false otherwise */ - public boolean isSetGuestOS() { - return this.guestOS != null; + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; } - public void setGuestOSIsSet(boolean value) { + public void setUserIDIsSet(boolean value) { if (!value) { - this.guestOS = null; + this.userID = null; + } + } + + public String getLectureID() { + return this.lectureID; + } + + public userIsLectureAdmin_args setLectureID(String lectureID) { + this.lectureID = lectureID; + return this; + } + + public void unsetLectureID() { + this.lectureID = null; + } + + /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureID() { + return this.lectureID != null; + } + + public void setLectureIDIsSet(boolean value) { + if (!value) { + this.lectureID = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case GUEST_OS: + case USER_ID: if (value == null) { - unsetGuestOS(); + unsetUserID(); } else { - setGuestOS((String)value); + setUserID((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureID(); + } else { + setLectureID((String)value); } break; @@ -47271,8 +49108,11 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { - case GUEST_OS: - return getGuestOS(); + case USER_ID: + return getUserID(); + + case LECTURE_ID: + return getLectureID(); } throw new IllegalStateException(); @@ -47285,8 +49125,10 @@ public class Server { } switch (field) { - case GUEST_OS: - return isSetGuestOS(); + case USER_ID: + return isSetUserID(); + case LECTURE_ID: + return isSetLectureID(); } throw new IllegalStateException(); } @@ -47295,21 +49137,30 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getOsNameForGuestOs_args) - return this.equals((getOsNameForGuestOs_args)that); + if (that instanceof userIsLectureAdmin_args) + return this.equals((userIsLectureAdmin_args)that); return false; } - public boolean equals(getOsNameForGuestOs_args that) { + public boolean equals(userIsLectureAdmin_args that) { if (that == null) return false; - boolean this_present_guestOS = true && this.isSetGuestOS(); - boolean that_present_guestOS = true && that.isSetGuestOS(); - if (this_present_guestOS || that_present_guestOS) { - if (!(this_present_guestOS && that_present_guestOS)) + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) return false; - if (!this.guestOS.equals(that.guestOS)) + if (!this.userID.equals(that.userID)) + return false; + } + + boolean this_present_lectureID = true && this.isSetLectureID(); + boolean that_present_lectureID = true && that.isSetLectureID(); + if (this_present_lectureID || that_present_lectureID) { + if (!(this_present_lectureID && that_present_lectureID)) + return false; + if (!this.lectureID.equals(that.lectureID)) return false; } @@ -47322,19 +49173,29 @@ public class Server { } @Override - public int compareTo(getOsNameForGuestOs_args other) { + public int compareTo(userIsLectureAdmin_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetGuestOS()).compareTo(other.isSetGuestOS()); + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); if (lastComparison != 0) { return lastComparison; } - if (isSetGuestOS()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guestOS, other.guestOS); + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID); if (lastComparison != 0) { return lastComparison; } @@ -47356,14 +49217,22 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getOsNameForGuestOs_args("); + StringBuilder sb = new StringBuilder("userIsLectureAdmin_args("); boolean first = true; - sb.append("guestOS:"); - if (this.guestOS == null) { + sb.append("userID:"); + if (this.userID == null) { sb.append("null"); } else { - sb.append(this.guestOS); + sb.append(this.userID); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureID:"); + if (this.lectureID == null) { + sb.append("null"); + } else { + sb.append(this.lectureID); } first = false; sb.append(")"); @@ -47391,15 +49260,15 @@ public class Server { } } - private static class getOsNameForGuestOs_argsStandardSchemeFactory implements SchemeFactory { - public getOsNameForGuestOs_argsStandardScheme getScheme() { - return new getOsNameForGuestOs_argsStandardScheme(); + private static class userIsLectureAdmin_argsStandardSchemeFactory implements SchemeFactory { + public userIsLectureAdmin_argsStandardScheme getScheme() { + return new userIsLectureAdmin_argsStandardScheme(); } } - private static class getOsNameForGuestOs_argsStandardScheme extends StandardScheme { + private static class userIsLectureAdmin_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -47409,10 +49278,18 @@ public class Server { break; } switch (schemeField.id) { - case 1: // GUEST_OS + case 1: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.guestOS = iprot.readString(); - struct.setGuestOSIsSet(true); + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureID = iprot.readString(); + struct.setLectureIDIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -47428,13 +49305,18 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.guestOS != null) { - oprot.writeFieldBegin(GUEST_OS_FIELD_DESC); - oprot.writeString(struct.guestOS); + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } + if (struct.lectureID != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureID); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -47443,52 +49325,62 @@ public class Server { } - private static class getOsNameForGuestOs_argsTupleSchemeFactory implements SchemeFactory { - public getOsNameForGuestOs_argsTupleScheme getScheme() { - return new getOsNameForGuestOs_argsTupleScheme(); + private static class userIsLectureAdmin_argsTupleSchemeFactory implements SchemeFactory { + public userIsLectureAdmin_argsTupleScheme getScheme() { + return new userIsLectureAdmin_argsTupleScheme(); } } - private static class getOsNameForGuestOs_argsTupleScheme extends TupleScheme { + private static class userIsLectureAdmin_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetGuestOS()) { + if (struct.isSetUserID()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetGuestOS()) { - oprot.writeString(struct.guestOS); + if (struct.isSetLectureID()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + if (struct.isSetLectureID()) { + oprot.writeString(struct.lectureID); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.guestOS = iprot.readString(); - struct.setGuestOSIsSet(true); + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + if (incoming.get(1)) { + struct.lectureID = iprot.readString(); + struct.setLectureIDIsSet(true); } } } } - public static class getOsNameForGuestOs_result 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("getOsNameForGuestOs_result"); + public static class userIsLectureAdmin_result 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("userIsLectureAdmin_result"); - 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getOsNameForGuestOs_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getOsNameForGuestOs_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new userIsLectureAdmin_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new userIsLectureAdmin_resultTupleSchemeFactory()); } - public String success; // required + public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -47549,65 +49441,67 @@ public class Server { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOsNameForGuestOs_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsLectureAdmin_result.class, metaDataMap); } - public getOsNameForGuestOs_result() { + public userIsLectureAdmin_result() { } - public getOsNameForGuestOs_result( - String success) + public userIsLectureAdmin_result( + boolean success) { this(); this.success = success; + setSuccessIsSet(true); } /** * Performs a deep copy on other. */ - public getOsNameForGuestOs_result(getOsNameForGuestOs_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } + public userIsLectureAdmin_result(userIsLectureAdmin_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; } - public getOsNameForGuestOs_result deepCopy() { - return new getOsNameForGuestOs_result(this); + public userIsLectureAdmin_result deepCopy() { + return new userIsLectureAdmin_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; } - public String getSuccess() { + public boolean isSuccess() { return this.success; } - public getOsNameForGuestOs_result setSuccess(String success) { + public userIsLectureAdmin_result setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -47616,7 +49510,7 @@ public class Server { if (value == null) { unsetSuccess(); } else { - setSuccess((String)value); + setSuccess((Boolean)value); } break; @@ -47626,7 +49520,7 @@ public class Server { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); } throw new IllegalStateException(); @@ -47649,21 +49543,21 @@ public class Server { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getOsNameForGuestOs_result) - return this.equals((getOsNameForGuestOs_result)that); + if (that instanceof userIsLectureAdmin_result) + return this.equals((userIsLectureAdmin_result)that); return false; } - public boolean equals(getOsNameForGuestOs_result that) { + public boolean equals(userIsLectureAdmin_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -47676,7 +49570,7 @@ public class Server { } @Override - public int compareTo(getOsNameForGuestOs_result other) { + public int compareTo(userIsLectureAdmin_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -47710,15 +49604,11 @@ public class Server { @Override public String toString() { - StringBuilder sb = new StringBuilder("getOsNameForGuestOs_result("); + StringBuilder sb = new StringBuilder("userIsLectureAdmin_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; sb.append(")"); return sb.toString(); @@ -47739,21 +49629,23 @@ public class Server { 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 getOsNameForGuestOs_resultStandardSchemeFactory implements SchemeFactory { - public getOsNameForGuestOs_resultStandardScheme getScheme() { - return new getOsNameForGuestOs_resultStandardScheme(); + private static class userIsLectureAdmin_resultStandardSchemeFactory implements SchemeFactory { + public userIsLectureAdmin_resultStandardScheme getScheme() { + return new userIsLectureAdmin_resultStandardScheme(); } } - private static class getOsNameForGuestOs_resultStandardScheme extends StandardScheme { + private static class userIsLectureAdmin_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, userIsLectureAdmin_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -47764,8 +49656,8 @@ public class Server { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -47782,13 +49674,13 @@ public class Server { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, userIsLectureAdmin_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -47797,16 +49689,16 @@ public class Server { } - private static class getOsNameForGuestOs_resultTupleSchemeFactory implements SchemeFactory { - public getOsNameForGuestOs_resultTupleScheme getScheme() { - return new getOsNameForGuestOs_resultTupleScheme(); + private static class userIsLectureAdmin_resultTupleSchemeFactory implements SchemeFactory { + public userIsLectureAdmin_resultTupleScheme getScheme() { + return new userIsLectureAdmin_resultTupleScheme(); } } - private static class getOsNameForGuestOs_resultTupleScheme extends TupleScheme { + private static class userIsLectureAdmin_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -47814,16 +49706,16 @@ public class Server { } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { - oprot.writeString(struct.success); + oprot.writeBool(struct.success); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readString(); + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java index 455b1e6d..2d038732 100644 --- a/dozentenmodulserver/src/main/java/sql/SQL.java +++ b/dozentenmodulserver/src/main/java/sql/SQL.java @@ -2217,6 +2217,58 @@ public class SQL { { return UUID.randomUUID().toString(); } + + + + + public boolean userIsImageAdmin(String userID, String imageID) { + Connection con = getConnection(); + ResultSet rs = null; + String sql = "SELECT image_admin FROM bwLehrpool.pm_VLData_image WHERE userID= ? AND GUID_imageID=?"; + + try + { + PreparedStatement prest = con.prepareStatement(sql); + prest.setString(1, userID); + prest.setString(2, imageID); + rs = prest.executeQuery(); + con.commit(); + rs.next(); + + return rs.getBoolean("image_admin"); + + } catch (SQLException e) { + + e.printStackTrace(); + } + return false; + } + + + + + public boolean userIsLectureAdmin(String userID, String lectureID) { + Connection con = getConnection(); + ResultSet rs = null; + String sql = "SELECT rec_admin FROM bwLehrpool.pm_VLData_lecture WHERE userID= ? AND lectureID=?"; + + try + { + PreparedStatement prest = con.prepareStatement(sql); + prest.setString(1, userID); + prest.setString(2, lectureID); + rs = prest.executeQuery(); + con.commit(); + rs.next(); + + return rs.getBoolean("rec_admin"); + + } catch (SQLException e) { + + e.printStackTrace(); + } + return false; + } -- cgit v1.2.3-55-g7522