summaryrefslogtreecommitdiffstats
path: root/Dozentenmodulserver/src
diff options
context:
space:
mode:
authorunknown2014-03-11 10:21:56 +0100
committerunknown2014-03-11 10:21:56 +0100
commit99538bd2cc35d2580dabdb4b16d68c5cce108e4d (patch)
tree43c2b680ba58ab49ff319ff5469cd3820535c207 /Dozentenmodulserver/src
parent-Suchfenster verbessert (diff)
downloadtutor-module-99538bd2cc35d2580dabdb4b16d68c5cce108e4d.tar.gz
tutor-module-99538bd2cc35d2580dabdb4b16d68c5cce108e4d.tar.xz
tutor-module-99538bd2cc35d2580dabdb4b16d68c5cce108e4d.zip
Es ist nun möglich die Metadaten eines Images über das Dozentenmodul zu updaten
Diffstat (limited to 'Dozentenmodulserver/src')
-rw-r--r--Dozentenmodulserver/src/server/Image.java45
-rw-r--r--Dozentenmodulserver/src/server/Server.java3175
-rw-r--r--Dozentenmodulserver/src/server/ServerHandler.java63
-rw-r--r--Dozentenmodulserver/src/server/User.java33
-rw-r--r--Dozentenmodulserver/src/sql/SQL.java44
5 files changed, 3272 insertions, 88 deletions
diff --git a/Dozentenmodulserver/src/server/Image.java b/Dozentenmodulserver/src/server/Image.java
index e142b86e..ec1a813f 100644
--- a/Dozentenmodulserver/src/server/Image.java
+++ b/Dozentenmodulserver/src/server/Image.java
@@ -5,20 +5,32 @@
* @generated
*/
package server;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
+
import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-@SuppressWarnings("serial")
public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, java.io.Serializable, Cloneable, Comparable<Image> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Image");
@@ -29,8 +41,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav
private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.STRING, (short)-5);
private static final org.apache.thrift.protocol.TField USER_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userData", org.apache.thrift.protocol.TType.STRING, (short)-6);
- @SuppressWarnings("rawtypes")
-private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ImageStandardSchemeFactory());
schemes.put(TupleScheme.class, new ImageTupleSchemeFactory());
@@ -588,13 +599,11 @@ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new
return _Fields.findByThriftId(fieldId);
}
- @SuppressWarnings("unchecked")
-public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- @SuppressWarnings("unchecked")
-public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -676,8 +685,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
}
private static class ImageStandardSchemeFactory implements SchemeFactory {
- @SuppressWarnings("unchecked")
- public ImageStandardScheme getScheme() {
+ public ImageStandardScheme getScheme() {
return new ImageStandardScheme();
}
}
@@ -794,8 +802,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
}
private static class ImageTupleSchemeFactory implements SchemeFactory {
- @SuppressWarnings("unchecked")
- public ImageTupleScheme getScheme() {
+ public ImageTupleScheme getScheme() {
return new ImageTupleScheme();
}
}
diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java
index a0342201..73ffb544 100644
--- a/Dozentenmodulserver/src/server/Server.java
+++ b/Dozentenmodulserver/src/server/Server.java
@@ -5,24 +5,29 @@
* @generated
*/
package server;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
+
import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,27 +53,39 @@ public class Server {
public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak) throws org.apache.thrift.TException;
+ public boolean startFileCopy(String file) throws org.apache.thrift.TException;
+
+ public Map<String,String> getImageData(String imagename) throws org.apache.thrift.TException;
+
+ public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException;
+
}
public interface AsyncIface {
- public void getFtpUser(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getFtpUser(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void DeleteFtpUser(String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getImages(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPathOfImage(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void DeleteFtpUser(String user, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getImages(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getPathOfImage(String name, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getAllOS(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void writeVLdata(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getPersonData(String Vorname, String Nachname, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getImageList(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getAllOS(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startFileCopy(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getPersonData(String Vorname, String Nachname, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageData(String imagename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
@@ -318,6 +335,80 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLecturedata failed: unknown result");
}
+ public boolean startFileCopy(String file) throws org.apache.thrift.TException
+ {
+ send_startFileCopy(file);
+ return recv_startFileCopy();
+ }
+
+ public void send_startFileCopy(String file) throws org.apache.thrift.TException
+ {
+ startFileCopy_args args = new startFileCopy_args();
+ args.setFile(file);
+ sendBase("startFileCopy", args);
+ }
+
+ public boolean recv_startFileCopy() throws org.apache.thrift.TException
+ {
+ startFileCopy_result result = new startFileCopy_result();
+ receiveBase(result, "startFileCopy");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startFileCopy failed: unknown result");
+ }
+
+ public Map<String,String> getImageData(String imagename) throws org.apache.thrift.TException
+ {
+ send_getImageData(imagename);
+ return recv_getImageData();
+ }
+
+ public void send_getImageData(String imagename) throws org.apache.thrift.TException
+ {
+ getImageData_args args = new getImageData_args();
+ args.setImagename(imagename);
+ sendBase("getImageData", args);
+ }
+
+ public Map<String,String> recv_getImageData() throws org.apache.thrift.TException
+ {
+ getImageData_result result = new getImageData_result();
+ receiveBase(result, "getImageData");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result");
+ }
+
+ public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException
+ {
+ send_updateImageData(name, newName, license, internet, ram, cpu);
+ return recv_updateImageData();
+ }
+
+ public void send_updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu) throws org.apache.thrift.TException
+ {
+ updateImageData_args args = new updateImageData_args();
+ args.setName(name);
+ args.setNewName(newName);
+ args.setLicense(license);
+ args.setInternet(internet);
+ args.setRam(ram);
+ args.setCpu(cpu);
+ sendBase("updateImageData", args);
+ }
+
+ public boolean recv_updateImageData() throws org.apache.thrift.TException
+ {
+ updateImageData_result result = new updateImageData_result();
+ receiveBase(result, "updateImageData");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageData failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -336,17 +427,15 @@ public class Server {
super(protocolFactory, clientManager, transport);
}
- public void getFtpUser(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getFtpUser(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getFtpUser_call method_call = new getFtpUser_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class getFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- @SuppressWarnings("unchecked")
- public getFtpUser_call(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 {
+ public static class getFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getFtpUser_call(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);
}
@@ -367,18 +456,16 @@ public class Server {
}
}
- public void DeleteFtpUser(String user, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void DeleteFtpUser(String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
DeleteFtpUser_call method_call = new DeleteFtpUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class DeleteFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class DeleteFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
private String user;
- @SuppressWarnings("unchecked")
- public DeleteFtpUser_call(String user, 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 {
+ public DeleteFtpUser_call(String user, 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.user = user;
}
@@ -401,17 +488,15 @@ public class Server {
}
}
- public void getImages(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getImages(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getImages_call method_call = new getImages_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class getImages_call extends org.apache.thrift.async.TAsyncMethodCall {
- @SuppressWarnings("unchecked")
- public getImages_call(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 {
+ public static class getImages_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getImages_call(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);
}
@@ -432,18 +517,16 @@ public class Server {
}
}
- public void getPathOfImage(String name, @SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getPathOfImage(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getPathOfImage_call method_call = new getPathOfImage_call(name, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class getPathOfImage_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getPathOfImage_call extends org.apache.thrift.async.TAsyncMethodCall {
private String name;
- @SuppressWarnings("unchecked")
- public getPathOfImage_call(String name, 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 {
+ public getPathOfImage_call(String name, 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.name = name;
}
@@ -473,8 +556,7 @@ public class Server {
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class writeVLdata_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class writeVLdata_call extends org.apache.thrift.async.TAsyncMethodCall {
private String imagename;
private String firstname;
private String lastname;
@@ -486,8 +568,7 @@ public class Server {
private boolean internet;
private long ram;
private long cpu;
- @SuppressWarnings("unchecked")
- public writeVLdata_call(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, 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 {
+ public writeVLdata_call(String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, 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.imagename = imagename;
this.firstname = firstname;
@@ -530,17 +611,15 @@ public class Server {
}
}
- public void getImageList(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getImageList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageList_call method_call = new getImageList_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- @SuppressWarnings("rawtypes")
- public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
- @SuppressWarnings("unchecked")
- public getImageList_call(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 {
+ public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getImageList_call(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);
}
@@ -561,7 +640,7 @@ public class Server {
}
}
- public void getAllOS(@SuppressWarnings("rawtypes") org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getAllOS(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllOS_call method_call = new getAllOS_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
@@ -693,6 +772,117 @@ public class Server {
}
}
+ public void startFileCopy(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ startFileCopy_call method_call = new startFileCopy_call(file, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startFileCopy_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String file;
+ public startFileCopy_call(String file, 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.file = file;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startFileCopy", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startFileCopy_args args = new startFileCopy_args();
+ args.setFile(file);
+ 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_startFileCopy();
+ }
+ }
+
+ public void getImageData(String imagename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImageData_call method_call = new getImageData_call(imagename, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String imagename;
+ public getImageData_call(String imagename, 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.imagename = imagename;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImageData_args args = new getImageData_args();
+ args.setImagename(imagename);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,String> 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_getImageData();
+ }
+ }
+
+ public void updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateImageData_call method_call = new updateImageData_call(name, newName, license, internet, ram, cpu, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String name;
+ private String newName;
+ private boolean license;
+ private boolean internet;
+ private long ram;
+ private long cpu;
+ public updateImageData_call(String name, String newName, boolean license, boolean internet, long ram, long cpu, 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.name = name;
+ this.newName = newName;
+ this.license = license;
+ this.internet = internet;
+ this.ram = ram;
+ this.cpu = cpu;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateImageData_args args = new updateImageData_args();
+ args.setName(name);
+ args.setNewName(newName);
+ args.setLicense(license);
+ args.setInternet(internet);
+ args.setRam(ram);
+ args.setCpu(cpu);
+ 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_updateImageData();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -715,6 +905,9 @@ public class Server {
processMap.put("getAllOS", new getAllOS());
processMap.put("getPersonData", new getPersonData());
processMap.put("writeLecturedata", new writeLecturedata());
+ processMap.put("startFileCopy", new startFileCopy());
+ processMap.put("getImageData", new getImageData());
+ processMap.put("updateImageData", new updateImageData());
return processMap;
}
@@ -901,6 +1094,68 @@ public class Server {
}
}
+ public static class startFileCopy<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startFileCopy_args> {
+ public startFileCopy() {
+ super("startFileCopy");
+ }
+
+ public startFileCopy_args getEmptyArgsInstance() {
+ return new startFileCopy_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startFileCopy_result getResult(I iface, startFileCopy_args args) throws org.apache.thrift.TException {
+ startFileCopy_result result = new startFileCopy_result();
+ result.success = iface.startFileCopy(args.file);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class getImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageData_args> {
+ public getImageData() {
+ super("getImageData");
+ }
+
+ public getImageData_args getEmptyArgsInstance() {
+ return new getImageData_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException {
+ getImageData_result result = new getImageData_result();
+ result.success = iface.getImageData(args.imagename);
+ return result;
+ }
+ }
+
+ public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> {
+ public updateImageData() {
+ super("updateImageData");
+ }
+
+ public updateImageData_args getEmptyArgsInstance() {
+ return new updateImageData_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException {
+ updateImageData_result result = new updateImageData_result();
+ result.success = iface.updateImageData(args.name, args.newName, args.license, args.internet, args.ram, args.cpu);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -923,6 +1178,9 @@ public class Server {
processMap.put("getAllOS", new getAllOS());
processMap.put("getPersonData", new getPersonData());
processMap.put("writeLecturedata", new writeLecturedata());
+ processMap.put("startFileCopy", new startFileCopy());
+ processMap.put("getImageData", new getImageData());
+ processMap.put("updateImageData", new updateImageData());
return processMap;
}
@@ -1388,6 +1646,161 @@ public class Server {
}
}
+ public static class startFileCopy<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startFileCopy_args, Boolean> {
+ public startFileCopy() {
+ super("startFileCopy");
+ }
+
+ public startFileCopy_args getEmptyArgsInstance() {
+ return new startFileCopy_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ startFileCopy_result result = new startFileCopy_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;
+ startFileCopy_result result = new startFileCopy_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();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, startFileCopy_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.startFileCopy(args.file,resultHandler);
+ }
+ }
+
+ public static class getImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageData_args, Map<String,String>> {
+ public getImageData() {
+ super("getImageData");
+ }
+
+ public getImageData_args getEmptyArgsInstance() {
+ return new getImageData_args();
+ }
+
+ public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Map<String,String>>() {
+ public void onComplete(Map<String,String> o) {
+ getImageData_result result = new getImageData_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();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getImageData_result result = new getImageData_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();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
+ iface.getImageData(args.imagename,resultHandler);
+ }
+ }
+
+ public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> {
+ public updateImageData() {
+ super("updateImageData");
+ }
+
+ public updateImageData_args getEmptyArgsInstance() {
+ return new updateImageData_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateImageData_result result = new updateImageData_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;
+ updateImageData_result result = new updateImageData_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();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateImageData(args.name, args.newName, args.license, args.internet, args.ram, args.cpu,resultHandler);
+ }
+ }
+
}
public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> {
@@ -9817,4 +10230,2660 @@ public class Server {
}
+ public static class startFileCopy_args implements org.apache.thrift.TBase<startFileCopy_args, startFileCopy_args._Fields>, java.io.Serializable, Cloneable, Comparable<startFileCopy_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startFileCopy_args");
+
+ private static final org.apache.thrift.protocol.TField FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("file", org.apache.thrift.protocol.TType.STRING, (short)-1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startFileCopy_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startFileCopy_argsTupleSchemeFactory());
+ }
+
+ public String file; // 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 {
+ FILE((short)-1, "file");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case -1: // FILE
+ return FILE;
+ 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.FILE, new org.apache.thrift.meta_data.FieldMetaData("file", 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(startFileCopy_args.class, metaDataMap);
+ }
+
+ public startFileCopy_args() {
+ }
+
+ public startFileCopy_args(
+ String file)
+ {
+ this();
+ this.file = file;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startFileCopy_args(startFileCopy_args other) {
+ if (other.isSetFile()) {
+ this.file = other.file;
+ }
+ }
+
+ public startFileCopy_args deepCopy() {
+ return new startFileCopy_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.file = null;
+ }
+
+ public String getFile() {
+ return this.file;
+ }
+
+ public startFileCopy_args setFile(String file) {
+ this.file = file;
+ return this;
+ }
+
+ public void unsetFile() {
+ this.file = null;
+ }
+
+ /** Returns true if field file is set (has been assigned a value) and false otherwise */
+ public boolean isSetFile() {
+ return this.file != null;
+ }
+
+ public void setFileIsSet(boolean value) {
+ if (!value) {
+ this.file = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FILE:
+ if (value == null) {
+ unsetFile();
+ } else {
+ setFile((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FILE:
+ return getFile();
+
+ }
+ 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 FILE:
+ return isSetFile();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startFileCopy_args)
+ return this.equals((startFileCopy_args)that);
+ return false;
+ }
+
+ public boolean equals(startFileCopy_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_file = true && this.isSetFile();
+ boolean that_present_file = true && that.isSetFile();
+ if (this_present_file || that_present_file) {
+ if (!(this_present_file && that_present_file))
+ return false;
+ if (!this.file.equals(that.file))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startFileCopy_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetFile()).compareTo(other.isSetFile());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFile()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file, other.file);
+ 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("startFileCopy_args(");
+ boolean first = true;
+
+ sb.append("file:");
+ if (this.file == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.file);
+ }
+ 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 startFileCopy_argsStandardSchemeFactory implements SchemeFactory {
+ public startFileCopy_argsStandardScheme getScheme() {
+ return new startFileCopy_argsStandardScheme();
+ }
+ }
+
+ private static class startFileCopy_argsStandardScheme extends StandardScheme<startFileCopy_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startFileCopy_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: // FILE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.file = iprot.readString();
+ struct.setFileIsSet(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, startFileCopy_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.file != null) {
+ oprot.writeFieldBegin(FILE_FIELD_DESC);
+ oprot.writeString(struct.file);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startFileCopy_argsTupleSchemeFactory implements SchemeFactory {
+ public startFileCopy_argsTupleScheme getScheme() {
+ return new startFileCopy_argsTupleScheme();
+ }
+ }
+
+ private static class startFileCopy_argsTupleScheme extends TupleScheme<startFileCopy_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startFileCopy_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetFile()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetFile()) {
+ oprot.writeString(struct.file);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startFileCopy_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.file = iprot.readString();
+ struct.setFileIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class startFileCopy_result implements org.apache.thrift.TBase<startFileCopy_result, startFileCopy_result._Fields>, java.io.Serializable, Cloneable, Comparable<startFileCopy_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startFileCopy_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startFileCopy_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startFileCopy_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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 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
+ 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(startFileCopy_result.class, metaDataMap);
+ }
+
+ public startFileCopy_result() {
+ }
+
+ public startFileCopy_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startFileCopy_result(startFileCopy_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public startFileCopy_result deepCopy() {
+ return new startFileCopy_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public startFileCopy_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();
+ }
+
+ /** 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 startFileCopy_result)
+ return this.equals((startFileCopy_result)that);
+ return false;
+ }
+
+ public boolean equals(startFileCopy_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;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startFileCopy_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("startFileCopy_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ 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 {
+ // 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 startFileCopy_resultStandardSchemeFactory implements SchemeFactory {
+ public startFileCopy_resultStandardScheme getScheme() {
+ return new startFileCopy_resultStandardScheme();
+ }
+ }
+
+ private static class startFileCopy_resultStandardScheme extends StandardScheme<startFileCopy_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startFileCopy_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.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);
+ }
+ 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, startFileCopy_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 startFileCopy_resultTupleSchemeFactory implements SchemeFactory {
+ public startFileCopy_resultTupleScheme getScheme() {
+ return new startFileCopy_resultTupleScheme();
+ }
+ }
+
+ private static class startFileCopy_resultTupleScheme extends TupleScheme<startFileCopy_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startFileCopy_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, startFileCopy_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 getImageData_args implements org.apache.thrift.TBase<getImageData_args, getImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_args");
+
+ private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)-1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageData_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageData_argsTupleSchemeFactory());
+ }
+
+ public String imagename; // 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 {
+ IMAGENAME((short)-1, "imagename");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case -1: // IMAGENAME
+ return IMAGENAME;
+ 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.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", 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(getImageData_args.class, metaDataMap);
+ }
+
+ public getImageData_args() {
+ }
+
+ public getImageData_args(
+ String imagename)
+ {
+ this();
+ this.imagename = imagename;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageData_args(getImageData_args other) {
+ if (other.isSetImagename()) {
+ this.imagename = other.imagename;
+ }
+ }
+
+ public getImageData_args deepCopy() {
+ return new getImageData_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.imagename = null;
+ }
+
+ public String getImagename() {
+ return this.imagename;
+ }
+
+ public getImageData_args setImagename(String imagename) {
+ this.imagename = imagename;
+ return this;
+ }
+
+ public void unsetImagename() {
+ this.imagename = null;
+ }
+
+ /** Returns true if field imagename is set (has been assigned a value) and false otherwise */
+ public boolean isSetImagename() {
+ return this.imagename != null;
+ }
+
+ public void setImagenameIsSet(boolean value) {
+ if (!value) {
+ this.imagename = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IMAGENAME:
+ if (value == null) {
+ unsetImagename();
+ } else {
+ setImagename((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IMAGENAME:
+ return getImagename();
+
+ }
+ 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 IMAGENAME:
+ return isSetImagename();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageData_args)
+ return this.equals((getImageData_args)that);
+ return false;
+ }
+
+ public boolean equals(getImageData_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_imagename = true && this.isSetImagename();
+ boolean that_present_imagename = true && that.isSetImagename();
+ if (this_present_imagename || that_present_imagename) {
+ if (!(this_present_imagename && that_present_imagename))
+ return false;
+ if (!this.imagename.equals(that.imagename))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImageData_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImagename()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename);
+ 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("getImageData_args(");
+ boolean first = true;
+
+ sb.append("imagename:");
+ if (this.imagename == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imagename);
+ }
+ 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 getImageData_argsStandardSchemeFactory implements SchemeFactory {
+ public getImageData_argsStandardScheme getScheme() {
+ return new getImageData_argsStandardScheme();
+ }
+ }
+
+ private static class getImageData_argsStandardScheme extends StandardScheme<getImageData_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_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: // IMAGENAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imagename = iprot.readString();
+ struct.setImagenameIsSet(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, getImageData_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imagename != null) {
+ oprot.writeFieldBegin(IMAGENAME_FIELD_DESC);
+ oprot.writeString(struct.imagename);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageData_argsTupleSchemeFactory implements SchemeFactory {
+ public getImageData_argsTupleScheme getScheme() {
+ return new getImageData_argsTupleScheme();
+ }
+ }
+
+ private static class getImageData_argsTupleScheme extends TupleScheme<getImageData_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetImagename()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetImagename()) {
+ oprot.writeString(struct.imagename);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.imagename = iprot.readString();
+ struct.setImagenameIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageData_result implements org.apache.thrift.TBase<getImageData_result, getImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageData_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageData_resultTupleSchemeFactory());
+ }
+
+ public Map<String,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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 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.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ 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.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_result.class, metaDataMap);
+ }
+
+ public getImageData_result() {
+ }
+
+ public getImageData_result(
+ Map<String,String> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageData_result(getImageData_result other) {
+ if (other.isSetSuccess()) {
+ Map<String,String> __this__success = new HashMap<String,String>(other.success);
+ this.success = __this__success;
+ }
+ }
+
+ public getImageData_result deepCopy() {
+ return new getImageData_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public void putToSuccess(String key, String val) {
+ if (this.success == null) {
+ this.success = new HashMap<String,String>();
+ }
+ this.success.put(key, val);
+ }
+
+ public Map<String,String> getSuccess() {
+ return this.success;
+ }
+
+ public getImageData_result setSuccess(Map<String,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((Map<String,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 getImageData_result)
+ return this.equals((getImageData_result)that);
+ return false;
+ }
+
+ public boolean equals(getImageData_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(getImageData_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("getImageData_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 getImageData_resultStandardSchemeFactory implements SchemeFactory {
+ public getImageData_resultStandardScheme getScheme() {
+ return new getImageData_resultStandardScheme();
+ }
+ }
+
+ private static class getImageData_resultStandardScheme extends StandardScheme<getImageData_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_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.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin();
+ struct.success = new HashMap<String,String>(2*_map34.size);
+ for (int _i35 = 0; _i35 < _map34.size; ++_i35)
+ {
+ String _key36;
+ String _val37;
+ _key36 = iprot.readString();
+ _val37 = iprot.readString();
+ struct.success.put(_key36, _val37);
+ }
+ iprot.readMapEnd();
+ }
+ 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, getImageData_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
+ for (Map.Entry<String, String> _iter38 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter38.getKey());
+ oprot.writeString(_iter38.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageData_resultTupleSchemeFactory implements SchemeFactory {
+ public getImageData_resultTupleScheme getScheme() {
+ return new getImageData_resultTupleScheme();
+ }
+ }
+
+ private static class getImageData_resultTupleScheme extends TupleScheme<getImageData_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_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.writeI32(struct.success.size());
+ for (Map.Entry<String, String> _iter39 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter39.getKey());
+ oprot.writeString(_iter39.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new HashMap<String,String>(2*_map40.size);
+ for (int _i41 = 0; _i41 < _map40.size; ++_i41)
+ {
+ String _key42;
+ String _val43;
+ _key42 = iprot.readString();
+ _val43 = iprot.readString();
+ struct.success.put(_key42, _val43);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageData_args implements org.apache.thrift.TBase<updateImageData_args, updateImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args");
+
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)-1);
+ private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)-2);
+ private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)-3);
+ private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)-4);
+ private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)-5);
+ private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)-6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageData_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageData_argsTupleSchemeFactory());
+ }
+
+ public String name; // required
+ public String newName; // required
+ public boolean license; // required
+ public boolean internet; // required
+ public long ram; // required
+ public long cpu; // 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 {
+ NAME((short)-1, "name"),
+ NEW_NAME((short)-2, "newName"),
+ LICENSE((short)-3, "license"),
+ INTERNET((short)-4, "internet"),
+ RAM((short)-5, "ram"),
+ CPU((short)-6, "cpu");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case -1: // NAME
+ return NAME;
+ case -2: // NEW_NAME
+ return NEW_NAME;
+ case -3: // LICENSE
+ return LICENSE;
+ case -4: // INTERNET
+ return INTERNET;
+ case -5: // RAM
+ return RAM;
+ case -6: // CPU
+ return CPU;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __LICENSE_ISSET_ID = 0;
+ private static final int __INTERNET_ISSET_ID = 1;
+ private static final int __RAM_ISSET_ID = 2;
+ private static final int __CPU_ISSET_ID = 3;
+ 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.INTERNET, new org.apache.thrift.meta_data.FieldMetaData("internet", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.RAM, new org.apache.thrift.meta_data.FieldMetaData("ram", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
+ tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_args.class, metaDataMap);
+ }
+
+ public updateImageData_args() {
+ }
+
+ public updateImageData_args(
+ String name,
+ String newName,
+ boolean license,
+ boolean internet,
+ long ram,
+ long cpu)
+ {
+ this();
+ this.name = name;
+ this.newName = newName;
+ this.license = license;
+ setLicenseIsSet(true);
+ this.internet = internet;
+ setInternetIsSet(true);
+ this.ram = ram;
+ setRamIsSet(true);
+ this.cpu = cpu;
+ setCpuIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageData_args(updateImageData_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetNewName()) {
+ this.newName = other.newName;
+ }
+ this.license = other.license;
+ this.internet = other.internet;
+ this.ram = other.ram;
+ this.cpu = other.cpu;
+ }
+
+ public updateImageData_args deepCopy() {
+ return new updateImageData_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.name = null;
+ this.newName = null;
+ setLicenseIsSet(false);
+ this.license = false;
+ setInternetIsSet(false);
+ this.internet = false;
+ setRamIsSet(false);
+ this.ram = 0;
+ setCpuIsSet(false);
+ this.cpu = 0;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public updateImageData_args setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getNewName() {
+ return this.newName;
+ }
+
+ public updateImageData_args setNewName(String newName) {
+ this.newName = newName;
+ return this;
+ }
+
+ public void unsetNewName() {
+ this.newName = null;
+ }
+
+ /** Returns true if field newName is set (has been assigned a value) and false otherwise */
+ public boolean isSetNewName() {
+ return this.newName != null;
+ }
+
+ public void setNewNameIsSet(boolean value) {
+ if (!value) {
+ this.newName = null;
+ }
+ }
+
+ public boolean isLicense() {
+ return this.license;
+ }
+
+ public updateImageData_args setLicense(boolean license) {
+ this.license = license;
+ setLicenseIsSet(true);
+ return this;
+ }
+
+ public void unsetLicense() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LICENSE_ISSET_ID);
+ }
+
+ /** Returns true if field license is set (has been assigned a value) and false otherwise */
+ public boolean isSetLicense() {
+ return EncodingUtils.testBit(__isset_bitfield, __LICENSE_ISSET_ID);
+ }
+
+ public void setLicenseIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LICENSE_ISSET_ID, value);
+ }
+
+ public boolean isInternet() {
+ return this.internet;
+ }
+
+ public updateImageData_args setInternet(boolean internet) {
+ this.internet = internet;
+ setInternetIsSet(true);
+ return this;
+ }
+
+ public void unsetInternet() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTERNET_ISSET_ID);
+ }
+
+ /** Returns true if field internet is set (has been assigned a value) and false otherwise */
+ public boolean isSetInternet() {
+ return EncodingUtils.testBit(__isset_bitfield, __INTERNET_ISSET_ID);
+ }
+
+ public void setInternetIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTERNET_ISSET_ID, value);
+ }
+
+ public long getRam() {
+ return this.ram;
+ }
+
+ public updateImageData_args setRam(long ram) {
+ this.ram = ram;
+ setRamIsSet(true);
+ return this;
+ }
+
+ public void unsetRam() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RAM_ISSET_ID);
+ }
+
+ /** Returns true if field ram is set (has been assigned a value) and false otherwise */
+ public boolean isSetRam() {
+ return EncodingUtils.testBit(__isset_bitfield, __RAM_ISSET_ID);
+ }
+
+ public void setRamIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RAM_ISSET_ID, value);
+ }
+
+ public long getCpu() {
+ return this.cpu;
+ }
+
+ public updateImageData_args setCpu(long cpu) {
+ this.cpu = cpu;
+ setCpuIsSet(true);
+ return this;
+ }
+
+ public void unsetCpu() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
+ }
+
+ /** Returns true if field cpu is set (has been assigned a value) and false otherwise */
+ public boolean isSetCpu() {
+ return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
+ }
+
+ public void setCpuIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case NEW_NAME:
+ if (value == null) {
+ unsetNewName();
+ } else {
+ setNewName((String)value);
+ }
+ break;
+
+ case LICENSE:
+ if (value == null) {
+ unsetLicense();
+ } else {
+ setLicense((Boolean)value);
+ }
+ break;
+
+ case INTERNET:
+ if (value == null) {
+ unsetInternet();
+ } else {
+ setInternet((Boolean)value);
+ }
+ break;
+
+ case RAM:
+ if (value == null) {
+ unsetRam();
+ } else {
+ setRam((Long)value);
+ }
+ break;
+
+ case CPU:
+ if (value == null) {
+ unsetCpu();
+ } else {
+ setCpu((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NAME:
+ return getName();
+
+ case NEW_NAME:
+ return getNewName();
+
+ case LICENSE:
+ return Boolean.valueOf(isLicense());
+
+ case INTERNET:
+ return Boolean.valueOf(isInternet());
+
+ case RAM:
+ return Long.valueOf(getRam());
+
+ case CPU:
+ return Long.valueOf(getCpu());
+
+ }
+ 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 NAME:
+ return isSetName();
+ case NEW_NAME:
+ return isSetNewName();
+ case LICENSE:
+ return isSetLicense();
+ case INTERNET:
+ return isSetInternet();
+ case RAM:
+ return isSetRam();
+ case CPU:
+ return isSetCpu();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateImageData_args)
+ return this.equals((updateImageData_args)that);
+ return false;
+ }
+
+ public boolean equals(updateImageData_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_newName = true && this.isSetNewName();
+ boolean that_present_newName = true && that.isSetNewName();
+ if (this_present_newName || that_present_newName) {
+ if (!(this_present_newName && that_present_newName))
+ return false;
+ if (!this.newName.equals(that.newName))
+ return false;
+ }
+
+ boolean this_present_license = true;
+ boolean that_present_license = true;
+ if (this_present_license || that_present_license) {
+ if (!(this_present_license && that_present_license))
+ return false;
+ if (this.license != that.license)
+ return false;
+ }
+
+ boolean this_present_internet = true;
+ boolean that_present_internet = true;
+ if (this_present_internet || that_present_internet) {
+ if (!(this_present_internet && that_present_internet))
+ return false;
+ if (this.internet != that.internet)
+ return false;
+ }
+
+ boolean this_present_ram = true;
+ boolean that_present_ram = true;
+ if (this_present_ram || that_present_ram) {
+ if (!(this_present_ram && that_present_ram))
+ return false;
+ if (this.ram != that.ram)
+ return false;
+ }
+
+ boolean this_present_cpu = true;
+ boolean that_present_cpu = true;
+ if (this_present_cpu || that_present_cpu) {
+ if (!(this_present_cpu && that_present_cpu))
+ return false;
+ if (this.cpu != that.cpu)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageData_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNewName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLicense()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.license, other.license);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetInternet()).compareTo(other.isSetInternet());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetInternet()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internet, other.internet);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRam()).compareTo(other.isSetRam());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRam()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ram, other.ram);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCpu()).compareTo(other.isSetCpu());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCpu()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpu, other.cpu);
+ 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("updateImageData_args(");
+ boolean first = true;
+
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("newName:");
+ if (this.newName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.newName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("license:");
+ sb.append(this.license);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("internet:");
+ sb.append(this.internet);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ram:");
+ sb.append(this.ram);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("cpu:");
+ sb.append(this.cpu);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updateImageData_argsStandardSchemeFactory implements SchemeFactory {
+ public updateImageData_argsStandardScheme getScheme() {
+ return new updateImageData_argsStandardScheme();
+ }
+ }
+
+ private static class updateImageData_argsStandardScheme extends StandardScheme<updateImageData_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_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: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -2: // NEW_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.newName = iprot.readString();
+ struct.setNewNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -3: // LICENSE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.license = iprot.readBool();
+ struct.setLicenseIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -4: // INTERNET
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.internet = iprot.readBool();
+ struct.setInternetIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -5: // RAM
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.ram = iprot.readI64();
+ struct.setRamIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -6: // CPU
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.cpu = iprot.readI64();
+ struct.setCpuIsSet(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, updateImageData_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(CPU_FIELD_DESC);
+ oprot.writeI64(struct.cpu);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(RAM_FIELD_DESC);
+ oprot.writeI64(struct.ram);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(INTERNET_FIELD_DESC);
+ oprot.writeBool(struct.internet);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LICENSE_FIELD_DESC);
+ oprot.writeBool(struct.license);
+ oprot.writeFieldEnd();
+ if (struct.newName != null) {
+ oprot.writeFieldBegin(NEW_NAME_FIELD_DESC);
+ oprot.writeString(struct.newName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateImageData_argsTupleSchemeFactory implements SchemeFactory {
+ public updateImageData_argsTupleScheme getScheme() {
+ return new updateImageData_argsTupleScheme();
+ }
+ }
+
+ private static class updateImageData_argsTupleScheme extends TupleScheme<updateImageData_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNewName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetLicense()) {
+ optionals.set(2);
+ }
+ if (struct.isSetInternet()) {
+ optionals.set(3);
+ }
+ if (struct.isSetRam()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCpu()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetNewName()) {
+ oprot.writeString(struct.newName);
+ }
+ if (struct.isSetLicense()) {
+ oprot.writeBool(struct.license);
+ }
+ if (struct.isSetInternet()) {
+ oprot.writeBool(struct.internet);
+ }
+ if (struct.isSetRam()) {
+ oprot.writeI64(struct.ram);
+ }
+ if (struct.isSetCpu()) {
+ oprot.writeI64(struct.cpu);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.newName = iprot.readString();
+ struct.setNewNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.license = iprot.readBool();
+ struct.setLicenseIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.internet = iprot.readBool();
+ struct.setInternetIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ram = iprot.readI64();
+ struct.setRamIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.cpu = iprot.readI64();
+ struct.setCpuIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageData_result implements org.apache.thrift.TBase<updateImageData_result, updateImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageData_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageData_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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 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
+ 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(updateImageData_result.class, metaDataMap);
+ }
+
+ public updateImageData_result() {
+ }
+
+ public updateImageData_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageData_result(updateImageData_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public updateImageData_result deepCopy() {
+ return new updateImageData_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateImageData_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();
+ }
+
+ /** 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 updateImageData_result)
+ return this.equals((updateImageData_result)that);
+ return false;
+ }
+
+ public boolean equals(updateImageData_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;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageData_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("updateImageData_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ 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 {
+ // 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 updateImageData_resultStandardSchemeFactory implements SchemeFactory {
+ public updateImageData_resultStandardScheme getScheme() {
+ return new updateImageData_resultStandardScheme();
+ }
+ }
+
+ private static class updateImageData_resultStandardScheme extends StandardScheme<updateImageData_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_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.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);
+ }
+ 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, updateImageData_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 updateImageData_resultTupleSchemeFactory implements SchemeFactory {
+ public updateImageData_resultTupleScheme getScheme() {
+ return new updateImageData_resultTupleScheme();
+ }
+ }
+
+ private static class updateImageData_resultTupleScheme extends TupleScheme<updateImageData_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_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, updateImageData_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);
+ }
+ }
+ }
+
+ }
+
}
diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java
index 9b52aea6..750943ed 100644
--- a/Dozentenmodulserver/src/server/ServerHandler.java
+++ b/Dozentenmodulserver/src/server/ServerHandler.java
@@ -1,5 +1,7 @@
package server;
+import java.io.File;
+import java.io.IOException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -13,6 +15,7 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
+import org.apache.commons.io.FileUtils;
import org.apache.thrift.TException;
import sql.SQL;
@@ -20,8 +23,8 @@ import sql.SQL;
public class ServerHandler implements Server.Iface {
- SQL sql=new SQL();
- Connection con=sql.getConnection();
+ static SQL sql=new SQL();
+ static Connection con=sql.getConnection();
/**
* @param args
*/
@@ -147,8 +150,7 @@ public class ServerHandler implements Server.Iface {
map.put("Nachname", rs.getString("Nachname"));
map.put("Vorname", rs.getString("Vorname"));
map.put("Hochschule", rs.getString("name"));
- map.put("tel", "009909");
- map.put("fak", "E+I");
+
}
return map;
@@ -191,4 +193,57 @@ public class ServerHandler implements Server.Iface {
return false;
}
+ @Override
+ public boolean startFileCopy(String file) throws TException {
+ File tmpFile=new File(file);
+
+ System.out.println("Vor Move" +new Date());
+ try {
+ FileUtils.moveFile(tmpFile, new File("141.79.128.103:/srv/nfs4slx/"+tmpFile.getName()));
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ System.out.println("Nach Move"+new Date());
+ return true;
+ }
+
+
+ @Override
+ public Map<String, String> getImageData(String imagename) throws TException {
+ System.out.println("test:"+imagename);
+ ResultSet data=sql.getImageData(con, imagename);
+
+ Map<String,String> map=new HashMap<String, String>();
+ try {
+ while(data.next())
+ {
+ System.out.println(data.getString("cond_hasInternetRestriction")+data.getString("cond_hasLicenseRestriction")+data.getString("cond_minCPUs")+data.getString("cond_minRAM"));
+ map.put("internet", data.getString("cond_hasInternetRestriction"));
+ map.put("license", data.getString("cond_hasLicenseRestriction"));
+ map.put("cpu", data.getString("cond_minCPUs"));
+ map.put("ram", data.getString("cond_minRAM"));
+
+ }
+ System.out.println("return success");
+ return map;
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+
+ }
+
+
+ @Override
+ public boolean updateImageData(String name, String newName,boolean license,
+ boolean internet, long ram, long cpu) throws TException {
+ System.out.println("Server: Vor Update");
+ sql.UpdateImageData(con, name, newName ,license, internet, cpu, ram);
+ System.out.println("Update erfolgreich");
+ return false;
+ }
+
}
diff --git a/Dozentenmodulserver/src/server/User.java b/Dozentenmodulserver/src/server/User.java
index a763e1c7..5fd2f983 100644
--- a/Dozentenmodulserver/src/server/User.java
+++ b/Dozentenmodulserver/src/server/User.java
@@ -5,20 +5,32 @@
* @generated
*/
package server;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
+
import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-@SuppressWarnings("serial")
public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
@@ -26,8 +38,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)-2);
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)-3);
- @SuppressWarnings("rawtypes")
-private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java
index 9f9ba352..2e81116a 100644
--- a/Dozentenmodulserver/src/sql/SQL.java
+++ b/Dozentenmodulserver/src/sql/SQL.java
@@ -171,7 +171,7 @@ public class SQL {
{
internet_bol=1;
}
- else if(license==true)
+ if(license==true)
{
license_bol=1;
}
@@ -272,4 +272,46 @@ public class SQL {
}
return null;
}
+
+ public ResultSet getImageData(Connection con,String name){
+ try {
+ Statement stm=con.createStatement();
+ System.out.println("Test");
+ return stm.executeQuery("SELECT image_name,cond_hasInternetRestriction,cond_hasLicenseRestriction, cond_minCPUs, cond_minRAM FROM bwLehrpool.m_VLData_imageInfo where image_name like '"+name+"';");
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public int UpdateImageData(Connection con,String name,String newName,boolean license, boolean internet, long cpu, long ram){
+ try {
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ Statement stm=con.createStatement();
+ ResultSet rs=getImageIDandVersion(con, name);
+ rs.next();
+ System.out.println(rs.getString("GUID_imageID")+"Version"+rs.getString("imageVersion"));
+ int newVersion=rs.getInt("imageVersion")+1;
+ int internet_bol=0;
+ int license_bol=0;
+ if(internet==true)
+ {
+ internet_bol=1;
+ }
+ if(license==true)
+ {
+ license_bol=1;
+ }
+ System.out.println(internet_bol);
+ System.out.println(license_bol);
+ stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `imageVersion` = '"+newVersion+"',`image_name` = '"+newName+"',`image_update_time` = '"+formatter.format(new Date())+"',`rec_change_time` = '"+formatter.format(new Date())+"',`cond_hasLicenseRestriction` = '"+license_bol+"',`cond_hasInternetRestriction` = '"+internet_bol+"',`cond_minRAM` = '"+ram+"',`cond_minCPUs` = '"+cpu+"' WHERE `GUID_imageID` = '"+rs.getString("GUID_imageID")+"' AND `imageVersion` = '"+rs.getString("imageVersion")+"';");
+ con.commit();
+ return 0;
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return -1;
+ }
}