summaryrefslogtreecommitdiffstats
path: root/Dozentenmodulserver
diff options
context:
space:
mode:
authorTobias Spitzer2014-08-25 10:22:15 +0200
committerTobias Spitzer2014-08-25 10:22:15 +0200
commitdc0c06568eba622b8151b76b2ecf12f299b89f46 (patch)
tree92c783bdc4ee9c331fb70f8ca277627175340521 /Dozentenmodulserver
parentMerge branch 'master' of git.openslx.org:openslx-ng/tutor-module (diff)
downloadtutor-module-dc0c06568eba622b8151b76b2ecf12f299b89f46.tar.gz
tutor-module-dc0c06568eba622b8151b76b2ecf12f299b89f46.tar.xz
tutor-module-dc0c06568eba622b8151b76b2ecf12f299b89f46.zip
Models angepasst für die Rolle
Diffstat (limited to 'Dozentenmodulserver')
-rw-r--r--Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.classbin2139 -> 2139 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.classbin3040 -> 3040 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.classbin3096 -> 3096 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.classbin3030 -> 3030 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.classbin1138 -> 1138 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$startFileCopy_args.classbin9460 -> 9460 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.classbin3030 -> 3030 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_args.classbin25783 -> 25783 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.classbin3050 -> 3050 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$updateImageData_result.classbin9798 -> 9798 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.classbin1186 -> 1186 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$writeLecturedata_args.classbin25807 -> 25807 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.classbin3060 -> 3060 bytes
-rw-r--r--Dozentenmodulserver/bin/server/Server$writeVLdata_args.classbin30564 -> 30564 bytes
-rw-r--r--Dozentenmodulserver/src/server/Server.java1258
-rw-r--r--Dozentenmodulserver/src/server/ServerHandler.java9
-rw-r--r--Dozentenmodulserver/thrift/server.thrift1
17 files changed, 1268 insertions, 0 deletions
diff --git a/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class b/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
index f53bda5c..848c2854 100644
--- a/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
+++ b/Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
index b7a97cbe..63dc96a7 100644
--- a/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class b/Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class
index 1bfa2f37..65b69661 100644
--- a/Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class
index c7072aa6..47fb72ce 100644
--- a/Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class b/Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class
index 86ec4c25..614387e8 100644
--- a/Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class
+++ b/Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$startFileCopy_args.class b/Dozentenmodulserver/bin/server/Server$startFileCopy_args.class
index 111b548e..ac43783d 100644
--- a/Dozentenmodulserver/bin/server/Server$startFileCopy_args.class
+++ b/Dozentenmodulserver/bin/server/Server$startFileCopy_args.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class
index 0c1c5adf..f8eaf3b0 100644
--- a/Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
index 8b2b685f..31a6d9cb 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_args.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
index d72cc254..70f66bab 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
index 67fe7810..7ab99f6d 100644
--- a/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
+++ b/Dozentenmodulserver/bin/server/Server$updateImageData_result.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class b/Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class
index 13103810..585629ce 100644
--- a/Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class
+++ b/Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class b/Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class
index dc2cd8d4..2a843390 100644
--- a/Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class
+++ b/Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class b/Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class
index 4d671e3f..c0d0b439 100644
--- a/Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class
+++ b/Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class
Binary files differ
diff --git a/Dozentenmodulserver/bin/server/Server$writeVLdata_args.class b/Dozentenmodulserver/bin/server/Server$writeVLdata_args.class
index 908aa944..8c394e63 100644
--- a/Dozentenmodulserver/bin/server/Server$writeVLdata_args.class
+++ b/Dozentenmodulserver/bin/server/Server$writeVLdata_args.class
Binary files differ
diff --git a/Dozentenmodulserver/src/server/Server.java b/Dozentenmodulserver/src/server/Server.java
index a9f8a753..e7c2f32a 100644
--- a/Dozentenmodulserver/src/server/Server.java
+++ b/Dozentenmodulserver/src/server/Server.java
@@ -76,6 +76,8 @@ public class Server {
public boolean checkUser(String username) throws org.apache.thrift.TException;
+ public boolean createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -120,6 +122,8 @@ public class Server {
public void checkUser(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createUser(String loginName, String lastName, String firstName, String mail, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -664,6 +668,33 @@ public class Server {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkUser failed: unknown result");
}
+ public boolean createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException
+ {
+ send_createUser(loginName, lastName, firstName, mail, university);
+ return recv_createUser();
+ }
+
+ public void send_createUser(String loginName, String lastName, String firstName, String mail, String university) throws org.apache.thrift.TException
+ {
+ createUser_args args = new createUser_args();
+ args.setLoginName(loginName);
+ args.setLastName(lastName);
+ args.setFirstName(firstName);
+ args.setMail(mail);
+ args.setUniversity(university);
+ sendBase("createUser", args);
+ }
+
+ public boolean recv_createUser() throws org.apache.thrift.TException
+ {
+ createUser_result result = new createUser_result();
+ receiveBase(result, "createUser");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser 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> {
@@ -1508,6 +1539,50 @@ public class Server {
}
}
+ public void createUser(String loginName, String lastName, String firstName, String mail, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createUser_call method_call = new createUser_call(loginName, lastName, firstName, mail, university, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String loginName;
+ private String lastName;
+ private String firstName;
+ private String mail;
+ private String university;
+ public createUser_call(String loginName, String lastName, String firstName, String mail, String university, 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.loginName = loginName;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.mail = mail;
+ this.university = university;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createUser_args args = new createUser_args();
+ args.setLoginName(loginName);
+ args.setLastName(lastName);
+ args.setFirstName(firstName);
+ args.setMail(mail);
+ args.setUniversity(university);
+ 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_createUser();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -1541,6 +1616,7 @@ public class Server {
processMap.put("connectedToLecture", new connectedToLecture());
processMap.put("deleteLecture", new deleteLecture());
processMap.put("checkUser", new checkUser());
+ processMap.put("createUser", new createUser());
return processMap;
}
@@ -1955,6 +2031,27 @@ public class Server {
}
}
+ public static class createUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createUser_args> {
+ public createUser() {
+ super("createUser");
+ }
+
+ public createUser_args getEmptyArgsInstance() {
+ return new createUser_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createUser_result getResult(I iface, createUser_args args) throws org.apache.thrift.TException {
+ createUser_result result = new createUser_result();
+ result.success = iface.createUser(args.loginName, args.lastName, args.firstName, args.mail, args.university);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -1988,6 +2085,7 @@ public class Server {
processMap.put("connectedToLecture", new connectedToLecture());
processMap.put("deleteLecture", new deleteLecture());
processMap.put("checkUser", new checkUser());
+ processMap.put("createUser", new createUser());
return processMap;
}
@@ -3022,6 +3120,58 @@ public class Server {
}
}
+ public static class createUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createUser_args, Boolean> {
+ public createUser() {
+ super("createUser");
+ }
+
+ public createUser_args getEmptyArgsInstance() {
+ return new createUser_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) {
+ createUser_result result = new createUser_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;
+ createUser_result result = new createUser_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, createUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.createUser(args.loginName, args.lastName, args.firstName, args.mail, args.university,resultHandler);
+ }
+ }
+
}
public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> {
@@ -23631,4 +23781,1112 @@ public class Server {
}
+ public static class createUser_args implements org.apache.thrift.TBase<createUser_args, createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_args");
+
+ private static final org.apache.thrift.protocol.TField LOGIN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("loginName", org.apache.thrift.protocol.TType.STRING, (short)-1);
+ private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)-2);
+ private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)-3);
+ private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)-4);
+ private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)-5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createUser_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createUser_argsTupleSchemeFactory());
+ }
+
+ public String loginName; // required
+ public String lastName; // required
+ public String firstName; // required
+ public String mail; // required
+ public String university; // 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 {
+ LOGIN_NAME((short)-1, "loginName"),
+ LAST_NAME((short)-2, "lastName"),
+ FIRST_NAME((short)-3, "firstName"),
+ MAIL((short)-4, "mail"),
+ UNIVERSITY((short)-5, "university");
+
+ 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: // LOGIN_NAME
+ return LOGIN_NAME;
+ case -2: // LAST_NAME
+ return LAST_NAME;
+ case -3: // FIRST_NAME
+ return FIRST_NAME;
+ case -4: // MAIL
+ return MAIL;
+ case -5: // UNIVERSITY
+ return UNIVERSITY;
+ 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.LOGIN_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", 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(createUser_args.class, metaDataMap);
+ }
+
+ public createUser_args() {
+ }
+
+ public createUser_args(
+ String loginName,
+ String lastName,
+ String firstName,
+ String mail,
+ String university)
+ {
+ this();
+ this.loginName = loginName;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.mail = mail;
+ this.university = university;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createUser_args(createUser_args other) {
+ if (other.isSetLoginName()) {
+ this.loginName = other.loginName;
+ }
+ if (other.isSetLastName()) {
+ this.lastName = other.lastName;
+ }
+ if (other.isSetFirstName()) {
+ this.firstName = other.firstName;
+ }
+ if (other.isSetMail()) {
+ this.mail = other.mail;
+ }
+ if (other.isSetUniversity()) {
+ this.university = other.university;
+ }
+ }
+
+ public createUser_args deepCopy() {
+ return new createUser_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.loginName = null;
+ this.lastName = null;
+ this.firstName = null;
+ this.mail = null;
+ this.university = null;
+ }
+
+ public String getLoginName() {
+ return this.loginName;
+ }
+
+ public createUser_args setLoginName(String loginName) {
+ this.loginName = loginName;
+ return this;
+ }
+
+ public void unsetLoginName() {
+ this.loginName = null;
+ }
+
+ /** Returns true if field loginName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLoginName() {
+ return this.loginName != null;
+ }
+
+ public void setLoginNameIsSet(boolean value) {
+ if (!value) {
+ this.loginName = null;
+ }
+ }
+
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public createUser_args setLastName(String lastName) {
+ this.lastName = lastName;
+ return this;
+ }
+
+ public void unsetLastName() {
+ this.lastName = null;
+ }
+
+ /** Returns true if field lastName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLastName() {
+ return this.lastName != null;
+ }
+
+ public void setLastNameIsSet(boolean value) {
+ if (!value) {
+ this.lastName = null;
+ }
+ }
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public createUser_args setFirstName(String firstName) {
+ this.firstName = firstName;
+ return this;
+ }
+
+ public void unsetFirstName() {
+ this.firstName = null;
+ }
+
+ /** Returns true if field firstName is set (has been assigned a value) and false otherwise */
+ public boolean isSetFirstName() {
+ return this.firstName != null;
+ }
+
+ public void setFirstNameIsSet(boolean value) {
+ if (!value) {
+ this.firstName = null;
+ }
+ }
+
+ public String getMail() {
+ return this.mail;
+ }
+
+ public createUser_args setMail(String mail) {
+ this.mail = mail;
+ return this;
+ }
+
+ public void unsetMail() {
+ this.mail = null;
+ }
+
+ /** Returns true if field mail is set (has been assigned a value) and false otherwise */
+ public boolean isSetMail() {
+ return this.mail != null;
+ }
+
+ public void setMailIsSet(boolean value) {
+ if (!value) {
+ this.mail = null;
+ }
+ }
+
+ public String getUniversity() {
+ return this.university;
+ }
+
+ public createUser_args setUniversity(String university) {
+ this.university = university;
+ return this;
+ }
+
+ public void unsetUniversity() {
+ this.university = null;
+ }
+
+ /** Returns true if field university is set (has been assigned a value) and false otherwise */
+ public boolean isSetUniversity() {
+ return this.university != null;
+ }
+
+ public void setUniversityIsSet(boolean value) {
+ if (!value) {
+ this.university = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LOGIN_NAME:
+ if (value == null) {
+ unsetLoginName();
+ } else {
+ setLoginName((String)value);
+ }
+ break;
+
+ case LAST_NAME:
+ if (value == null) {
+ unsetLastName();
+ } else {
+ setLastName((String)value);
+ }
+ break;
+
+ case FIRST_NAME:
+ if (value == null) {
+ unsetFirstName();
+ } else {
+ setFirstName((String)value);
+ }
+ break;
+
+ case MAIL:
+ if (value == null) {
+ unsetMail();
+ } else {
+ setMail((String)value);
+ }
+ break;
+
+ case UNIVERSITY:
+ if (value == null) {
+ unsetUniversity();
+ } else {
+ setUniversity((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LOGIN_NAME:
+ return getLoginName();
+
+ case LAST_NAME:
+ return getLastName();
+
+ case FIRST_NAME:
+ return getFirstName();
+
+ case MAIL:
+ return getMail();
+
+ case UNIVERSITY:
+ return getUniversity();
+
+ }
+ 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 LOGIN_NAME:
+ return isSetLoginName();
+ case LAST_NAME:
+ return isSetLastName();
+ case FIRST_NAME:
+ return isSetFirstName();
+ case MAIL:
+ return isSetMail();
+ case UNIVERSITY:
+ return isSetUniversity();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createUser_args)
+ return this.equals((createUser_args)that);
+ return false;
+ }
+
+ public boolean equals(createUser_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_loginName = true && this.isSetLoginName();
+ boolean that_present_loginName = true && that.isSetLoginName();
+ if (this_present_loginName || that_present_loginName) {
+ if (!(this_present_loginName && that_present_loginName))
+ return false;
+ if (!this.loginName.equals(that.loginName))
+ return false;
+ }
+
+ boolean this_present_lastName = true && this.isSetLastName();
+ boolean that_present_lastName = true && that.isSetLastName();
+ if (this_present_lastName || that_present_lastName) {
+ if (!(this_present_lastName && that_present_lastName))
+ return false;
+ if (!this.lastName.equals(that.lastName))
+ return false;
+ }
+
+ boolean this_present_firstName = true && this.isSetFirstName();
+ boolean that_present_firstName = true && that.isSetFirstName();
+ if (this_present_firstName || that_present_firstName) {
+ if (!(this_present_firstName && that_present_firstName))
+ return false;
+ if (!this.firstName.equals(that.firstName))
+ return false;
+ }
+
+ boolean this_present_mail = true && this.isSetMail();
+ boolean that_present_mail = true && that.isSetMail();
+ if (this_present_mail || that_present_mail) {
+ if (!(this_present_mail && that_present_mail))
+ return false;
+ if (!this.mail.equals(that.mail))
+ return false;
+ }
+
+ boolean this_present_university = true && this.isSetUniversity();
+ boolean that_present_university = true && that.isSetUniversity();
+ if (this_present_university || that_present_university) {
+ if (!(this_present_university && that_present_university))
+ return false;
+ if (!this.university.equals(that.university))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createUser_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetLoginName()).compareTo(other.isSetLoginName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLoginName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loginName, other.loginName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLastName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFirstName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMail()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUniversity()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
+ 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("createUser_args(");
+ boolean first = true;
+
+ sb.append("loginName:");
+ if (this.loginName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.loginName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lastName:");
+ if (this.lastName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lastName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("firstName:");
+ if (this.firstName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.firstName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("mail:");
+ if (this.mail == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.mail);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("university:");
+ if (this.university == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.university);
+ }
+ 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 createUser_argsStandardSchemeFactory implements SchemeFactory {
+ public createUser_argsStandardScheme getScheme() {
+ return new createUser_argsStandardScheme();
+ }
+ }
+
+ private static class createUser_argsStandardScheme extends StandardScheme<createUser_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_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: // LOGIN_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.loginName = iprot.readString();
+ struct.setLoginNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -2: // LAST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lastName = iprot.readString();
+ struct.setLastNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -3: // FIRST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.firstName = iprot.readString();
+ struct.setFirstNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -4: // MAIL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.mail = iprot.readString();
+ struct.setMailIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case -5: // UNIVERSITY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.university = iprot.readString();
+ struct.setUniversityIsSet(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, createUser_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.university != null) {
+ oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
+ oprot.writeString(struct.university);
+ oprot.writeFieldEnd();
+ }
+ if (struct.mail != null) {
+ oprot.writeFieldBegin(MAIL_FIELD_DESC);
+ oprot.writeString(struct.mail);
+ oprot.writeFieldEnd();
+ }
+ if (struct.firstName != null) {
+ oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC);
+ oprot.writeString(struct.firstName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lastName != null) {
+ oprot.writeFieldBegin(LAST_NAME_FIELD_DESC);
+ oprot.writeString(struct.lastName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.loginName != null) {
+ oprot.writeFieldBegin(LOGIN_NAME_FIELD_DESC);
+ oprot.writeString(struct.loginName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createUser_argsTupleSchemeFactory implements SchemeFactory {
+ public createUser_argsTupleScheme getScheme() {
+ return new createUser_argsTupleScheme();
+ }
+ }
+
+ private static class createUser_argsTupleScheme extends TupleScheme<createUser_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLoginName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLastName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetFirstName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetMail()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUniversity()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetLoginName()) {
+ oprot.writeString(struct.loginName);
+ }
+ if (struct.isSetLastName()) {
+ oprot.writeString(struct.lastName);
+ }
+ if (struct.isSetFirstName()) {
+ oprot.writeString(struct.firstName);
+ }
+ if (struct.isSetMail()) {
+ oprot.writeString(struct.mail);
+ }
+ if (struct.isSetUniversity()) {
+ oprot.writeString(struct.university);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.loginName = iprot.readString();
+ struct.setLoginNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lastName = iprot.readString();
+ struct.setLastNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.firstName = iprot.readString();
+ struct.setFirstNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.mail = iprot.readString();
+ struct.setMailIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.university = iprot.readString();
+ struct.setUniversityIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class createUser_result implements org.apache.thrift.TBase<createUser_result, createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_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 createUser_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createUser_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(createUser_result.class, metaDataMap);
+ }
+
+ public createUser_result() {
+ }
+
+ public createUser_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createUser_result(createUser_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public createUser_result deepCopy() {
+ return new createUser_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public createUser_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 createUser_result)
+ return this.equals((createUser_result)that);
+ return false;
+ }
+
+ public boolean equals(createUser_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(createUser_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("createUser_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 createUser_resultStandardSchemeFactory implements SchemeFactory {
+ public createUser_resultStandardScheme getScheme() {
+ return new createUser_resultStandardScheme();
+ }
+ }
+
+ private static class createUser_resultStandardScheme extends StandardScheme<createUser_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_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, createUser_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 createUser_resultTupleSchemeFactory implements SchemeFactory {
+ public createUser_resultTupleScheme getScheme() {
+ return new createUser_resultTupleScheme();
+ }
+ }
+
+ private static class createUser_resultTupleScheme extends TupleScheme<createUser_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createUser_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, createUser_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 be8d430d..90ce457d 100644
--- a/Dozentenmodulserver/src/server/ServerHandler.java
+++ b/Dozentenmodulserver/src/server/ServerHandler.java
@@ -444,4 +444,13 @@ public class ServerHandler implements Server.Iface {
return sql.checkUser(username);
}
+
+ @Override
+ public boolean createUser(String loginName, String lastName,
+ String firstName, String mail, String university) throws TException {
+ String pk_institution = sql.setInstitution(university);
+ String pk_person = sql.setPerson(loginName, lastName, firstName, mail,
+ new Date(), pk_institution);
+ return true;
+ }
}
diff --git a/Dozentenmodulserver/thrift/server.thrift b/Dozentenmodulserver/thrift/server.thrift
index 0665c978..4bd5954f 100644
--- a/Dozentenmodulserver/thrift/server.thrift
+++ b/Dozentenmodulserver/thrift/server.thrift
@@ -55,4 +55,5 @@ service Server{
bool connectedToLecture(string id, string version),
bool deleteLecture(string id, string hs, string user),
bool checkUser(string username),
+ bool createUser(string loginName, string lastName, string firstName, string mail, string university),
} \ No newline at end of file