From d6b7e14f8cca315a45366bf8fc18633fb9cccdef Mon Sep 17 00:00:00 2001 From: Nino Breuer Date: Thu, 16 Oct 2014 21:01:06 +0200 Subject: - --- .../src/main/java/server/generated/Server.java | 1316 ++++++++++++++++---- 1 file changed, 1074 insertions(+), 242 deletions(-) (limited to 'dozentenmodulserver/src/main/java/server/generated') diff --git a/dozentenmodulserver/src/main/java/server/generated/Server.java b/dozentenmodulserver/src/main/java/server/generated/Server.java index 364331a5..db04dfa0 100644 --- a/dozentenmodulserver/src/main/java/server/generated/Server.java +++ b/dozentenmodulserver/src/main/java/server/generated/Server.java @@ -92,6 +92,8 @@ public class Server { public List getPermissionForUserAndImage(String userID, String imageID) throws org.apache.thrift.TException; + public void deleteAllAdditionalImagePermissions(String imageID, String userID) throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -152,6 +154,8 @@ public class Server { public void getPermissionForUserAndImage(String userID, String imageID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void deleteAllAdditionalImagePermissions(String imageID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -903,6 +907,27 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionForUserAndImage failed: unknown result"); } + public void deleteAllAdditionalImagePermissions(String imageID, String userID) throws org.apache.thrift.TException + { + send_deleteAllAdditionalImagePermissions(imageID, userID); + recv_deleteAllAdditionalImagePermissions(); + } + + public void send_deleteAllAdditionalImagePermissions(String imageID, String userID) throws org.apache.thrift.TException + { + deleteAllAdditionalImagePermissions_args args = new deleteAllAdditionalImagePermissions_args(); + args.setImageID(imageID); + args.setUserID(userID); + sendBase("deleteAllAdditionalImagePermissions", args); + } + + public void recv_deleteAllAdditionalImagePermissions() throws org.apache.thrift.TException + { + deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result(); + receiveBase(result, "deleteAllAdditionalImagePermissions"); + return; + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -2072,6 +2097,41 @@ public class Server { } } + public void deleteAllAdditionalImagePermissions(String imageID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteAllAdditionalImagePermissions_call method_call = new deleteAllAdditionalImagePermissions_call(imageID, userID, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteAllAdditionalImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String imageID; + private String userID; + public deleteAllAdditionalImagePermissions_call(String imageID, String userID, 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.imageID = imageID; + this.userID = userID; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllAdditionalImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteAllAdditionalImagePermissions_args args = new deleteAllAdditionalImagePermissions_args(); + args.setImageID(imageID); + args.setUserID(userID); + args.write(prot); + prot.writeMessageEnd(); + } + + public void 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); + (new Client(prot)).recv_deleteAllAdditionalImagePermissions(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -2113,6 +2173,7 @@ public class Server { processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers()); processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights()); processMap.put("getPermissionForUserAndImage", new getPermissionForUserAndImage()); + processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions()); return processMap; } @@ -2691,6 +2752,26 @@ public class Server { } } + public static class deleteAllAdditionalImagePermissions extends org.apache.thrift.ProcessFunction { + public deleteAllAdditionalImagePermissions() { + super("deleteAllAdditionalImagePermissions"); + } + + public deleteAllAdditionalImagePermissions_args getEmptyArgsInstance() { + return new deleteAllAdditionalImagePermissions_args(); + } + + protected boolean isOneway() { + return false; + } + + public deleteAllAdditionalImagePermissions_result getResult(I iface, deleteAllAdditionalImagePermissions_args args) throws org.apache.thrift.TException { + deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result(); + iface.deleteAllAdditionalImagePermissions(args.imageID, args.userID); + return result; + } + } + } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -2732,6 +2813,7 @@ public class Server { processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers()); processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights()); processMap.put("getPermissionForUserAndImage", new getPermissionForUserAndImage()); + processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions()); return processMap; } @@ -4178,270 +4260,72 @@ public class Server { } } - } - - 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 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()); + public static class deleteAllAdditionalImagePermissions extends org.apache.thrift.AsyncProcessFunction { + public deleteAllAdditionalImagePermissions() { + super("deleteAllAdditionalImagePermissions"); } - 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(); + public deleteAllAdditionalImagePermissions_args getEmptyArgsInstance() { + return new deleteAllAdditionalImagePermissions_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(Void o) { + deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); } - 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; + deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_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, deleteAllAdditionalImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteAllAdditionalImagePermissions(args.imageID, args.userID,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(); @@ -4456,8 +4340,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; } @@ -32955,4 +33087,704 @@ public class Server { } + public static class deleteAllAdditionalImagePermissions_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("deleteAllAdditionalImagePermissions_args"); + + 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)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)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllAdditionalImagePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllAdditionalImagePermissions_argsTupleSchemeFactory()); + } + + public String imageID; // required + public String userID; // 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 { + IMAGE_ID((short)1, "imageID"), + USER_ID((short)2, "userID"); + + 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: // IMAGE_ID + return IMAGE_ID; + case 2: // USER_ID + return USER_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.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))); + 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(deleteAllAdditionalImagePermissions_args.class, metaDataMap); + } + + public deleteAllAdditionalImagePermissions_args() { + } + + public deleteAllAdditionalImagePermissions_args( + String imageID, + String userID) + { + this(); + this.imageID = imageID; + this.userID = userID; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllAdditionalImagePermissions_args(deleteAllAdditionalImagePermissions_args other) { + if (other.isSetImageID()) { + this.imageID = other.imageID; + } + if (other.isSetUserID()) { + this.userID = other.userID; + } + } + + public deleteAllAdditionalImagePermissions_args deepCopy() { + return new deleteAllAdditionalImagePermissions_args(this); + } + + @Override + public void clear() { + this.imageID = null; + this.userID = null; + } + + public String getImageID() { + return this.imageID; + } + + public deleteAllAdditionalImagePermissions_args setImageID(String imageID) { + this.imageID = imageID; + return this; + } + + public void unsetImageID() { + this.imageID = 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 setImageIDIsSet(boolean value) { + if (!value) { + this.imageID = null; + } + } + + public String getUserID() { + return this.userID; + } + + public deleteAllAdditionalImagePermissions_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 IMAGE_ID: + if (value == null) { + unsetImageID(); + } else { + setImageID((String)value); + } + break; + + case USER_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGE_ID: + return getImageID(); + + 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 IMAGE_ID: + return isSetImageID(); + case USER_ID: + return isSetUserID(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllAdditionalImagePermissions_args) + return this.equals((deleteAllAdditionalImagePermissions_args)that); + return false; + } + + public boolean equals(deleteAllAdditionalImagePermissions_args that) { + if (that == null) + 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; + } + + 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(deleteAllAdditionalImagePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID); + 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("deleteAllAdditionalImagePermissions_args("); + boolean first = true; + + sb.append("imageID:"); + if (this.imageID == null) { + sb.append("null"); + } else { + sb.append(this.imageID); + } + 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 deleteAllAdditionalImagePermissions_argsStandardSchemeFactory implements SchemeFactory { + public deleteAllAdditionalImagePermissions_argsStandardScheme getScheme() { + return new deleteAllAdditionalImagePermissions_argsStandardScheme(); + } + } + + private static class deleteAllAdditionalImagePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalImagePermissions_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: // IMAGE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageID = iprot.readString(); + struct.setImageIDIsSet(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, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.imageID != null) { + oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC); + oprot.writeString(struct.imageID); + 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 deleteAllAdditionalImagePermissions_argsTupleSchemeFactory implements SchemeFactory { + public deleteAllAdditionalImagePermissions_argsTupleScheme getScheme() { + return new deleteAllAdditionalImagePermissions_argsTupleScheme(); + } + } + + private static class deleteAllAdditionalImagePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImageID()) { + optionals.set(0); + } + if (struct.isSetUserID()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetImageID()) { + oprot.writeString(struct.imageID); + } + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.imageID = iprot.readString(); + struct.setImageIDIsSet(true); + } + if (incoming.get(1)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + } + } + + } + + public static class deleteAllAdditionalImagePermissions_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("deleteAllAdditionalImagePermissions_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllAdditionalImagePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllAdditionalImagePermissions_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(deleteAllAdditionalImagePermissions_result.class, metaDataMap); + } + + public deleteAllAdditionalImagePermissions_result() { + } + + /** + * Performs a deep copy on other. + */ + public deleteAllAdditionalImagePermissions_result(deleteAllAdditionalImagePermissions_result other) { + } + + public deleteAllAdditionalImagePermissions_result deepCopy() { + return new deleteAllAdditionalImagePermissions_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 deleteAllAdditionalImagePermissions_result) + return this.equals((deleteAllAdditionalImagePermissions_result)that); + return false; + } + + public boolean equals(deleteAllAdditionalImagePermissions_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteAllAdditionalImagePermissions_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("deleteAllAdditionalImagePermissions_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 deleteAllAdditionalImagePermissions_resultStandardSchemeFactory implements SchemeFactory { + public deleteAllAdditionalImagePermissions_resultStandardScheme getScheme() { + return new deleteAllAdditionalImagePermissions_resultStandardScheme(); + } + } + + private static class deleteAllAdditionalImagePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalImagePermissions_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, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllAdditionalImagePermissions_resultTupleSchemeFactory implements SchemeFactory { + public deleteAllAdditionalImagePermissions_resultTupleScheme getScheme() { + return new deleteAllAdditionalImagePermissions_resultTupleScheme(); + } + } + + private static class deleteAllAdditionalImagePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + } -- cgit v1.2.3-55-g7522