summaryrefslogtreecommitdiffstats
path: root/Dozentenmodulserver/src/server/Server.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodulserver/src/server/Server.java')
-rw-r--r--Dozentenmodulserver/src/server/Server.java198
1 files changed, 151 insertions, 47 deletions
diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java
index 91afb099..7382e965 100644
--- a/Dozentenmodulserver/src/server/Server.java
+++ b/Dozentenmodulserver/src/server/Server.java
@@ -58,7 +58,7 @@ public class Server {
public Map<String,String> getImageData(String imageid, String imageversion) throws org.apache.thrift.TException;
- public boolean updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException;
+ public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException;
public Map<String,String> getLectureData(String lecturename) throws org.apache.thrift.TException;
@@ -98,7 +98,7 @@ public class Server {
public void getImageData(String imageid, String imageversion, 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, String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getLectureData(String lecturename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -411,17 +411,18 @@ public class Server {
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, String id, String version) throws org.apache.thrift.TException
+ public boolean updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException
{
- send_updateImageData(name, newName, license, internet, ram, cpu, id, version);
+ send_updateImageData(name, newName, image_path, license, internet, ram, cpu, id, version);
return recv_updateImageData();
}
- public void send_updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException
+ public void send_updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version) throws org.apache.thrift.TException
{
updateImageData_args args = new updateImageData_args();
args.setName(name);
args.setNewName(newName);
+ args.setImage_path(image_path);
args.setLicense(license);
args.setInternet(internet);
args.setRam(ram);
@@ -1040,9 +1041,9 @@ public class Server {
}
}
- public void updateImageData(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void updateImageData(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, 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, id, version, resultHandler, this, ___protocolFactory, ___transport);
+ updateImageData_call method_call = new updateImageData_call(name, newName, image_path, license, internet, ram, cpu, id, version, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -1050,16 +1051,18 @@ public class Server {
public static class updateImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
private String name;
private String newName;
+ private String image_path;
private boolean license;
private boolean internet;
private long ram;
private long cpu;
private String id;
private String version;
- public updateImageData_call(String name, String newName, boolean license, boolean internet, long ram, long cpu, String id, String version, 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 updateImageData_call(String name, String newName, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, 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.image_path = image_path;
this.license = license;
this.internet = internet;
this.ram = ram;
@@ -1073,6 +1076,7 @@ public class Server {
updateImageData_args args = new updateImageData_args();
args.setName(name);
args.setNewName(newName);
+ args.setImage_path(image_path);
args.setLicense(license);
args.setInternet(internet);
args.setRam(ram);
@@ -1615,7 +1619,7 @@ public class Server {
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, args.id, args.version);
+ result.success = iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version);
result.setSuccessIsSet(true);
return result;
}
@@ -2393,7 +2397,7 @@ public class Server {
}
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, args.id, args.version,resultHandler);
+ iface.updateImageData(args.name, args.newName, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version,resultHandler);
}
}
@@ -13115,12 +13119,13 @@ public class Server {
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 org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-7);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-8);
+ private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)-3);
+ 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)-4);
+ 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)-5);
+ 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)-6);
+ 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)-7);
+ private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)-8);
+ private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)-9);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -13130,6 +13135,7 @@ public class Server {
public String name; // required
public String newName; // required
+ public String image_path; // required
public boolean license; // required
public boolean internet; // required
public long ram; // required
@@ -13141,12 +13147,13 @@ public class Server {
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"),
- ID((short)-7, "id"),
- VERSION((short)-8, "version");
+ IMAGE_PATH((short)-3, "image_path"),
+ LICENSE((short)-4, "license"),
+ INTERNET((short)-5, "internet"),
+ RAM((short)-6, "ram"),
+ CPU((short)-7, "cpu"),
+ ID((short)-8, "id"),
+ VERSION((short)-9, "version");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -13165,17 +13172,19 @@ public class Server {
return NAME;
case -2: // NEW_NAME
return NEW_NAME;
- case -3: // LICENSE
+ case -3: // IMAGE_PATH
+ return IMAGE_PATH;
+ case -4: // LICENSE
return LICENSE;
- case -4: // INTERNET
+ case -5: // INTERNET
return INTERNET;
- case -5: // RAM
+ case -6: // RAM
return RAM;
- case -6: // CPU
+ case -7: // CPU
return CPU;
- case -7: // ID
+ case -8: // ID
return ID;
- case -8: // VERSION
+ case -9: // VERSION
return VERSION;
default:
return null;
@@ -13229,6 +13238,8 @@ public class Server {
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.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", 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,
@@ -13251,6 +13262,7 @@ public class Server {
public updateImageData_args(
String name,
String newName,
+ String image_path,
boolean license,
boolean internet,
long ram,
@@ -13261,6 +13273,7 @@ public class Server {
this();
this.name = name;
this.newName = newName;
+ this.image_path = image_path;
this.license = license;
setLicenseIsSet(true);
this.internet = internet;
@@ -13284,6 +13297,9 @@ public class Server {
if (other.isSetNewName()) {
this.newName = other.newName;
}
+ if (other.isSetImage_path()) {
+ this.image_path = other.image_path;
+ }
this.license = other.license;
this.internet = other.internet;
this.ram = other.ram;
@@ -13304,6 +13320,7 @@ public class Server {
public void clear() {
this.name = null;
this.newName = null;
+ this.image_path = null;
setLicenseIsSet(false);
this.license = false;
setInternetIsSet(false);
@@ -13364,6 +13381,30 @@ public class Server {
}
}
+ public String getImage_path() {
+ return this.image_path;
+ }
+
+ public updateImageData_args setImage_path(String image_path) {
+ this.image_path = image_path;
+ return this;
+ }
+
+ public void unsetImage_path() {
+ this.image_path = null;
+ }
+
+ /** Returns true if field image_path is set (has been assigned a value) and false otherwise */
+ public boolean isSetImage_path() {
+ return this.image_path != null;
+ }
+
+ public void setImage_pathIsSet(boolean value) {
+ if (!value) {
+ this.image_path = null;
+ }
+ }
+
public boolean isLicense() {
return this.license;
}
@@ -13522,6 +13563,14 @@ public class Server {
}
break;
+ case IMAGE_PATH:
+ if (value == null) {
+ unsetImage_path();
+ } else {
+ setImage_path((String)value);
+ }
+ break;
+
case LICENSE:
if (value == null) {
unsetLicense();
@@ -13581,6 +13630,9 @@ public class Server {
case NEW_NAME:
return getNewName();
+ case IMAGE_PATH:
+ return getImage_path();
+
case LICENSE:
return Boolean.valueOf(isLicense());
@@ -13614,6 +13666,8 @@ public class Server {
return isSetName();
case NEW_NAME:
return isSetNewName();
+ case IMAGE_PATH:
+ return isSetImage_path();
case LICENSE:
return isSetLicense();
case INTERNET:
@@ -13661,6 +13715,15 @@ public class Server {
return false;
}
+ boolean this_present_image_path = true && this.isSetImage_path();
+ boolean that_present_image_path = true && that.isSetImage_path();
+ if (this_present_image_path || that_present_image_path) {
+ if (!(this_present_image_path && that_present_image_path))
+ return false;
+ if (!this.image_path.equals(that.image_path))
+ return false;
+ }
+
boolean this_present_license = true;
boolean that_present_license = true;
if (this_present_license || that_present_license) {
@@ -13751,6 +13814,16 @@ public class Server {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImage_path()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_path, other.image_path);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense());
if (lastComparison != 0) {
return lastComparison;
@@ -13847,6 +13920,14 @@ public class Server {
}
first = false;
if (!first) sb.append(", ");
+ sb.append("image_path:");
+ if (this.image_path == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.image_path);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("license:");
sb.append(this.license);
first = false;
@@ -13939,7 +14020,15 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -3: // LICENSE
+ case -3: // IMAGE_PATH
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.image_path = iprot.readString();
+ struct.setImage_pathIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -4: // LICENSE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.license = iprot.readBool();
struct.setLicenseIsSet(true);
@@ -13947,7 +14036,7 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -4: // INTERNET
+ case -5: // INTERNET
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.internet = iprot.readBool();
struct.setInternetIsSet(true);
@@ -13955,7 +14044,7 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -5: // RAM
+ case -6: // RAM
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.ram = iprot.readI64();
struct.setRamIsSet(true);
@@ -13963,7 +14052,7 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -6: // CPU
+ case -7: // CPU
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.cpu = iprot.readI64();
struct.setCpuIsSet(true);
@@ -13971,7 +14060,7 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -7: // ID
+ case -8: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
@@ -13979,7 +14068,7 @@ public class Server {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case -8: // VERSION
+ case -9: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.version = iprot.readString();
struct.setVersionIsSet(true);
@@ -14024,6 +14113,11 @@ public class Server {
oprot.writeFieldBegin(LICENSE_FIELD_DESC);
oprot.writeBool(struct.license);
oprot.writeFieldEnd();
+ if (struct.image_path != null) {
+ oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC);
+ oprot.writeString(struct.image_path);
+ oprot.writeFieldEnd();
+ }
if (struct.newName != null) {
oprot.writeFieldBegin(NEW_NAME_FIELD_DESC);
oprot.writeString(struct.newName);
@@ -14058,31 +14152,37 @@ public class Server {
if (struct.isSetNewName()) {
optionals.set(1);
}
- if (struct.isSetLicense()) {
+ if (struct.isSetImage_path()) {
optionals.set(2);
}
- if (struct.isSetInternet()) {
+ if (struct.isSetLicense()) {
optionals.set(3);
}
- if (struct.isSetRam()) {
+ if (struct.isSetInternet()) {
optionals.set(4);
}
- if (struct.isSetCpu()) {
+ if (struct.isSetRam()) {
optionals.set(5);
}
- if (struct.isSetId()) {
+ if (struct.isSetCpu()) {
optionals.set(6);
}
- if (struct.isSetVersion()) {
+ if (struct.isSetId()) {
optionals.set(7);
}
- oprot.writeBitSet(optionals, 8);
+ if (struct.isSetVersion()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetNewName()) {
oprot.writeString(struct.newName);
}
+ if (struct.isSetImage_path()) {
+ oprot.writeString(struct.image_path);
+ }
if (struct.isSetLicense()) {
oprot.writeBool(struct.license);
}
@@ -14106,7 +14206,7 @@ public class Server {
@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(8);
+ BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
@@ -14116,26 +14216,30 @@ public class Server {
struct.setNewNameIsSet(true);
}
if (incoming.get(2)) {
+ struct.image_path = iprot.readString();
+ struct.setImage_pathIsSet(true);
+ }
+ if (incoming.get(3)) {
struct.license = iprot.readBool();
struct.setLicenseIsSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(4)) {
struct.internet = iprot.readBool();
struct.setInternetIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(5)) {
struct.ram = iprot.readI64();
struct.setRamIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.cpu = iprot.readI64();
struct.setCpuIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.version = iprot.readString();
struct.setVersionIsSet(true);
}