You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/02/09 04:14:16 UTC
[01/16] git commit: changing adding license header to not preserve
backup files
Updated Branches:
refs/heads/master 299872ab6 -> 28ac4b750
changing adding license header to not preserve backup files
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a977952e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a977952e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a977952e
Branch: refs/heads/master
Commit: a977952e6b724976ffbf689da6f65ca077c9a2cb
Parents: 299872a
Author: Suresh Marru <sm...@apache.org>
Authored: Sat Feb 8 18:46:46 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Sat Feb 8 18:46:46 2014 -0500
----------------------------------------------------------------------
airavata-api/generate-thrift-files.sh | 37 +++++++++++++++++-------------
1 file changed, 21 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a977952e/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index 3863bc5..95b1d64 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -43,8 +43,9 @@ add_license_header() {
GENERATED_CODE_DIR=$1
# For all generated thrift code, add the suppress all warnings annotation
- find $GENERATED_CODE_DIR -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/public class /@SuppressWarnings("all") public class /'
- find $GENERATED_CODE_DIR -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/public enum /@SuppressWarnings("all") public enum /'
+ # NOTE: In order to save the orginal file as a backup, use sed -i.orig in place of sed -i ''
+ find $GENERATED_CODE_DIR -name '*.java' -print0 | xargs -0 sed -i '' -e 's/public class /@SuppressWarnings("all") public class /'
+ find $GENERATED_CODE_DIR -name '*.java' -print0 | xargs -0 sed -i '' -e 's/public enum /@SuppressWarnings("all") public enum /'
# For each java file within the genrated directory, add the ASF V2 LICENSE header
for f in $(find $GENERATED_CODE_DIR -name '*.java'); do
@@ -66,6 +67,7 @@ add_license_header() {
* limitations under the License.
*/
EOF
+ mv ${f}-with-license $f
done
}
@@ -77,18 +79,21 @@ copy_changed_files() {
# Read all the funcation arguments
GENERATED_CODE_DIR=$1
- EXISTING_SRC_DIR=$2
-
- SDIR="${GENERATED_CODE_DIR}/org/apache/airavata/model/experiment"
- DDIR="${EXISTING_SRC_DIR}/org/apache/airavata/model/experiment"
- mkdir -p "$DDIR"
- for f in "$SDIR"/*.java; do
- DEST="$DDIR/`basename $f`"
- if ! cmp -s "${f}-with-license" "${DEST}" ; then
- echo "Copying ${f}-with-license to ${DEST}"
- cp -f "${f}-with-license" "${DEST}" || fail unable to copy files to java workspace
- fi
- done
+ WORKSPACE_SRC_DIR=$2
+
+ echo "Generated sources are in $GENERATED_CODE_DIR"
+ echo "Destination workspace is in $WORKSPACE_SRC_DIR"
+
+# SDIR="${GENERATED_CODE_DIR}/org/apache/airavata/model/experiment"
+# DDIR="${EXISTING_SRC_DIR}/org/apache/airavata/model/experiment"
+# mkdir -p "$DDIR"
+# for f in "$SDIR"/*.java; do
+# DEST="$DDIR/`basename $f`"
+# if ! cmp -s "${f}-with-license" "${DEST}" ; then
+# echo "Copying ${f}-with-license to ${DEST}"
+# cp -f "${f}-with-license" "${DEST}" || fail unable to copy files to java workspace
+# fi
+# done
}
# Generation of thrift files will require installing Apache Thrift. Please add thrift to your path.
@@ -127,10 +132,10 @@ thrift ${THRIFT_ARGS} --gen java $THRIFT_IDL_DIR/airavataAPI.thrift || fail unab
add_license_header $JAVA_GEN_DIR
# Compare the newly generated classes with existing server skelton sources and replace the changed ones.
-copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
+#copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
# Compare the newly generated classes with existing java client stub sources and replace the changed ones.
-copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
+#copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
##############################
# Update Airavata Data Model #
[09/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/airavataAPIConstants.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
deleted file mode 100644
index 734e0db..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api;
-
-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;
-
-public class airavataAPIConstants {
-
- public static final String VERSION = "0.12.0";
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataClientException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
deleted file mode 100644
index 4646bfc..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
+++ /dev/null
@@ -1,518 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown by Airavata Services when a call fails as a result of
- * a problem that a client may be able to resolve. For example, if the user
- * attempts to execute an application on a resource gateway does not have access to.
- *
- * This exception would not be used for internal system errors that do not
- * reflect user actions, but rather reflect a problem within the service that
- * the client cannot resolve.
- *
- * airavataErrorType: The message type indicating the error that occurred.
- * must be one of the values of AiravataErrorType.
- *
- * parameter: If the error applied to a particular input parameter, this will
- * indicate which parameter.
- */
-public class AiravataClientException extends TException implements org.apache.thrift.TBase<AiravataClientException, AiravataClientException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataClientException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataClientException");
-
- private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField PARAMETER_FIELD_DESC = new org.apache.thrift.protocol.TField("parameter", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AiravataClientExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AiravataClientExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataErrorType airavataErrorType; // required
- public String parameter; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- /**
- *
- * @see AiravataErrorType
- */
- AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
- PARAMETER((short)2, "parameter");
-
- 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: // AIRAVATA_ERROR_TYPE
- return AIRAVATA_ERROR_TYPE;
- case 2: // PARAMETER
- return PARAMETER;
- 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 _Fields optionals[] = {_Fields.PARAMETER};
- 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
- tmpMap.put(_Fields.PARAMETER, new org.apache.thrift.meta_data.FieldMetaData("parameter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataClientException.class, metaDataMap);
- }
-
- public AiravataClientException() {
- }
-
- public AiravataClientException(
- AiravataErrorType airavataErrorType)
- {
- this();
- this.airavataErrorType = airavataErrorType;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AiravataClientException(AiravataClientException other) {
- if (other.isSetAiravataErrorType()) {
- this.airavataErrorType = other.airavataErrorType;
- }
- if (other.isSetParameter()) {
- this.parameter = other.parameter;
- }
- }
-
- public AiravataClientException deepCopy() {
- return new AiravataClientException(this);
- }
-
- @Override
- public void clear() {
- this.airavataErrorType = null;
- this.parameter = null;
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataErrorType getAiravataErrorType() {
- return this.airavataErrorType;
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataClientException setAiravataErrorType(AiravataErrorType airavataErrorType) {
- this.airavataErrorType = airavataErrorType;
- return this;
- }
-
- public void unsetAiravataErrorType() {
- this.airavataErrorType = null;
- }
-
- /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
- public boolean isSetAiravataErrorType() {
- return this.airavataErrorType != null;
- }
-
- public void setAiravataErrorTypeIsSet(boolean value) {
- if (!value) {
- this.airavataErrorType = null;
- }
- }
-
- public String getParameter() {
- return this.parameter;
- }
-
- public AiravataClientException setParameter(String parameter) {
- this.parameter = parameter;
- return this;
- }
-
- public void unsetParameter() {
- this.parameter = null;
- }
-
- /** Returns true if field parameter is set (has been assigned a value) and false otherwise */
- public boolean isSetParameter() {
- return this.parameter != null;
- }
-
- public void setParameterIsSet(boolean value) {
- if (!value) {
- this.parameter = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case AIRAVATA_ERROR_TYPE:
- if (value == null) {
- unsetAiravataErrorType();
- } else {
- setAiravataErrorType((AiravataErrorType)value);
- }
- break;
-
- case PARAMETER:
- if (value == null) {
- unsetParameter();
- } else {
- setParameter((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case AIRAVATA_ERROR_TYPE:
- return getAiravataErrorType();
-
- case PARAMETER:
- return getParameter();
-
- }
- 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 AIRAVATA_ERROR_TYPE:
- return isSetAiravataErrorType();
- case PARAMETER:
- return isSetParameter();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AiravataClientException)
- return this.equals((AiravataClientException)that);
- return false;
- }
-
- public boolean equals(AiravataClientException that) {
- if (that == null)
- return false;
-
- boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
- boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
- if (this_present_airavataErrorType || that_present_airavataErrorType) {
- if (!(this_present_airavataErrorType && that_present_airavataErrorType))
- return false;
- if (!this.airavataErrorType.equals(that.airavataErrorType))
- return false;
- }
-
- boolean this_present_parameter = true && this.isSetParameter();
- boolean that_present_parameter = true && that.isSetParameter();
- if (this_present_parameter || that_present_parameter) {
- if (!(this_present_parameter && that_present_parameter))
- return false;
- if (!this.parameter.equals(that.parameter))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AiravataClientException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAiravataErrorType()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetParameter()).compareTo(other.isSetParameter());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetParameter()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameter, other.parameter);
- 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("AiravataClientException(");
- boolean first = true;
-
- sb.append("airavataErrorType:");
- if (this.airavataErrorType == null) {
- sb.append("null");
- } else {
- sb.append(this.airavataErrorType);
- }
- first = false;
- if (isSetParameter()) {
- if (!first) sb.append(", ");
- sb.append("parameter:");
- if (this.parameter == null) {
- sb.append("null");
- } else {
- sb.append(this.parameter);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (airavataErrorType == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
- }
- // 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 AiravataClientExceptionStandardSchemeFactory implements SchemeFactory {
- public AiravataClientExceptionStandardScheme getScheme() {
- return new AiravataClientExceptionStandardScheme();
- }
- }
-
- private static class AiravataClientExceptionStandardScheme extends StandardScheme<AiravataClientException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataClientException 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: // AIRAVATA_ERROR_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
- struct.setAiravataErrorTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PARAMETER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.parameter = iprot.readString();
- struct.setParameterIsSet(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, AiravataClientException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.airavataErrorType != null) {
- oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
- oprot.writeI32(struct.airavataErrorType.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.parameter != null) {
- if (struct.isSetParameter()) {
- oprot.writeFieldBegin(PARAMETER_FIELD_DESC);
- oprot.writeString(struct.parameter);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AiravataClientExceptionTupleSchemeFactory implements SchemeFactory {
- public AiravataClientExceptionTupleScheme getScheme() {
- return new AiravataClientExceptionTupleScheme();
- }
- }
-
- private static class AiravataClientExceptionTupleScheme extends TupleScheme<AiravataClientException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.airavataErrorType.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetParameter()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetParameter()) {
- oprot.writeString(struct.parameter);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
- struct.setAiravataErrorTypeIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.parameter = iprot.readString();
- struct.setParameterIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
deleted file mode 100644
index 0185945..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-/**
- * A list of Airavata API Error Message Types
- *
- * UNKNOWN: No information available about the error
- *
- * PERMISSION_DENIED: Not permitted to perform action
- *
- * INTERNAL_ERROR: Unexpected problem with the service
- *
- * AUTHENTICATION_FAILURE: The client failed to authenticate.
- *
- * INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect
- *
- * AUTHORIZATION_EXPIRED: Authentication token expired
- *
- * UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata.
- *
- * UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
- */
-public enum AiravataErrorType implements org.apache.thrift.TEnum {
- UNKNOWN(0),
- PERMISSION_DENIED(1),
- INTERNAL_ERROR(2),
- AUTHENTICATION_FAILURE(3),
- INVALID_AUTHORIZATION(4),
- AUTHORIZATION_EXPIRED(5),
- UNKNOWN_GATEWAY_ID(6),
- UNSUPPORTED_OPERATION(7);
-
- private final int value;
-
- private AiravataErrorType(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static AiravataErrorType findByValue(int value) {
- switch (value) {
- case 0:
- return UNKNOWN;
- case 1:
- return PERMISSION_DENIED;
- case 2:
- return INTERNAL_ERROR;
- case 3:
- return AUTHENTICATION_FAILURE;
- case 4:
- return INVALID_AUTHORIZATION;
- case 5:
- return AUTHORIZATION_EXPIRED;
- case 6:
- return UNKNOWN_GATEWAY_ID;
- case 7:
- return UNSUPPORTED_OPERATION;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
deleted file mode 100644
index da06a12..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown by Airavata Services when a call fails as a result of
- * a problem in the service that could not be changed through client's action.
- *
- * airavataErrorType: The message type indicating the error that occurred.
- * must be one of the values of AiravataErrorType.
- *
- * message: This may contain additional information about the error
- *
- */
-public class AiravataSystemException extends TException implements org.apache.thrift.TBase<AiravataSystemException, AiravataSystemException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataSystemException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataSystemException");
-
- private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AiravataSystemExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AiravataSystemExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataErrorType airavataErrorType; // required
- public String message; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- /**
- *
- * @see AiravataErrorType
- */
- AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
- MESSAGE((short)2, "message");
-
- 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: // AIRAVATA_ERROR_TYPE
- return AIRAVATA_ERROR_TYPE;
- case 2: // MESSAGE
- return MESSAGE;
- 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 _Fields optionals[] = {_Fields.MESSAGE};
- 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataSystemException.class, metaDataMap);
- }
-
- public AiravataSystemException() {
- }
-
- public AiravataSystemException(
- AiravataErrorType airavataErrorType)
- {
- this();
- this.airavataErrorType = airavataErrorType;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AiravataSystemException(AiravataSystemException other) {
- if (other.isSetAiravataErrorType()) {
- this.airavataErrorType = other.airavataErrorType;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public AiravataSystemException deepCopy() {
- return new AiravataSystemException(this);
- }
-
- @Override
- public void clear() {
- this.airavataErrorType = null;
- this.message = null;
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataErrorType getAiravataErrorType() {
- return this.airavataErrorType;
- }
-
- /**
- *
- * @see AiravataErrorType
- */
- public AiravataSystemException setAiravataErrorType(AiravataErrorType airavataErrorType) {
- this.airavataErrorType = airavataErrorType;
- return this;
- }
-
- public void unsetAiravataErrorType() {
- this.airavataErrorType = null;
- }
-
- /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
- public boolean isSetAiravataErrorType() {
- return this.airavataErrorType != null;
- }
-
- public void setAiravataErrorTypeIsSet(boolean value) {
- if (!value) {
- this.airavataErrorType = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public AiravataSystemException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case AIRAVATA_ERROR_TYPE:
- if (value == null) {
- unsetAiravataErrorType();
- } else {
- setAiravataErrorType((AiravataErrorType)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case AIRAVATA_ERROR_TYPE:
- return getAiravataErrorType();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 AIRAVATA_ERROR_TYPE:
- return isSetAiravataErrorType();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AiravataSystemException)
- return this.equals((AiravataSystemException)that);
- return false;
- }
-
- public boolean equals(AiravataSystemException that) {
- if (that == null)
- return false;
-
- boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
- boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
- if (this_present_airavataErrorType || that_present_airavataErrorType) {
- if (!(this_present_airavataErrorType && that_present_airavataErrorType))
- return false;
- if (!this.airavataErrorType.equals(that.airavataErrorType))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AiravataSystemException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAiravataErrorType()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("AiravataSystemException(");
- boolean first = true;
-
- sb.append("airavataErrorType:");
- if (this.airavataErrorType == null) {
- sb.append("null");
- } else {
- sb.append(this.airavataErrorType);
- }
- first = false;
- if (isSetMessage()) {
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (airavataErrorType == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
- }
- // 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 AiravataSystemExceptionStandardSchemeFactory implements SchemeFactory {
- public AiravataSystemExceptionStandardScheme getScheme() {
- return new AiravataSystemExceptionStandardScheme();
- }
- }
-
- private static class AiravataSystemExceptionStandardScheme extends StandardScheme<AiravataSystemException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataSystemException 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: // AIRAVATA_ERROR_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
- struct.setAiravataErrorTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, AiravataSystemException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.airavataErrorType != null) {
- oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
- oprot.writeI32(struct.airavataErrorType.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- if (struct.isSetMessage()) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AiravataSystemExceptionTupleSchemeFactory implements SchemeFactory {
- public AiravataSystemExceptionTupleScheme getScheme() {
- return new AiravataSystemExceptionTupleScheme();
- }
- }
-
- private static class AiravataSystemExceptionTupleScheme extends TupleScheme<AiravataSystemException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.airavataErrorType.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetMessage()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
- struct.setAiravataErrorTypeIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthenticationException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
deleted file mode 100644
index 412a195..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown for invalid authentication requests.
- *
- * message: contains the cause of the authorization failure.
- */
-public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
-
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthenticationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory());
- }
-
- public String message; // 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 {
- MESSAGE((short)1, "message");
-
- 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: // MESSAGE
- return MESSAGE;
- 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
- }
-
- public AuthenticationException() {
- }
-
- public AuthenticationException(
- String message)
- {
- this();
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AuthenticationException(AuthenticationException other) {
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public AuthenticationException deepCopy() {
- return new AuthenticationException(this);
- }
-
- @Override
- public void clear() {
- this.message = null;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public AuthenticationException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MESSAGE:
- return getMessage();
-
- }
- 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 MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AuthenticationException)
- return this.equals((AuthenticationException)that);
- return false;
- }
-
- public boolean equals(AuthenticationException that) {
- if (that == null)
- return false;
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AuthenticationException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("AuthenticationException(");
- boolean first = true;
-
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (message == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
- }
- // 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 AuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
- public AuthenticationExceptionStandardScheme getScheme() {
- return new AuthenticationExceptionStandardScheme();
- }
- }
-
- private static class AuthenticationExceptionStandardScheme extends StandardScheme<AuthenticationException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException 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: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, AuthenticationException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
- public AuthenticationExceptionTupleScheme getScheme() {
- return new AuthenticationExceptionTupleScheme();
- }
- }
-
- private static class AuthenticationExceptionTupleScheme extends TupleScheme<AuthenticationException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.message);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthorizationException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
deleted file mode 100644
index 1c53c8a..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
- *
- * message: contains the authorization failure message
- */
-public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
-
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthorizationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
- }
-
- public String message; // 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 {
- MESSAGE((short)1, "message");
-
- 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: // MESSAGE
- return MESSAGE;
- 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
- }
-
- public AuthorizationException() {
- }
-
- public AuthorizationException(
- String message)
- {
- this();
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AuthorizationException(AuthorizationException other) {
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public AuthorizationException deepCopy() {
- return new AuthorizationException(this);
- }
-
- @Override
- public void clear() {
- this.message = null;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public AuthorizationException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MESSAGE:
- return getMessage();
-
- }
- 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 MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AuthorizationException)
- return this.equals((AuthorizationException)that);
- return false;
- }
-
- public boolean equals(AuthorizationException that) {
- if (that == null)
- return false;
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AuthorizationException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("AuthorizationException(");
- boolean first = true;
-
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (message == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
- }
- // 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 AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
- public AuthorizationExceptionStandardScheme getScheme() {
- return new AuthorizationExceptionStandardScheme();
- }
- }
-
- private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException 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: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, AuthorizationException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
- public AuthorizationExceptionTupleScheme getScheme() {
- return new AuthorizationExceptionTupleScheme();
- }
- }
-
- private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.message);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
deleted file mode 100644
index fd5c245..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown when a client asks to perform an operation on an experiment that does not exist.
- *
- * identifier: A description of the experiment that was not found on the server.
- *
- * key: The value passed from the client in the identifier, which was not found.
- */
-public class ExperimentNotFoundException extends TException implements org.apache.thrift.TBase<ExperimentNotFoundException, ExperimentNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentNotFoundException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentNotFoundException");
-
- private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExperimentNotFoundExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExperimentNotFoundExceptionTupleSchemeFactory());
- }
-
- public String identifier; // optional
- public String key; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IDENTIFIER((short)1, "identifier"),
- KEY((short)2, "key");
-
- 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: // IDENTIFIER
- return IDENTIFIER;
- case 2: // KEY
- return KEY;
- 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 _Fields optionals[] = {_Fields.IDENTIFIER,_Fields.KEY};
- 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.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentNotFoundException.class, metaDataMap);
- }
-
- public ExperimentNotFoundException() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ExperimentNotFoundException(ExperimentNotFoundException other) {
- if (other.isSetIdentifier()) {
- this.identifier = other.identifier;
- }
- if (other.isSetKey()) {
- this.key = other.key;
- }
- }
-
- public ExperimentNotFoundException deepCopy() {
- return new ExperimentNotFoundException(this);
- }
-
- @Override
- public void clear() {
- this.identifier = null;
- this.key = null;
- }
-
- public String getIdentifier() {
- return this.identifier;
- }
-
- public ExperimentNotFoundException setIdentifier(String identifier) {
- this.identifier = identifier;
- return this;
- }
-
- public void unsetIdentifier() {
- this.identifier = null;
- }
-
- /** Returns true if field identifier is set (has been assigned a value) and false otherwise */
- public boolean isSetIdentifier() {
- return this.identifier != null;
- }
-
- public void setIdentifierIsSet(boolean value) {
- if (!value) {
- this.identifier = null;
- }
- }
-
- public String getKey() {
- return this.key;
- }
-
- public ExperimentNotFoundException setKey(String key) {
- this.key = key;
- return this;
- }
-
- public void unsetKey() {
- this.key = null;
- }
-
- /** Returns true if field key is set (has been assigned a value) and false otherwise */
- public boolean isSetKey() {
- return this.key != null;
- }
-
- public void setKeyIsSet(boolean value) {
- if (!value) {
- this.key = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IDENTIFIER:
- if (value == null) {
- unsetIdentifier();
- } else {
- setIdentifier((String)value);
- }
- break;
-
- case KEY:
- if (value == null) {
- unsetKey();
- } else {
- setKey((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IDENTIFIER:
- return getIdentifier();
-
- case KEY:
- return getKey();
-
- }
- 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 IDENTIFIER:
- return isSetIdentifier();
- case KEY:
- return isSetKey();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ExperimentNotFoundException)
- return this.equals((ExperimentNotFoundException)that);
- return false;
- }
-
- public boolean equals(ExperimentNotFoundException that) {
- if (that == null)
- return false;
-
- boolean this_present_identifier = true && this.isSetIdentifier();
- boolean that_present_identifier = true && that.isSetIdentifier();
- if (this_present_identifier || that_present_identifier) {
- if (!(this_present_identifier && that_present_identifier))
- return false;
- if (!this.identifier.equals(that.identifier))
- return false;
- }
-
- boolean this_present_key = true && this.isSetKey();
- boolean that_present_key = true && that.isSetKey();
- if (this_present_key || that_present_key) {
- if (!(this_present_key && that_present_key))
- return false;
- if (!this.key.equals(that.key))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ExperimentNotFoundException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIdentifier()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, other.identifier);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
- 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("ExperimentNotFoundException(");
- boolean first = true;
-
- if (isSetIdentifier()) {
- sb.append("identifier:");
- if (this.identifier == null) {
- sb.append("null");
- } else {
- sb.append(this.identifier);
- }
- first = false;
- }
- if (isSetKey()) {
- if (!first) sb.append(", ");
- sb.append("key:");
- if (this.key == null) {
- sb.append("null");
- } else {
- sb.append(this.key);
- }
- 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 ExperimentNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
- public ExperimentNotFoundExceptionStandardScheme getScheme() {
- return new ExperimentNotFoundExceptionStandardScheme();
- }
- }
-
- private static class ExperimentNotFoundExceptionStandardScheme extends StandardScheme<ExperimentNotFoundException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentNotFoundException 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: // IDENTIFIER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.identifier = iprot.readString();
- struct.setIdentifierIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.key = iprot.readString();
- struct.setKeyIsSet(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, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.identifier != null) {
- if (struct.isSetIdentifier()) {
- oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
- oprot.writeString(struct.identifier);
- oprot.writeFieldEnd();
- }
- }
- if (struct.key != null) {
- if (struct.isSetKey()) {
- oprot.writeFieldBegin(KEY_FIELD_DESC);
- oprot.writeString(struct.key);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ExperimentNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
- public ExperimentNotFoundExceptionTupleScheme getScheme() {
- return new ExperimentNotFoundExceptionTupleScheme();
- }
- }
-
- private static class ExperimentNotFoundExceptionTupleScheme extends TupleScheme<ExperimentNotFoundException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetIdentifier()) {
- optionals.set(0);
- }
- if (struct.isSetKey()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetIdentifier()) {
- oprot.writeString(struct.identifier);
- }
- if (struct.isSetKey()) {
- oprot.writeString(struct.key);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.identifier = iprot.readString();
- struct.setIdentifierIsSet(true);
- }
- if (incoming.get(1)) {
- struct.key = iprot.readString();
- struct.setKeyIsSet(true);
- }
- }
- }
-
-}
-
[12/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
new file mode 100644
index 0000000..5abd063
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
@@ -0,0 +1,914 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the basic experiment metadata.
+ *
+ * userName:
+ * The user name of the targeted gateway end user on whose behalf the experiment is being created.
+ * the associated gateway identity can only be inferred from the security hand-shake so as to avoid
+ * authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
+ * Airavata, an authorization exception is thrown.
+ *
+ * experimentName:
+ * The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
+ * by the generated experiment id.
+ *
+ * experimentDescription:
+ * The verbose description of the experiment. This is an optional parameter.
+ */
+@SuppressWarnings("all") public class BasicMetadata implements org.apache.thrift.TBase<BasicMetadata, BasicMetadata._Fields>, java.io.Serializable, Cloneable, Comparable<BasicMetadata> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BasicMetadata");
+
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentDescription", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC = new org.apache.thrift.protocol.TField("shareExperimentPublicly", org.apache.thrift.protocol.TType.BOOL, (short)5);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BasicMetadataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BasicMetadataTupleSchemeFactory());
+ }
+
+ public String userName; // required
+ public String experimentName; // required
+ public String projectID; // required
+ public String experimentDescription; // optional
+ public boolean shareExperimentPublicly; // optional
+ public String experimentID; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_NAME((short)1, "userName"),
+ EXPERIMENT_NAME((short)2, "experimentName"),
+ PROJECT_ID((short)3, "projectID"),
+ EXPERIMENT_DESCRIPTION((short)4, "experimentDescription"),
+ SHARE_EXPERIMENT_PUBLICLY((short)5, "shareExperimentPublicly"),
+ EXPERIMENT_ID((short)6, "experimentID");
+
+ 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: // USER_NAME
+ return USER_NAME;
+ case 2: // EXPERIMENT_NAME
+ return EXPERIMENT_NAME;
+ case 3: // PROJECT_ID
+ return PROJECT_ID;
+ case 4: // EXPERIMENT_DESCRIPTION
+ return EXPERIMENT_DESCRIPTION;
+ case 5: // SHARE_EXPERIMENT_PUBLICLY
+ return SHARE_EXPERIMENT_PUBLICLY;
+ case 6: // EXPERIMENT_ID
+ return EXPERIMENT_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.EXPERIMENT_DESCRIPTION,_Fields.SHARE_EXPERIMENT_PUBLICLY};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("experimentName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("experimentDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SHARE_EXPERIMENT_PUBLICLY, new org.apache.thrift.meta_data.FieldMetaData("shareExperimentPublicly", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BasicMetadata.class, metaDataMap);
+ }
+
+ public BasicMetadata() {
+ this.projectID = "default";
+
+ this.shareExperimentPublicly = false;
+
+ this.experimentID = "DO_NOT_SET";
+
+ }
+
+ public BasicMetadata(
+ String userName,
+ String experimentName,
+ String projectID,
+ String experimentID)
+ {
+ this();
+ this.userName = userName;
+ this.experimentName = experimentName;
+ this.projectID = projectID;
+ this.experimentID = experimentID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public BasicMetadata(BasicMetadata other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetExperimentName()) {
+ this.experimentName = other.experimentName;
+ }
+ if (other.isSetProjectID()) {
+ this.projectID = other.projectID;
+ }
+ if (other.isSetExperimentDescription()) {
+ this.experimentDescription = other.experimentDescription;
+ }
+ this.shareExperimentPublicly = other.shareExperimentPublicly;
+ if (other.isSetExperimentID()) {
+ this.experimentID = other.experimentID;
+ }
+ }
+
+ public BasicMetadata deepCopy() {
+ return new BasicMetadata(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userName = null;
+ this.experimentName = null;
+ this.projectID = "default";
+
+ this.experimentDescription = null;
+ this.shareExperimentPublicly = false;
+
+ this.experimentID = "DO_NOT_SET";
+
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public BasicMetadata setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public String getExperimentName() {
+ return this.experimentName;
+ }
+
+ public BasicMetadata setExperimentName(String experimentName) {
+ this.experimentName = experimentName;
+ return this;
+ }
+
+ public void unsetExperimentName() {
+ this.experimentName = null;
+ }
+
+ /** Returns true if field experimentName is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentName() {
+ return this.experimentName != null;
+ }
+
+ public void setExperimentNameIsSet(boolean value) {
+ if (!value) {
+ this.experimentName = null;
+ }
+ }
+
+ public String getProjectID() {
+ return this.projectID;
+ }
+
+ public BasicMetadata setProjectID(String projectID) {
+ this.projectID = projectID;
+ return this;
+ }
+
+ public void unsetProjectID() {
+ this.projectID = null;
+ }
+
+ /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
+ public boolean isSetProjectID() {
+ return this.projectID != null;
+ }
+
+ public void setProjectIDIsSet(boolean value) {
+ if (!value) {
+ this.projectID = null;
+ }
+ }
+
+ public String getExperimentDescription() {
+ return this.experimentDescription;
+ }
+
+ public BasicMetadata setExperimentDescription(String experimentDescription) {
+ this.experimentDescription = experimentDescription;
+ return this;
+ }
+
+ public void unsetExperimentDescription() {
+ this.experimentDescription = null;
+ }
+
+ /** Returns true if field experimentDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentDescription() {
+ return this.experimentDescription != null;
+ }
+
+ public void setExperimentDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.experimentDescription = null;
+ }
+ }
+
+ public boolean isShareExperimentPublicly() {
+ return this.shareExperimentPublicly;
+ }
+
+ public BasicMetadata setShareExperimentPublicly(boolean shareExperimentPublicly) {
+ this.shareExperimentPublicly = shareExperimentPublicly;
+ setShareExperimentPubliclyIsSet(true);
+ return this;
+ }
+
+ public void unsetShareExperimentPublicly() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ /** Returns true if field shareExperimentPublicly is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareExperimentPublicly() {
+ return EncodingUtils.testBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ public void setShareExperimentPubliclyIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID, value);
+ }
+
+ public String getExperimentID() {
+ return this.experimentID;
+ }
+
+ public BasicMetadata setExperimentID(String experimentID) {
+ this.experimentID = experimentID;
+ return this;
+ }
+
+ public void unsetExperimentID() {
+ this.experimentID = null;
+ }
+
+ /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentID() {
+ return this.experimentID != null;
+ }
+
+ public void setExperimentIDIsSet(boolean value) {
+ if (!value) {
+ this.experimentID = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case EXPERIMENT_NAME:
+ if (value == null) {
+ unsetExperimentName();
+ } else {
+ setExperimentName((String)value);
+ }
+ break;
+
+ case PROJECT_ID:
+ if (value == null) {
+ unsetProjectID();
+ } else {
+ setProjectID((String)value);
+ }
+ break;
+
+ case EXPERIMENT_DESCRIPTION:
+ if (value == null) {
+ unsetExperimentDescription();
+ } else {
+ setExperimentDescription((String)value);
+ }
+ break;
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ if (value == null) {
+ unsetShareExperimentPublicly();
+ } else {
+ setShareExperimentPublicly((Boolean)value);
+ }
+ break;
+
+ case EXPERIMENT_ID:
+ if (value == null) {
+ unsetExperimentID();
+ } else {
+ setExperimentID((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_NAME:
+ return getUserName();
+
+ case EXPERIMENT_NAME:
+ return getExperimentName();
+
+ case PROJECT_ID:
+ return getProjectID();
+
+ case EXPERIMENT_DESCRIPTION:
+ return getExperimentDescription();
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return Boolean.valueOf(isShareExperimentPublicly());
+
+ case EXPERIMENT_ID:
+ return getExperimentID();
+
+ }
+ 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 USER_NAME:
+ return isSetUserName();
+ case EXPERIMENT_NAME:
+ return isSetExperimentName();
+ case PROJECT_ID:
+ return isSetProjectID();
+ case EXPERIMENT_DESCRIPTION:
+ return isSetExperimentDescription();
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return isSetShareExperimentPublicly();
+ case EXPERIMENT_ID:
+ return isSetExperimentID();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BasicMetadata)
+ return this.equals((BasicMetadata)that);
+ return false;
+ }
+
+ public boolean equals(BasicMetadata that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_experimentName = true && this.isSetExperimentName();
+ boolean that_present_experimentName = true && that.isSetExperimentName();
+ if (this_present_experimentName || that_present_experimentName) {
+ if (!(this_present_experimentName && that_present_experimentName))
+ return false;
+ if (!this.experimentName.equals(that.experimentName))
+ return false;
+ }
+
+ boolean this_present_projectID = true && this.isSetProjectID();
+ boolean that_present_projectID = true && that.isSetProjectID();
+ if (this_present_projectID || that_present_projectID) {
+ if (!(this_present_projectID && that_present_projectID))
+ return false;
+ if (!this.projectID.equals(that.projectID))
+ return false;
+ }
+
+ boolean this_present_experimentDescription = true && this.isSetExperimentDescription();
+ boolean that_present_experimentDescription = true && that.isSetExperimentDescription();
+ if (this_present_experimentDescription || that_present_experimentDescription) {
+ if (!(this_present_experimentDescription && that_present_experimentDescription))
+ return false;
+ if (!this.experimentDescription.equals(that.experimentDescription))
+ return false;
+ }
+
+ boolean this_present_shareExperimentPublicly = true && this.isSetShareExperimentPublicly();
+ boolean that_present_shareExperimentPublicly = true && that.isSetShareExperimentPublicly();
+ if (this_present_shareExperimentPublicly || that_present_shareExperimentPublicly) {
+ if (!(this_present_shareExperimentPublicly && that_present_shareExperimentPublicly))
+ return false;
+ if (this.shareExperimentPublicly != that.shareExperimentPublicly)
+ return false;
+ }
+
+ boolean this_present_experimentID = true && this.isSetExperimentID();
+ boolean that_present_experimentID = true && that.isSetExperimentID();
+ if (this_present_experimentID || that_present_experimentID) {
+ if (!(this_present_experimentID && that_present_experimentID))
+ return false;
+ if (!this.experimentID.equals(that.experimentID))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(BasicMetadata other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentName()).compareTo(other.isSetExperimentName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentName, other.experimentName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetProjectID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentDescription()).compareTo(other.isSetExperimentDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentDescription, other.experimentDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareExperimentPublicly()).compareTo(other.isSetShareExperimentPublicly());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareExperimentPublicly()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareExperimentPublicly, other.shareExperimentPublicly);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
+ 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("BasicMetadata(");
+ boolean first = true;
+
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("experimentName:");
+ if (this.experimentName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("projectID:");
+ if (this.projectID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectID);
+ }
+ first = false;
+ if (isSetExperimentDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentDescription:");
+ if (this.experimentDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentDescription);
+ }
+ first = false;
+ }
+ if (isSetShareExperimentPublicly()) {
+ if (!first) sb.append(", ");
+ sb.append("shareExperimentPublicly:");
+ sb.append(this.shareExperimentPublicly);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("experimentID:");
+ if (this.experimentID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentID);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (userName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
+ }
+ if (experimentName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentName' was not present! Struct: " + toString());
+ }
+ if (projectID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' was not present! Struct: " + toString());
+ }
+ if (experimentID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' was not present! Struct: " + toString());
+ }
+ // 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 BasicMetadataStandardSchemeFactory implements SchemeFactory {
+ public BasicMetadataStandardScheme getScheme() {
+ return new BasicMetadataStandardScheme();
+ }
+ }
+
+ private static class BasicMetadataStandardScheme extends StandardScheme<BasicMetadata> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BasicMetadata 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: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXPERIMENT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentName = iprot.readString();
+ struct.setExperimentNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PROJECT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXPERIMENT_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentDescription = iprot.readString();
+ struct.setExperimentDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // SHARE_EXPERIMENT_PUBLICLY
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // EXPERIMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(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, BasicMetadata struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentName != null) {
+ oprot.writeFieldBegin(EXPERIMENT_NAME_FIELD_DESC);
+ oprot.writeString(struct.experimentName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.projectID != null) {
+ oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
+ oprot.writeString(struct.projectID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentDescription != null) {
+ if (struct.isSetExperimentDescription()) {
+ oprot.writeFieldBegin(EXPERIMENT_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.experimentDescription);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeFieldBegin(SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC);
+ oprot.writeBool(struct.shareExperimentPublicly);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentID != null) {
+ oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.experimentID);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BasicMetadataTupleSchemeFactory implements SchemeFactory {
+ public BasicMetadataTupleScheme getScheme() {
+ return new BasicMetadataTupleScheme();
+ }
+ }
+
+ private static class BasicMetadataTupleScheme extends TupleScheme<BasicMetadata> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BasicMetadata struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.userName);
+ oprot.writeString(struct.experimentName);
+ oprot.writeString(struct.projectID);
+ oprot.writeString(struct.experimentID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetExperimentDescription()) {
+ optionals.set(0);
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetExperimentDescription()) {
+ oprot.writeString(struct.experimentDescription);
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeBool(struct.shareExperimentPublicly);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BasicMetadata struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ struct.experimentName = iprot.readString();
+ struct.setExperimentNameIsSet(true);
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.experimentDescription = iprot.readString();
+ struct.setExperimentDescriptionIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
new file mode 100644
index 0000000..792ef0b
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
@@ -0,0 +1,1375 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the Computational Resource Scheduling.
+ *
+ */
+@SuppressWarnings("all") public class ComputationalResourceScheduling implements org.apache.thrift.TBase<ComputationalResourceScheduling, ComputationalResourceScheduling._Fields>, java.io.Serializable, Cloneable, Comparable<ComputationalResourceScheduling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceScheduling");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_AUTO_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataAutoSchedule", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("overrideManualScheduledParams", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final org.apache.thrift.protocol.TField RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField TOTAL_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCPUCount", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField NUMBER_OF_THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfThreads", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField WALL_TIME_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallTimeLimit", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField JOB_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStartTime", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)10);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ComputationalProjectAccount", org.apache.thrift.protocol.TType.STRING, (short)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ComputationalResourceSchedulingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ComputationalResourceSchedulingTupleSchemeFactory());
+ }
+
+ public boolean airavataAutoSchedule; // required
+ public boolean overrideManualScheduledParams; // required
+ public String resourceHostId; // optional
+ public int totalCPUCount; // optional
+ public int nodeCount; // optional
+ public int numberOfThreads; // optional
+ public String queueName; // optional
+ public int wallTimeLimit; // optional
+ public int jobStartTime; // optional
+ public int totalPhysicalMemory; // optional
+ public String ComputationalProjectAccount; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
+ OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
+ RESOURCE_HOST_ID((short)3, "resourceHostId"),
+ TOTAL_CPUCOUNT((short)4, "totalCPUCount"),
+ NODE_COUNT((short)5, "nodeCount"),
+ NUMBER_OF_THREADS((short)6, "numberOfThreads"),
+ QUEUE_NAME((short)7, "queueName"),
+ WALL_TIME_LIMIT((short)8, "wallTimeLimit"),
+ JOB_START_TIME((short)9, "jobStartTime"),
+ TOTAL_PHYSICAL_MEMORY((short)10, "totalPhysicalMemory"),
+ COMPUTATIONAL_PROJECT_ACCOUNT((short)11, "ComputationalProjectAccount");
+
+ 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: // AIRAVATA_AUTO_SCHEDULE
+ return AIRAVATA_AUTO_SCHEDULE;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ return OVERRIDE_MANUAL_SCHEDULED_PARAMS;
+ case 3: // RESOURCE_HOST_ID
+ return RESOURCE_HOST_ID;
+ case 4: // TOTAL_CPUCOUNT
+ return TOTAL_CPUCOUNT;
+ case 5: // NODE_COUNT
+ return NODE_COUNT;
+ case 6: // NUMBER_OF_THREADS
+ return NUMBER_OF_THREADS;
+ case 7: // QUEUE_NAME
+ return QUEUE_NAME;
+ case 8: // WALL_TIME_LIMIT
+ return WALL_TIME_LIMIT;
+ case 9: // JOB_START_TIME
+ return JOB_START_TIME;
+ case 10: // TOTAL_PHYSICAL_MEMORY
+ return TOTAL_PHYSICAL_MEMORY;
+ case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ return COMPUTATIONAL_PROJECT_ACCOUNT;
+ 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 __AIRAVATAAUTOSCHEDULE_ISSET_ID = 0;
+ private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
+ private static final int __TOTALCPUCOUNT_ISSET_ID = 2;
+ private static final int __NODECOUNT_ISSET_ID = 3;
+ private static final int __NUMBEROFTHREADS_ISSET_ID = 4;
+ private static final int __WALLTIMELIMIT_ISSET_ID = 5;
+ private static final int __JOBSTARTTIME_ISSET_ID = 6;
+ private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 7;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT};
+ 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.AIRAVATA_AUTO_SCHEDULE, new org.apache.thrift.meta_data.FieldMetaData("airavataAutoSchedule", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.OVERRIDE_MANUAL_SCHEDULED_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("overrideManualScheduledParams", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.RESOURCE_HOST_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceHostId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TOTAL_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("nodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.NUMBER_OF_THREADS, new org.apache.thrift.meta_data.FieldMetaData("numberOfThreads", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WALL_TIME_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("wallTimeLimit", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.JOB_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("jobStartTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.TOTAL_PHYSICAL_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("totalPhysicalMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.COMPUTATIONAL_PROJECT_ACCOUNT, new org.apache.thrift.meta_data.FieldMetaData("ComputationalProjectAccount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputationalResourceScheduling.class, metaDataMap);
+ }
+
+ public ComputationalResourceScheduling() {
+ this.airavataAutoSchedule = true;
+
+ this.overrideManualScheduledParams = false;
+
+ }
+
+ public ComputationalResourceScheduling(
+ boolean airavataAutoSchedule,
+ boolean overrideManualScheduledParams)
+ {
+ this();
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ComputationalResourceScheduling(ComputationalResourceScheduling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.airavataAutoSchedule = other.airavataAutoSchedule;
+ this.overrideManualScheduledParams = other.overrideManualScheduledParams;
+ if (other.isSetResourceHostId()) {
+ this.resourceHostId = other.resourceHostId;
+ }
+ this.totalCPUCount = other.totalCPUCount;
+ this.nodeCount = other.nodeCount;
+ this.numberOfThreads = other.numberOfThreads;
+ if (other.isSetQueueName()) {
+ this.queueName = other.queueName;
+ }
+ this.wallTimeLimit = other.wallTimeLimit;
+ this.jobStartTime = other.jobStartTime;
+ this.totalPhysicalMemory = other.totalPhysicalMemory;
+ if (other.isSetComputationalProjectAccount()) {
+ this.ComputationalProjectAccount = other.ComputationalProjectAccount;
+ }
+ }
+
+ public ComputationalResourceScheduling deepCopy() {
+ return new ComputationalResourceScheduling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataAutoSchedule = true;
+
+ this.overrideManualScheduledParams = false;
+
+ this.resourceHostId = null;
+ setTotalCPUCountIsSet(false);
+ this.totalCPUCount = 0;
+ setNodeCountIsSet(false);
+ this.nodeCount = 0;
+ setNumberOfThreadsIsSet(false);
+ this.numberOfThreads = 0;
+ this.queueName = null;
+ setWallTimeLimitIsSet(false);
+ this.wallTimeLimit = 0;
+ setJobStartTimeIsSet(false);
+ this.jobStartTime = 0;
+ setTotalPhysicalMemoryIsSet(false);
+ this.totalPhysicalMemory = 0;
+ this.ComputationalProjectAccount = null;
+ }
+
+ public boolean isAiravataAutoSchedule() {
+ return this.airavataAutoSchedule;
+ }
+
+ public ComputationalResourceScheduling setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ return this;
+ }
+
+ public void unsetAiravataAutoSchedule() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ /** Returns true if field airavataAutoSchedule is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataAutoSchedule() {
+ return EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ public void setAiravataAutoScheduleIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
+ }
+
+ public boolean isOverrideManualScheduledParams() {
+ return this.overrideManualScheduledParams;
+ }
+
+ public ComputationalResourceScheduling setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ return this;
+ }
+
+ public void unsetOverrideManualScheduledParams() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ /** Returns true if field overrideManualScheduledParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetOverrideManualScheduledParams() {
+ return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ public void setOverrideManualScheduledParamsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
+ }
+
+ public String getResourceHostId() {
+ return this.resourceHostId;
+ }
+
+ public ComputationalResourceScheduling setResourceHostId(String resourceHostId) {
+ this.resourceHostId = resourceHostId;
+ return this;
+ }
+
+ public void unsetResourceHostId() {
+ this.resourceHostId = null;
+ }
+
+ /** Returns true if field resourceHostId is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceHostId() {
+ return this.resourceHostId != null;
+ }
+
+ public void setResourceHostIdIsSet(boolean value) {
+ if (!value) {
+ this.resourceHostId = null;
+ }
+ }
+
+ public int getTotalCPUCount() {
+ return this.totalCPUCount;
+ }
+
+ public ComputationalResourceScheduling setTotalCPUCount(int totalCPUCount) {
+ this.totalCPUCount = totalCPUCount;
+ setTotalCPUCountIsSet(true);
+ return this;
+ }
+
+ public void unsetTotalCPUCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field totalCPUCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetTotalCPUCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
+ }
+
+ public void setTotalCPUCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID, value);
+ }
+
+ public int getNodeCount() {
+ return this.nodeCount;
+ }
+
+ public ComputationalResourceScheduling setNodeCount(int nodeCount) {
+ this.nodeCount = nodeCount;
+ setNodeCountIsSet(true);
+ return this;
+ }
+
+ public void unsetNodeCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field nodeCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ public void setNodeCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NODECOUNT_ISSET_ID, value);
+ }
+
+ public int getNumberOfThreads() {
+ return this.numberOfThreads;
+ }
+
+ public ComputationalResourceScheduling setNumberOfThreads(int numberOfThreads) {
+ this.numberOfThreads = numberOfThreads;
+ setNumberOfThreadsIsSet(true);
+ return this;
+ }
+
+ public void unsetNumberOfThreads() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID);
+ }
+
+ /** Returns true if field numberOfThreads is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumberOfThreads() {
+ return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID);
+ }
+
+ public void setNumberOfThreadsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID, value);
+ }
+
+ public String getQueueName() {
+ return this.queueName;
+ }
+
+ public ComputationalResourceScheduling setQueueName(String queueName) {
+ this.queueName = queueName;
+ return this;
+ }
+
+ public void unsetQueueName() {
+ this.queueName = null;
+ }
+
+ /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
+ public boolean isSetQueueName() {
+ return this.queueName != null;
+ }
+
+ public void setQueueNameIsSet(boolean value) {
+ if (!value) {
+ this.queueName = null;
+ }
+ }
+
+ public int getWallTimeLimit() {
+ return this.wallTimeLimit;
+ }
+
+ public ComputationalResourceScheduling setWallTimeLimit(int wallTimeLimit) {
+ this.wallTimeLimit = wallTimeLimit;
+ setWallTimeLimitIsSet(true);
+ return this;
+ }
+
+ public void unsetWallTimeLimit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID);
+ }
+
+ /** Returns true if field wallTimeLimit is set (has been assigned a value) and false otherwise */
+ public boolean isSetWallTimeLimit() {
+ return EncodingUtils.testBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID);
+ }
+
+ public void setWallTimeLimitIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID, value);
+ }
+
+ public int getJobStartTime() {
+ return this.jobStartTime;
+ }
+
+ public ComputationalResourceScheduling setJobStartTime(int jobStartTime) {
+ this.jobStartTime = jobStartTime;
+ setJobStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetJobStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field jobStartTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID);
+ }
+
+ public void setJobStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID, value);
+ }
+
+ public int getTotalPhysicalMemory() {
+ return this.totalPhysicalMemory;
+ }
+
+ public ComputationalResourceScheduling setTotalPhysicalMemory(int totalPhysicalMemory) {
+ this.totalPhysicalMemory = totalPhysicalMemory;
+ setTotalPhysicalMemoryIsSet(true);
+ return this;
+ }
+
+ public void unsetTotalPhysicalMemory() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID);
+ }
+
+ /** Returns true if field totalPhysicalMemory is set (has been assigned a value) and false otherwise */
+ public boolean isSetTotalPhysicalMemory() {
+ return EncodingUtils.testBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID);
+ }
+
+ public void setTotalPhysicalMemoryIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID, value);
+ }
+
+ public String getComputationalProjectAccount() {
+ return this.ComputationalProjectAccount;
+ }
+
+ public ComputationalResourceScheduling setComputationalProjectAccount(String ComputationalProjectAccount) {
+ this.ComputationalProjectAccount = ComputationalProjectAccount;
+ return this;
+ }
+
+ public void unsetComputationalProjectAccount() {
+ this.ComputationalProjectAccount = null;
+ }
+
+ /** Returns true if field ComputationalProjectAccount is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalProjectAccount() {
+ return this.ComputationalProjectAccount != null;
+ }
+
+ public void setComputationalProjectAccountIsSet(boolean value) {
+ if (!value) {
+ this.ComputationalProjectAccount = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ if (value == null) {
+ unsetAiravataAutoSchedule();
+ } else {
+ setAiravataAutoSchedule((Boolean)value);
+ }
+ break;
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ if (value == null) {
+ unsetOverrideManualScheduledParams();
+ } else {
+ setOverrideManualScheduledParams((Boolean)value);
+ }
+ break;
+
+ case RESOURCE_HOST_ID:
+ if (value == null) {
+ unsetResourceHostId();
+ } else {
+ setResourceHostId((String)value);
+ }
+ break;
+
+ case TOTAL_CPUCOUNT:
+ if (value == null) {
+ unsetTotalCPUCount();
+ } else {
+ setTotalCPUCount((Integer)value);
+ }
+ break;
+
+ case NODE_COUNT:
+ if (value == null) {
+ unsetNodeCount();
+ } else {
+ setNodeCount((Integer)value);
+ }
+ break;
+
+ case NUMBER_OF_THREADS:
+ if (value == null) {
+ unsetNumberOfThreads();
+ } else {
+ setNumberOfThreads((Integer)value);
+ }
+ break;
+
+ case QUEUE_NAME:
+ if (value == null) {
+ unsetQueueName();
+ } else {
+ setQueueName((String)value);
+ }
+ break;
+
+ case WALL_TIME_LIMIT:
+ if (value == null) {
+ unsetWallTimeLimit();
+ } else {
+ setWallTimeLimit((Integer)value);
+ }
+ break;
+
+ case JOB_START_TIME:
+ if (value == null) {
+ unsetJobStartTime();
+ } else {
+ setJobStartTime((Integer)value);
+ }
+ break;
+
+ case TOTAL_PHYSICAL_MEMORY:
+ if (value == null) {
+ unsetTotalPhysicalMemory();
+ } else {
+ setTotalPhysicalMemory((Integer)value);
+ }
+ break;
+
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ if (value == null) {
+ unsetComputationalProjectAccount();
+ } else {
+ setComputationalProjectAccount((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ return Boolean.valueOf(isAiravataAutoSchedule());
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return Boolean.valueOf(isOverrideManualScheduledParams());
+
+ case RESOURCE_HOST_ID:
+ return getResourceHostId();
+
+ case TOTAL_CPUCOUNT:
+ return Integer.valueOf(getTotalCPUCount());
+
+ case NODE_COUNT:
+ return Integer.valueOf(getNodeCount());
+
+ case NUMBER_OF_THREADS:
+ return Integer.valueOf(getNumberOfThreads());
+
+ case QUEUE_NAME:
+ return getQueueName();
+
+ case WALL_TIME_LIMIT:
+ return Integer.valueOf(getWallTimeLimit());
+
+ case JOB_START_TIME:
+ return Integer.valueOf(getJobStartTime());
+
+ case TOTAL_PHYSICAL_MEMORY:
+ return Integer.valueOf(getTotalPhysicalMemory());
+
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ return getComputationalProjectAccount();
+
+ }
+ 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 AIRAVATA_AUTO_SCHEDULE:
+ return isSetAiravataAutoSchedule();
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return isSetOverrideManualScheduledParams();
+ case RESOURCE_HOST_ID:
+ return isSetResourceHostId();
+ case TOTAL_CPUCOUNT:
+ return isSetTotalCPUCount();
+ case NODE_COUNT:
+ return isSetNodeCount();
+ case NUMBER_OF_THREADS:
+ return isSetNumberOfThreads();
+ case QUEUE_NAME:
+ return isSetQueueName();
+ case WALL_TIME_LIMIT:
+ return isSetWallTimeLimit();
+ case JOB_START_TIME:
+ return isSetJobStartTime();
+ case TOTAL_PHYSICAL_MEMORY:
+ return isSetTotalPhysicalMemory();
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ return isSetComputationalProjectAccount();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ComputationalResourceScheduling)
+ return this.equals((ComputationalResourceScheduling)that);
+ return false;
+ }
+
+ public boolean equals(ComputationalResourceScheduling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataAutoSchedule = true;
+ boolean that_present_airavataAutoSchedule = true;
+ if (this_present_airavataAutoSchedule || that_present_airavataAutoSchedule) {
+ if (!(this_present_airavataAutoSchedule && that_present_airavataAutoSchedule))
+ return false;
+ if (this.airavataAutoSchedule != that.airavataAutoSchedule)
+ return false;
+ }
+
+ boolean this_present_overrideManualScheduledParams = true;
+ boolean that_present_overrideManualScheduledParams = true;
+ if (this_present_overrideManualScheduledParams || that_present_overrideManualScheduledParams) {
+ if (!(this_present_overrideManualScheduledParams && that_present_overrideManualScheduledParams))
+ return false;
+ if (this.overrideManualScheduledParams != that.overrideManualScheduledParams)
+ return false;
+ }
+
+ boolean this_present_resourceHostId = true && this.isSetResourceHostId();
+ boolean that_present_resourceHostId = true && that.isSetResourceHostId();
+ if (this_present_resourceHostId || that_present_resourceHostId) {
+ if (!(this_present_resourceHostId && that_present_resourceHostId))
+ return false;
+ if (!this.resourceHostId.equals(that.resourceHostId))
+ return false;
+ }
+
+ boolean this_present_totalCPUCount = true && this.isSetTotalCPUCount();
+ boolean that_present_totalCPUCount = true && that.isSetTotalCPUCount();
+ if (this_present_totalCPUCount || that_present_totalCPUCount) {
+ if (!(this_present_totalCPUCount && that_present_totalCPUCount))
+ return false;
+ if (this.totalCPUCount != that.totalCPUCount)
+ return false;
+ }
+
+ boolean this_present_nodeCount = true && this.isSetNodeCount();
+ boolean that_present_nodeCount = true && that.isSetNodeCount();
+ if (this_present_nodeCount || that_present_nodeCount) {
+ if (!(this_present_nodeCount && that_present_nodeCount))
+ return false;
+ if (this.nodeCount != that.nodeCount)
+ return false;
+ }
+
+ boolean this_present_numberOfThreads = true && this.isSetNumberOfThreads();
+ boolean that_present_numberOfThreads = true && that.isSetNumberOfThreads();
+ if (this_present_numberOfThreads || that_present_numberOfThreads) {
+ if (!(this_present_numberOfThreads && that_present_numberOfThreads))
+ return false;
+ if (this.numberOfThreads != that.numberOfThreads)
+ return false;
+ }
+
+ boolean this_present_queueName = true && this.isSetQueueName();
+ boolean that_present_queueName = true && that.isSetQueueName();
+ if (this_present_queueName || that_present_queueName) {
+ if (!(this_present_queueName && that_present_queueName))
+ return false;
+ if (!this.queueName.equals(that.queueName))
+ return false;
+ }
+
+ boolean this_present_wallTimeLimit = true && this.isSetWallTimeLimit();
+ boolean that_present_wallTimeLimit = true && that.isSetWallTimeLimit();
+ if (this_present_wallTimeLimit || that_present_wallTimeLimit) {
+ if (!(this_present_wallTimeLimit && that_present_wallTimeLimit))
+ return false;
+ if (this.wallTimeLimit != that.wallTimeLimit)
+ return false;
+ }
+
+ boolean this_present_jobStartTime = true && this.isSetJobStartTime();
+ boolean that_present_jobStartTime = true && that.isSetJobStartTime();
+ if (this_present_jobStartTime || that_present_jobStartTime) {
+ if (!(this_present_jobStartTime && that_present_jobStartTime))
+ return false;
+ if (this.jobStartTime != that.jobStartTime)
+ return false;
+ }
+
+ boolean this_present_totalPhysicalMemory = true && this.isSetTotalPhysicalMemory();
+ boolean that_present_totalPhysicalMemory = true && that.isSetTotalPhysicalMemory();
+ if (this_present_totalPhysicalMemory || that_present_totalPhysicalMemory) {
+ if (!(this_present_totalPhysicalMemory && that_present_totalPhysicalMemory))
+ return false;
+ if (this.totalPhysicalMemory != that.totalPhysicalMemory)
+ return false;
+ }
+
+ boolean this_present_ComputationalProjectAccount = true && this.isSetComputationalProjectAccount();
+ boolean that_present_ComputationalProjectAccount = true && that.isSetComputationalProjectAccount();
+ if (this_present_ComputationalProjectAccount || that_present_ComputationalProjectAccount) {
+ if (!(this_present_ComputationalProjectAccount && that_present_ComputationalProjectAccount))
+ return false;
+ if (!this.ComputationalProjectAccount.equals(that.ComputationalProjectAccount))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ComputationalResourceScheduling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataAutoSchedule()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataAutoSchedule, other.airavataAutoSchedule);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOverrideManualScheduledParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overrideManualScheduledParams, other.overrideManualScheduledParams);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceHostId()).compareTo(other.isSetResourceHostId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceHostId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceHostId, other.resourceHostId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTotalCPUCount()).compareTo(other.isSetTotalCPUCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTotalCPUCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalCPUCount, other.totalCPUCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeCount()).compareTo(other.isSetNodeCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeCount, other.nodeCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNumberOfThreads()).compareTo(other.isSetNumberOfThreads());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumberOfThreads()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfThreads, other.numberOfThreads);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQueueName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWallTimeLimit()).compareTo(other.isSetWallTimeLimit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWallTimeLimit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallTimeLimit, other.wallTimeLimit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobStartTime()).compareTo(other.isSetJobStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStartTime, other.jobStartTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTotalPhysicalMemory()).compareTo(other.isSetTotalPhysicalMemory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTotalPhysicalMemory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPhysicalMemory, other.totalPhysicalMemory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalProjectAccount()).compareTo(other.isSetComputationalProjectAccount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalProjectAccount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ComputationalProjectAccount, other.ComputationalProjectAccount);
+ 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("ComputationalResourceScheduling(");
+ boolean first = true;
+
+ sb.append("airavataAutoSchedule:");
+ sb.append(this.airavataAutoSchedule);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("overrideManualScheduledParams:");
+ sb.append(this.overrideManualScheduledParams);
+ first = false;
+ if (isSetResourceHostId()) {
+ if (!first) sb.append(", ");
+ sb.append("resourceHostId:");
+ if (this.resourceHostId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceHostId);
+ }
+ first = false;
+ }
+ if (isSetTotalCPUCount()) {
+ if (!first) sb.append(", ");
+ sb.append("totalCPUCount:");
+ sb.append(this.totalCPUCount);
+ first = false;
+ }
+ if (isSetNodeCount()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeCount:");
+ sb.append(this.nodeCount);
+ first = false;
+ }
+ if (isSetNumberOfThreads()) {
+ if (!first) sb.append(", ");
+ sb.append("numberOfThreads:");
+ sb.append(this.numberOfThreads);
+ first = false;
+ }
+ if (isSetQueueName()) {
+ if (!first) sb.append(", ");
+ sb.append("queueName:");
+ if (this.queueName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.queueName);
+ }
+ first = false;
+ }
+ if (isSetWallTimeLimit()) {
+ if (!first) sb.append(", ");
+ sb.append("wallTimeLimit:");
+ sb.append(this.wallTimeLimit);
+ first = false;
+ }
+ if (isSetJobStartTime()) {
+ if (!first) sb.append(", ");
+ sb.append("jobStartTime:");
+ sb.append(this.jobStartTime);
+ first = false;
+ }
+ if (isSetTotalPhysicalMemory()) {
+ if (!first) sb.append(", ");
+ sb.append("totalPhysicalMemory:");
+ sb.append(this.totalPhysicalMemory);
+ first = false;
+ }
+ if (isSetComputationalProjectAccount()) {
+ if (!first) sb.append(", ");
+ sb.append("ComputationalProjectAccount:");
+ if (this.ComputationalProjectAccount == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ComputationalProjectAccount);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // alas, we cannot check 'airavataAutoSchedule' because it's a primitive and you chose the non-beans generator.
+ // alas, we cannot check 'overrideManualScheduledParams' because it's a primitive and you chose the non-beans generator.
+ // 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 ComputationalResourceSchedulingStandardSchemeFactory implements SchemeFactory {
+ public ComputationalResourceSchedulingStandardScheme getScheme() {
+ return new ComputationalResourceSchedulingStandardScheme();
+ }
+ }
+
+ private static class ComputationalResourceSchedulingStandardScheme extends StandardScheme<ComputationalResourceScheduling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ComputationalResourceScheduling 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: // AIRAVATA_AUTO_SCHEDULE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RESOURCE_HOST_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.resourceHostId = iprot.readString();
+ struct.setResourceHostIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // TOTAL_CPUCOUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.totalCPUCount = iprot.readI32();
+ struct.setTotalCPUCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NODE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // NUMBER_OF_THREADS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.numberOfThreads = iprot.readI32();
+ struct.setNumberOfThreadsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // QUEUE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // WALL_TIME_LIMIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.wallTimeLimit = iprot.readI32();
+ struct.setWallTimeLimitIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // JOB_START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.jobStartTime = iprot.readI32();
+ struct.setJobStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // TOTAL_PHYSICAL_MEMORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.totalPhysicalMemory = iprot.readI32();
+ struct.setTotalPhysicalMemoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ComputationalProjectAccount = iprot.readString();
+ struct.setComputationalProjectAccountIsSet(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
+ if (!struct.isSetAiravataAutoSchedule()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataAutoSchedule' was not found in serialized data! Struct: " + toString());
+ }
+ if (!struct.isSetOverrideManualScheduledParams()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'overrideManualScheduledParams' was not found in serialized data! Struct: " + toString());
+ }
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(AIRAVATA_AUTO_SCHEDULE_FIELD_DESC);
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ oprot.writeFieldEnd();
+ if (struct.resourceHostId != null) {
+ if (struct.isSetResourceHostId()) {
+ oprot.writeFieldBegin(RESOURCE_HOST_ID_FIELD_DESC);
+ oprot.writeString(struct.resourceHostId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetTotalCPUCount()) {
+ oprot.writeFieldBegin(TOTAL_CPUCOUNT_FIELD_DESC);
+ oprot.writeI32(struct.totalCPUCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeFieldBegin(NODE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.nodeCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetNumberOfThreads()) {
+ oprot.writeFieldBegin(NUMBER_OF_THREADS_FIELD_DESC);
+ oprot.writeI32(struct.numberOfThreads);
+ oprot.writeFieldEnd();
+ }
+ if (struct.queueName != null) {
+ if (struct.isSetQueueName()) {
+ oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
+ oprot.writeString(struct.queueName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetWallTimeLimit()) {
+ oprot.writeFieldBegin(WALL_TIME_LIMIT_FIELD_DESC);
+ oprot.writeI32(struct.wallTimeLimit);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetJobStartTime()) {
+ oprot.writeFieldBegin(JOB_START_TIME_FIELD_DESC);
+ oprot.writeI32(struct.jobStartTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ oprot.writeFieldBegin(TOTAL_PHYSICAL_MEMORY_FIELD_DESC);
+ oprot.writeI32(struct.totalPhysicalMemory);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ComputationalProjectAccount != null) {
+ if (struct.isSetComputationalProjectAccount()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC);
+ oprot.writeString(struct.ComputationalProjectAccount);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ComputationalResourceSchedulingTupleSchemeFactory implements SchemeFactory {
+ public ComputationalResourceSchedulingTupleScheme getScheme() {
+ return new ComputationalResourceSchedulingTupleScheme();
+ }
+ }
+
+ private static class ComputationalResourceSchedulingTupleScheme extends TupleScheme<ComputationalResourceScheduling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ BitSet optionals = new BitSet();
+ if (struct.isSetResourceHostId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTotalCPUCount()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNodeCount()) {
+ optionals.set(2);
+ }
+ if (struct.isSetNumberOfThreads()) {
+ optionals.set(3);
+ }
+ if (struct.isSetQueueName()) {
+ optionals.set(4);
+ }
+ if (struct.isSetWallTimeLimit()) {
+ optionals.set(5);
+ }
+ if (struct.isSetJobStartTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ optionals.set(7);
+ }
+ if (struct.isSetComputationalProjectAccount()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
+ if (struct.isSetResourceHostId()) {
+ oprot.writeString(struct.resourceHostId);
+ }
+ if (struct.isSetTotalCPUCount()) {
+ oprot.writeI32(struct.totalCPUCount);
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeI32(struct.nodeCount);
+ }
+ if (struct.isSetNumberOfThreads()) {
+ oprot.writeI32(struct.numberOfThreads);
+ }
+ if (struct.isSetQueueName()) {
+ oprot.writeString(struct.queueName);
+ }
+ if (struct.isSetWallTimeLimit()) {
+ oprot.writeI32(struct.wallTimeLimit);
+ }
+ if (struct.isSetJobStartTime()) {
+ oprot.writeI32(struct.jobStartTime);
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ oprot.writeI32(struct.totalPhysicalMemory);
+ }
+ if (struct.isSetComputationalProjectAccount()) {
+ oprot.writeString(struct.ComputationalProjectAccount);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ BitSet incoming = iprot.readBitSet(9);
+ if (incoming.get(0)) {
+ struct.resourceHostId = iprot.readString();
+ struct.setResourceHostIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.totalCPUCount = iprot.readI32();
+ struct.setTotalCPUCountIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.numberOfThreads = iprot.readI32();
+ struct.setNumberOfThreadsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.wallTimeLimit = iprot.readI32();
+ struct.setWallTimeLimitIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.jobStartTime = iprot.readI32();
+ struct.setJobStartTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.totalPhysicalMemory = iprot.readI32();
+ struct.setTotalPhysicalMemoryIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.ComputationalProjectAccount = iprot.readString();
+ struct.setComputationalProjectAccountIsSet(true);
+ }
+ }
+ }
+
+}
+
[02/16] git commit: updating script to use rsync for sycning
generated code
Posted by sm...@apache.org.
updating script to use rsync for sycning generated code
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/85f95280
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/85f95280
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/85f95280
Branch: refs/heads/master
Commit: 85f95280f72770116588bc6638d42fe380bf015d
Parents: a977952
Author: Suresh Marru <sm...@apache.org>
Authored: Sat Feb 8 22:10:47 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Sat Feb 8 22:10:47 2014 -0500
----------------------------------------------------------------------
airavata-api/generate-thrift-files.sh | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/85f95280/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index 95b1d64..7993a35 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -84,16 +84,9 @@ copy_changed_files() {
echo "Generated sources are in $GENERATED_CODE_DIR"
echo "Destination workspace is in $WORKSPACE_SRC_DIR"
-# SDIR="${GENERATED_CODE_DIR}/org/apache/airavata/model/experiment"
-# DDIR="${EXISTING_SRC_DIR}/org/apache/airavata/model/experiment"
-# mkdir -p "$DDIR"
-# for f in "$SDIR"/*.java; do
-# DEST="$DDIR/`basename $f`"
-# if ! cmp -s "${f}-with-license" "${DEST}" ; then
-# echo "Copying ${f}-with-license to ${DEST}"
-# cp -f "${f}-with-license" "${DEST}" || fail unable to copy files to java workspace
-# fi
-# done
+ # Check if the newly generated files exist in the targetted workspace, if not copy. Only changed files will be synced.
+ # the extra slash to GENERATED_CODE_DIR is needed to ensure the parent directory itself is not copied.
+ rsync -auv $GENERATED_CODE_DIR/ $WORKSPACE_SRC_DIR
}
# Generation of thrift files will require installing Apache Thrift. Please add thrift to your path.
@@ -132,10 +125,10 @@ thrift ${THRIFT_ARGS} --gen java $THRIFT_IDL_DIR/airavataAPI.thrift || fail unab
add_license_header $JAVA_GEN_DIR
# Compare the newly generated classes with existing server skelton sources and replace the changed ones.
-#copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
+copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
# Compare the newly generated classes with existing java client stub sources and replace the changed ones.
-#copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
+copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
##############################
# Update Airavata Data Model #
@@ -159,7 +152,7 @@ add_license_header $JAVA_BEAN_GEN_DIR
copy_changed_files $JAVA_BEAN_GEN_DIR $DATAMODEL_SRC_DIR
# CleanUp: Delete the base target build directory
-#rm -rf $BASE_TARGET_DIR
+rm -rf $BASE_TARGET_DIR
echo "Successfully generated new sources, compared against exiting code and replaced the changed files"
exit 0
\ No newline at end of file
[13/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
new file mode 100644
index 0000000..a0572d3
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
@@ -0,0 +1,403 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
+ * or a parameter is malformed.
+ *
+ * message: contains the associated error message.
+ */
+@SuppressWarnings("all") public class InvalidRequestException extends TException implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 InvalidRequestExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new InvalidRequestExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
+ }
+
+ public InvalidRequestException() {
+ }
+
+ public InvalidRequestException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public InvalidRequestException(InvalidRequestException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public InvalidRequestException deepCopy() {
+ return new InvalidRequestException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public InvalidRequestException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof InvalidRequestException)
+ return this.equals((InvalidRequestException)that);
+ return false;
+ }
+
+ public boolean equals(InvalidRequestException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(InvalidRequestException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("InvalidRequestException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 InvalidRequestExceptionStandardSchemeFactory implements SchemeFactory {
+ public InvalidRequestExceptionStandardScheme getScheme() {
+ return new InvalidRequestExceptionStandardScheme();
+ }
+ }
+
+ private static class InvalidRequestExceptionStandardScheme extends StandardScheme<InvalidRequestException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidRequestException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, InvalidRequestException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class InvalidRequestExceptionTupleSchemeFactory implements SchemeFactory {
+ public InvalidRequestExceptionTupleScheme getScheme() {
+ return new InvalidRequestExceptionTupleScheme();
+ }
+ }
+
+ private static class InvalidRequestExceptionTupleScheme extends TupleScheme<InvalidRequestException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/TimedOutException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/TimedOutException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/TimedOutException.java
new file mode 100644
index 0000000..a746de0
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/TimedOutException.java
@@ -0,0 +1,299 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown when RPC timeout gets exceeded.
+ */
+@SuppressWarnings("all") public class TimedOutException extends TException implements org.apache.thrift.TBase<TimedOutException, TimedOutException._Fields>, java.io.Serializable, Cloneable, Comparable<TimedOutException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimedOutException");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TimedOutExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TimedOutExceptionTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ 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) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimedOutException.class, metaDataMap);
+ }
+
+ public TimedOutException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TimedOutException(TimedOutException other) {
+ }
+
+ public TimedOutException deepCopy() {
+ return new TimedOutException(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TimedOutException)
+ return this.equals((TimedOutException)that);
+ return false;
+ }
+
+ public boolean equals(TimedOutException that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TimedOutException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TimedOutException(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TimedOutExceptionStandardSchemeFactory implements SchemeFactory {
+ public TimedOutExceptionStandardScheme getScheme() {
+ return new TimedOutExceptionStandardScheme();
+ }
+ }
+
+ private static class TimedOutExceptionStandardScheme extends StandardScheme<TimedOutException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TimedOutException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TimedOutException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TimedOutExceptionTupleSchemeFactory implements SchemeFactory {
+ public TimedOutExceptionTupleScheme getScheme() {
+ return new TimedOutExceptionTupleScheme();
+ }
+ }
+
+ private static class TimedOutExceptionTupleScheme extends TupleScheme<TimedOutException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
new file mode 100644
index 0000000..4cf5045
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
@@ -0,0 +1,706 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding specified input data handling.
+ *
+ */
+@SuppressWarnings("all") public class AdvancedInputDataHandling implements org.apache.thrift.TBase<AdvancedInputDataHandling, AdvancedInputDataHandling._Fields>, java.io.Serializable, Cloneable, Comparable<AdvancedInputDataHandling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedInputDataHandling");
+
+ private static final org.apache.thrift.protocol.TField STAGE_INPUT_FILES_TO_WORKING_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("stageInputFilesToWorkingDir", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField WORKING_DIRECTORY_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("workingDirectoryParent", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField UNIQUE_WORKING_DIRECTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueWorkingDirectory", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField CLEAN_UP_WORKING_DIR_AFTER_JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("cleanUpWorkingDirAfterJob", org.apache.thrift.protocol.TType.BOOL, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AdvancedInputDataHandlingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AdvancedInputDataHandlingTupleSchemeFactory());
+ }
+
+ public boolean stageInputFilesToWorkingDir; // optional
+ public String workingDirectoryParent; // optional
+ public String uniqueWorkingDirectory; // optional
+ public boolean cleanUpWorkingDirAfterJob; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ STAGE_INPUT_FILES_TO_WORKING_DIR((short)1, "stageInputFilesToWorkingDir"),
+ WORKING_DIRECTORY_PARENT((short)2, "workingDirectoryParent"),
+ UNIQUE_WORKING_DIRECTORY((short)3, "uniqueWorkingDirectory"),
+ CLEAN_UP_WORKING_DIR_AFTER_JOB((short)4, "cleanUpWorkingDirAfterJob");
+
+ 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: // STAGE_INPUT_FILES_TO_WORKING_DIR
+ return STAGE_INPUT_FILES_TO_WORKING_DIR;
+ case 2: // WORKING_DIRECTORY_PARENT
+ return WORKING_DIRECTORY_PARENT;
+ case 3: // UNIQUE_WORKING_DIRECTORY
+ return UNIQUE_WORKING_DIRECTORY;
+ case 4: // CLEAN_UP_WORKING_DIR_AFTER_JOB
+ return CLEAN_UP_WORKING_DIR_AFTER_JOB;
+ 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 __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID = 0;
+ private static final int __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.STAGE_INPUT_FILES_TO_WORKING_DIR,_Fields.WORKING_DIRECTORY_PARENT,_Fields.UNIQUE_WORKING_DIRECTORY,_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB};
+ 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.STAGE_INPUT_FILES_TO_WORKING_DIR, new org.apache.thrift.meta_data.FieldMetaData("stageInputFilesToWorkingDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.WORKING_DIRECTORY_PARENT, new org.apache.thrift.meta_data.FieldMetaData("workingDirectoryParent", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UNIQUE_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("uniqueWorkingDirectory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB, new org.apache.thrift.meta_data.FieldMetaData("cleanUpWorkingDirAfterJob", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdvancedInputDataHandling.class, metaDataMap);
+ }
+
+ public AdvancedInputDataHandling() {
+ this.stageInputFilesToWorkingDir = false;
+
+ this.cleanUpWorkingDirAfterJob = false;
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AdvancedInputDataHandling(AdvancedInputDataHandling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.stageInputFilesToWorkingDir = other.stageInputFilesToWorkingDir;
+ if (other.isSetWorkingDirectoryParent()) {
+ this.workingDirectoryParent = other.workingDirectoryParent;
+ }
+ if (other.isSetUniqueWorkingDirectory()) {
+ this.uniqueWorkingDirectory = other.uniqueWorkingDirectory;
+ }
+ this.cleanUpWorkingDirAfterJob = other.cleanUpWorkingDirAfterJob;
+ }
+
+ public AdvancedInputDataHandling deepCopy() {
+ return new AdvancedInputDataHandling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.stageInputFilesToWorkingDir = false;
+
+ this.workingDirectoryParent = null;
+ this.uniqueWorkingDirectory = null;
+ this.cleanUpWorkingDirAfterJob = false;
+
+ }
+
+ public boolean isStageInputFilesToWorkingDir() {
+ return this.stageInputFilesToWorkingDir;
+ }
+
+ public AdvancedInputDataHandling setStageInputFilesToWorkingDir(boolean stageInputFilesToWorkingDir) {
+ this.stageInputFilesToWorkingDir = stageInputFilesToWorkingDir;
+ setStageInputFilesToWorkingDirIsSet(true);
+ return this;
+ }
+
+ public void unsetStageInputFilesToWorkingDir() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID);
+ }
+
+ /** Returns true if field stageInputFilesToWorkingDir is set (has been assigned a value) and false otherwise */
+ public boolean isSetStageInputFilesToWorkingDir() {
+ return EncodingUtils.testBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID);
+ }
+
+ public void setStageInputFilesToWorkingDirIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID, value);
+ }
+
+ public String getWorkingDirectoryParent() {
+ return this.workingDirectoryParent;
+ }
+
+ public AdvancedInputDataHandling setWorkingDirectoryParent(String workingDirectoryParent) {
+ this.workingDirectoryParent = workingDirectoryParent;
+ return this;
+ }
+
+ public void unsetWorkingDirectoryParent() {
+ this.workingDirectoryParent = null;
+ }
+
+ /** Returns true if field workingDirectoryParent is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkingDirectoryParent() {
+ return this.workingDirectoryParent != null;
+ }
+
+ public void setWorkingDirectoryParentIsSet(boolean value) {
+ if (!value) {
+ this.workingDirectoryParent = null;
+ }
+ }
+
+ public String getUniqueWorkingDirectory() {
+ return this.uniqueWorkingDirectory;
+ }
+
+ public AdvancedInputDataHandling setUniqueWorkingDirectory(String uniqueWorkingDirectory) {
+ this.uniqueWorkingDirectory = uniqueWorkingDirectory;
+ return this;
+ }
+
+ public void unsetUniqueWorkingDirectory() {
+ this.uniqueWorkingDirectory = null;
+ }
+
+ /** Returns true if field uniqueWorkingDirectory is set (has been assigned a value) and false otherwise */
+ public boolean isSetUniqueWorkingDirectory() {
+ return this.uniqueWorkingDirectory != null;
+ }
+
+ public void setUniqueWorkingDirectoryIsSet(boolean value) {
+ if (!value) {
+ this.uniqueWorkingDirectory = null;
+ }
+ }
+
+ public boolean isCleanUpWorkingDirAfterJob() {
+ return this.cleanUpWorkingDirAfterJob;
+ }
+
+ public AdvancedInputDataHandling setCleanUpWorkingDirAfterJob(boolean cleanUpWorkingDirAfterJob) {
+ this.cleanUpWorkingDirAfterJob = cleanUpWorkingDirAfterJob;
+ setCleanUpWorkingDirAfterJobIsSet(true);
+ return this;
+ }
+
+ public void unsetCleanUpWorkingDirAfterJob() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID);
+ }
+
+ /** Returns true if field cleanUpWorkingDirAfterJob is set (has been assigned a value) and false otherwise */
+ public boolean isSetCleanUpWorkingDirAfterJob() {
+ return EncodingUtils.testBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID);
+ }
+
+ public void setCleanUpWorkingDirAfterJobIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case STAGE_INPUT_FILES_TO_WORKING_DIR:
+ if (value == null) {
+ unsetStageInputFilesToWorkingDir();
+ } else {
+ setStageInputFilesToWorkingDir((Boolean)value);
+ }
+ break;
+
+ case WORKING_DIRECTORY_PARENT:
+ if (value == null) {
+ unsetWorkingDirectoryParent();
+ } else {
+ setWorkingDirectoryParent((String)value);
+ }
+ break;
+
+ case UNIQUE_WORKING_DIRECTORY:
+ if (value == null) {
+ unsetUniqueWorkingDirectory();
+ } else {
+ setUniqueWorkingDirectory((String)value);
+ }
+ break;
+
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ if (value == null) {
+ unsetCleanUpWorkingDirAfterJob();
+ } else {
+ setCleanUpWorkingDirAfterJob((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STAGE_INPUT_FILES_TO_WORKING_DIR:
+ return Boolean.valueOf(isStageInputFilesToWorkingDir());
+
+ case WORKING_DIRECTORY_PARENT:
+ return getWorkingDirectoryParent();
+
+ case UNIQUE_WORKING_DIRECTORY:
+ return getUniqueWorkingDirectory();
+
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ return Boolean.valueOf(isCleanUpWorkingDirAfterJob());
+
+ }
+ 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 STAGE_INPUT_FILES_TO_WORKING_DIR:
+ return isSetStageInputFilesToWorkingDir();
+ case WORKING_DIRECTORY_PARENT:
+ return isSetWorkingDirectoryParent();
+ case UNIQUE_WORKING_DIRECTORY:
+ return isSetUniqueWorkingDirectory();
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ return isSetCleanUpWorkingDirAfterJob();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AdvancedInputDataHandling)
+ return this.equals((AdvancedInputDataHandling)that);
+ return false;
+ }
+
+ public boolean equals(AdvancedInputDataHandling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_stageInputFilesToWorkingDir = true && this.isSetStageInputFilesToWorkingDir();
+ boolean that_present_stageInputFilesToWorkingDir = true && that.isSetStageInputFilesToWorkingDir();
+ if (this_present_stageInputFilesToWorkingDir || that_present_stageInputFilesToWorkingDir) {
+ if (!(this_present_stageInputFilesToWorkingDir && that_present_stageInputFilesToWorkingDir))
+ return false;
+ if (this.stageInputFilesToWorkingDir != that.stageInputFilesToWorkingDir)
+ return false;
+ }
+
+ boolean this_present_workingDirectoryParent = true && this.isSetWorkingDirectoryParent();
+ boolean that_present_workingDirectoryParent = true && that.isSetWorkingDirectoryParent();
+ if (this_present_workingDirectoryParent || that_present_workingDirectoryParent) {
+ if (!(this_present_workingDirectoryParent && that_present_workingDirectoryParent))
+ return false;
+ if (!this.workingDirectoryParent.equals(that.workingDirectoryParent))
+ return false;
+ }
+
+ boolean this_present_uniqueWorkingDirectory = true && this.isSetUniqueWorkingDirectory();
+ boolean that_present_uniqueWorkingDirectory = true && that.isSetUniqueWorkingDirectory();
+ if (this_present_uniqueWorkingDirectory || that_present_uniqueWorkingDirectory) {
+ if (!(this_present_uniqueWorkingDirectory && that_present_uniqueWorkingDirectory))
+ return false;
+ if (!this.uniqueWorkingDirectory.equals(that.uniqueWorkingDirectory))
+ return false;
+ }
+
+ boolean this_present_cleanUpWorkingDirAfterJob = true && this.isSetCleanUpWorkingDirAfterJob();
+ boolean that_present_cleanUpWorkingDirAfterJob = true && that.isSetCleanUpWorkingDirAfterJob();
+ if (this_present_cleanUpWorkingDirAfterJob || that_present_cleanUpWorkingDirAfterJob) {
+ if (!(this_present_cleanUpWorkingDirAfterJob && that_present_cleanUpWorkingDirAfterJob))
+ return false;
+ if (this.cleanUpWorkingDirAfterJob != that.cleanUpWorkingDirAfterJob)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AdvancedInputDataHandling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStageInputFilesToWorkingDir()).compareTo(other.isSetStageInputFilesToWorkingDir());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStageInputFilesToWorkingDir()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageInputFilesToWorkingDir, other.stageInputFilesToWorkingDir);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkingDirectoryParent()).compareTo(other.isSetWorkingDirectoryParent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkingDirectoryParent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workingDirectoryParent, other.workingDirectoryParent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUniqueWorkingDirectory()).compareTo(other.isSetUniqueWorkingDirectory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUniqueWorkingDirectory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueWorkingDirectory, other.uniqueWorkingDirectory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCleanUpWorkingDirAfterJob()).compareTo(other.isSetCleanUpWorkingDirAfterJob());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCleanUpWorkingDirAfterJob()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cleanUpWorkingDirAfterJob, other.cleanUpWorkingDirAfterJob);
+ 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("AdvancedInputDataHandling(");
+ boolean first = true;
+
+ if (isSetStageInputFilesToWorkingDir()) {
+ sb.append("stageInputFilesToWorkingDir:");
+ sb.append(this.stageInputFilesToWorkingDir);
+ first = false;
+ }
+ if (isSetWorkingDirectoryParent()) {
+ if (!first) sb.append(", ");
+ sb.append("workingDirectoryParent:");
+ if (this.workingDirectoryParent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workingDirectoryParent);
+ }
+ first = false;
+ }
+ if (isSetUniqueWorkingDirectory()) {
+ if (!first) sb.append(", ");
+ sb.append("uniqueWorkingDirectory:");
+ if (this.uniqueWorkingDirectory == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uniqueWorkingDirectory);
+ }
+ first = false;
+ }
+ if (isSetCleanUpWorkingDirAfterJob()) {
+ if (!first) sb.append(", ");
+ sb.append("cleanUpWorkingDirAfterJob:");
+ sb.append(this.cleanUpWorkingDirAfterJob);
+ 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 AdvancedInputDataHandlingStandardSchemeFactory implements SchemeFactory {
+ public AdvancedInputDataHandlingStandardScheme getScheme() {
+ return new AdvancedInputDataHandlingStandardScheme();
+ }
+ }
+
+ private static class AdvancedInputDataHandlingStandardScheme extends StandardScheme<AdvancedInputDataHandling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AdvancedInputDataHandling 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: // STAGE_INPUT_FILES_TO_WORKING_DIR
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.stageInputFilesToWorkingDir = iprot.readBool();
+ struct.setStageInputFilesToWorkingDirIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // WORKING_DIRECTORY_PARENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workingDirectoryParent = iprot.readString();
+ struct.setWorkingDirectoryParentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // UNIQUE_WORKING_DIRECTORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uniqueWorkingDirectory = iprot.readString();
+ struct.setUniqueWorkingDirectoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CLEAN_UP_WORKING_DIR_AFTER_JOB
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.cleanUpWorkingDirAfterJob = iprot.readBool();
+ struct.setCleanUpWorkingDirAfterJobIsSet(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, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ oprot.writeFieldBegin(STAGE_INPUT_FILES_TO_WORKING_DIR_FIELD_DESC);
+ oprot.writeBool(struct.stageInputFilesToWorkingDir);
+ oprot.writeFieldEnd();
+ }
+ if (struct.workingDirectoryParent != null) {
+ if (struct.isSetWorkingDirectoryParent()) {
+ oprot.writeFieldBegin(WORKING_DIRECTORY_PARENT_FIELD_DESC);
+ oprot.writeString(struct.workingDirectoryParent);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.uniqueWorkingDirectory != null) {
+ if (struct.isSetUniqueWorkingDirectory()) {
+ oprot.writeFieldBegin(UNIQUE_WORKING_DIRECTORY_FIELD_DESC);
+ oprot.writeString(struct.uniqueWorkingDirectory);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ oprot.writeFieldBegin(CLEAN_UP_WORKING_DIR_AFTER_JOB_FIELD_DESC);
+ oprot.writeBool(struct.cleanUpWorkingDirAfterJob);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AdvancedInputDataHandlingTupleSchemeFactory implements SchemeFactory {
+ public AdvancedInputDataHandlingTupleScheme getScheme() {
+ return new AdvancedInputDataHandlingTupleScheme();
+ }
+ }
+
+ private static class AdvancedInputDataHandlingTupleScheme extends TupleScheme<AdvancedInputDataHandling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ optionals.set(0);
+ }
+ if (struct.isSetWorkingDirectoryParent()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUniqueWorkingDirectory()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ oprot.writeBool(struct.stageInputFilesToWorkingDir);
+ }
+ if (struct.isSetWorkingDirectoryParent()) {
+ oprot.writeString(struct.workingDirectoryParent);
+ }
+ if (struct.isSetUniqueWorkingDirectory()) {
+ oprot.writeString(struct.uniqueWorkingDirectory);
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ oprot.writeBool(struct.cleanUpWorkingDirAfterJob);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.stageInputFilesToWorkingDir = iprot.readBool();
+ struct.setStageInputFilesToWorkingDirIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.workingDirectoryParent = iprot.readString();
+ struct.setWorkingDirectoryParentIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.uniqueWorkingDirectory = iprot.readString();
+ struct.setUniqueWorkingDirectoryIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.cleanUpWorkingDirAfterJob = iprot.readBool();
+ struct.setCleanUpWorkingDirAfterJobIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
new file mode 100644
index 0000000..7bec30e
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
@@ -0,0 +1,609 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding specified output data handling.
+ *
+ */
+@SuppressWarnings("all") public class AdvancedOutputDataHandling implements org.apache.thrift.TBase<AdvancedOutputDataHandling, AdvancedOutputDataHandling._Fields>, java.io.Serializable, Cloneable, Comparable<AdvancedOutputDataHandling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedOutputDataHandling");
+
+ private static final org.apache.thrift.protocol.TField OUTPUTDATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("outputdataDir", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DATA_REGISTRY_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegistryURL", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField PERSIST_OUTPUT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("persistOutputData", org.apache.thrift.protocol.TType.BOOL, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AdvancedOutputDataHandlingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AdvancedOutputDataHandlingTupleSchemeFactory());
+ }
+
+ public String outputdataDir; // optional
+ public String dataRegistryURL; // optional
+ public boolean persistOutputData; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ OUTPUTDATA_DIR((short)2, "outputdataDir"),
+ DATA_REGISTRY_URL((short)3, "dataRegistryURL"),
+ PERSIST_OUTPUT_DATA((short)4, "persistOutputData");
+
+ 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 2: // OUTPUTDATA_DIR
+ return OUTPUTDATA_DIR;
+ case 3: // DATA_REGISTRY_URL
+ return DATA_REGISTRY_URL;
+ case 4: // PERSIST_OUTPUT_DATA
+ return PERSIST_OUTPUT_DATA;
+ 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 __PERSISTOUTPUTDATA_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.OUTPUTDATA_DIR,_Fields.DATA_REGISTRY_URL,_Fields.PERSIST_OUTPUT_DATA};
+ 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.OUTPUTDATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputdataDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DATA_REGISTRY_URL, new org.apache.thrift.meta_data.FieldMetaData("dataRegistryURL", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PERSIST_OUTPUT_DATA, new org.apache.thrift.meta_data.FieldMetaData("persistOutputData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdvancedOutputDataHandling.class, metaDataMap);
+ }
+
+ public AdvancedOutputDataHandling() {
+ this.persistOutputData = true;
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AdvancedOutputDataHandling(AdvancedOutputDataHandling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetOutputdataDir()) {
+ this.outputdataDir = other.outputdataDir;
+ }
+ if (other.isSetDataRegistryURL()) {
+ this.dataRegistryURL = other.dataRegistryURL;
+ }
+ this.persistOutputData = other.persistOutputData;
+ }
+
+ public AdvancedOutputDataHandling deepCopy() {
+ return new AdvancedOutputDataHandling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.outputdataDir = null;
+ this.dataRegistryURL = null;
+ this.persistOutputData = true;
+
+ }
+
+ public String getOutputdataDir() {
+ return this.outputdataDir;
+ }
+
+ public AdvancedOutputDataHandling setOutputdataDir(String outputdataDir) {
+ this.outputdataDir = outputdataDir;
+ return this;
+ }
+
+ public void unsetOutputdataDir() {
+ this.outputdataDir = null;
+ }
+
+ /** Returns true if field outputdataDir is set (has been assigned a value) and false otherwise */
+ public boolean isSetOutputdataDir() {
+ return this.outputdataDir != null;
+ }
+
+ public void setOutputdataDirIsSet(boolean value) {
+ if (!value) {
+ this.outputdataDir = null;
+ }
+ }
+
+ public String getDataRegistryURL() {
+ return this.dataRegistryURL;
+ }
+
+ public AdvancedOutputDataHandling setDataRegistryURL(String dataRegistryURL) {
+ this.dataRegistryURL = dataRegistryURL;
+ return this;
+ }
+
+ public void unsetDataRegistryURL() {
+ this.dataRegistryURL = null;
+ }
+
+ /** Returns true if field dataRegistryURL is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataRegistryURL() {
+ return this.dataRegistryURL != null;
+ }
+
+ public void setDataRegistryURLIsSet(boolean value) {
+ if (!value) {
+ this.dataRegistryURL = null;
+ }
+ }
+
+ public boolean isPersistOutputData() {
+ return this.persistOutputData;
+ }
+
+ public AdvancedOutputDataHandling setPersistOutputData(boolean persistOutputData) {
+ this.persistOutputData = persistOutputData;
+ setPersistOutputDataIsSet(true);
+ return this;
+ }
+
+ public void unsetPersistOutputData() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID);
+ }
+
+ /** Returns true if field persistOutputData is set (has been assigned a value) and false otherwise */
+ public boolean isSetPersistOutputData() {
+ return EncodingUtils.testBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID);
+ }
+
+ public void setPersistOutputDataIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OUTPUTDATA_DIR:
+ if (value == null) {
+ unsetOutputdataDir();
+ } else {
+ setOutputdataDir((String)value);
+ }
+ break;
+
+ case DATA_REGISTRY_URL:
+ if (value == null) {
+ unsetDataRegistryURL();
+ } else {
+ setDataRegistryURL((String)value);
+ }
+ break;
+
+ case PERSIST_OUTPUT_DATA:
+ if (value == null) {
+ unsetPersistOutputData();
+ } else {
+ setPersistOutputData((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OUTPUTDATA_DIR:
+ return getOutputdataDir();
+
+ case DATA_REGISTRY_URL:
+ return getDataRegistryURL();
+
+ case PERSIST_OUTPUT_DATA:
+ return Boolean.valueOf(isPersistOutputData());
+
+ }
+ 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 OUTPUTDATA_DIR:
+ return isSetOutputdataDir();
+ case DATA_REGISTRY_URL:
+ return isSetDataRegistryURL();
+ case PERSIST_OUTPUT_DATA:
+ return isSetPersistOutputData();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AdvancedOutputDataHandling)
+ return this.equals((AdvancedOutputDataHandling)that);
+ return false;
+ }
+
+ public boolean equals(AdvancedOutputDataHandling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_outputdataDir = true && this.isSetOutputdataDir();
+ boolean that_present_outputdataDir = true && that.isSetOutputdataDir();
+ if (this_present_outputdataDir || that_present_outputdataDir) {
+ if (!(this_present_outputdataDir && that_present_outputdataDir))
+ return false;
+ if (!this.outputdataDir.equals(that.outputdataDir))
+ return false;
+ }
+
+ boolean this_present_dataRegistryURL = true && this.isSetDataRegistryURL();
+ boolean that_present_dataRegistryURL = true && that.isSetDataRegistryURL();
+ if (this_present_dataRegistryURL || that_present_dataRegistryURL) {
+ if (!(this_present_dataRegistryURL && that_present_dataRegistryURL))
+ return false;
+ if (!this.dataRegistryURL.equals(that.dataRegistryURL))
+ return false;
+ }
+
+ boolean this_present_persistOutputData = true && this.isSetPersistOutputData();
+ boolean that_present_persistOutputData = true && that.isSetPersistOutputData();
+ if (this_present_persistOutputData || that_present_persistOutputData) {
+ if (!(this_present_persistOutputData && that_present_persistOutputData))
+ return false;
+ if (this.persistOutputData != that.persistOutputData)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AdvancedOutputDataHandling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOutputdataDir()).compareTo(other.isSetOutputdataDir());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOutputdataDir()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputdataDir, other.outputdataDir);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataRegistryURL()).compareTo(other.isSetDataRegistryURL());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataRegistryURL()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataRegistryURL, other.dataRegistryURL);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPersistOutputData()).compareTo(other.isSetPersistOutputData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPersistOutputData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistOutputData, other.persistOutputData);
+ 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("AdvancedOutputDataHandling(");
+ boolean first = true;
+
+ if (isSetOutputdataDir()) {
+ sb.append("outputdataDir:");
+ if (this.outputdataDir == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.outputdataDir);
+ }
+ first = false;
+ }
+ if (isSetDataRegistryURL()) {
+ if (!first) sb.append(", ");
+ sb.append("dataRegistryURL:");
+ if (this.dataRegistryURL == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataRegistryURL);
+ }
+ first = false;
+ }
+ if (isSetPersistOutputData()) {
+ if (!first) sb.append(", ");
+ sb.append("persistOutputData:");
+ sb.append(this.persistOutputData);
+ 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 AdvancedOutputDataHandlingStandardSchemeFactory implements SchemeFactory {
+ public AdvancedOutputDataHandlingStandardScheme getScheme() {
+ return new AdvancedOutputDataHandlingStandardScheme();
+ }
+ }
+
+ private static class AdvancedOutputDataHandlingStandardScheme extends StandardScheme<AdvancedOutputDataHandling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AdvancedOutputDataHandling 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 2: // OUTPUTDATA_DIR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.outputdataDir = iprot.readString();
+ struct.setOutputdataDirIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DATA_REGISTRY_URL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataRegistryURL = iprot.readString();
+ struct.setDataRegistryURLIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PERSIST_OUTPUT_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.persistOutputData = iprot.readBool();
+ struct.setPersistOutputDataIsSet(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, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.outputdataDir != null) {
+ if (struct.isSetOutputdataDir()) {
+ oprot.writeFieldBegin(OUTPUTDATA_DIR_FIELD_DESC);
+ oprot.writeString(struct.outputdataDir);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dataRegistryURL != null) {
+ if (struct.isSetDataRegistryURL()) {
+ oprot.writeFieldBegin(DATA_REGISTRY_URL_FIELD_DESC);
+ oprot.writeString(struct.dataRegistryURL);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetPersistOutputData()) {
+ oprot.writeFieldBegin(PERSIST_OUTPUT_DATA_FIELD_DESC);
+ oprot.writeBool(struct.persistOutputData);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AdvancedOutputDataHandlingTupleSchemeFactory implements SchemeFactory {
+ public AdvancedOutputDataHandlingTupleScheme getScheme() {
+ return new AdvancedOutputDataHandlingTupleScheme();
+ }
+ }
+
+ private static class AdvancedOutputDataHandlingTupleScheme extends TupleScheme<AdvancedOutputDataHandling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOutputdataDir()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDataRegistryURL()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPersistOutputData()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetOutputdataDir()) {
+ oprot.writeString(struct.outputdataDir);
+ }
+ if (struct.isSetDataRegistryURL()) {
+ oprot.writeString(struct.dataRegistryURL);
+ }
+ if (struct.isSetPersistOutputData()) {
+ oprot.writeBool(struct.persistOutputData);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.outputdataDir = iprot.readString();
+ struct.setOutputdataDirIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dataRegistryURL = iprot.readString();
+ struct.setDataRegistryURLIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.persistOutputData = iprot.readBool();
+ struct.setPersistOutputDataIsSet(true);
+ }
+ }
+ }
+
+}
+
[14/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/airavataAPIConstants.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
new file mode 100644
index 0000000..43739d7
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
@@ -0,0 +1,55 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api;
+
+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("all") public class airavataAPIConstants {
+
+ public static final String VERSION = "0.12.0";
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataClientException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
new file mode 100644
index 0000000..8050da8
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
@@ -0,0 +1,534 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem that a client may be able to resolve. For example, if the user
+ * attempts to execute an application on a resource gateway does not have access to.
+ *
+ * This exception would not be used for internal system errors that do not
+ * reflect user actions, but rather reflect a problem within the service that
+ * the client cannot resolve.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * parameter: If the error applied to a particular input parameter, this will
+ * indicate which parameter.
+ */
+@SuppressWarnings("all") public class AiravataClientException extends TException implements org.apache.thrift.TBase<AiravataClientException, AiravataClientException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataClientException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataClientException");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField PARAMETER_FIELD_DESC = new org.apache.thrift.protocol.TField("parameter", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AiravataClientExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AiravataClientExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType airavataErrorType; // required
+ public String parameter; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
+ PARAMETER((short)2, "parameter");
+
+ 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: // AIRAVATA_ERROR_TYPE
+ return AIRAVATA_ERROR_TYPE;
+ case 2: // PARAMETER
+ return PARAMETER;
+ 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 _Fields optionals[] = {_Fields.PARAMETER};
+ 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
+ tmpMap.put(_Fields.PARAMETER, new org.apache.thrift.meta_data.FieldMetaData("parameter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataClientException.class, metaDataMap);
+ }
+
+ public AiravataClientException() {
+ }
+
+ public AiravataClientException(
+ AiravataErrorType airavataErrorType)
+ {
+ this();
+ this.airavataErrorType = airavataErrorType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AiravataClientException(AiravataClientException other) {
+ if (other.isSetAiravataErrorType()) {
+ this.airavataErrorType = other.airavataErrorType;
+ }
+ if (other.isSetParameter()) {
+ this.parameter = other.parameter;
+ }
+ }
+
+ public AiravataClientException deepCopy() {
+ return new AiravataClientException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataErrorType = null;
+ this.parameter = null;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType getAiravataErrorType() {
+ return this.airavataErrorType;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataClientException setAiravataErrorType(AiravataErrorType airavataErrorType) {
+ this.airavataErrorType = airavataErrorType;
+ return this;
+ }
+
+ public void unsetAiravataErrorType() {
+ this.airavataErrorType = null;
+ }
+
+ /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataErrorType() {
+ return this.airavataErrorType != null;
+ }
+
+ public void setAiravataErrorTypeIsSet(boolean value) {
+ if (!value) {
+ this.airavataErrorType = null;
+ }
+ }
+
+ public String getParameter() {
+ return this.parameter;
+ }
+
+ public AiravataClientException setParameter(String parameter) {
+ this.parameter = parameter;
+ return this;
+ }
+
+ public void unsetParameter() {
+ this.parameter = null;
+ }
+
+ /** Returns true if field parameter is set (has been assigned a value) and false otherwise */
+ public boolean isSetParameter() {
+ return this.parameter != null;
+ }
+
+ public void setParameterIsSet(boolean value) {
+ if (!value) {
+ this.parameter = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ if (value == null) {
+ unsetAiravataErrorType();
+ } else {
+ setAiravataErrorType((AiravataErrorType)value);
+ }
+ break;
+
+ case PARAMETER:
+ if (value == null) {
+ unsetParameter();
+ } else {
+ setParameter((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ return getAiravataErrorType();
+
+ case PARAMETER:
+ return getParameter();
+
+ }
+ 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 AIRAVATA_ERROR_TYPE:
+ return isSetAiravataErrorType();
+ case PARAMETER:
+ return isSetParameter();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AiravataClientException)
+ return this.equals((AiravataClientException)that);
+ return false;
+ }
+
+ public boolean equals(AiravataClientException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
+ boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
+ if (this_present_airavataErrorType || that_present_airavataErrorType) {
+ if (!(this_present_airavataErrorType && that_present_airavataErrorType))
+ return false;
+ if (!this.airavataErrorType.equals(that.airavataErrorType))
+ return false;
+ }
+
+ boolean this_present_parameter = true && this.isSetParameter();
+ boolean that_present_parameter = true && that.isSetParameter();
+ if (this_present_parameter || that_present_parameter) {
+ if (!(this_present_parameter && that_present_parameter))
+ return false;
+ if (!this.parameter.equals(that.parameter))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AiravataClientException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataErrorType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParameter()).compareTo(other.isSetParameter());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParameter()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameter, other.parameter);
+ 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("AiravataClientException(");
+ boolean first = true;
+
+ sb.append("airavataErrorType:");
+ if (this.airavataErrorType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataErrorType);
+ }
+ first = false;
+ if (isSetParameter()) {
+ if (!first) sb.append(", ");
+ sb.append("parameter:");
+ if (this.parameter == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parameter);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (airavataErrorType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
+ }
+ // 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 AiravataClientExceptionStandardSchemeFactory implements SchemeFactory {
+ public AiravataClientExceptionStandardScheme getScheme() {
+ return new AiravataClientExceptionStandardScheme();
+ }
+ }
+
+ private static class AiravataClientExceptionStandardScheme extends StandardScheme<AiravataClientException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataClientException 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: // AIRAVATA_ERROR_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PARAMETER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parameter = iprot.readString();
+ struct.setParameterIsSet(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, AiravataClientException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.airavataErrorType != null) {
+ oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.parameter != null) {
+ if (struct.isSetParameter()) {
+ oprot.writeFieldBegin(PARAMETER_FIELD_DESC);
+ oprot.writeString(struct.parameter);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AiravataClientExceptionTupleSchemeFactory implements SchemeFactory {
+ public AiravataClientExceptionTupleScheme getScheme() {
+ return new AiravataClientExceptionTupleScheme();
+ }
+ }
+
+ private static class AiravataClientExceptionTupleScheme extends TupleScheme<AiravataClientException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetParameter()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetParameter()) {
+ oprot.writeString(struct.parameter);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.parameter = iprot.readString();
+ struct.setParameterIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
new file mode 100644
index 0000000..6d9dc2c
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
@@ -0,0 +1,98 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * A list of Airavata API Error Message Types
+ *
+ * UNKNOWN: No information available about the error
+ *
+ * PERMISSION_DENIED: Not permitted to perform action
+ *
+ * INTERNAL_ERROR: Unexpected problem with the service
+ *
+ * AUTHENTICATION_FAILURE: The client failed to authenticate.
+ *
+ * INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect
+ *
+ * AUTHORIZATION_EXPIRED: Authentication token expired
+ *
+ * UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata.
+ *
+ * UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
+ */
+@SuppressWarnings("all") public enum AiravataErrorType implements org.apache.thrift.TEnum {
+ UNKNOWN(0),
+ PERMISSION_DENIED(1),
+ INTERNAL_ERROR(2),
+ AUTHENTICATION_FAILURE(3),
+ INVALID_AUTHORIZATION(4),
+ AUTHORIZATION_EXPIRED(5),
+ UNKNOWN_GATEWAY_ID(6),
+ UNSUPPORTED_OPERATION(7);
+
+ private final int value;
+
+ private AiravataErrorType(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AiravataErrorType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return UNKNOWN;
+ case 1:
+ return PERMISSION_DENIED;
+ case 2:
+ return INTERNAL_ERROR;
+ case 3:
+ return AUTHENTICATION_FAILURE;
+ case 4:
+ return INVALID_AUTHORIZATION;
+ case 5:
+ return AUTHORIZATION_EXPIRED;
+ case 6:
+ return UNKNOWN_GATEWAY_ID;
+ case 7:
+ return UNSUPPORTED_OPERATION;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
new file mode 100644
index 0000000..366fe6e
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
@@ -0,0 +1,529 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem in the service that could not be changed through client's action.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * message: This may contain additional information about the error
+ *
+ */
+@SuppressWarnings("all") public class AiravataSystemException extends TException implements org.apache.thrift.TBase<AiravataSystemException, AiravataSystemException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataSystemException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataSystemException");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AiravataSystemExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AiravataSystemExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType airavataErrorType; // required
+ public String message; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
+ MESSAGE((short)2, "message");
+
+ 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: // AIRAVATA_ERROR_TYPE
+ return AIRAVATA_ERROR_TYPE;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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 _Fields optionals[] = {_Fields.MESSAGE};
+ 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataSystemException.class, metaDataMap);
+ }
+
+ public AiravataSystemException() {
+ }
+
+ public AiravataSystemException(
+ AiravataErrorType airavataErrorType)
+ {
+ this();
+ this.airavataErrorType = airavataErrorType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AiravataSystemException(AiravataSystemException other) {
+ if (other.isSetAiravataErrorType()) {
+ this.airavataErrorType = other.airavataErrorType;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AiravataSystemException deepCopy() {
+ return new AiravataSystemException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataErrorType = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType getAiravataErrorType() {
+ return this.airavataErrorType;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataSystemException setAiravataErrorType(AiravataErrorType airavataErrorType) {
+ this.airavataErrorType = airavataErrorType;
+ return this;
+ }
+
+ public void unsetAiravataErrorType() {
+ this.airavataErrorType = null;
+ }
+
+ /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataErrorType() {
+ return this.airavataErrorType != null;
+ }
+
+ public void setAiravataErrorTypeIsSet(boolean value) {
+ if (!value) {
+ this.airavataErrorType = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AiravataSystemException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ if (value == null) {
+ unsetAiravataErrorType();
+ } else {
+ setAiravataErrorType((AiravataErrorType)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ return getAiravataErrorType();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 AIRAVATA_ERROR_TYPE:
+ return isSetAiravataErrorType();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AiravataSystemException)
+ return this.equals((AiravataSystemException)that);
+ return false;
+ }
+
+ public boolean equals(AiravataSystemException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
+ boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
+ if (this_present_airavataErrorType || that_present_airavataErrorType) {
+ if (!(this_present_airavataErrorType && that_present_airavataErrorType))
+ return false;
+ if (!this.airavataErrorType.equals(that.airavataErrorType))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AiravataSystemException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataErrorType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AiravataSystemException(");
+ boolean first = true;
+
+ sb.append("airavataErrorType:");
+ if (this.airavataErrorType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataErrorType);
+ }
+ first = false;
+ if (isSetMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (airavataErrorType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
+ }
+ // 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 AiravataSystemExceptionStandardSchemeFactory implements SchemeFactory {
+ public AiravataSystemExceptionStandardScheme getScheme() {
+ return new AiravataSystemExceptionStandardScheme();
+ }
+ }
+
+ private static class AiravataSystemExceptionStandardScheme extends StandardScheme<AiravataSystemException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataSystemException 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: // AIRAVATA_ERROR_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AiravataSystemException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.airavataErrorType != null) {
+ oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ if (struct.isSetMessage()) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AiravataSystemExceptionTupleSchemeFactory implements SchemeFactory {
+ public AiravataSystemExceptionTupleScheme getScheme() {
+ return new AiravataSystemExceptionTupleScheme();
+ }
+ }
+
+ private static class AiravataSystemExceptionTupleScheme extends TupleScheme<AiravataSystemException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthenticationException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
new file mode 100644
index 0000000..24cc7ea
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
@@ -0,0 +1,402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid authentication requests.
+ *
+ * message: contains the cause of the authorization failure.
+ */
+@SuppressWarnings("all") public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthenticationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
+ }
+
+ public AuthenticationException() {
+ }
+
+ public AuthenticationException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AuthenticationException(AuthenticationException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AuthenticationException deepCopy() {
+ return new AuthenticationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AuthenticationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AuthenticationException)
+ return this.equals((AuthenticationException)that);
+ return false;
+ }
+
+ public boolean equals(AuthenticationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AuthenticationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AuthenticationException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 AuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionStandardScheme getScheme() {
+ return new AuthenticationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionStandardScheme extends StandardScheme<AuthenticationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AuthenticationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionTupleScheme getScheme() {
+ return new AuthenticationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionTupleScheme extends TupleScheme<AuthenticationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthorizationException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
new file mode 100644
index 0000000..eb56508
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
@@ -0,0 +1,402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
+ *
+ * message: contains the authorization failure message
+ */
+@SuppressWarnings("all") public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthorizationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
+ }
+
+ public AuthorizationException() {
+ }
+
+ public AuthorizationException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AuthorizationException(AuthorizationException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AuthorizationException deepCopy() {
+ return new AuthorizationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AuthorizationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AuthorizationException)
+ return this.equals((AuthorizationException)that);
+ return false;
+ }
+
+ public boolean equals(AuthorizationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AuthorizationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AuthorizationException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionStandardScheme getScheme() {
+ return new AuthorizationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AuthorizationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionTupleScheme getScheme() {
+ return new AuthorizationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
new file mode 100644
index 0000000..9b1044b
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
@@ -0,0 +1,511 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown when a client asks to perform an operation on an experiment that does not exist.
+ *
+ * identifier: A description of the experiment that was not found on the server.
+ *
+ * key: The value passed from the client in the identifier, which was not found.
+ */
+@SuppressWarnings("all") public class ExperimentNotFoundException extends TException implements org.apache.thrift.TBase<ExperimentNotFoundException, ExperimentNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentNotFoundException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentNotFoundException");
+
+ private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentNotFoundExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentNotFoundExceptionTupleSchemeFactory());
+ }
+
+ public String identifier; // optional
+ public String key; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IDENTIFIER((short)1, "identifier"),
+ KEY((short)2, "key");
+
+ 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: // IDENTIFIER
+ return IDENTIFIER;
+ case 2: // KEY
+ return KEY;
+ 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 _Fields optionals[] = {_Fields.IDENTIFIER,_Fields.KEY};
+ 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.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentNotFoundException.class, metaDataMap);
+ }
+
+ public ExperimentNotFoundException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ExperimentNotFoundException(ExperimentNotFoundException other) {
+ if (other.isSetIdentifier()) {
+ this.identifier = other.identifier;
+ }
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ }
+
+ public ExperimentNotFoundException deepCopy() {
+ return new ExperimentNotFoundException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.identifier = null;
+ this.key = null;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public ExperimentNotFoundException setIdentifier(String identifier) {
+ this.identifier = identifier;
+ return this;
+ }
+
+ public void unsetIdentifier() {
+ this.identifier = null;
+ }
+
+ /** Returns true if field identifier is set (has been assigned a value) and false otherwise */
+ public boolean isSetIdentifier() {
+ return this.identifier != null;
+ }
+
+ public void setIdentifierIsSet(boolean value) {
+ if (!value) {
+ this.identifier = null;
+ }
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public ExperimentNotFoundException setKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IDENTIFIER:
+ if (value == null) {
+ unsetIdentifier();
+ } else {
+ setIdentifier((String)value);
+ }
+ break;
+
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IDENTIFIER:
+ return getIdentifier();
+
+ case KEY:
+ return getKey();
+
+ }
+ 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 IDENTIFIER:
+ return isSetIdentifier();
+ case KEY:
+ return isSetKey();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ExperimentNotFoundException)
+ return this.equals((ExperimentNotFoundException)that);
+ return false;
+ }
+
+ public boolean equals(ExperimentNotFoundException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_identifier = true && this.isSetIdentifier();
+ boolean that_present_identifier = true && that.isSetIdentifier();
+ if (this_present_identifier || that_present_identifier) {
+ if (!(this_present_identifier && that_present_identifier))
+ return false;
+ if (!this.identifier.equals(that.identifier))
+ return false;
+ }
+
+ boolean this_present_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ExperimentNotFoundException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIdentifier()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, other.identifier);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKey()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
+ 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("ExperimentNotFoundException(");
+ boolean first = true;
+
+ if (isSetIdentifier()) {
+ sb.append("identifier:");
+ if (this.identifier == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.identifier);
+ }
+ first = false;
+ }
+ if (isSetKey()) {
+ if (!first) sb.append(", ");
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ 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 ExperimentNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ public ExperimentNotFoundExceptionStandardScheme getScheme() {
+ return new ExperimentNotFoundExceptionStandardScheme();
+ }
+ }
+
+ private static class ExperimentNotFoundExceptionStandardScheme extends StandardScheme<ExperimentNotFoundException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentNotFoundException 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: // IDENTIFIER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.identifier = iprot.readString();
+ struct.setIdentifierIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(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, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.identifier != null) {
+ if (struct.isSetIdentifier()) {
+ oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
+ oprot.writeString(struct.identifier);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.key != null) {
+ if (struct.isSetKey()) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ public ExperimentNotFoundExceptionTupleScheme getScheme() {
+ return new ExperimentNotFoundExceptionTupleScheme();
+ }
+ }
+
+ private static class ExperimentNotFoundExceptionTupleScheme extends TupleScheme<ExperimentNotFoundException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIdentifier()) {
+ optionals.set(0);
+ }
+ if (struct.isSetKey()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetIdentifier()) {
+ oprot.writeString(struct.identifier);
+ }
+ if (struct.isSetKey()) {
+ oprot.writeString(struct.key);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.identifier = iprot.readString();
+ struct.setIdentifierIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ }
+ }
+ }
+
+}
+
[04/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
new file mode 100644
index 0000000..5abd063
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
@@ -0,0 +1,914 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the basic experiment metadata.
+ *
+ * userName:
+ * The user name of the targeted gateway end user on whose behalf the experiment is being created.
+ * the associated gateway identity can only be inferred from the security hand-shake so as to avoid
+ * authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
+ * Airavata, an authorization exception is thrown.
+ *
+ * experimentName:
+ * The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
+ * by the generated experiment id.
+ *
+ * experimentDescription:
+ * The verbose description of the experiment. This is an optional parameter.
+ */
+@SuppressWarnings("all") public class BasicMetadata implements org.apache.thrift.TBase<BasicMetadata, BasicMetadata._Fields>, java.io.Serializable, Cloneable, Comparable<BasicMetadata> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BasicMetadata");
+
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentDescription", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC = new org.apache.thrift.protocol.TField("shareExperimentPublicly", org.apache.thrift.protocol.TType.BOOL, (short)5);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BasicMetadataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BasicMetadataTupleSchemeFactory());
+ }
+
+ public String userName; // required
+ public String experimentName; // required
+ public String projectID; // required
+ public String experimentDescription; // optional
+ public boolean shareExperimentPublicly; // optional
+ public String experimentID; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_NAME((short)1, "userName"),
+ EXPERIMENT_NAME((short)2, "experimentName"),
+ PROJECT_ID((short)3, "projectID"),
+ EXPERIMENT_DESCRIPTION((short)4, "experimentDescription"),
+ SHARE_EXPERIMENT_PUBLICLY((short)5, "shareExperimentPublicly"),
+ EXPERIMENT_ID((short)6, "experimentID");
+
+ 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: // USER_NAME
+ return USER_NAME;
+ case 2: // EXPERIMENT_NAME
+ return EXPERIMENT_NAME;
+ case 3: // PROJECT_ID
+ return PROJECT_ID;
+ case 4: // EXPERIMENT_DESCRIPTION
+ return EXPERIMENT_DESCRIPTION;
+ case 5: // SHARE_EXPERIMENT_PUBLICLY
+ return SHARE_EXPERIMENT_PUBLICLY;
+ case 6: // EXPERIMENT_ID
+ return EXPERIMENT_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.EXPERIMENT_DESCRIPTION,_Fields.SHARE_EXPERIMENT_PUBLICLY};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("experimentName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("experimentDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SHARE_EXPERIMENT_PUBLICLY, new org.apache.thrift.meta_data.FieldMetaData("shareExperimentPublicly", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BasicMetadata.class, metaDataMap);
+ }
+
+ public BasicMetadata() {
+ this.projectID = "default";
+
+ this.shareExperimentPublicly = false;
+
+ this.experimentID = "DO_NOT_SET";
+
+ }
+
+ public BasicMetadata(
+ String userName,
+ String experimentName,
+ String projectID,
+ String experimentID)
+ {
+ this();
+ this.userName = userName;
+ this.experimentName = experimentName;
+ this.projectID = projectID;
+ this.experimentID = experimentID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public BasicMetadata(BasicMetadata other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetExperimentName()) {
+ this.experimentName = other.experimentName;
+ }
+ if (other.isSetProjectID()) {
+ this.projectID = other.projectID;
+ }
+ if (other.isSetExperimentDescription()) {
+ this.experimentDescription = other.experimentDescription;
+ }
+ this.shareExperimentPublicly = other.shareExperimentPublicly;
+ if (other.isSetExperimentID()) {
+ this.experimentID = other.experimentID;
+ }
+ }
+
+ public BasicMetadata deepCopy() {
+ return new BasicMetadata(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userName = null;
+ this.experimentName = null;
+ this.projectID = "default";
+
+ this.experimentDescription = null;
+ this.shareExperimentPublicly = false;
+
+ this.experimentID = "DO_NOT_SET";
+
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public BasicMetadata setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public String getExperimentName() {
+ return this.experimentName;
+ }
+
+ public BasicMetadata setExperimentName(String experimentName) {
+ this.experimentName = experimentName;
+ return this;
+ }
+
+ public void unsetExperimentName() {
+ this.experimentName = null;
+ }
+
+ /** Returns true if field experimentName is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentName() {
+ return this.experimentName != null;
+ }
+
+ public void setExperimentNameIsSet(boolean value) {
+ if (!value) {
+ this.experimentName = null;
+ }
+ }
+
+ public String getProjectID() {
+ return this.projectID;
+ }
+
+ public BasicMetadata setProjectID(String projectID) {
+ this.projectID = projectID;
+ return this;
+ }
+
+ public void unsetProjectID() {
+ this.projectID = null;
+ }
+
+ /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
+ public boolean isSetProjectID() {
+ return this.projectID != null;
+ }
+
+ public void setProjectIDIsSet(boolean value) {
+ if (!value) {
+ this.projectID = null;
+ }
+ }
+
+ public String getExperimentDescription() {
+ return this.experimentDescription;
+ }
+
+ public BasicMetadata setExperimentDescription(String experimentDescription) {
+ this.experimentDescription = experimentDescription;
+ return this;
+ }
+
+ public void unsetExperimentDescription() {
+ this.experimentDescription = null;
+ }
+
+ /** Returns true if field experimentDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentDescription() {
+ return this.experimentDescription != null;
+ }
+
+ public void setExperimentDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.experimentDescription = null;
+ }
+ }
+
+ public boolean isShareExperimentPublicly() {
+ return this.shareExperimentPublicly;
+ }
+
+ public BasicMetadata setShareExperimentPublicly(boolean shareExperimentPublicly) {
+ this.shareExperimentPublicly = shareExperimentPublicly;
+ setShareExperimentPubliclyIsSet(true);
+ return this;
+ }
+
+ public void unsetShareExperimentPublicly() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ /** Returns true if field shareExperimentPublicly is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareExperimentPublicly() {
+ return EncodingUtils.testBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ public void setShareExperimentPubliclyIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID, value);
+ }
+
+ public String getExperimentID() {
+ return this.experimentID;
+ }
+
+ public BasicMetadata setExperimentID(String experimentID) {
+ this.experimentID = experimentID;
+ return this;
+ }
+
+ public void unsetExperimentID() {
+ this.experimentID = null;
+ }
+
+ /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentID() {
+ return this.experimentID != null;
+ }
+
+ public void setExperimentIDIsSet(boolean value) {
+ if (!value) {
+ this.experimentID = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case EXPERIMENT_NAME:
+ if (value == null) {
+ unsetExperimentName();
+ } else {
+ setExperimentName((String)value);
+ }
+ break;
+
+ case PROJECT_ID:
+ if (value == null) {
+ unsetProjectID();
+ } else {
+ setProjectID((String)value);
+ }
+ break;
+
+ case EXPERIMENT_DESCRIPTION:
+ if (value == null) {
+ unsetExperimentDescription();
+ } else {
+ setExperimentDescription((String)value);
+ }
+ break;
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ if (value == null) {
+ unsetShareExperimentPublicly();
+ } else {
+ setShareExperimentPublicly((Boolean)value);
+ }
+ break;
+
+ case EXPERIMENT_ID:
+ if (value == null) {
+ unsetExperimentID();
+ } else {
+ setExperimentID((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_NAME:
+ return getUserName();
+
+ case EXPERIMENT_NAME:
+ return getExperimentName();
+
+ case PROJECT_ID:
+ return getProjectID();
+
+ case EXPERIMENT_DESCRIPTION:
+ return getExperimentDescription();
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return Boolean.valueOf(isShareExperimentPublicly());
+
+ case EXPERIMENT_ID:
+ return getExperimentID();
+
+ }
+ 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 USER_NAME:
+ return isSetUserName();
+ case EXPERIMENT_NAME:
+ return isSetExperimentName();
+ case PROJECT_ID:
+ return isSetProjectID();
+ case EXPERIMENT_DESCRIPTION:
+ return isSetExperimentDescription();
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return isSetShareExperimentPublicly();
+ case EXPERIMENT_ID:
+ return isSetExperimentID();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BasicMetadata)
+ return this.equals((BasicMetadata)that);
+ return false;
+ }
+
+ public boolean equals(BasicMetadata that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_experimentName = true && this.isSetExperimentName();
+ boolean that_present_experimentName = true && that.isSetExperimentName();
+ if (this_present_experimentName || that_present_experimentName) {
+ if (!(this_present_experimentName && that_present_experimentName))
+ return false;
+ if (!this.experimentName.equals(that.experimentName))
+ return false;
+ }
+
+ boolean this_present_projectID = true && this.isSetProjectID();
+ boolean that_present_projectID = true && that.isSetProjectID();
+ if (this_present_projectID || that_present_projectID) {
+ if (!(this_present_projectID && that_present_projectID))
+ return false;
+ if (!this.projectID.equals(that.projectID))
+ return false;
+ }
+
+ boolean this_present_experimentDescription = true && this.isSetExperimentDescription();
+ boolean that_present_experimentDescription = true && that.isSetExperimentDescription();
+ if (this_present_experimentDescription || that_present_experimentDescription) {
+ if (!(this_present_experimentDescription && that_present_experimentDescription))
+ return false;
+ if (!this.experimentDescription.equals(that.experimentDescription))
+ return false;
+ }
+
+ boolean this_present_shareExperimentPublicly = true && this.isSetShareExperimentPublicly();
+ boolean that_present_shareExperimentPublicly = true && that.isSetShareExperimentPublicly();
+ if (this_present_shareExperimentPublicly || that_present_shareExperimentPublicly) {
+ if (!(this_present_shareExperimentPublicly && that_present_shareExperimentPublicly))
+ return false;
+ if (this.shareExperimentPublicly != that.shareExperimentPublicly)
+ return false;
+ }
+
+ boolean this_present_experimentID = true && this.isSetExperimentID();
+ boolean that_present_experimentID = true && that.isSetExperimentID();
+ if (this_present_experimentID || that_present_experimentID) {
+ if (!(this_present_experimentID && that_present_experimentID))
+ return false;
+ if (!this.experimentID.equals(that.experimentID))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(BasicMetadata other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentName()).compareTo(other.isSetExperimentName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentName, other.experimentName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetProjectID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentDescription()).compareTo(other.isSetExperimentDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentDescription, other.experimentDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareExperimentPublicly()).compareTo(other.isSetShareExperimentPublicly());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareExperimentPublicly()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareExperimentPublicly, other.shareExperimentPublicly);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
+ 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("BasicMetadata(");
+ boolean first = true;
+
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("experimentName:");
+ if (this.experimentName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("projectID:");
+ if (this.projectID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectID);
+ }
+ first = false;
+ if (isSetExperimentDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentDescription:");
+ if (this.experimentDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentDescription);
+ }
+ first = false;
+ }
+ if (isSetShareExperimentPublicly()) {
+ if (!first) sb.append(", ");
+ sb.append("shareExperimentPublicly:");
+ sb.append(this.shareExperimentPublicly);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("experimentID:");
+ if (this.experimentID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentID);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (userName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
+ }
+ if (experimentName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentName' was not present! Struct: " + toString());
+ }
+ if (projectID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' was not present! Struct: " + toString());
+ }
+ if (experimentID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' was not present! Struct: " + toString());
+ }
+ // 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 BasicMetadataStandardSchemeFactory implements SchemeFactory {
+ public BasicMetadataStandardScheme getScheme() {
+ return new BasicMetadataStandardScheme();
+ }
+ }
+
+ private static class BasicMetadataStandardScheme extends StandardScheme<BasicMetadata> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BasicMetadata 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: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXPERIMENT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentName = iprot.readString();
+ struct.setExperimentNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PROJECT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXPERIMENT_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentDescription = iprot.readString();
+ struct.setExperimentDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // SHARE_EXPERIMENT_PUBLICLY
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // EXPERIMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(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, BasicMetadata struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentName != null) {
+ oprot.writeFieldBegin(EXPERIMENT_NAME_FIELD_DESC);
+ oprot.writeString(struct.experimentName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.projectID != null) {
+ oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
+ oprot.writeString(struct.projectID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentDescription != null) {
+ if (struct.isSetExperimentDescription()) {
+ oprot.writeFieldBegin(EXPERIMENT_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.experimentDescription);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeFieldBegin(SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC);
+ oprot.writeBool(struct.shareExperimentPublicly);
+ oprot.writeFieldEnd();
+ }
+ if (struct.experimentID != null) {
+ oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.experimentID);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BasicMetadataTupleSchemeFactory implements SchemeFactory {
+ public BasicMetadataTupleScheme getScheme() {
+ return new BasicMetadataTupleScheme();
+ }
+ }
+
+ private static class BasicMetadataTupleScheme extends TupleScheme<BasicMetadata> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BasicMetadata struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.userName);
+ oprot.writeString(struct.experimentName);
+ oprot.writeString(struct.projectID);
+ oprot.writeString(struct.experimentID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetExperimentDescription()) {
+ optionals.set(0);
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetExperimentDescription()) {
+ oprot.writeString(struct.experimentDescription);
+ }
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeBool(struct.shareExperimentPublicly);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BasicMetadata struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ struct.experimentName = iprot.readString();
+ struct.setExperimentNameIsSet(true);
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.experimentDescription = iprot.readString();
+ struct.setExperimentDescriptionIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
new file mode 100644
index 0000000..792ef0b
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
@@ -0,0 +1,1375 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the Computational Resource Scheduling.
+ *
+ */
+@SuppressWarnings("all") public class ComputationalResourceScheduling implements org.apache.thrift.TBase<ComputationalResourceScheduling, ComputationalResourceScheduling._Fields>, java.io.Serializable, Cloneable, Comparable<ComputationalResourceScheduling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceScheduling");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_AUTO_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataAutoSchedule", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("overrideManualScheduledParams", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final org.apache.thrift.protocol.TField RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField TOTAL_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCPUCount", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField NUMBER_OF_THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfThreads", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField WALL_TIME_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallTimeLimit", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField JOB_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStartTime", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)10);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ComputationalProjectAccount", org.apache.thrift.protocol.TType.STRING, (short)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ComputationalResourceSchedulingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ComputationalResourceSchedulingTupleSchemeFactory());
+ }
+
+ public boolean airavataAutoSchedule; // required
+ public boolean overrideManualScheduledParams; // required
+ public String resourceHostId; // optional
+ public int totalCPUCount; // optional
+ public int nodeCount; // optional
+ public int numberOfThreads; // optional
+ public String queueName; // optional
+ public int wallTimeLimit; // optional
+ public int jobStartTime; // optional
+ public int totalPhysicalMemory; // optional
+ public String ComputationalProjectAccount; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
+ OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
+ RESOURCE_HOST_ID((short)3, "resourceHostId"),
+ TOTAL_CPUCOUNT((short)4, "totalCPUCount"),
+ NODE_COUNT((short)5, "nodeCount"),
+ NUMBER_OF_THREADS((short)6, "numberOfThreads"),
+ QUEUE_NAME((short)7, "queueName"),
+ WALL_TIME_LIMIT((short)8, "wallTimeLimit"),
+ JOB_START_TIME((short)9, "jobStartTime"),
+ TOTAL_PHYSICAL_MEMORY((short)10, "totalPhysicalMemory"),
+ COMPUTATIONAL_PROJECT_ACCOUNT((short)11, "ComputationalProjectAccount");
+
+ 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: // AIRAVATA_AUTO_SCHEDULE
+ return AIRAVATA_AUTO_SCHEDULE;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ return OVERRIDE_MANUAL_SCHEDULED_PARAMS;
+ case 3: // RESOURCE_HOST_ID
+ return RESOURCE_HOST_ID;
+ case 4: // TOTAL_CPUCOUNT
+ return TOTAL_CPUCOUNT;
+ case 5: // NODE_COUNT
+ return NODE_COUNT;
+ case 6: // NUMBER_OF_THREADS
+ return NUMBER_OF_THREADS;
+ case 7: // QUEUE_NAME
+ return QUEUE_NAME;
+ case 8: // WALL_TIME_LIMIT
+ return WALL_TIME_LIMIT;
+ case 9: // JOB_START_TIME
+ return JOB_START_TIME;
+ case 10: // TOTAL_PHYSICAL_MEMORY
+ return TOTAL_PHYSICAL_MEMORY;
+ case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ return COMPUTATIONAL_PROJECT_ACCOUNT;
+ 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 __AIRAVATAAUTOSCHEDULE_ISSET_ID = 0;
+ private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
+ private static final int __TOTALCPUCOUNT_ISSET_ID = 2;
+ private static final int __NODECOUNT_ISSET_ID = 3;
+ private static final int __NUMBEROFTHREADS_ISSET_ID = 4;
+ private static final int __WALLTIMELIMIT_ISSET_ID = 5;
+ private static final int __JOBSTARTTIME_ISSET_ID = 6;
+ private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 7;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT};
+ 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.AIRAVATA_AUTO_SCHEDULE, new org.apache.thrift.meta_data.FieldMetaData("airavataAutoSchedule", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.OVERRIDE_MANUAL_SCHEDULED_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("overrideManualScheduledParams", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.RESOURCE_HOST_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceHostId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TOTAL_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("nodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.NUMBER_OF_THREADS, new org.apache.thrift.meta_data.FieldMetaData("numberOfThreads", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WALL_TIME_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("wallTimeLimit", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.JOB_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("jobStartTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.TOTAL_PHYSICAL_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("totalPhysicalMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.COMPUTATIONAL_PROJECT_ACCOUNT, new org.apache.thrift.meta_data.FieldMetaData("ComputationalProjectAccount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputationalResourceScheduling.class, metaDataMap);
+ }
+
+ public ComputationalResourceScheduling() {
+ this.airavataAutoSchedule = true;
+
+ this.overrideManualScheduledParams = false;
+
+ }
+
+ public ComputationalResourceScheduling(
+ boolean airavataAutoSchedule,
+ boolean overrideManualScheduledParams)
+ {
+ this();
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ComputationalResourceScheduling(ComputationalResourceScheduling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.airavataAutoSchedule = other.airavataAutoSchedule;
+ this.overrideManualScheduledParams = other.overrideManualScheduledParams;
+ if (other.isSetResourceHostId()) {
+ this.resourceHostId = other.resourceHostId;
+ }
+ this.totalCPUCount = other.totalCPUCount;
+ this.nodeCount = other.nodeCount;
+ this.numberOfThreads = other.numberOfThreads;
+ if (other.isSetQueueName()) {
+ this.queueName = other.queueName;
+ }
+ this.wallTimeLimit = other.wallTimeLimit;
+ this.jobStartTime = other.jobStartTime;
+ this.totalPhysicalMemory = other.totalPhysicalMemory;
+ if (other.isSetComputationalProjectAccount()) {
+ this.ComputationalProjectAccount = other.ComputationalProjectAccount;
+ }
+ }
+
+ public ComputationalResourceScheduling deepCopy() {
+ return new ComputationalResourceScheduling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataAutoSchedule = true;
+
+ this.overrideManualScheduledParams = false;
+
+ this.resourceHostId = null;
+ setTotalCPUCountIsSet(false);
+ this.totalCPUCount = 0;
+ setNodeCountIsSet(false);
+ this.nodeCount = 0;
+ setNumberOfThreadsIsSet(false);
+ this.numberOfThreads = 0;
+ this.queueName = null;
+ setWallTimeLimitIsSet(false);
+ this.wallTimeLimit = 0;
+ setJobStartTimeIsSet(false);
+ this.jobStartTime = 0;
+ setTotalPhysicalMemoryIsSet(false);
+ this.totalPhysicalMemory = 0;
+ this.ComputationalProjectAccount = null;
+ }
+
+ public boolean isAiravataAutoSchedule() {
+ return this.airavataAutoSchedule;
+ }
+
+ public ComputationalResourceScheduling setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ return this;
+ }
+
+ public void unsetAiravataAutoSchedule() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ /** Returns true if field airavataAutoSchedule is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataAutoSchedule() {
+ return EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ public void setAiravataAutoScheduleIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
+ }
+
+ public boolean isOverrideManualScheduledParams() {
+ return this.overrideManualScheduledParams;
+ }
+
+ public ComputationalResourceScheduling setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ return this;
+ }
+
+ public void unsetOverrideManualScheduledParams() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ /** Returns true if field overrideManualScheduledParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetOverrideManualScheduledParams() {
+ return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ public void setOverrideManualScheduledParamsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
+ }
+
+ public String getResourceHostId() {
+ return this.resourceHostId;
+ }
+
+ public ComputationalResourceScheduling setResourceHostId(String resourceHostId) {
+ this.resourceHostId = resourceHostId;
+ return this;
+ }
+
+ public void unsetResourceHostId() {
+ this.resourceHostId = null;
+ }
+
+ /** Returns true if field resourceHostId is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceHostId() {
+ return this.resourceHostId != null;
+ }
+
+ public void setResourceHostIdIsSet(boolean value) {
+ if (!value) {
+ this.resourceHostId = null;
+ }
+ }
+
+ public int getTotalCPUCount() {
+ return this.totalCPUCount;
+ }
+
+ public ComputationalResourceScheduling setTotalCPUCount(int totalCPUCount) {
+ this.totalCPUCount = totalCPUCount;
+ setTotalCPUCountIsSet(true);
+ return this;
+ }
+
+ public void unsetTotalCPUCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field totalCPUCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetTotalCPUCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
+ }
+
+ public void setTotalCPUCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID, value);
+ }
+
+ public int getNodeCount() {
+ return this.nodeCount;
+ }
+
+ public ComputationalResourceScheduling setNodeCount(int nodeCount) {
+ this.nodeCount = nodeCount;
+ setNodeCountIsSet(true);
+ return this;
+ }
+
+ public void unsetNodeCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field nodeCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ public void setNodeCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NODECOUNT_ISSET_ID, value);
+ }
+
+ public int getNumberOfThreads() {
+ return this.numberOfThreads;
+ }
+
+ public ComputationalResourceScheduling setNumberOfThreads(int numberOfThreads) {
+ this.numberOfThreads = numberOfThreads;
+ setNumberOfThreadsIsSet(true);
+ return this;
+ }
+
+ public void unsetNumberOfThreads() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID);
+ }
+
+ /** Returns true if field numberOfThreads is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumberOfThreads() {
+ return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID);
+ }
+
+ public void setNumberOfThreadsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFTHREADS_ISSET_ID, value);
+ }
+
+ public String getQueueName() {
+ return this.queueName;
+ }
+
+ public ComputationalResourceScheduling setQueueName(String queueName) {
+ this.queueName = queueName;
+ return this;
+ }
+
+ public void unsetQueueName() {
+ this.queueName = null;
+ }
+
+ /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
+ public boolean isSetQueueName() {
+ return this.queueName != null;
+ }
+
+ public void setQueueNameIsSet(boolean value) {
+ if (!value) {
+ this.queueName = null;
+ }
+ }
+
+ public int getWallTimeLimit() {
+ return this.wallTimeLimit;
+ }
+
+ public ComputationalResourceScheduling setWallTimeLimit(int wallTimeLimit) {
+ this.wallTimeLimit = wallTimeLimit;
+ setWallTimeLimitIsSet(true);
+ return this;
+ }
+
+ public void unsetWallTimeLimit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID);
+ }
+
+ /** Returns true if field wallTimeLimit is set (has been assigned a value) and false otherwise */
+ public boolean isSetWallTimeLimit() {
+ return EncodingUtils.testBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID);
+ }
+
+ public void setWallTimeLimitIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID, value);
+ }
+
+ public int getJobStartTime() {
+ return this.jobStartTime;
+ }
+
+ public ComputationalResourceScheduling setJobStartTime(int jobStartTime) {
+ this.jobStartTime = jobStartTime;
+ setJobStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetJobStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field jobStartTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID);
+ }
+
+ public void setJobStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JOBSTARTTIME_ISSET_ID, value);
+ }
+
+ public int getTotalPhysicalMemory() {
+ return this.totalPhysicalMemory;
+ }
+
+ public ComputationalResourceScheduling setTotalPhysicalMemory(int totalPhysicalMemory) {
+ this.totalPhysicalMemory = totalPhysicalMemory;
+ setTotalPhysicalMemoryIsSet(true);
+ return this;
+ }
+
+ public void unsetTotalPhysicalMemory() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID);
+ }
+
+ /** Returns true if field totalPhysicalMemory is set (has been assigned a value) and false otherwise */
+ public boolean isSetTotalPhysicalMemory() {
+ return EncodingUtils.testBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID);
+ }
+
+ public void setTotalPhysicalMemoryIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID, value);
+ }
+
+ public String getComputationalProjectAccount() {
+ return this.ComputationalProjectAccount;
+ }
+
+ public ComputationalResourceScheduling setComputationalProjectAccount(String ComputationalProjectAccount) {
+ this.ComputationalProjectAccount = ComputationalProjectAccount;
+ return this;
+ }
+
+ public void unsetComputationalProjectAccount() {
+ this.ComputationalProjectAccount = null;
+ }
+
+ /** Returns true if field ComputationalProjectAccount is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalProjectAccount() {
+ return this.ComputationalProjectAccount != null;
+ }
+
+ public void setComputationalProjectAccountIsSet(boolean value) {
+ if (!value) {
+ this.ComputationalProjectAccount = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ if (value == null) {
+ unsetAiravataAutoSchedule();
+ } else {
+ setAiravataAutoSchedule((Boolean)value);
+ }
+ break;
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ if (value == null) {
+ unsetOverrideManualScheduledParams();
+ } else {
+ setOverrideManualScheduledParams((Boolean)value);
+ }
+ break;
+
+ case RESOURCE_HOST_ID:
+ if (value == null) {
+ unsetResourceHostId();
+ } else {
+ setResourceHostId((String)value);
+ }
+ break;
+
+ case TOTAL_CPUCOUNT:
+ if (value == null) {
+ unsetTotalCPUCount();
+ } else {
+ setTotalCPUCount((Integer)value);
+ }
+ break;
+
+ case NODE_COUNT:
+ if (value == null) {
+ unsetNodeCount();
+ } else {
+ setNodeCount((Integer)value);
+ }
+ break;
+
+ case NUMBER_OF_THREADS:
+ if (value == null) {
+ unsetNumberOfThreads();
+ } else {
+ setNumberOfThreads((Integer)value);
+ }
+ break;
+
+ case QUEUE_NAME:
+ if (value == null) {
+ unsetQueueName();
+ } else {
+ setQueueName((String)value);
+ }
+ break;
+
+ case WALL_TIME_LIMIT:
+ if (value == null) {
+ unsetWallTimeLimit();
+ } else {
+ setWallTimeLimit((Integer)value);
+ }
+ break;
+
+ case JOB_START_TIME:
+ if (value == null) {
+ unsetJobStartTime();
+ } else {
+ setJobStartTime((Integer)value);
+ }
+ break;
+
+ case TOTAL_PHYSICAL_MEMORY:
+ if (value == null) {
+ unsetTotalPhysicalMemory();
+ } else {
+ setTotalPhysicalMemory((Integer)value);
+ }
+ break;
+
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ if (value == null) {
+ unsetComputationalProjectAccount();
+ } else {
+ setComputationalProjectAccount((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ return Boolean.valueOf(isAiravataAutoSchedule());
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return Boolean.valueOf(isOverrideManualScheduledParams());
+
+ case RESOURCE_HOST_ID:
+ return getResourceHostId();
+
+ case TOTAL_CPUCOUNT:
+ return Integer.valueOf(getTotalCPUCount());
+
+ case NODE_COUNT:
+ return Integer.valueOf(getNodeCount());
+
+ case NUMBER_OF_THREADS:
+ return Integer.valueOf(getNumberOfThreads());
+
+ case QUEUE_NAME:
+ return getQueueName();
+
+ case WALL_TIME_LIMIT:
+ return Integer.valueOf(getWallTimeLimit());
+
+ case JOB_START_TIME:
+ return Integer.valueOf(getJobStartTime());
+
+ case TOTAL_PHYSICAL_MEMORY:
+ return Integer.valueOf(getTotalPhysicalMemory());
+
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ return getComputationalProjectAccount();
+
+ }
+ 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 AIRAVATA_AUTO_SCHEDULE:
+ return isSetAiravataAutoSchedule();
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return isSetOverrideManualScheduledParams();
+ case RESOURCE_HOST_ID:
+ return isSetResourceHostId();
+ case TOTAL_CPUCOUNT:
+ return isSetTotalCPUCount();
+ case NODE_COUNT:
+ return isSetNodeCount();
+ case NUMBER_OF_THREADS:
+ return isSetNumberOfThreads();
+ case QUEUE_NAME:
+ return isSetQueueName();
+ case WALL_TIME_LIMIT:
+ return isSetWallTimeLimit();
+ case JOB_START_TIME:
+ return isSetJobStartTime();
+ case TOTAL_PHYSICAL_MEMORY:
+ return isSetTotalPhysicalMemory();
+ case COMPUTATIONAL_PROJECT_ACCOUNT:
+ return isSetComputationalProjectAccount();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ComputationalResourceScheduling)
+ return this.equals((ComputationalResourceScheduling)that);
+ return false;
+ }
+
+ public boolean equals(ComputationalResourceScheduling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataAutoSchedule = true;
+ boolean that_present_airavataAutoSchedule = true;
+ if (this_present_airavataAutoSchedule || that_present_airavataAutoSchedule) {
+ if (!(this_present_airavataAutoSchedule && that_present_airavataAutoSchedule))
+ return false;
+ if (this.airavataAutoSchedule != that.airavataAutoSchedule)
+ return false;
+ }
+
+ boolean this_present_overrideManualScheduledParams = true;
+ boolean that_present_overrideManualScheduledParams = true;
+ if (this_present_overrideManualScheduledParams || that_present_overrideManualScheduledParams) {
+ if (!(this_present_overrideManualScheduledParams && that_present_overrideManualScheduledParams))
+ return false;
+ if (this.overrideManualScheduledParams != that.overrideManualScheduledParams)
+ return false;
+ }
+
+ boolean this_present_resourceHostId = true && this.isSetResourceHostId();
+ boolean that_present_resourceHostId = true && that.isSetResourceHostId();
+ if (this_present_resourceHostId || that_present_resourceHostId) {
+ if (!(this_present_resourceHostId && that_present_resourceHostId))
+ return false;
+ if (!this.resourceHostId.equals(that.resourceHostId))
+ return false;
+ }
+
+ boolean this_present_totalCPUCount = true && this.isSetTotalCPUCount();
+ boolean that_present_totalCPUCount = true && that.isSetTotalCPUCount();
+ if (this_present_totalCPUCount || that_present_totalCPUCount) {
+ if (!(this_present_totalCPUCount && that_present_totalCPUCount))
+ return false;
+ if (this.totalCPUCount != that.totalCPUCount)
+ return false;
+ }
+
+ boolean this_present_nodeCount = true && this.isSetNodeCount();
+ boolean that_present_nodeCount = true && that.isSetNodeCount();
+ if (this_present_nodeCount || that_present_nodeCount) {
+ if (!(this_present_nodeCount && that_present_nodeCount))
+ return false;
+ if (this.nodeCount != that.nodeCount)
+ return false;
+ }
+
+ boolean this_present_numberOfThreads = true && this.isSetNumberOfThreads();
+ boolean that_present_numberOfThreads = true && that.isSetNumberOfThreads();
+ if (this_present_numberOfThreads || that_present_numberOfThreads) {
+ if (!(this_present_numberOfThreads && that_present_numberOfThreads))
+ return false;
+ if (this.numberOfThreads != that.numberOfThreads)
+ return false;
+ }
+
+ boolean this_present_queueName = true && this.isSetQueueName();
+ boolean that_present_queueName = true && that.isSetQueueName();
+ if (this_present_queueName || that_present_queueName) {
+ if (!(this_present_queueName && that_present_queueName))
+ return false;
+ if (!this.queueName.equals(that.queueName))
+ return false;
+ }
+
+ boolean this_present_wallTimeLimit = true && this.isSetWallTimeLimit();
+ boolean that_present_wallTimeLimit = true && that.isSetWallTimeLimit();
+ if (this_present_wallTimeLimit || that_present_wallTimeLimit) {
+ if (!(this_present_wallTimeLimit && that_present_wallTimeLimit))
+ return false;
+ if (this.wallTimeLimit != that.wallTimeLimit)
+ return false;
+ }
+
+ boolean this_present_jobStartTime = true && this.isSetJobStartTime();
+ boolean that_present_jobStartTime = true && that.isSetJobStartTime();
+ if (this_present_jobStartTime || that_present_jobStartTime) {
+ if (!(this_present_jobStartTime && that_present_jobStartTime))
+ return false;
+ if (this.jobStartTime != that.jobStartTime)
+ return false;
+ }
+
+ boolean this_present_totalPhysicalMemory = true && this.isSetTotalPhysicalMemory();
+ boolean that_present_totalPhysicalMemory = true && that.isSetTotalPhysicalMemory();
+ if (this_present_totalPhysicalMemory || that_present_totalPhysicalMemory) {
+ if (!(this_present_totalPhysicalMemory && that_present_totalPhysicalMemory))
+ return false;
+ if (this.totalPhysicalMemory != that.totalPhysicalMemory)
+ return false;
+ }
+
+ boolean this_present_ComputationalProjectAccount = true && this.isSetComputationalProjectAccount();
+ boolean that_present_ComputationalProjectAccount = true && that.isSetComputationalProjectAccount();
+ if (this_present_ComputationalProjectAccount || that_present_ComputationalProjectAccount) {
+ if (!(this_present_ComputationalProjectAccount && that_present_ComputationalProjectAccount))
+ return false;
+ if (!this.ComputationalProjectAccount.equals(that.ComputationalProjectAccount))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ComputationalResourceScheduling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataAutoSchedule()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataAutoSchedule, other.airavataAutoSchedule);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOverrideManualScheduledParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overrideManualScheduledParams, other.overrideManualScheduledParams);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceHostId()).compareTo(other.isSetResourceHostId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceHostId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceHostId, other.resourceHostId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTotalCPUCount()).compareTo(other.isSetTotalCPUCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTotalCPUCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalCPUCount, other.totalCPUCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeCount()).compareTo(other.isSetNodeCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeCount, other.nodeCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNumberOfThreads()).compareTo(other.isSetNumberOfThreads());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumberOfThreads()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfThreads, other.numberOfThreads);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQueueName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWallTimeLimit()).compareTo(other.isSetWallTimeLimit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWallTimeLimit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallTimeLimit, other.wallTimeLimit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobStartTime()).compareTo(other.isSetJobStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStartTime, other.jobStartTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTotalPhysicalMemory()).compareTo(other.isSetTotalPhysicalMemory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTotalPhysicalMemory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPhysicalMemory, other.totalPhysicalMemory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalProjectAccount()).compareTo(other.isSetComputationalProjectAccount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalProjectAccount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ComputationalProjectAccount, other.ComputationalProjectAccount);
+ 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("ComputationalResourceScheduling(");
+ boolean first = true;
+
+ sb.append("airavataAutoSchedule:");
+ sb.append(this.airavataAutoSchedule);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("overrideManualScheduledParams:");
+ sb.append(this.overrideManualScheduledParams);
+ first = false;
+ if (isSetResourceHostId()) {
+ if (!first) sb.append(", ");
+ sb.append("resourceHostId:");
+ if (this.resourceHostId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceHostId);
+ }
+ first = false;
+ }
+ if (isSetTotalCPUCount()) {
+ if (!first) sb.append(", ");
+ sb.append("totalCPUCount:");
+ sb.append(this.totalCPUCount);
+ first = false;
+ }
+ if (isSetNodeCount()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeCount:");
+ sb.append(this.nodeCount);
+ first = false;
+ }
+ if (isSetNumberOfThreads()) {
+ if (!first) sb.append(", ");
+ sb.append("numberOfThreads:");
+ sb.append(this.numberOfThreads);
+ first = false;
+ }
+ if (isSetQueueName()) {
+ if (!first) sb.append(", ");
+ sb.append("queueName:");
+ if (this.queueName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.queueName);
+ }
+ first = false;
+ }
+ if (isSetWallTimeLimit()) {
+ if (!first) sb.append(", ");
+ sb.append("wallTimeLimit:");
+ sb.append(this.wallTimeLimit);
+ first = false;
+ }
+ if (isSetJobStartTime()) {
+ if (!first) sb.append(", ");
+ sb.append("jobStartTime:");
+ sb.append(this.jobStartTime);
+ first = false;
+ }
+ if (isSetTotalPhysicalMemory()) {
+ if (!first) sb.append(", ");
+ sb.append("totalPhysicalMemory:");
+ sb.append(this.totalPhysicalMemory);
+ first = false;
+ }
+ if (isSetComputationalProjectAccount()) {
+ if (!first) sb.append(", ");
+ sb.append("ComputationalProjectAccount:");
+ if (this.ComputationalProjectAccount == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ComputationalProjectAccount);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // alas, we cannot check 'airavataAutoSchedule' because it's a primitive and you chose the non-beans generator.
+ // alas, we cannot check 'overrideManualScheduledParams' because it's a primitive and you chose the non-beans generator.
+ // 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 ComputationalResourceSchedulingStandardSchemeFactory implements SchemeFactory {
+ public ComputationalResourceSchedulingStandardScheme getScheme() {
+ return new ComputationalResourceSchedulingStandardScheme();
+ }
+ }
+
+ private static class ComputationalResourceSchedulingStandardScheme extends StandardScheme<ComputationalResourceScheduling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ComputationalResourceScheduling 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: // AIRAVATA_AUTO_SCHEDULE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RESOURCE_HOST_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.resourceHostId = iprot.readString();
+ struct.setResourceHostIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // TOTAL_CPUCOUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.totalCPUCount = iprot.readI32();
+ struct.setTotalCPUCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NODE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // NUMBER_OF_THREADS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.numberOfThreads = iprot.readI32();
+ struct.setNumberOfThreadsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // QUEUE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // WALL_TIME_LIMIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.wallTimeLimit = iprot.readI32();
+ struct.setWallTimeLimitIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // JOB_START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.jobStartTime = iprot.readI32();
+ struct.setJobStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // TOTAL_PHYSICAL_MEMORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.totalPhysicalMemory = iprot.readI32();
+ struct.setTotalPhysicalMemoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ComputationalProjectAccount = iprot.readString();
+ struct.setComputationalProjectAccountIsSet(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
+ if (!struct.isSetAiravataAutoSchedule()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataAutoSchedule' was not found in serialized data! Struct: " + toString());
+ }
+ if (!struct.isSetOverrideManualScheduledParams()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'overrideManualScheduledParams' was not found in serialized data! Struct: " + toString());
+ }
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(AIRAVATA_AUTO_SCHEDULE_FIELD_DESC);
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ oprot.writeFieldEnd();
+ if (struct.resourceHostId != null) {
+ if (struct.isSetResourceHostId()) {
+ oprot.writeFieldBegin(RESOURCE_HOST_ID_FIELD_DESC);
+ oprot.writeString(struct.resourceHostId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetTotalCPUCount()) {
+ oprot.writeFieldBegin(TOTAL_CPUCOUNT_FIELD_DESC);
+ oprot.writeI32(struct.totalCPUCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeFieldBegin(NODE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.nodeCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetNumberOfThreads()) {
+ oprot.writeFieldBegin(NUMBER_OF_THREADS_FIELD_DESC);
+ oprot.writeI32(struct.numberOfThreads);
+ oprot.writeFieldEnd();
+ }
+ if (struct.queueName != null) {
+ if (struct.isSetQueueName()) {
+ oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
+ oprot.writeString(struct.queueName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetWallTimeLimit()) {
+ oprot.writeFieldBegin(WALL_TIME_LIMIT_FIELD_DESC);
+ oprot.writeI32(struct.wallTimeLimit);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetJobStartTime()) {
+ oprot.writeFieldBegin(JOB_START_TIME_FIELD_DESC);
+ oprot.writeI32(struct.jobStartTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ oprot.writeFieldBegin(TOTAL_PHYSICAL_MEMORY_FIELD_DESC);
+ oprot.writeI32(struct.totalPhysicalMemory);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ComputationalProjectAccount != null) {
+ if (struct.isSetComputationalProjectAccount()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC);
+ oprot.writeString(struct.ComputationalProjectAccount);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ComputationalResourceSchedulingTupleSchemeFactory implements SchemeFactory {
+ public ComputationalResourceSchedulingTupleScheme getScheme() {
+ return new ComputationalResourceSchedulingTupleScheme();
+ }
+ }
+
+ private static class ComputationalResourceSchedulingTupleScheme extends TupleScheme<ComputationalResourceScheduling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ BitSet optionals = new BitSet();
+ if (struct.isSetResourceHostId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTotalCPUCount()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNodeCount()) {
+ optionals.set(2);
+ }
+ if (struct.isSetNumberOfThreads()) {
+ optionals.set(3);
+ }
+ if (struct.isSetQueueName()) {
+ optionals.set(4);
+ }
+ if (struct.isSetWallTimeLimit()) {
+ optionals.set(5);
+ }
+ if (struct.isSetJobStartTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ optionals.set(7);
+ }
+ if (struct.isSetComputationalProjectAccount()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
+ if (struct.isSetResourceHostId()) {
+ oprot.writeString(struct.resourceHostId);
+ }
+ if (struct.isSetTotalCPUCount()) {
+ oprot.writeI32(struct.totalCPUCount);
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeI32(struct.nodeCount);
+ }
+ if (struct.isSetNumberOfThreads()) {
+ oprot.writeI32(struct.numberOfThreads);
+ }
+ if (struct.isSetQueueName()) {
+ oprot.writeString(struct.queueName);
+ }
+ if (struct.isSetWallTimeLimit()) {
+ oprot.writeI32(struct.wallTimeLimit);
+ }
+ if (struct.isSetJobStartTime()) {
+ oprot.writeI32(struct.jobStartTime);
+ }
+ if (struct.isSetTotalPhysicalMemory()) {
+ oprot.writeI32(struct.totalPhysicalMemory);
+ }
+ if (struct.isSetComputationalProjectAccount()) {
+ oprot.writeString(struct.ComputationalProjectAccount);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ BitSet incoming = iprot.readBitSet(9);
+ if (incoming.get(0)) {
+ struct.resourceHostId = iprot.readString();
+ struct.setResourceHostIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.totalCPUCount = iprot.readI32();
+ struct.setTotalCPUCountIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.numberOfThreads = iprot.readI32();
+ struct.setNumberOfThreadsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.wallTimeLimit = iprot.readI32();
+ struct.setWallTimeLimitIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.jobStartTime = iprot.readI32();
+ struct.setJobStartTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.totalPhysicalMemory = iprot.readI32();
+ struct.setTotalPhysicalMemoryIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.ComputationalProjectAccount = iprot.readString();
+ struct.setComputationalProjectAccountIsSet(true);
+ }
+ }
+ }
+
+}
+
[10/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/Airavata.java
deleted file mode 100644
index c9cfdb8..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/Airavata.java
+++ /dev/null
@@ -1,11622 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api;
-
-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;
-
-public class Airavata {
-
- public interface Iface {
-
- /**
- * Query Airavata to fetch the API version
- */
- public String GetAPIVersion() throws org.apache.thrift.TException;
-
- /**
- * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
- * but inferred from the authentication header. This experiment is just a persistent place holder. The client
- * has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
- * registering the experiment in a persistent store.
- *
- * @param basicExperimentMetadata
- * The create experiment will require the basic experiment metadata like the name and description, intended user,
- * the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
- * the ExperimentMetadata is a required field.
- *
- * @return
- * The server-side generated airavata experiment globally unique identifier.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param basicExperimentMetadata
- */
- public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Fetch previously created experiment metadata.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @return experimentMetada
- * This method will return the previously stored experiment metadata.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- */
- public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Configure a previously created experiment with required inputs, scheduling and other quality of service
- * parameters. This method only updates the experiment object within the registry. The experiment has to be launched
- * to make it actionable by the server.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @param experimentConfigurationData
- * The configuration information of the experiment with application input parameters, computational resource scheduling
- * information, special input output handling and additional quality of service parameters.
- *
- * @return
- * This method call does not have a return value.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- * @param experimentConfigurationData
- */
- public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Fetch the previously configured experiment configuration information.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @return
- * This method returns the previously configured experiment configuration data.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- */
- public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
- * notifications and intermediate and output data will be subsequently available for this experiment.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @param airavataCredStoreToken:
- * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
- * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
- * generated token associated with the registered credentials. The client has to security posses this token id and is
- * required to pass it to Airavata Server for all execution requests.
- * Note: At this point only the credential store token is required so the string is directly passed here. In future if
- * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
- * Note: This parameter is not persisted within Airavata Registry for security reasons.
- *
- * @return
- * This method call does not have a return value.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- * @param airavataCredStoreToken
- */
- public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Configure and Launch a previously created experiment with required inputs, scheduling, security and other quality of service
- * parameters. This method also launches the experiment after it is configured. If you would like to configure only
- * and launch at a later time or partially configure then ConfigureExperiment should be used.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @param experimentConfigurationData
- * The configuration information of the experiment with application input parameters, computational resource scheduling
- * information, special input output handling and additional quality of service parameters.
- *
- * @param airavataCredStoreToken:
- * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
- * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
- * generated token associated with the registered credentials. The client has to security posses this token id and is
- * required to pass it to Airavata Server for all execution requests.
- * Note: At this point only the credential store token is required so the string is directly passed here. In future if
- * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
- *
- * @return
- * The server-side generated experiment GUID.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- * @param experimentConfigurationData
- * @param airavataCredStoreToken
- */
- public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
- * The client has to subsequently update this configuration if needed and launch the cloned experiment.
- *
- * @param airavataExperimentIdToBeCloned
- * This is the experiment identifier that is to be cloned.
- *
- * @param basicExperimentMetadata
- * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
- * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
- * should be shared public by default.
- *
- * @return
- * The server-side generated airavata experiment globally unique identifier for the newly cloned experiment.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentIdToBeCloned
- * @param basicExperimentMetadata
- */
- public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- /**
- * Terminate a running experiment.
- *
- * @param airavataExperimentId
- * The identifier for the requested experiment. This is returned during the create experiment step.
- *
- * @return
- * This method call does not have a return value.
- *
- * @throws org.apache.airavata.api.error.InvalidRequestException
- * For any incorrect forming of the request itself.
- *
- * @throws org.apache.airavata.api.error.ExperimentNotFoundException
- * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
- *
- * @throws org.apache.airavata.api.error.AiravataClientException
- * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
- *
- * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
- * step, then Airavata Registry will not have a provenance area setup. The client has to follow
- * gateway registration steps and retry this request.
- *
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- *
- * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
- * is implemented, the authorization will be more substantial.
- *
- * @throws org.apache.airavata.api.error.AiravataSystemException
- * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
- * rather an Airavata Administrator will be notified to take corrective action.
- *
- *
- * @param airavataExperimentId
- */
- public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public String GetAPIVersion() throws org.apache.thrift.TException
- {
- send_GetAPIVersion();
- return recv_GetAPIVersion();
- }
-
- public void send_GetAPIVersion() throws org.apache.thrift.TException
- {
- GetAPIVersion_args args = new GetAPIVersion_args();
- sendBase("GetAPIVersion", args);
- }
-
- public String recv_GetAPIVersion() throws org.apache.thrift.TException
- {
- GetAPIVersion_result result = new GetAPIVersion_result();
- receiveBase(result, "GetAPIVersion");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetAPIVersion failed: unknown result");
- }
-
- public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_createExperiment(basicExperimentMetadata);
- return recv_createExperiment();
- }
-
- public void send_createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
- {
- createExperiment_args args = new createExperiment_args();
- args.setBasicExperimentMetadata(basicExperimentMetadata);
- sendBase("createExperiment", args);
- }
-
- public String recv_createExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- createExperiment_result result = new createExperiment_result();
- receiveBase(result, "createExperiment");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createExperiment failed: unknown result");
- }
-
- public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_getBasicExperimentMetadata(airavataExperimentId);
- return recv_getBasicExperimentMetadata();
- }
-
- public void send_getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.thrift.TException
- {
- getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
- args.setAiravataExperimentId(airavataExperimentId);
- sendBase("getBasicExperimentMetadata", args);
- }
-
- public org.apache.airavata.model.experiment.BasicMetadata recv_getBasicExperimentMetadata() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
- receiveBase(result, "getBasicExperimentMetadata");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBasicExperimentMetadata failed: unknown result");
- }
-
- public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_configureExperiment(airavataExperimentId, experimentConfigurationData);
- recv_configureExperiment();
- }
-
- public void send_configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.thrift.TException
- {
- configureExperiment_args args = new configureExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setExperimentConfigurationData(experimentConfigurationData);
- sendBase("configureExperiment", args);
- }
-
- public void recv_configureExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- configureExperiment_result result = new configureExperiment_result();
- receiveBase(result, "configureExperiment");
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- return;
- }
-
- public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_getExperimentConfiguration(airavataExperimentId);
- return recv_getExperimentConfiguration();
- }
-
- public void send_getExperimentConfiguration(String airavataExperimentId) throws org.apache.thrift.TException
- {
- getExperimentConfiguration_args args = new getExperimentConfiguration_args();
- args.setAiravataExperimentId(airavataExperimentId);
- sendBase("getExperimentConfiguration", args);
- }
-
- public org.apache.airavata.model.experiment.ConfigurationData recv_getExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- getExperimentConfiguration_result result = new getExperimentConfiguration_result();
- receiveBase(result, "getExperimentConfiguration");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentConfiguration failed: unknown result");
- }
-
- public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_launchConfiguredExperiment(airavataExperimentId, airavataCredStoreToken);
- recv_launchConfiguredExperiment();
- }
-
- public void send_launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.thrift.TException
- {
- launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setAiravataCredStoreToken(airavataCredStoreToken);
- sendBase("launchConfiguredExperiment", args);
- }
-
- public void recv_launchConfiguredExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
- receiveBase(result, "launchConfiguredExperiment");
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- return;
- }
-
- public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_configureAndLaunchExperiment(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken);
- return recv_configureAndLaunchExperiment();
- }
-
- public void send_configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.thrift.TException
- {
- configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setExperimentConfigurationData(experimentConfigurationData);
- args.setAiravataCredStoreToken(airavataCredStoreToken);
- sendBase("configureAndLaunchExperiment", args);
- }
-
- public String recv_configureAndLaunchExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
- receiveBase(result, "configureAndLaunchExperiment");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "configureAndLaunchExperiment failed: unknown result");
- }
-
- public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_cloneExperimentConfiguration(airavataExperimentIdToBeCloned, basicExperimentMetadata);
- return recv_cloneExperimentConfiguration();
- }
-
- public void send_cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
- {
- cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
- args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
- args.setBasicExperimentMetadata(basicExperimentMetadata);
- sendBase("cloneExperimentConfiguration", args);
- }
-
- public String recv_cloneExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
- receiveBase(result, "cloneExperimentConfiguration");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cloneExperimentConfiguration failed: unknown result");
- }
-
- public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- send_terminateExperiment(airavataExperimentId);
- recv_terminateExperiment();
- }
-
- public void send_terminateExperiment(String airavataExperimentId) throws org.apache.thrift.TException
- {
- terminateExperiment_args args = new terminateExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- sendBase("terminateExperiment", args);
- }
-
- public void recv_terminateExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
- {
- terminateExperiment_result result = new terminateExperiment_result();
- receiveBase(result, "terminateExperiment");
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.enf != null) {
- throw result.enf;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- return;
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetAPIVersion_call method_call = new GetAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- public GetAPIVersion_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);
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetAPIVersion_args args = new GetAPIVersion_args();
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public 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_GetAPIVersion();
- }
- }
-
- public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- createExperiment_call method_call = new createExperiment_call(basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class createExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
- public createExperiment_call(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.basicExperimentMetadata = basicExperimentMetadata;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- createExperiment_args args = new createExperiment_args();
- args.setBasicExperimentMetadata(basicExperimentMetadata);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_createExperiment();
- }
- }
-
- public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getBasicExperimentMetadata_call method_call = new getBasicExperimentMetadata_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getBasicExperimentMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- public getBasicExperimentMetadata_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBasicExperimentMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.model.experiment.BasicMetadata getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getBasicExperimentMetadata();
- }
- }
-
- public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- configureExperiment_call method_call = new configureExperiment_call(airavataExperimentId, experimentConfigurationData, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class configureExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
- public configureExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, 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.airavataExperimentId = airavataExperimentId;
- this.experimentConfigurationData = experimentConfigurationData;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- configureExperiment_args args = new configureExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setExperimentConfigurationData(experimentConfigurationData);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_configureExperiment();
- }
- }
-
- public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getExperimentConfiguration_call method_call = new getExperimentConfiguration_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- public getExperimentConfiguration_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getExperimentConfiguration_args args = new getExperimentConfiguration_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.model.experiment.ConfigurationData getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getExperimentConfiguration();
- }
- }
-
- public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- launchConfiguredExperiment_call method_call = new launchConfiguredExperiment_call(airavataExperimentId, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class launchConfiguredExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- private String airavataCredStoreToken;
- public launchConfiguredExperiment_call(String airavataExperimentId, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
- this.airavataCredStoreToken = airavataCredStoreToken;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchConfiguredExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setAiravataCredStoreToken(airavataCredStoreToken);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_launchConfiguredExperiment();
- }
- }
-
- public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- configureAndLaunchExperiment_call method_call = new configureAndLaunchExperiment_call(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class configureAndLaunchExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
- private String airavataCredStoreToken;
- public configureAndLaunchExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
- this.experimentConfigurationData = experimentConfigurationData;
- this.airavataCredStoreToken = airavataCredStoreToken;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureAndLaunchExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.setExperimentConfigurationData(experimentConfigurationData);
- args.setAiravataCredStoreToken(airavataCredStoreToken);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_configureAndLaunchExperiment();
- }
- }
-
- public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- cloneExperimentConfiguration_call method_call = new cloneExperimentConfiguration_call(airavataExperimentIdToBeCloned, basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class cloneExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentIdToBeCloned;
- private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
- public cloneExperimentConfiguration_call(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.airavataExperimentIdToBeCloned = airavataExperimentIdToBeCloned;
- this.basicExperimentMetadata = basicExperimentMetadata;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cloneExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
- cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
- args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
- args.setBasicExperimentMetadata(basicExperimentMetadata);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_cloneExperimentConfiguration();
- }
- }
-
- public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- terminateExperiment_call method_call = new terminateExperiment_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class terminateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String airavataExperimentId;
- public terminateExperiment_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- terminateExperiment_args args = new terminateExperiment_args();
- args.setAiravataExperimentId(airavataExperimentId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_terminateExperiment();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("GetAPIVersion", new GetAPIVersion());
- processMap.put("createExperiment", new createExperiment());
- processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
- processMap.put("configureExperiment", new configureExperiment());
- processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
- processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
- processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
- processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
- processMap.put("terminateExperiment", new terminateExperiment());
- return processMap;
- }
-
- public static class GetAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, GetAPIVersion_args> {
- public GetAPIVersion() {
- super("GetAPIVersion");
- }
-
- public GetAPIVersion_args getEmptyArgsInstance() {
- return new GetAPIVersion_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetAPIVersion_result getResult(I iface, GetAPIVersion_args args) throws org.apache.thrift.TException {
- GetAPIVersion_result result = new GetAPIVersion_result();
- result.success = iface.GetAPIVersion();
- return result;
- }
- }
-
- public static class createExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createExperiment_args> {
- public createExperiment() {
- super("createExperiment");
- }
-
- public createExperiment_args getEmptyArgsInstance() {
- return new createExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public createExperiment_result getResult(I iface, createExperiment_args args) throws org.apache.thrift.TException {
- createExperiment_result result = new createExperiment_result();
- try {
- result.success = iface.createExperiment(args.basicExperimentMetadata);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class getBasicExperimentMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBasicExperimentMetadata_args> {
- public getBasicExperimentMetadata() {
- super("getBasicExperimentMetadata");
- }
-
- public getBasicExperimentMetadata_args getEmptyArgsInstance() {
- return new getBasicExperimentMetadata_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getBasicExperimentMetadata_result getResult(I iface, getBasicExperimentMetadata_args args) throws org.apache.thrift.TException {
- getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
- try {
- result.success = iface.getBasicExperimentMetadata(args.airavataExperimentId);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class configureExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureExperiment_args> {
- public configureExperiment() {
- super("configureExperiment");
- }
-
- public configureExperiment_args getEmptyArgsInstance() {
- return new configureExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public configureExperiment_result getResult(I iface, configureExperiment_args args) throws org.apache.thrift.TException {
- configureExperiment_result result = new configureExperiment_result();
- try {
- iface.configureExperiment(args.airavataExperimentId, args.experimentConfigurationData);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class getExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentConfiguration_args> {
- public getExperimentConfiguration() {
- super("getExperimentConfiguration");
- }
-
- public getExperimentConfiguration_args getEmptyArgsInstance() {
- return new getExperimentConfiguration_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getExperimentConfiguration_result getResult(I iface, getExperimentConfiguration_args args) throws org.apache.thrift.TException {
- getExperimentConfiguration_result result = new getExperimentConfiguration_result();
- try {
- result.success = iface.getExperimentConfiguration(args.airavataExperimentId);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class launchConfiguredExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchConfiguredExperiment_args> {
- public launchConfiguredExperiment() {
- super("launchConfiguredExperiment");
- }
-
- public launchConfiguredExperiment_args getEmptyArgsInstance() {
- return new launchConfiguredExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public launchConfiguredExperiment_result getResult(I iface, launchConfiguredExperiment_args args) throws org.apache.thrift.TException {
- launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
- try {
- iface.launchConfiguredExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class configureAndLaunchExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureAndLaunchExperiment_args> {
- public configureAndLaunchExperiment() {
- super("configureAndLaunchExperiment");
- }
-
- public configureAndLaunchExperiment_args getEmptyArgsInstance() {
- return new configureAndLaunchExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public configureAndLaunchExperiment_result getResult(I iface, configureAndLaunchExperiment_args args) throws org.apache.thrift.TException {
- configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
- try {
- result.success = iface.configureAndLaunchExperiment(args.airavataExperimentId, args.experimentConfigurationData, args.airavataCredStoreToken);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class cloneExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cloneExperimentConfiguration_args> {
- public cloneExperimentConfiguration() {
- super("cloneExperimentConfiguration");
- }
-
- public cloneExperimentConfiguration_args getEmptyArgsInstance() {
- return new cloneExperimentConfiguration_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public cloneExperimentConfiguration_result getResult(I iface, cloneExperimentConfiguration_args args) throws org.apache.thrift.TException {
- cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
- try {
- result.success = iface.cloneExperimentConfiguration(args.airavataExperimentIdToBeCloned, args.basicExperimentMetadata);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- public static class terminateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateExperiment_args> {
- public terminateExperiment() {
- super("terminateExperiment");
- }
-
- public terminateExperiment_args getEmptyArgsInstance() {
- return new terminateExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public terminateExperiment_result getResult(I iface, terminateExperiment_args args) throws org.apache.thrift.TException {
- terminateExperiment_result result = new terminateExperiment_result();
- try {
- iface.terminateExperiment(args.airavataExperimentId);
- } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
- result.ire = ire;
- } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
- result.enf = enf;
- } catch (org.apache.airavata.api.error.AiravataClientException ace) {
- result.ace = ace;
- } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
- result.ase = ase;
- }
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("GetAPIVersion", new GetAPIVersion());
- processMap.put("createExperiment", new createExperiment());
- processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
- processMap.put("configureExperiment", new configureExperiment());
- processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
- processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
- processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
- processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
- processMap.put("terminateExperiment", new terminateExperiment());
- return processMap;
- }
-
- public static class GetAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, GetAPIVersion_args, String> {
- public GetAPIVersion() {
- super("GetAPIVersion");
- }
-
- public GetAPIVersion_args getEmptyArgsInstance() {
- return new GetAPIVersion_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- GetAPIVersion_result result = new GetAPIVersion_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;
- GetAPIVersion_result result = new GetAPIVersion_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, GetAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.GetAPIVersion(resultHandler);
- }
- }
-
- public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
- public createExperiment() {
- super("createExperiment");
- }
-
- public createExperiment_args getEmptyArgsInstance() {
- return new createExperiment_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createExperiment_result result = new createExperiment_result();
- result.success = o;
-
<TRUNCATED>
[07/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/server/src/main/java/org/apache/airavata/api/Airavata.java
new file mode 100644
index 0000000..4d3cd9c
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/Airavata.java
@@ -0,0 +1,11638 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api;
+
+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("all") public class Airavata {
+
+ public interface Iface {
+
+ /**
+ * Query Airavata to fetch the API version
+ */
+ public String GetAPIVersion() throws org.apache.thrift.TException;
+
+ /**
+ * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
+ * but inferred from the authentication header. This experiment is just a persistent place holder. The client
+ * has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
+ * registering the experiment in a persistent store.
+ *
+ * @param basicExperimentMetadata
+ * The create experiment will require the basic experiment metadata like the name and description, intended user,
+ * the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
+ * the ExperimentMetadata is a required field.
+ *
+ * @return
+ * The server-side generated airavata experiment globally unique identifier.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param basicExperimentMetadata
+ */
+ public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Fetch previously created experiment metadata.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return experimentMetada
+ * This method will return the previously stored experiment metadata.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Configure a previously created experiment with required inputs, scheduling and other quality of service
+ * parameters. This method only updates the experiment object within the registry. The experiment has to be launched
+ * to make it actionable by the server.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param experimentConfigurationData
+ * The configuration information of the experiment with application input parameters, computational resource scheduling
+ * information, special input output handling and additional quality of service parameters.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param experimentConfigurationData
+ */
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Fetch the previously configured experiment configuration information.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return
+ * This method returns the previously configured experiment configuration data.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
+ * notifications and intermediate and output data will be subsequently available for this experiment.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param airavataCredStoreToken:
+ * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
+ * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
+ * generated token associated with the registered credentials. The client has to security posses this token id and is
+ * required to pass it to Airavata Server for all execution requests.
+ * Note: At this point only the credential store token is required so the string is directly passed here. In future if
+ * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
+ * Note: This parameter is not persisted within Airavata Registry for security reasons.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param airavataCredStoreToken
+ */
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Configure and Launch a previously created experiment with required inputs, scheduling, security and other quality of service
+ * parameters. This method also launches the experiment after it is configured. If you would like to configure only
+ * and launch at a later time or partially configure then ConfigureExperiment should be used.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param experimentConfigurationData
+ * The configuration information of the experiment with application input parameters, computational resource scheduling
+ * information, special input output handling and additional quality of service parameters.
+ *
+ * @param airavataCredStoreToken:
+ * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
+ * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
+ * generated token associated with the registered credentials. The client has to security posses this token id and is
+ * required to pass it to Airavata Server for all execution requests.
+ * Note: At this point only the credential store token is required so the string is directly passed here. In future if
+ * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
+ *
+ * @return
+ * The server-side generated experiment GUID.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param experimentConfigurationData
+ * @param airavataCredStoreToken
+ */
+ public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
+ * The client has to subsequently update this configuration if needed and launch the cloned experiment.
+ *
+ * @param airavataExperimentIdToBeCloned
+ * This is the experiment identifier that is to be cloned.
+ *
+ * @param basicExperimentMetadata
+ * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+ * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+ * should be shared public by default.
+ *
+ * @return
+ * The server-side generated airavata experiment globally unique identifier for the newly cloned experiment.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentIdToBeCloned
+ * @param basicExperimentMetadata
+ */
+ public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Terminate a running experiment.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public String GetAPIVersion() throws org.apache.thrift.TException
+ {
+ send_GetAPIVersion();
+ return recv_GetAPIVersion();
+ }
+
+ public void send_GetAPIVersion() throws org.apache.thrift.TException
+ {
+ GetAPIVersion_args args = new GetAPIVersion_args();
+ sendBase("GetAPIVersion", args);
+ }
+
+ public String recv_GetAPIVersion() throws org.apache.thrift.TException
+ {
+ GetAPIVersion_result result = new GetAPIVersion_result();
+ receiveBase(result, "GetAPIVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetAPIVersion failed: unknown result");
+ }
+
+ public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_createExperiment(basicExperimentMetadata);
+ return recv_createExperiment();
+ }
+
+ public void send_createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
+ {
+ createExperiment_args args = new createExperiment_args();
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ sendBase("createExperiment", args);
+ }
+
+ public String recv_createExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ createExperiment_result result = new createExperiment_result();
+ receiveBase(result, "createExperiment");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createExperiment failed: unknown result");
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_getBasicExperimentMetadata(airavataExperimentId);
+ return recv_getBasicExperimentMetadata();
+ }
+
+ public void send_getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getBasicExperimentMetadata", args);
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata recv_getBasicExperimentMetadata() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ receiveBase(result, "getBasicExperimentMetadata");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBasicExperimentMetadata failed: unknown result");
+ }
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_configureExperiment(airavataExperimentId, experimentConfigurationData);
+ recv_configureExperiment();
+ }
+
+ public void send_configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.thrift.TException
+ {
+ configureExperiment_args args = new configureExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ sendBase("configureExperiment", args);
+ }
+
+ public void recv_configureExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ configureExperiment_result result = new configureExperiment_result();
+ receiveBase(result, "configureExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_getExperimentConfiguration(airavataExperimentId);
+ return recv_getExperimentConfiguration();
+ }
+
+ public void send_getExperimentConfiguration(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getExperimentConfiguration_args args = new getExperimentConfiguration_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getExperimentConfiguration", args);
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData recv_getExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getExperimentConfiguration_result result = new getExperimentConfiguration_result();
+ receiveBase(result, "getExperimentConfiguration");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentConfiguration failed: unknown result");
+ }
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_launchConfiguredExperiment(airavataExperimentId, airavataCredStoreToken);
+ recv_launchConfiguredExperiment();
+ }
+
+ public void send_launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.thrift.TException
+ {
+ launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ sendBase("launchConfiguredExperiment", args);
+ }
+
+ public void recv_launchConfiguredExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
+ receiveBase(result, "launchConfiguredExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_configureAndLaunchExperiment(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken);
+ return recv_configureAndLaunchExperiment();
+ }
+
+ public void send_configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.thrift.TException
+ {
+ configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ sendBase("configureAndLaunchExperiment", args);
+ }
+
+ public String recv_configureAndLaunchExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
+ receiveBase(result, "configureAndLaunchExperiment");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "configureAndLaunchExperiment failed: unknown result");
+ }
+
+ public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_cloneExperimentConfiguration(airavataExperimentIdToBeCloned, basicExperimentMetadata);
+ return recv_cloneExperimentConfiguration();
+ }
+
+ public void send_cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
+ {
+ cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
+ args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ sendBase("cloneExperimentConfiguration", args);
+ }
+
+ public String recv_cloneExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
+ receiveBase(result, "cloneExperimentConfiguration");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cloneExperimentConfiguration failed: unknown result");
+ }
+
+ public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_terminateExperiment(airavataExperimentId);
+ recv_terminateExperiment();
+ }
+
+ public void send_terminateExperiment(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ terminateExperiment_args args = new terminateExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("terminateExperiment", args);
+ }
+
+ public void recv_terminateExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ terminateExperiment_result result = new terminateExperiment_result();
+ receiveBase(result, "terminateExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ GetAPIVersion_call method_call = new GetAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class GetAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public GetAPIVersion_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ GetAPIVersion_args args = new GetAPIVersion_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public 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_GetAPIVersion();
+ }
+ }
+
+ public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createExperiment_call method_call = new createExperiment_call(basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
+ public createExperiment_call(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.basicExperimentMetadata = basicExperimentMetadata;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createExperiment_args args = new createExperiment_args();
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_createExperiment();
+ }
+ }
+
+ public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getBasicExperimentMetadata_call method_call = new getBasicExperimentMetadata_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getBasicExperimentMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public getBasicExperimentMetadata_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBasicExperimentMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getBasicExperimentMetadata();
+ }
+ }
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ configureExperiment_call method_call = new configureExperiment_call(airavataExperimentId, experimentConfigurationData, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class configureExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
+ public configureExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, 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.airavataExperimentId = airavataExperimentId;
+ this.experimentConfigurationData = experimentConfigurationData;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ configureExperiment_args args = new configureExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_configureExperiment();
+ }
+ }
+
+ public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getExperimentConfiguration_call method_call = new getExperimentConfiguration_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public getExperimentConfiguration_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperimentConfiguration_args args = new getExperimentConfiguration_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getExperimentConfiguration();
+ }
+ }
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ launchConfiguredExperiment_call method_call = new launchConfiguredExperiment_call(airavataExperimentId, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class launchConfiguredExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private String airavataCredStoreToken;
+ public launchConfiguredExperiment_call(String airavataExperimentId, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
+ this.airavataCredStoreToken = airavataCredStoreToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchConfiguredExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_launchConfiguredExperiment();
+ }
+ }
+
+ public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ configureAndLaunchExperiment_call method_call = new configureAndLaunchExperiment_call(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class configureAndLaunchExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
+ private String airavataCredStoreToken;
+ public configureAndLaunchExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
+ this.experimentConfigurationData = experimentConfigurationData;
+ this.airavataCredStoreToken = airavataCredStoreToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureAndLaunchExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_configureAndLaunchExperiment();
+ }
+ }
+
+ public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ cloneExperimentConfiguration_call method_call = new cloneExperimentConfiguration_call(airavataExperimentIdToBeCloned, basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class cloneExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentIdToBeCloned;
+ private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
+ public cloneExperimentConfiguration_call(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.airavataExperimentIdToBeCloned = airavataExperimentIdToBeCloned;
+ this.basicExperimentMetadata = basicExperimentMetadata;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cloneExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
+ args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_cloneExperimentConfiguration();
+ }
+ }
+
+ public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ terminateExperiment_call method_call = new terminateExperiment_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class terminateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public terminateExperiment_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ terminateExperiment_args args = new terminateExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_terminateExperiment();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("GetAPIVersion", new GetAPIVersion());
+ processMap.put("createExperiment", new createExperiment());
+ processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
+ processMap.put("configureExperiment", new configureExperiment());
+ processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
+ processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
+ processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
+ processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
+ processMap.put("terminateExperiment", new terminateExperiment());
+ return processMap;
+ }
+
+ public static class GetAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, GetAPIVersion_args> {
+ public GetAPIVersion() {
+ super("GetAPIVersion");
+ }
+
+ public GetAPIVersion_args getEmptyArgsInstance() {
+ return new GetAPIVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public GetAPIVersion_result getResult(I iface, GetAPIVersion_args args) throws org.apache.thrift.TException {
+ GetAPIVersion_result result = new GetAPIVersion_result();
+ result.success = iface.GetAPIVersion();
+ return result;
+ }
+ }
+
+ public static class createExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createExperiment_args> {
+ public createExperiment() {
+ super("createExperiment");
+ }
+
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createExperiment_result getResult(I iface, createExperiment_args args) throws org.apache.thrift.TException {
+ createExperiment_result result = new createExperiment_result();
+ try {
+ result.success = iface.createExperiment(args.basicExperimentMetadata);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class getBasicExperimentMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBasicExperimentMetadata_args> {
+ public getBasicExperimentMetadata() {
+ super("getBasicExperimentMetadata");
+ }
+
+ public getBasicExperimentMetadata_args getEmptyArgsInstance() {
+ return new getBasicExperimentMetadata_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getBasicExperimentMetadata_result getResult(I iface, getBasicExperimentMetadata_args args) throws org.apache.thrift.TException {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ try {
+ result.success = iface.getBasicExperimentMetadata(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class configureExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureExperiment_args> {
+ public configureExperiment() {
+ super("configureExperiment");
+ }
+
+ public configureExperiment_args getEmptyArgsInstance() {
+ return new configureExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public configureExperiment_result getResult(I iface, configureExperiment_args args) throws org.apache.thrift.TException {
+ configureExperiment_result result = new configureExperiment_result();
+ try {
+ iface.configureExperiment(args.airavataExperimentId, args.experimentConfigurationData);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class getExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentConfiguration_args> {
+ public getExperimentConfiguration() {
+ super("getExperimentConfiguration");
+ }
+
+ public getExperimentConfiguration_args getEmptyArgsInstance() {
+ return new getExperimentConfiguration_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getExperimentConfiguration_result getResult(I iface, getExperimentConfiguration_args args) throws org.apache.thrift.TException {
+ getExperimentConfiguration_result result = new getExperimentConfiguration_result();
+ try {
+ result.success = iface.getExperimentConfiguration(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class launchConfiguredExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchConfiguredExperiment_args> {
+ public launchConfiguredExperiment() {
+ super("launchConfiguredExperiment");
+ }
+
+ public launchConfiguredExperiment_args getEmptyArgsInstance() {
+ return new launchConfiguredExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public launchConfiguredExperiment_result getResult(I iface, launchConfiguredExperiment_args args) throws org.apache.thrift.TException {
+ launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
+ try {
+ iface.launchConfiguredExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class configureAndLaunchExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureAndLaunchExperiment_args> {
+ public configureAndLaunchExperiment() {
+ super("configureAndLaunchExperiment");
+ }
+
+ public configureAndLaunchExperiment_args getEmptyArgsInstance() {
+ return new configureAndLaunchExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public configureAndLaunchExperiment_result getResult(I iface, configureAndLaunchExperiment_args args) throws org.apache.thrift.TException {
+ configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
+ try {
+ result.success = iface.configureAndLaunchExperiment(args.airavataExperimentId, args.experimentConfigurationData, args.airavataCredStoreToken);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class cloneExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cloneExperimentConfiguration_args> {
+ public cloneExperimentConfiguration() {
+ super("cloneExperimentConfiguration");
+ }
+
+ public cloneExperimentConfiguration_args getEmptyArgsInstance() {
+ return new cloneExperimentConfiguration_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public cloneExperimentConfiguration_result getResult(I iface, cloneExperimentConfiguration_args args) throws org.apache.thrift.TException {
+ cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
+ try {
+ result.success = iface.cloneExperimentConfiguration(args.airavataExperimentIdToBeCloned, args.basicExperimentMetadata);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class terminateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateExperiment_args> {
+ public terminateExperiment() {
+ super("terminateExperiment");
+ }
+
+ public terminateExperiment_args getEmptyArgsInstance() {
+ return new terminateExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public terminateExperiment_result getResult(I iface, terminateExperiment_args args) throws org.apache.thrift.TException {
+ terminateExperiment_result result = new terminateExperiment_result();
+ try {
+ iface.terminateExperiment(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("GetAPIVersion", new GetAPIVersion());
+ processMap.put("createExperiment", new createExperiment());
+ processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
+ processMap.put("configureExperiment", new configureExperiment());
+ processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
+ processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
+ processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
+ processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
+ processMap.put("terminateExperiment", new terminateExperiment());
+ return processMap;
+ }
+
+ public static class GetAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, GetAPIVersion_args, String> {
+ public GetAPIVersion() {
+ super("GetAPIVersion");
+ }
+
+ public GetAPIVersion_args getEmptyArgsInstance() {
+ return new GetAPIVersion_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ GetAPIVersion_result result = new GetAPIVersion_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;
+ GetAPIVersion_result result = new GetAPIVersion_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, GetAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.GetAPIVersion(resultHandler);
+ }
+ }
+
+ public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
+ public createExperiment() {
+ super("createExperiment");
+ }
+
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createExperiment_result result = new createExperiment_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;
+ createExperiment_result result = new createExperiment_result();
+ if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.api.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.api.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createExperiment(args.basicExperimentMetadata,resultHandler);
+ }
+ }
+
+ public static class getBasicExperimentMetadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getBasicExperimentMetadata_args, org.apache.airavata.model.experiment.BasicMetadata> {
+ public getBasicExperimentMetadata() {
+ super("getBasicExperimentMetadata");
+ }
+
+ public getBasicExperimentMetadata_args getEmptyArgsInstance() {
+ return new getBasicExperimentMetadata_args();
+ }
+
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata>() {
+ public void onComplete(org.apache.airavata.model.experiment.BasicMetadata o) {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_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;
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.api.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.api.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.api.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, getBasicExperimentMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata> resultHandler) throws TException {
+ iface.getBasicExperimentMetadata(args.airavataExperimentId,resultHandler);
+ }
+ }
+
+ public static class configureExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, configureExperiment_args, Void> {
+ public configureExperim
<TRUNCATED>
[08/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
deleted file mode 100644
index 0e8d332..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
- * or a parameter is malformed.
- *
- * message: contains the associated error message.
- */
-public class InvalidRequestException extends TException implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
-
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 InvalidRequestExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InvalidRequestExceptionTupleSchemeFactory());
- }
-
- public String message; // 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 {
- MESSAGE((short)1, "message");
-
- 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: // MESSAGE
- return MESSAGE;
- 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
- }
-
- public InvalidRequestException() {
- }
-
- public InvalidRequestException(
- String message)
- {
- this();
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public InvalidRequestException(InvalidRequestException other) {
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public InvalidRequestException deepCopy() {
- return new InvalidRequestException(this);
- }
-
- @Override
- public void clear() {
- this.message = null;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public InvalidRequestException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MESSAGE:
- return getMessage();
-
- }
- 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 MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof InvalidRequestException)
- return this.equals((InvalidRequestException)that);
- return false;
- }
-
- public boolean equals(InvalidRequestException that) {
- if (that == null)
- return false;
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(InvalidRequestException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("InvalidRequestException(");
- boolean first = true;
-
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (message == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
- }
- // 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 InvalidRequestExceptionStandardSchemeFactory implements SchemeFactory {
- public InvalidRequestExceptionStandardScheme getScheme() {
- return new InvalidRequestExceptionStandardScheme();
- }
- }
-
- private static class InvalidRequestExceptionStandardScheme extends StandardScheme<InvalidRequestException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidRequestException 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: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, InvalidRequestException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class InvalidRequestExceptionTupleSchemeFactory implements SchemeFactory {
- public InvalidRequestExceptionTupleScheme getScheme() {
- return new InvalidRequestExceptionTupleScheme();
- }
- }
-
- private static class InvalidRequestExceptionTupleScheme extends TupleScheme<InvalidRequestException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.message);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/TimedOutException.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/TimedOutException.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/TimedOutException.java
deleted file mode 100644
index b3bc735..0000000
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/api/error/TimedOutException.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.api.error;
-
-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;
-
-/**
- * This exception is thrown when RPC timeout gets exceeded.
- */
-public class TimedOutException extends TException implements org.apache.thrift.TBase<TimedOutException, TimedOutException._Fields>, java.io.Serializable, Cloneable, Comparable<TimedOutException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimedOutException");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TimedOutExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TimedOutExceptionTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<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) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimedOutException.class, metaDataMap);
- }
-
- public TimedOutException() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TimedOutException(TimedOutException other) {
- }
-
- public TimedOutException deepCopy() {
- return new TimedOutException(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TimedOutException)
- return this.equals((TimedOutException)that);
- return false;
- }
-
- public boolean equals(TimedOutException that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(TimedOutException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TimedOutException(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TimedOutExceptionStandardSchemeFactory implements SchemeFactory {
- public TimedOutExceptionStandardScheme getScheme() {
- return new TimedOutExceptionStandardScheme();
- }
- }
-
- private static class TimedOutExceptionStandardScheme extends StandardScheme<TimedOutException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TimedOutException struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TimedOutException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TimedOutExceptionTupleSchemeFactory implements SchemeFactory {
- public TimedOutExceptionTupleScheme getScheme() {
- return new TimedOutExceptionTupleScheme();
- }
- }
-
- private static class TimedOutExceptionTupleScheme extends TupleScheme<TimedOutException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
index d13fc69..ac1ba59 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -72,7 +72,7 @@ import org.slf4j.LoggerFactory;
private boolean cleanUpWorkingDirAfterJob; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STAGE_INPUT_FILES_TO_WORKING_DIR((short)1, "stageInputFilesToWorkingDir"),
WORKING_DIRECTORY_PARENT((short)2, "workingDirectoryParent"),
UNIQUE_WORKING_DIRECTORY((short)3, "uniqueWorkingDirectory"),
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
index 8289ff4..b4c389e 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -70,7 +70,7 @@ import org.slf4j.LoggerFactory;
private boolean persistOutputData; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
OUTPUTDATA_DIR((short)2, "outputdataDir"),
DATA_REGISTRY_URL((short)3, "dataRegistryURL"),
PERSIST_OUTPUT_DATA((short)4, "persistOutputData");
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
index c5cdbd0..c0f30db 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/BasicMetadata.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -88,7 +88,7 @@ import org.slf4j.LoggerFactory;
private String experimentID; // 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 {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
USER_NAME((short)1, "userName"),
EXPERIMENT_NAME((short)2, "experimentName"),
PROJECT_ID((short)3, "projectID"),
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
index fd0768d..634ce07 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -86,7 +86,7 @@ import org.slf4j.LoggerFactory;
private String ComputationalProjectAccount; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
RESOURCE_HOST_ID((short)3, "resourceHostId"),
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
index 071b203..84aa9ee 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -85,7 +85,7 @@ import org.slf4j.LoggerFactory;
private QualityOfServiceParams qosParams; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
BASIC_METADATA((short)1, "basicMetadata"),
APPLICATION_ID((short)2, "applicationId"),
APPLICATION_VERSION((short)3, "applicationVersion"),
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
----------------------------------------------------------------------
diff --git a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
index 6e26ce7..0df6139 100644
--- a/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
+++ b/airavata-api/datamodel/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
@@ -70,7 +70,7 @@ import org.slf4j.LoggerFactory;
private int numberofRetries; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
START_EXECUTION_AT((short)1, "startExecutionAt"),
EXECUTE_BEFORE((short)2, "executeBefore"),
NUMBEROF_RETRIES((short)3, "numberofRetries");
[15/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/Airavata.java
new file mode 100644
index 0000000..4d3cd9c
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/api/Airavata.java
@@ -0,0 +1,11638 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api;
+
+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("all") public class Airavata {
+
+ public interface Iface {
+
+ /**
+ * Query Airavata to fetch the API version
+ */
+ public String GetAPIVersion() throws org.apache.thrift.TException;
+
+ /**
+ * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
+ * but inferred from the authentication header. This experiment is just a persistent place holder. The client
+ * has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
+ * registering the experiment in a persistent store.
+ *
+ * @param basicExperimentMetadata
+ * The create experiment will require the basic experiment metadata like the name and description, intended user,
+ * the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
+ * the ExperimentMetadata is a required field.
+ *
+ * @return
+ * The server-side generated airavata experiment globally unique identifier.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param basicExperimentMetadata
+ */
+ public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Fetch previously created experiment metadata.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return experimentMetada
+ * This method will return the previously stored experiment metadata.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Configure a previously created experiment with required inputs, scheduling and other quality of service
+ * parameters. This method only updates the experiment object within the registry. The experiment has to be launched
+ * to make it actionable by the server.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param experimentConfigurationData
+ * The configuration information of the experiment with application input parameters, computational resource scheduling
+ * information, special input output handling and additional quality of service parameters.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param experimentConfigurationData
+ */
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Fetch the previously configured experiment configuration information.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return
+ * This method returns the previously configured experiment configuration data.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
+ * notifications and intermediate and output data will be subsequently available for this experiment.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param airavataCredStoreToken:
+ * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
+ * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
+ * generated token associated with the registered credentials. The client has to security posses this token id and is
+ * required to pass it to Airavata Server for all execution requests.
+ * Note: At this point only the credential store token is required so the string is directly passed here. In future if
+ * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
+ * Note: This parameter is not persisted within Airavata Registry for security reasons.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param airavataCredStoreToken
+ */
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Configure and Launch a previously created experiment with required inputs, scheduling, security and other quality of service
+ * parameters. This method also launches the experiment after it is configured. If you would like to configure only
+ * and launch at a later time or partially configure then ConfigureExperiment should be used.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @param experimentConfigurationData
+ * The configuration information of the experiment with application input parameters, computational resource scheduling
+ * information, special input output handling and additional quality of service parameters.
+ *
+ * @param airavataCredStoreToken:
+ * A requirement to execute experiments within Airavata is to first register the targeted remote computational account
+ * credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
+ * generated token associated with the registered credentials. The client has to security posses this token id and is
+ * required to pass it to Airavata Server for all execution requests.
+ * Note: At this point only the credential store token is required so the string is directly passed here. In future if
+ * if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
+ *
+ * @return
+ * The server-side generated experiment GUID.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ * @param experimentConfigurationData
+ * @param airavataCredStoreToken
+ */
+ public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
+ * The client has to subsequently update this configuration if needed and launch the cloned experiment.
+ *
+ * @param airavataExperimentIdToBeCloned
+ * This is the experiment identifier that is to be cloned.
+ *
+ * @param basicExperimentMetadata
+ * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+ * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+ * should be shared public by default.
+ *
+ * @return
+ * The server-side generated airavata experiment globally unique identifier for the newly cloned experiment.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentIdToBeCloned
+ * @param basicExperimentMetadata
+ */
+ public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ /**
+ * Terminate a running experiment.
+ *
+ * @param airavataExperimentId
+ * The identifier for the requested experiment. This is returned during the create experiment step.
+ *
+ * @return
+ * This method call does not have a return value.
+ *
+ * @throws org.apache.airavata.api.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.api.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.api.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.api.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param airavataExperimentId
+ */
+ public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public String GetAPIVersion() throws org.apache.thrift.TException
+ {
+ send_GetAPIVersion();
+ return recv_GetAPIVersion();
+ }
+
+ public void send_GetAPIVersion() throws org.apache.thrift.TException
+ {
+ GetAPIVersion_args args = new GetAPIVersion_args();
+ sendBase("GetAPIVersion", args);
+ }
+
+ public String recv_GetAPIVersion() throws org.apache.thrift.TException
+ {
+ GetAPIVersion_result result = new GetAPIVersion_result();
+ receiveBase(result, "GetAPIVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetAPIVersion failed: unknown result");
+ }
+
+ public String createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_createExperiment(basicExperimentMetadata);
+ return recv_createExperiment();
+ }
+
+ public void send_createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
+ {
+ createExperiment_args args = new createExperiment_args();
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ sendBase("createExperiment", args);
+ }
+
+ public String recv_createExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ createExperiment_result result = new createExperiment_result();
+ receiveBase(result, "createExperiment");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createExperiment failed: unknown result");
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_getBasicExperimentMetadata(airavataExperimentId);
+ return recv_getBasicExperimentMetadata();
+ }
+
+ public void send_getBasicExperimentMetadata(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getBasicExperimentMetadata", args);
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata recv_getBasicExperimentMetadata() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ receiveBase(result, "getBasicExperimentMetadata");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBasicExperimentMetadata failed: unknown result");
+ }
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_configureExperiment(airavataExperimentId, experimentConfigurationData);
+ recv_configureExperiment();
+ }
+
+ public void send_configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData) throws org.apache.thrift.TException
+ {
+ configureExperiment_args args = new configureExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ sendBase("configureExperiment", args);
+ }
+
+ public void recv_configureExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ configureExperiment_result result = new configureExperiment_result();
+ receiveBase(result, "configureExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData getExperimentConfiguration(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_getExperimentConfiguration(airavataExperimentId);
+ return recv_getExperimentConfiguration();
+ }
+
+ public void send_getExperimentConfiguration(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getExperimentConfiguration_args args = new getExperimentConfiguration_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getExperimentConfiguration", args);
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData recv_getExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getExperimentConfiguration_result result = new getExperimentConfiguration_result();
+ receiveBase(result, "getExperimentConfiguration");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentConfiguration failed: unknown result");
+ }
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_launchConfiguredExperiment(airavataExperimentId, airavataCredStoreToken);
+ recv_launchConfiguredExperiment();
+ }
+
+ public void send_launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.thrift.TException
+ {
+ launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ sendBase("launchConfiguredExperiment", args);
+ }
+
+ public void recv_launchConfiguredExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
+ receiveBase(result, "launchConfiguredExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ public String configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_configureAndLaunchExperiment(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken);
+ return recv_configureAndLaunchExperiment();
+ }
+
+ public void send_configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken) throws org.apache.thrift.TException
+ {
+ configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ sendBase("configureAndLaunchExperiment", args);
+ }
+
+ public String recv_configureAndLaunchExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
+ receiveBase(result, "configureAndLaunchExperiment");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "configureAndLaunchExperiment failed: unknown result");
+ }
+
+ public String cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_cloneExperimentConfiguration(airavataExperimentIdToBeCloned, basicExperimentMetadata);
+ return recv_cloneExperimentConfiguration();
+ }
+
+ public void send_cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata) throws org.apache.thrift.TException
+ {
+ cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
+ args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ sendBase("cloneExperimentConfiguration", args);
+ }
+
+ public String recv_cloneExperimentConfiguration() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
+ receiveBase(result, "cloneExperimentConfiguration");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cloneExperimentConfiguration failed: unknown result");
+ }
+
+ public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_terminateExperiment(airavataExperimentId);
+ recv_terminateExperiment();
+ }
+
+ public void send_terminateExperiment(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ terminateExperiment_args args = new terminateExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("terminateExperiment", args);
+ }
+
+ public void recv_terminateExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ terminateExperiment_result result = new terminateExperiment_result();
+ receiveBase(result, "terminateExperiment");
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ return;
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ GetAPIVersion_call method_call = new GetAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class GetAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public GetAPIVersion_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ GetAPIVersion_args args = new GetAPIVersion_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public 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_GetAPIVersion();
+ }
+ }
+
+ public void createExperiment(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createExperiment_call method_call = new createExperiment_call(basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
+ public createExperiment_call(org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.basicExperimentMetadata = basicExperimentMetadata;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createExperiment_args args = new createExperiment_args();
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_createExperiment();
+ }
+ }
+
+ public void getBasicExperimentMetadata(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getBasicExperimentMetadata_call method_call = new getBasicExperimentMetadata_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getBasicExperimentMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public getBasicExperimentMetadata_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBasicExperimentMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getBasicExperimentMetadata_args args = new getBasicExperimentMetadata_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.experiment.BasicMetadata getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getBasicExperimentMetadata();
+ }
+ }
+
+ public void configureExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ configureExperiment_call method_call = new configureExperiment_call(airavataExperimentId, experimentConfigurationData, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class configureExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
+ public configureExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, 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.airavataExperimentId = airavataExperimentId;
+ this.experimentConfigurationData = experimentConfigurationData;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ configureExperiment_args args = new configureExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_configureExperiment();
+ }
+ }
+
+ public void getExperimentConfiguration(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getExperimentConfiguration_call method_call = new getExperimentConfiguration_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public getExperimentConfiguration_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperimentConfiguration_args args = new getExperimentConfiguration_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.experiment.ConfigurationData getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_getExperimentConfiguration();
+ }
+ }
+
+ public void launchConfiguredExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ launchConfiguredExperiment_call method_call = new launchConfiguredExperiment_call(airavataExperimentId, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class launchConfiguredExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private String airavataCredStoreToken;
+ public launchConfiguredExperiment_call(String airavataExperimentId, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
+ this.airavataCredStoreToken = airavataCredStoreToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchConfiguredExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ launchConfiguredExperiment_args args = new launchConfiguredExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_launchConfiguredExperiment();
+ }
+ }
+
+ public void configureAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ configureAndLaunchExperiment_call method_call = new configureAndLaunchExperiment_call(airavataExperimentId, experimentConfigurationData, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class configureAndLaunchExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData;
+ private String airavataCredStoreToken;
+ public configureAndLaunchExperiment_call(String airavataExperimentId, org.apache.airavata.model.experiment.ConfigurationData experimentConfigurationData, String airavataCredStoreToken, 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.airavataExperimentId = airavataExperimentId;
+ this.experimentConfigurationData = experimentConfigurationData;
+ this.airavataCredStoreToken = airavataCredStoreToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configureAndLaunchExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ configureAndLaunchExperiment_args args = new configureAndLaunchExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setExperimentConfigurationData(experimentConfigurationData);
+ args.setAiravataCredStoreToken(airavataCredStoreToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_configureAndLaunchExperiment();
+ }
+ }
+
+ public void cloneExperimentConfiguration(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ cloneExperimentConfiguration_call method_call = new cloneExperimentConfiguration_call(airavataExperimentIdToBeCloned, basicExperimentMetadata, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class cloneExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentIdToBeCloned;
+ private org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata;
+ public cloneExperimentConfiguration_call(String airavataExperimentIdToBeCloned, org.apache.airavata.model.experiment.BasicMetadata basicExperimentMetadata, 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.airavataExperimentIdToBeCloned = airavataExperimentIdToBeCloned;
+ this.basicExperimentMetadata = basicExperimentMetadata;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cloneExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ cloneExperimentConfiguration_args args = new cloneExperimentConfiguration_args();
+ args.setAiravataExperimentIdToBeCloned(airavataExperimentIdToBeCloned);
+ args.setBasicExperimentMetadata(basicExperimentMetadata);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, 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_cloneExperimentConfiguration();
+ }
+ }
+
+ public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ terminateExperiment_call method_call = new terminateExperiment_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class terminateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public terminateExperiment_call(String airavataExperimentId, 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.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ terminateExperiment_args args = new terminateExperiment_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_terminateExperiment();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("GetAPIVersion", new GetAPIVersion());
+ processMap.put("createExperiment", new createExperiment());
+ processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
+ processMap.put("configureExperiment", new configureExperiment());
+ processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
+ processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
+ processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
+ processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
+ processMap.put("terminateExperiment", new terminateExperiment());
+ return processMap;
+ }
+
+ public static class GetAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, GetAPIVersion_args> {
+ public GetAPIVersion() {
+ super("GetAPIVersion");
+ }
+
+ public GetAPIVersion_args getEmptyArgsInstance() {
+ return new GetAPIVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public GetAPIVersion_result getResult(I iface, GetAPIVersion_args args) throws org.apache.thrift.TException {
+ GetAPIVersion_result result = new GetAPIVersion_result();
+ result.success = iface.GetAPIVersion();
+ return result;
+ }
+ }
+
+ public static class createExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createExperiment_args> {
+ public createExperiment() {
+ super("createExperiment");
+ }
+
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createExperiment_result getResult(I iface, createExperiment_args args) throws org.apache.thrift.TException {
+ createExperiment_result result = new createExperiment_result();
+ try {
+ result.success = iface.createExperiment(args.basicExperimentMetadata);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class getBasicExperimentMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBasicExperimentMetadata_args> {
+ public getBasicExperimentMetadata() {
+ super("getBasicExperimentMetadata");
+ }
+
+ public getBasicExperimentMetadata_args getEmptyArgsInstance() {
+ return new getBasicExperimentMetadata_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getBasicExperimentMetadata_result getResult(I iface, getBasicExperimentMetadata_args args) throws org.apache.thrift.TException {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ try {
+ result.success = iface.getBasicExperimentMetadata(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class configureExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureExperiment_args> {
+ public configureExperiment() {
+ super("configureExperiment");
+ }
+
+ public configureExperiment_args getEmptyArgsInstance() {
+ return new configureExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public configureExperiment_result getResult(I iface, configureExperiment_args args) throws org.apache.thrift.TException {
+ configureExperiment_result result = new configureExperiment_result();
+ try {
+ iface.configureExperiment(args.airavataExperimentId, args.experimentConfigurationData);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class getExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentConfiguration_args> {
+ public getExperimentConfiguration() {
+ super("getExperimentConfiguration");
+ }
+
+ public getExperimentConfiguration_args getEmptyArgsInstance() {
+ return new getExperimentConfiguration_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getExperimentConfiguration_result getResult(I iface, getExperimentConfiguration_args args) throws org.apache.thrift.TException {
+ getExperimentConfiguration_result result = new getExperimentConfiguration_result();
+ try {
+ result.success = iface.getExperimentConfiguration(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class launchConfiguredExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchConfiguredExperiment_args> {
+ public launchConfiguredExperiment() {
+ super("launchConfiguredExperiment");
+ }
+
+ public launchConfiguredExperiment_args getEmptyArgsInstance() {
+ return new launchConfiguredExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public launchConfiguredExperiment_result getResult(I iface, launchConfiguredExperiment_args args) throws org.apache.thrift.TException {
+ launchConfiguredExperiment_result result = new launchConfiguredExperiment_result();
+ try {
+ iface.launchConfiguredExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class configureAndLaunchExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configureAndLaunchExperiment_args> {
+ public configureAndLaunchExperiment() {
+ super("configureAndLaunchExperiment");
+ }
+
+ public configureAndLaunchExperiment_args getEmptyArgsInstance() {
+ return new configureAndLaunchExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public configureAndLaunchExperiment_result getResult(I iface, configureAndLaunchExperiment_args args) throws org.apache.thrift.TException {
+ configureAndLaunchExperiment_result result = new configureAndLaunchExperiment_result();
+ try {
+ result.success = iface.configureAndLaunchExperiment(args.airavataExperimentId, args.experimentConfigurationData, args.airavataCredStoreToken);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class cloneExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cloneExperimentConfiguration_args> {
+ public cloneExperimentConfiguration() {
+ super("cloneExperimentConfiguration");
+ }
+
+ public cloneExperimentConfiguration_args getEmptyArgsInstance() {
+ return new cloneExperimentConfiguration_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public cloneExperimentConfiguration_result getResult(I iface, cloneExperimentConfiguration_args args) throws org.apache.thrift.TException {
+ cloneExperimentConfiguration_result result = new cloneExperimentConfiguration_result();
+ try {
+ result.success = iface.cloneExperimentConfiguration(args.airavataExperimentIdToBeCloned, args.basicExperimentMetadata);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ public static class terminateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateExperiment_args> {
+ public terminateExperiment() {
+ super("terminateExperiment");
+ }
+
+ public terminateExperiment_args getEmptyArgsInstance() {
+ return new terminateExperiment_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public terminateExperiment_result getResult(I iface, terminateExperiment_args args) throws org.apache.thrift.TException {
+ terminateExperiment_result result = new terminateExperiment_result();
+ try {
+ iface.terminateExperiment(args.airavataExperimentId);
+ } catch (org.apache.airavata.api.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.api.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.api.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("GetAPIVersion", new GetAPIVersion());
+ processMap.put("createExperiment", new createExperiment());
+ processMap.put("getBasicExperimentMetadata", new getBasicExperimentMetadata());
+ processMap.put("configureExperiment", new configureExperiment());
+ processMap.put("getExperimentConfiguration", new getExperimentConfiguration());
+ processMap.put("launchConfiguredExperiment", new launchConfiguredExperiment());
+ processMap.put("configureAndLaunchExperiment", new configureAndLaunchExperiment());
+ processMap.put("cloneExperimentConfiguration", new cloneExperimentConfiguration());
+ processMap.put("terminateExperiment", new terminateExperiment());
+ return processMap;
+ }
+
+ public static class GetAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, GetAPIVersion_args, String> {
+ public GetAPIVersion() {
+ super("GetAPIVersion");
+ }
+
+ public GetAPIVersion_args getEmptyArgsInstance() {
+ return new GetAPIVersion_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ GetAPIVersion_result result = new GetAPIVersion_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;
+ GetAPIVersion_result result = new GetAPIVersion_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, GetAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.GetAPIVersion(resultHandler);
+ }
+ }
+
+ public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
+ public createExperiment() {
+ super("createExperiment");
+ }
+
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createExperiment_result result = new createExperiment_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;
+ createExperiment_result result = new createExperiment_result();
+ if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.api.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.api.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createExperiment(args.basicExperimentMetadata,resultHandler);
+ }
+ }
+
+ public static class getBasicExperimentMetadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getBasicExperimentMetadata_args, org.apache.airavata.model.experiment.BasicMetadata> {
+ public getBasicExperimentMetadata() {
+ super("getBasicExperimentMetadata");
+ }
+
+ public getBasicExperimentMetadata_args getEmptyArgsInstance() {
+ return new getBasicExperimentMetadata_args();
+ }
+
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata>() {
+ public void onComplete(org.apache.airavata.model.experiment.BasicMetadata o) {
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_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;
+ getBasicExperimentMetadata_result result = new getBasicExperimentMetadata_result();
+ if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.api.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.api.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.api.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.api.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, getBasicExperimentMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.BasicMetadata> resultHandler) throws TException {
+ iface.getBasicExperimentMetadata(args.airavataExperimentId,resultHandler);
+ }
+ }
+
+ public static class configureExperiment<I extends AsyncIface> extends org.apache.thrift.Asyn
<TRUNCATED>
[16/16] git commit: adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
adding generated code for API AIRAVATA-991
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/28ac4b75
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/28ac4b75
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/28ac4b75
Branch: refs/heads/master
Commit: 28ac4b750801f6c5a2cc095569513ed37c297183
Parents: 85f9528
Author: Suresh Marru <sm...@apache.org>
Authored: Sat Feb 8 22:12:45 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Sat Feb 8 22:12:45 2014 -0500
----------------------------------------------------------------------
.../java/org/apache/airavata/api/Airavata.java | 11638 +++++++++++++++++
.../airavata/api/airavataAPIConstants.java | 55 +
.../api/error/AiravataClientException.java | 534 +
.../airavata/api/error/AiravataErrorType.java | 98 +
.../api/error/AiravataSystemException.java | 529 +
.../api/error/AuthenticationException.java | 402 +
.../api/error/AuthorizationException.java | 402 +
.../api/error/ExperimentNotFoundException.java | 511 +
.../api/error/InvalidRequestException.java | 403 +
.../airavata/api/error/TimedOutException.java | 299 +
.../experiment/AdvancedInputDataHandling.java | 706 +
.../experiment/AdvancedOutputDataHandling.java | 609 +
.../model/experiment/BasicMetadata.java | 914 ++
.../ComputationalResourceScheduling.java | 1375 ++
.../model/experiment/ConfigurationData.java | 1402 ++
.../experiment/QualityOfServiceParams.java | 607 +
.../java/org/apache/airavata/api/Airavata.java | 11622 ----------------
.../airavata/api/airavataAPIConstants.java | 39 -
.../api/error/AiravataClientException.java | 518 -
.../airavata/api/error/AiravataErrorType.java | 82 -
.../api/error/AiravataSystemException.java | 513 -
.../api/error/AuthenticationException.java | 386 -
.../api/error/AuthorizationException.java | 386 -
.../api/error/ExperimentNotFoundException.java | 495 -
.../api/error/InvalidRequestException.java | 387 -
.../airavata/api/error/TimedOutException.java | 283 -
.../experiment/AdvancedInputDataHandling.java | 34 +-
.../experiment/AdvancedOutputDataHandling.java | 34 +-
.../model/experiment/BasicMetadata.java | 34 +-
.../ComputationalResourceScheduling.java | 34 +-
.../model/experiment/ConfigurationData.java | 34 +-
.../experiment/QualityOfServiceParams.java | 34 +-
.../java/org/apache/airavata/api/Airavata.java | 11638 +++++++++++++++++
.../airavata/api/airavataAPIConstants.java | 55 +
.../api/error/AiravataClientException.java | 534 +
.../airavata/api/error/AiravataErrorType.java | 98 +
.../api/error/AiravataSystemException.java | 529 +
.../api/error/AuthenticationException.java | 402 +
.../api/error/AuthorizationException.java | 402 +
.../api/error/ExperimentNotFoundException.java | 511 +
.../api/error/InvalidRequestException.java | 403 +
.../airavata/api/error/TimedOutException.java | 299 +
.../experiment/AdvancedInputDataHandling.java | 706 +
.../experiment/AdvancedOutputDataHandling.java | 609 +
.../model/experiment/BasicMetadata.java | 914 ++
.../ComputationalResourceScheduling.java | 1375 ++
.../model/experiment/ConfigurationData.java | 1402 ++
.../experiment/QualityOfServiceParams.java | 607 +
48 files changed, 41070 insertions(+), 14813 deletions(-)
----------------------------------------------------------------------
[06/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/airavataAPIConstants.java b/airavata-api/server/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
new file mode 100644
index 0000000..43739d7
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
@@ -0,0 +1,55 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api;
+
+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("all") public class airavataAPIConstants {
+
+ public static final String VERSION = "0.12.0";
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataClientException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
new file mode 100644
index 0000000..8050da8
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataClientException.java
@@ -0,0 +1,534 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem that a client may be able to resolve. For example, if the user
+ * attempts to execute an application on a resource gateway does not have access to.
+ *
+ * This exception would not be used for internal system errors that do not
+ * reflect user actions, but rather reflect a problem within the service that
+ * the client cannot resolve.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * parameter: If the error applied to a particular input parameter, this will
+ * indicate which parameter.
+ */
+@SuppressWarnings("all") public class AiravataClientException extends TException implements org.apache.thrift.TBase<AiravataClientException, AiravataClientException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataClientException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataClientException");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField PARAMETER_FIELD_DESC = new org.apache.thrift.protocol.TField("parameter", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AiravataClientExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AiravataClientExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType airavataErrorType; // required
+ public String parameter; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
+ PARAMETER((short)2, "parameter");
+
+ 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: // AIRAVATA_ERROR_TYPE
+ return AIRAVATA_ERROR_TYPE;
+ case 2: // PARAMETER
+ return PARAMETER;
+ 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 _Fields optionals[] = {_Fields.PARAMETER};
+ 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
+ tmpMap.put(_Fields.PARAMETER, new org.apache.thrift.meta_data.FieldMetaData("parameter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataClientException.class, metaDataMap);
+ }
+
+ public AiravataClientException() {
+ }
+
+ public AiravataClientException(
+ AiravataErrorType airavataErrorType)
+ {
+ this();
+ this.airavataErrorType = airavataErrorType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AiravataClientException(AiravataClientException other) {
+ if (other.isSetAiravataErrorType()) {
+ this.airavataErrorType = other.airavataErrorType;
+ }
+ if (other.isSetParameter()) {
+ this.parameter = other.parameter;
+ }
+ }
+
+ public AiravataClientException deepCopy() {
+ return new AiravataClientException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataErrorType = null;
+ this.parameter = null;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType getAiravataErrorType() {
+ return this.airavataErrorType;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataClientException setAiravataErrorType(AiravataErrorType airavataErrorType) {
+ this.airavataErrorType = airavataErrorType;
+ return this;
+ }
+
+ public void unsetAiravataErrorType() {
+ this.airavataErrorType = null;
+ }
+
+ /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataErrorType() {
+ return this.airavataErrorType != null;
+ }
+
+ public void setAiravataErrorTypeIsSet(boolean value) {
+ if (!value) {
+ this.airavataErrorType = null;
+ }
+ }
+
+ public String getParameter() {
+ return this.parameter;
+ }
+
+ public AiravataClientException setParameter(String parameter) {
+ this.parameter = parameter;
+ return this;
+ }
+
+ public void unsetParameter() {
+ this.parameter = null;
+ }
+
+ /** Returns true if field parameter is set (has been assigned a value) and false otherwise */
+ public boolean isSetParameter() {
+ return this.parameter != null;
+ }
+
+ public void setParameterIsSet(boolean value) {
+ if (!value) {
+ this.parameter = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ if (value == null) {
+ unsetAiravataErrorType();
+ } else {
+ setAiravataErrorType((AiravataErrorType)value);
+ }
+ break;
+
+ case PARAMETER:
+ if (value == null) {
+ unsetParameter();
+ } else {
+ setParameter((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ return getAiravataErrorType();
+
+ case PARAMETER:
+ return getParameter();
+
+ }
+ 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 AIRAVATA_ERROR_TYPE:
+ return isSetAiravataErrorType();
+ case PARAMETER:
+ return isSetParameter();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AiravataClientException)
+ return this.equals((AiravataClientException)that);
+ return false;
+ }
+
+ public boolean equals(AiravataClientException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
+ boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
+ if (this_present_airavataErrorType || that_present_airavataErrorType) {
+ if (!(this_present_airavataErrorType && that_present_airavataErrorType))
+ return false;
+ if (!this.airavataErrorType.equals(that.airavataErrorType))
+ return false;
+ }
+
+ boolean this_present_parameter = true && this.isSetParameter();
+ boolean that_present_parameter = true && that.isSetParameter();
+ if (this_present_parameter || that_present_parameter) {
+ if (!(this_present_parameter && that_present_parameter))
+ return false;
+ if (!this.parameter.equals(that.parameter))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AiravataClientException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataErrorType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParameter()).compareTo(other.isSetParameter());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParameter()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameter, other.parameter);
+ 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("AiravataClientException(");
+ boolean first = true;
+
+ sb.append("airavataErrorType:");
+ if (this.airavataErrorType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataErrorType);
+ }
+ first = false;
+ if (isSetParameter()) {
+ if (!first) sb.append(", ");
+ sb.append("parameter:");
+ if (this.parameter == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parameter);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (airavataErrorType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
+ }
+ // 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 AiravataClientExceptionStandardSchemeFactory implements SchemeFactory {
+ public AiravataClientExceptionStandardScheme getScheme() {
+ return new AiravataClientExceptionStandardScheme();
+ }
+ }
+
+ private static class AiravataClientExceptionStandardScheme extends StandardScheme<AiravataClientException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataClientException 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: // AIRAVATA_ERROR_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PARAMETER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parameter = iprot.readString();
+ struct.setParameterIsSet(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, AiravataClientException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.airavataErrorType != null) {
+ oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.parameter != null) {
+ if (struct.isSetParameter()) {
+ oprot.writeFieldBegin(PARAMETER_FIELD_DESC);
+ oprot.writeString(struct.parameter);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AiravataClientExceptionTupleSchemeFactory implements SchemeFactory {
+ public AiravataClientExceptionTupleScheme getScheme() {
+ return new AiravataClientExceptionTupleScheme();
+ }
+ }
+
+ private static class AiravataClientExceptionTupleScheme extends TupleScheme<AiravataClientException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetParameter()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetParameter()) {
+ oprot.writeString(struct.parameter);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AiravataClientException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.parameter = iprot.readString();
+ struct.setParameterIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
new file mode 100644
index 0000000..6d9dc2c
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataErrorType.java
@@ -0,0 +1,98 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * A list of Airavata API Error Message Types
+ *
+ * UNKNOWN: No information available about the error
+ *
+ * PERMISSION_DENIED: Not permitted to perform action
+ *
+ * INTERNAL_ERROR: Unexpected problem with the service
+ *
+ * AUTHENTICATION_FAILURE: The client failed to authenticate.
+ *
+ * INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect
+ *
+ * AUTHORIZATION_EXPIRED: Authentication token expired
+ *
+ * UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata.
+ *
+ * UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
+ */
+@SuppressWarnings("all") public enum AiravataErrorType implements org.apache.thrift.TEnum {
+ UNKNOWN(0),
+ PERMISSION_DENIED(1),
+ INTERNAL_ERROR(2),
+ AUTHENTICATION_FAILURE(3),
+ INVALID_AUTHORIZATION(4),
+ AUTHORIZATION_EXPIRED(5),
+ UNKNOWN_GATEWAY_ID(6),
+ UNSUPPORTED_OPERATION(7);
+
+ private final int value;
+
+ private AiravataErrorType(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AiravataErrorType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return UNKNOWN;
+ case 1:
+ return PERMISSION_DENIED;
+ case 2:
+ return INTERNAL_ERROR;
+ case 3:
+ return AUTHENTICATION_FAILURE;
+ case 4:
+ return INVALID_AUTHORIZATION;
+ case 5:
+ return AUTHORIZATION_EXPIRED;
+ case 6:
+ return UNKNOWN_GATEWAY_ID;
+ case 7:
+ return UNSUPPORTED_OPERATION;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
new file mode 100644
index 0000000..366fe6e
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AiravataSystemException.java
@@ -0,0 +1,529 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem in the service that could not be changed through client's action.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * message: This may contain additional information about the error
+ *
+ */
+@SuppressWarnings("all") public class AiravataSystemException extends TException implements org.apache.thrift.TBase<AiravataSystemException, AiravataSystemException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataSystemException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataSystemException");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_ERROR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataErrorType", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AiravataSystemExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AiravataSystemExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType airavataErrorType; // required
+ public String message; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ AIRAVATA_ERROR_TYPE((short)1, "airavataErrorType"),
+ MESSAGE((short)2, "message");
+
+ 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: // AIRAVATA_ERROR_TYPE
+ return AIRAVATA_ERROR_TYPE;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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 _Fields optionals[] = {_Fields.MESSAGE};
+ 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.AIRAVATA_ERROR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("airavataErrorType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AiravataErrorType.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AiravataSystemException.class, metaDataMap);
+ }
+
+ public AiravataSystemException() {
+ }
+
+ public AiravataSystemException(
+ AiravataErrorType airavataErrorType)
+ {
+ this();
+ this.airavataErrorType = airavataErrorType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AiravataSystemException(AiravataSystemException other) {
+ if (other.isSetAiravataErrorType()) {
+ this.airavataErrorType = other.airavataErrorType;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AiravataSystemException deepCopy() {
+ return new AiravataSystemException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataErrorType = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataErrorType getAiravataErrorType() {
+ return this.airavataErrorType;
+ }
+
+ /**
+ *
+ * @see AiravataErrorType
+ */
+ public AiravataSystemException setAiravataErrorType(AiravataErrorType airavataErrorType) {
+ this.airavataErrorType = airavataErrorType;
+ return this;
+ }
+
+ public void unsetAiravataErrorType() {
+ this.airavataErrorType = null;
+ }
+
+ /** Returns true if field airavataErrorType is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataErrorType() {
+ return this.airavataErrorType != null;
+ }
+
+ public void setAiravataErrorTypeIsSet(boolean value) {
+ if (!value) {
+ this.airavataErrorType = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AiravataSystemException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ if (value == null) {
+ unsetAiravataErrorType();
+ } else {
+ setAiravataErrorType((AiravataErrorType)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_ERROR_TYPE:
+ return getAiravataErrorType();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 AIRAVATA_ERROR_TYPE:
+ return isSetAiravataErrorType();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AiravataSystemException)
+ return this.equals((AiravataSystemException)that);
+ return false;
+ }
+
+ public boolean equals(AiravataSystemException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataErrorType = true && this.isSetAiravataErrorType();
+ boolean that_present_airavataErrorType = true && that.isSetAiravataErrorType();
+ if (this_present_airavataErrorType || that_present_airavataErrorType) {
+ if (!(this_present_airavataErrorType && that_present_airavataErrorType))
+ return false;
+ if (!this.airavataErrorType.equals(that.airavataErrorType))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AiravataSystemException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataErrorType()).compareTo(other.isSetAiravataErrorType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataErrorType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataErrorType, other.airavataErrorType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AiravataSystemException(");
+ boolean first = true;
+
+ sb.append("airavataErrorType:");
+ if (this.airavataErrorType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataErrorType);
+ }
+ first = false;
+ if (isSetMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (airavataErrorType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataErrorType' was not present! Struct: " + toString());
+ }
+ // 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 AiravataSystemExceptionStandardSchemeFactory implements SchemeFactory {
+ public AiravataSystemExceptionStandardScheme getScheme() {
+ return new AiravataSystemExceptionStandardScheme();
+ }
+ }
+
+ private static class AiravataSystemExceptionStandardScheme extends StandardScheme<AiravataSystemException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AiravataSystemException 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: // AIRAVATA_ERROR_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AiravataSystemException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.airavataErrorType != null) {
+ oprot.writeFieldBegin(AIRAVATA_ERROR_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ if (struct.isSetMessage()) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AiravataSystemExceptionTupleSchemeFactory implements SchemeFactory {
+ public AiravataSystemExceptionTupleScheme getScheme() {
+ return new AiravataSystemExceptionTupleScheme();
+ }
+ }
+
+ private static class AiravataSystemExceptionTupleScheme extends TupleScheme<AiravataSystemException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.airavataErrorType.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AiravataSystemException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataErrorType = AiravataErrorType.findByValue(iprot.readI32());
+ struct.setAiravataErrorTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthenticationException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
new file mode 100644
index 0000000..24cc7ea
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthenticationException.java
@@ -0,0 +1,402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid authentication requests.
+ *
+ * message: contains the cause of the authorization failure.
+ */
+@SuppressWarnings("all") public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthenticationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap);
+ }
+
+ public AuthenticationException() {
+ }
+
+ public AuthenticationException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AuthenticationException(AuthenticationException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AuthenticationException deepCopy() {
+ return new AuthenticationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AuthenticationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AuthenticationException)
+ return this.equals((AuthenticationException)that);
+ return false;
+ }
+
+ public boolean equals(AuthenticationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AuthenticationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AuthenticationException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 AuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionStandardScheme getScheme() {
+ return new AuthenticationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionStandardScheme extends StandardScheme<AuthenticationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AuthenticationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthenticationExceptionTupleScheme getScheme() {
+ return new AuthenticationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthenticationExceptionTupleScheme extends TupleScheme<AuthenticationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthorizationException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
new file mode 100644
index 0000000..eb56508
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/AuthorizationException.java
@@ -0,0 +1,402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
+ *
+ * message: contains the authorization failure message
+ */
+@SuppressWarnings("all") public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AuthorizationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
+ }
+
+ public AuthorizationException() {
+ }
+
+ public AuthorizationException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AuthorizationException(AuthorizationException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public AuthorizationException deepCopy() {
+ return new AuthorizationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public AuthorizationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AuthorizationException)
+ return this.equals((AuthorizationException)that);
+ return false;
+ }
+
+ public boolean equals(AuthorizationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AuthorizationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("AuthorizationException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionStandardScheme getScheme() {
+ return new AuthorizationExceptionStandardScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, AuthorizationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ public AuthorizationExceptionTupleScheme getScheme() {
+ return new AuthorizationExceptionTupleScheme();
+ }
+ }
+
+ private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
new file mode 100644
index 0000000..9b1044b
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/ExperimentNotFoundException.java
@@ -0,0 +1,511 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown when a client asks to perform an operation on an experiment that does not exist.
+ *
+ * identifier: A description of the experiment that was not found on the server.
+ *
+ * key: The value passed from the client in the identifier, which was not found.
+ */
+@SuppressWarnings("all") public class ExperimentNotFoundException extends TException implements org.apache.thrift.TBase<ExperimentNotFoundException, ExperimentNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentNotFoundException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentNotFoundException");
+
+ private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentNotFoundExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentNotFoundExceptionTupleSchemeFactory());
+ }
+
+ public String identifier; // optional
+ public String key; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IDENTIFIER((short)1, "identifier"),
+ KEY((short)2, "key");
+
+ 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: // IDENTIFIER
+ return IDENTIFIER;
+ case 2: // KEY
+ return KEY;
+ 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 _Fields optionals[] = {_Fields.IDENTIFIER,_Fields.KEY};
+ 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.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentNotFoundException.class, metaDataMap);
+ }
+
+ public ExperimentNotFoundException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ExperimentNotFoundException(ExperimentNotFoundException other) {
+ if (other.isSetIdentifier()) {
+ this.identifier = other.identifier;
+ }
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ }
+
+ public ExperimentNotFoundException deepCopy() {
+ return new ExperimentNotFoundException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.identifier = null;
+ this.key = null;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public ExperimentNotFoundException setIdentifier(String identifier) {
+ this.identifier = identifier;
+ return this;
+ }
+
+ public void unsetIdentifier() {
+ this.identifier = null;
+ }
+
+ /** Returns true if field identifier is set (has been assigned a value) and false otherwise */
+ public boolean isSetIdentifier() {
+ return this.identifier != null;
+ }
+
+ public void setIdentifierIsSet(boolean value) {
+ if (!value) {
+ this.identifier = null;
+ }
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public ExperimentNotFoundException setKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IDENTIFIER:
+ if (value == null) {
+ unsetIdentifier();
+ } else {
+ setIdentifier((String)value);
+ }
+ break;
+
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IDENTIFIER:
+ return getIdentifier();
+
+ case KEY:
+ return getKey();
+
+ }
+ 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 IDENTIFIER:
+ return isSetIdentifier();
+ case KEY:
+ return isSetKey();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ExperimentNotFoundException)
+ return this.equals((ExperimentNotFoundException)that);
+ return false;
+ }
+
+ public boolean equals(ExperimentNotFoundException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_identifier = true && this.isSetIdentifier();
+ boolean that_present_identifier = true && that.isSetIdentifier();
+ if (this_present_identifier || that_present_identifier) {
+ if (!(this_present_identifier && that_present_identifier))
+ return false;
+ if (!this.identifier.equals(that.identifier))
+ return false;
+ }
+
+ boolean this_present_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ExperimentNotFoundException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIdentifier()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, other.identifier);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKey()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
+ 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("ExperimentNotFoundException(");
+ boolean first = true;
+
+ if (isSetIdentifier()) {
+ sb.append("identifier:");
+ if (this.identifier == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.identifier);
+ }
+ first = false;
+ }
+ if (isSetKey()) {
+ if (!first) sb.append(", ");
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ 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 ExperimentNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ public ExperimentNotFoundExceptionStandardScheme getScheme() {
+ return new ExperimentNotFoundExceptionStandardScheme();
+ }
+ }
+
+ private static class ExperimentNotFoundExceptionStandardScheme extends StandardScheme<ExperimentNotFoundException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentNotFoundException 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: // IDENTIFIER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.identifier = iprot.readString();
+ struct.setIdentifierIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(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, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.identifier != null) {
+ if (struct.isSetIdentifier()) {
+ oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
+ oprot.writeString(struct.identifier);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.key != null) {
+ if (struct.isSetKey()) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ public ExperimentNotFoundExceptionTupleScheme getScheme() {
+ return new ExperimentNotFoundExceptionTupleScheme();
+ }
+ }
+
+ private static class ExperimentNotFoundExceptionTupleScheme extends TupleScheme<ExperimentNotFoundException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIdentifier()) {
+ optionals.set(0);
+ }
+ if (struct.isSetKey()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetIdentifier()) {
+ oprot.writeString(struct.identifier);
+ }
+ if (struct.isSetKey()) {
+ oprot.writeString(struct.key);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.identifier = iprot.readString();
+ struct.setIdentifierIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ }
+ }
+ }
+
+}
+
[05/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
new file mode 100644
index 0000000..a0572d3
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/InvalidRequestException.java
@@ -0,0 +1,403 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
+ * or a parameter is malformed.
+ *
+ * message: contains the associated error message.
+ */
+@SuppressWarnings("all") public class InvalidRequestException extends TException implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 InvalidRequestExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new InvalidRequestExceptionTupleSchemeFactory());
+ }
+
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidRequestException.class, metaDataMap);
+ }
+
+ public InvalidRequestException() {
+ }
+
+ public InvalidRequestException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public InvalidRequestException(InvalidRequestException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public InvalidRequestException deepCopy() {
+ return new InvalidRequestException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public InvalidRequestException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof InvalidRequestException)
+ return this.equals((InvalidRequestException)that);
+ return false;
+ }
+
+ public boolean equals(InvalidRequestException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(InvalidRequestException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("InvalidRequestException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
+ }
+ // 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 InvalidRequestExceptionStandardSchemeFactory implements SchemeFactory {
+ public InvalidRequestExceptionStandardScheme getScheme() {
+ return new InvalidRequestExceptionStandardScheme();
+ }
+ }
+
+ private static class InvalidRequestExceptionStandardScheme extends StandardScheme<InvalidRequestException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidRequestException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, InvalidRequestException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class InvalidRequestExceptionTupleSchemeFactory implements SchemeFactory {
+ public InvalidRequestExceptionTupleScheme getScheme() {
+ return new InvalidRequestExceptionTupleScheme();
+ }
+ }
+
+ private static class InvalidRequestExceptionTupleScheme extends TupleScheme<InvalidRequestException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/api/error/TimedOutException.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/api/error/TimedOutException.java b/airavata-api/server/src/main/java/org/apache/airavata/api/error/TimedOutException.java
new file mode 100644
index 0000000..a746de0
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/api/error/TimedOutException.java
@@ -0,0 +1,299 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+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;
+
+/**
+ * This exception is thrown when RPC timeout gets exceeded.
+ */
+@SuppressWarnings("all") public class TimedOutException extends TException implements org.apache.thrift.TBase<TimedOutException, TimedOutException._Fields>, java.io.Serializable, Cloneable, Comparable<TimedOutException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimedOutException");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TimedOutExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TimedOutExceptionTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ 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) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimedOutException.class, metaDataMap);
+ }
+
+ public TimedOutException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TimedOutException(TimedOutException other) {
+ }
+
+ public TimedOutException deepCopy() {
+ return new TimedOutException(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TimedOutException)
+ return this.equals((TimedOutException)that);
+ return false;
+ }
+
+ public boolean equals(TimedOutException that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TimedOutException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TimedOutException(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TimedOutExceptionStandardSchemeFactory implements SchemeFactory {
+ public TimedOutExceptionStandardScheme getScheme() {
+ return new TimedOutExceptionStandardScheme();
+ }
+ }
+
+ private static class TimedOutExceptionStandardScheme extends StandardScheme<TimedOutException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TimedOutException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TimedOutException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TimedOutExceptionTupleSchemeFactory implements SchemeFactory {
+ public TimedOutExceptionTupleScheme getScheme() {
+ return new TimedOutExceptionTupleScheme();
+ }
+ }
+
+ private static class TimedOutExceptionTupleScheme extends TupleScheme<TimedOutException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TimedOutException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
new file mode 100644
index 0000000..4cf5045
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
@@ -0,0 +1,706 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding specified input data handling.
+ *
+ */
+@SuppressWarnings("all") public class AdvancedInputDataHandling implements org.apache.thrift.TBase<AdvancedInputDataHandling, AdvancedInputDataHandling._Fields>, java.io.Serializable, Cloneable, Comparable<AdvancedInputDataHandling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedInputDataHandling");
+
+ private static final org.apache.thrift.protocol.TField STAGE_INPUT_FILES_TO_WORKING_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("stageInputFilesToWorkingDir", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField WORKING_DIRECTORY_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("workingDirectoryParent", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField UNIQUE_WORKING_DIRECTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueWorkingDirectory", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField CLEAN_UP_WORKING_DIR_AFTER_JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("cleanUpWorkingDirAfterJob", org.apache.thrift.protocol.TType.BOOL, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AdvancedInputDataHandlingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AdvancedInputDataHandlingTupleSchemeFactory());
+ }
+
+ public boolean stageInputFilesToWorkingDir; // optional
+ public String workingDirectoryParent; // optional
+ public String uniqueWorkingDirectory; // optional
+ public boolean cleanUpWorkingDirAfterJob; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ STAGE_INPUT_FILES_TO_WORKING_DIR((short)1, "stageInputFilesToWorkingDir"),
+ WORKING_DIRECTORY_PARENT((short)2, "workingDirectoryParent"),
+ UNIQUE_WORKING_DIRECTORY((short)3, "uniqueWorkingDirectory"),
+ CLEAN_UP_WORKING_DIR_AFTER_JOB((short)4, "cleanUpWorkingDirAfterJob");
+
+ 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: // STAGE_INPUT_FILES_TO_WORKING_DIR
+ return STAGE_INPUT_FILES_TO_WORKING_DIR;
+ case 2: // WORKING_DIRECTORY_PARENT
+ return WORKING_DIRECTORY_PARENT;
+ case 3: // UNIQUE_WORKING_DIRECTORY
+ return UNIQUE_WORKING_DIRECTORY;
+ case 4: // CLEAN_UP_WORKING_DIR_AFTER_JOB
+ return CLEAN_UP_WORKING_DIR_AFTER_JOB;
+ 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 __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID = 0;
+ private static final int __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.STAGE_INPUT_FILES_TO_WORKING_DIR,_Fields.WORKING_DIRECTORY_PARENT,_Fields.UNIQUE_WORKING_DIRECTORY,_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB};
+ 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.STAGE_INPUT_FILES_TO_WORKING_DIR, new org.apache.thrift.meta_data.FieldMetaData("stageInputFilesToWorkingDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.WORKING_DIRECTORY_PARENT, new org.apache.thrift.meta_data.FieldMetaData("workingDirectoryParent", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UNIQUE_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("uniqueWorkingDirectory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB, new org.apache.thrift.meta_data.FieldMetaData("cleanUpWorkingDirAfterJob", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdvancedInputDataHandling.class, metaDataMap);
+ }
+
+ public AdvancedInputDataHandling() {
+ this.stageInputFilesToWorkingDir = false;
+
+ this.cleanUpWorkingDirAfterJob = false;
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AdvancedInputDataHandling(AdvancedInputDataHandling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.stageInputFilesToWorkingDir = other.stageInputFilesToWorkingDir;
+ if (other.isSetWorkingDirectoryParent()) {
+ this.workingDirectoryParent = other.workingDirectoryParent;
+ }
+ if (other.isSetUniqueWorkingDirectory()) {
+ this.uniqueWorkingDirectory = other.uniqueWorkingDirectory;
+ }
+ this.cleanUpWorkingDirAfterJob = other.cleanUpWorkingDirAfterJob;
+ }
+
+ public AdvancedInputDataHandling deepCopy() {
+ return new AdvancedInputDataHandling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.stageInputFilesToWorkingDir = false;
+
+ this.workingDirectoryParent = null;
+ this.uniqueWorkingDirectory = null;
+ this.cleanUpWorkingDirAfterJob = false;
+
+ }
+
+ public boolean isStageInputFilesToWorkingDir() {
+ return this.stageInputFilesToWorkingDir;
+ }
+
+ public AdvancedInputDataHandling setStageInputFilesToWorkingDir(boolean stageInputFilesToWorkingDir) {
+ this.stageInputFilesToWorkingDir = stageInputFilesToWorkingDir;
+ setStageInputFilesToWorkingDirIsSet(true);
+ return this;
+ }
+
+ public void unsetStageInputFilesToWorkingDir() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID);
+ }
+
+ /** Returns true if field stageInputFilesToWorkingDir is set (has been assigned a value) and false otherwise */
+ public boolean isSetStageInputFilesToWorkingDir() {
+ return EncodingUtils.testBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID);
+ }
+
+ public void setStageInputFilesToWorkingDirIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID, value);
+ }
+
+ public String getWorkingDirectoryParent() {
+ return this.workingDirectoryParent;
+ }
+
+ public AdvancedInputDataHandling setWorkingDirectoryParent(String workingDirectoryParent) {
+ this.workingDirectoryParent = workingDirectoryParent;
+ return this;
+ }
+
+ public void unsetWorkingDirectoryParent() {
+ this.workingDirectoryParent = null;
+ }
+
+ /** Returns true if field workingDirectoryParent is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkingDirectoryParent() {
+ return this.workingDirectoryParent != null;
+ }
+
+ public void setWorkingDirectoryParentIsSet(boolean value) {
+ if (!value) {
+ this.workingDirectoryParent = null;
+ }
+ }
+
+ public String getUniqueWorkingDirectory() {
+ return this.uniqueWorkingDirectory;
+ }
+
+ public AdvancedInputDataHandling setUniqueWorkingDirectory(String uniqueWorkingDirectory) {
+ this.uniqueWorkingDirectory = uniqueWorkingDirectory;
+ return this;
+ }
+
+ public void unsetUniqueWorkingDirectory() {
+ this.uniqueWorkingDirectory = null;
+ }
+
+ /** Returns true if field uniqueWorkingDirectory is set (has been assigned a value) and false otherwise */
+ public boolean isSetUniqueWorkingDirectory() {
+ return this.uniqueWorkingDirectory != null;
+ }
+
+ public void setUniqueWorkingDirectoryIsSet(boolean value) {
+ if (!value) {
+ this.uniqueWorkingDirectory = null;
+ }
+ }
+
+ public boolean isCleanUpWorkingDirAfterJob() {
+ return this.cleanUpWorkingDirAfterJob;
+ }
+
+ public AdvancedInputDataHandling setCleanUpWorkingDirAfterJob(boolean cleanUpWorkingDirAfterJob) {
+ this.cleanUpWorkingDirAfterJob = cleanUpWorkingDirAfterJob;
+ setCleanUpWorkingDirAfterJobIsSet(true);
+ return this;
+ }
+
+ public void unsetCleanUpWorkingDirAfterJob() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID);
+ }
+
+ /** Returns true if field cleanUpWorkingDirAfterJob is set (has been assigned a value) and false otherwise */
+ public boolean isSetCleanUpWorkingDirAfterJob() {
+ return EncodingUtils.testBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID);
+ }
+
+ public void setCleanUpWorkingDirAfterJobIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case STAGE_INPUT_FILES_TO_WORKING_DIR:
+ if (value == null) {
+ unsetStageInputFilesToWorkingDir();
+ } else {
+ setStageInputFilesToWorkingDir((Boolean)value);
+ }
+ break;
+
+ case WORKING_DIRECTORY_PARENT:
+ if (value == null) {
+ unsetWorkingDirectoryParent();
+ } else {
+ setWorkingDirectoryParent((String)value);
+ }
+ break;
+
+ case UNIQUE_WORKING_DIRECTORY:
+ if (value == null) {
+ unsetUniqueWorkingDirectory();
+ } else {
+ setUniqueWorkingDirectory((String)value);
+ }
+ break;
+
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ if (value == null) {
+ unsetCleanUpWorkingDirAfterJob();
+ } else {
+ setCleanUpWorkingDirAfterJob((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STAGE_INPUT_FILES_TO_WORKING_DIR:
+ return Boolean.valueOf(isStageInputFilesToWorkingDir());
+
+ case WORKING_DIRECTORY_PARENT:
+ return getWorkingDirectoryParent();
+
+ case UNIQUE_WORKING_DIRECTORY:
+ return getUniqueWorkingDirectory();
+
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ return Boolean.valueOf(isCleanUpWorkingDirAfterJob());
+
+ }
+ 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 STAGE_INPUT_FILES_TO_WORKING_DIR:
+ return isSetStageInputFilesToWorkingDir();
+ case WORKING_DIRECTORY_PARENT:
+ return isSetWorkingDirectoryParent();
+ case UNIQUE_WORKING_DIRECTORY:
+ return isSetUniqueWorkingDirectory();
+ case CLEAN_UP_WORKING_DIR_AFTER_JOB:
+ return isSetCleanUpWorkingDirAfterJob();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AdvancedInputDataHandling)
+ return this.equals((AdvancedInputDataHandling)that);
+ return false;
+ }
+
+ public boolean equals(AdvancedInputDataHandling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_stageInputFilesToWorkingDir = true && this.isSetStageInputFilesToWorkingDir();
+ boolean that_present_stageInputFilesToWorkingDir = true && that.isSetStageInputFilesToWorkingDir();
+ if (this_present_stageInputFilesToWorkingDir || that_present_stageInputFilesToWorkingDir) {
+ if (!(this_present_stageInputFilesToWorkingDir && that_present_stageInputFilesToWorkingDir))
+ return false;
+ if (this.stageInputFilesToWorkingDir != that.stageInputFilesToWorkingDir)
+ return false;
+ }
+
+ boolean this_present_workingDirectoryParent = true && this.isSetWorkingDirectoryParent();
+ boolean that_present_workingDirectoryParent = true && that.isSetWorkingDirectoryParent();
+ if (this_present_workingDirectoryParent || that_present_workingDirectoryParent) {
+ if (!(this_present_workingDirectoryParent && that_present_workingDirectoryParent))
+ return false;
+ if (!this.workingDirectoryParent.equals(that.workingDirectoryParent))
+ return false;
+ }
+
+ boolean this_present_uniqueWorkingDirectory = true && this.isSetUniqueWorkingDirectory();
+ boolean that_present_uniqueWorkingDirectory = true && that.isSetUniqueWorkingDirectory();
+ if (this_present_uniqueWorkingDirectory || that_present_uniqueWorkingDirectory) {
+ if (!(this_present_uniqueWorkingDirectory && that_present_uniqueWorkingDirectory))
+ return false;
+ if (!this.uniqueWorkingDirectory.equals(that.uniqueWorkingDirectory))
+ return false;
+ }
+
+ boolean this_present_cleanUpWorkingDirAfterJob = true && this.isSetCleanUpWorkingDirAfterJob();
+ boolean that_present_cleanUpWorkingDirAfterJob = true && that.isSetCleanUpWorkingDirAfterJob();
+ if (this_present_cleanUpWorkingDirAfterJob || that_present_cleanUpWorkingDirAfterJob) {
+ if (!(this_present_cleanUpWorkingDirAfterJob && that_present_cleanUpWorkingDirAfterJob))
+ return false;
+ if (this.cleanUpWorkingDirAfterJob != that.cleanUpWorkingDirAfterJob)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AdvancedInputDataHandling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStageInputFilesToWorkingDir()).compareTo(other.isSetStageInputFilesToWorkingDir());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStageInputFilesToWorkingDir()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageInputFilesToWorkingDir, other.stageInputFilesToWorkingDir);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkingDirectoryParent()).compareTo(other.isSetWorkingDirectoryParent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkingDirectoryParent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workingDirectoryParent, other.workingDirectoryParent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUniqueWorkingDirectory()).compareTo(other.isSetUniqueWorkingDirectory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUniqueWorkingDirectory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueWorkingDirectory, other.uniqueWorkingDirectory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCleanUpWorkingDirAfterJob()).compareTo(other.isSetCleanUpWorkingDirAfterJob());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCleanUpWorkingDirAfterJob()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cleanUpWorkingDirAfterJob, other.cleanUpWorkingDirAfterJob);
+ 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("AdvancedInputDataHandling(");
+ boolean first = true;
+
+ if (isSetStageInputFilesToWorkingDir()) {
+ sb.append("stageInputFilesToWorkingDir:");
+ sb.append(this.stageInputFilesToWorkingDir);
+ first = false;
+ }
+ if (isSetWorkingDirectoryParent()) {
+ if (!first) sb.append(", ");
+ sb.append("workingDirectoryParent:");
+ if (this.workingDirectoryParent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workingDirectoryParent);
+ }
+ first = false;
+ }
+ if (isSetUniqueWorkingDirectory()) {
+ if (!first) sb.append(", ");
+ sb.append("uniqueWorkingDirectory:");
+ if (this.uniqueWorkingDirectory == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uniqueWorkingDirectory);
+ }
+ first = false;
+ }
+ if (isSetCleanUpWorkingDirAfterJob()) {
+ if (!first) sb.append(", ");
+ sb.append("cleanUpWorkingDirAfterJob:");
+ sb.append(this.cleanUpWorkingDirAfterJob);
+ 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 AdvancedInputDataHandlingStandardSchemeFactory implements SchemeFactory {
+ public AdvancedInputDataHandlingStandardScheme getScheme() {
+ return new AdvancedInputDataHandlingStandardScheme();
+ }
+ }
+
+ private static class AdvancedInputDataHandlingStandardScheme extends StandardScheme<AdvancedInputDataHandling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AdvancedInputDataHandling 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: // STAGE_INPUT_FILES_TO_WORKING_DIR
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.stageInputFilesToWorkingDir = iprot.readBool();
+ struct.setStageInputFilesToWorkingDirIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // WORKING_DIRECTORY_PARENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workingDirectoryParent = iprot.readString();
+ struct.setWorkingDirectoryParentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // UNIQUE_WORKING_DIRECTORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uniqueWorkingDirectory = iprot.readString();
+ struct.setUniqueWorkingDirectoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CLEAN_UP_WORKING_DIR_AFTER_JOB
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.cleanUpWorkingDirAfterJob = iprot.readBool();
+ struct.setCleanUpWorkingDirAfterJobIsSet(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, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ oprot.writeFieldBegin(STAGE_INPUT_FILES_TO_WORKING_DIR_FIELD_DESC);
+ oprot.writeBool(struct.stageInputFilesToWorkingDir);
+ oprot.writeFieldEnd();
+ }
+ if (struct.workingDirectoryParent != null) {
+ if (struct.isSetWorkingDirectoryParent()) {
+ oprot.writeFieldBegin(WORKING_DIRECTORY_PARENT_FIELD_DESC);
+ oprot.writeString(struct.workingDirectoryParent);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.uniqueWorkingDirectory != null) {
+ if (struct.isSetUniqueWorkingDirectory()) {
+ oprot.writeFieldBegin(UNIQUE_WORKING_DIRECTORY_FIELD_DESC);
+ oprot.writeString(struct.uniqueWorkingDirectory);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ oprot.writeFieldBegin(CLEAN_UP_WORKING_DIR_AFTER_JOB_FIELD_DESC);
+ oprot.writeBool(struct.cleanUpWorkingDirAfterJob);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AdvancedInputDataHandlingTupleSchemeFactory implements SchemeFactory {
+ public AdvancedInputDataHandlingTupleScheme getScheme() {
+ return new AdvancedInputDataHandlingTupleScheme();
+ }
+ }
+
+ private static class AdvancedInputDataHandlingTupleScheme extends TupleScheme<AdvancedInputDataHandling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ optionals.set(0);
+ }
+ if (struct.isSetWorkingDirectoryParent()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUniqueWorkingDirectory()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetStageInputFilesToWorkingDir()) {
+ oprot.writeBool(struct.stageInputFilesToWorkingDir);
+ }
+ if (struct.isSetWorkingDirectoryParent()) {
+ oprot.writeString(struct.workingDirectoryParent);
+ }
+ if (struct.isSetUniqueWorkingDirectory()) {
+ oprot.writeString(struct.uniqueWorkingDirectory);
+ }
+ if (struct.isSetCleanUpWorkingDirAfterJob()) {
+ oprot.writeBool(struct.cleanUpWorkingDirAfterJob);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AdvancedInputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.stageInputFilesToWorkingDir = iprot.readBool();
+ struct.setStageInputFilesToWorkingDirIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.workingDirectoryParent = iprot.readString();
+ struct.setWorkingDirectoryParentIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.uniqueWorkingDirectory = iprot.readString();
+ struct.setUniqueWorkingDirectoryIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.cleanUpWorkingDirAfterJob = iprot.readBool();
+ struct.setCleanUpWorkingDirAfterJobIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
new file mode 100644
index 0000000..7bec30e
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
@@ -0,0 +1,609 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding specified output data handling.
+ *
+ */
+@SuppressWarnings("all") public class AdvancedOutputDataHandling implements org.apache.thrift.TBase<AdvancedOutputDataHandling, AdvancedOutputDataHandling._Fields>, java.io.Serializable, Cloneable, Comparable<AdvancedOutputDataHandling> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedOutputDataHandling");
+
+ private static final org.apache.thrift.protocol.TField OUTPUTDATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("outputdataDir", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DATA_REGISTRY_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegistryURL", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField PERSIST_OUTPUT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("persistOutputData", org.apache.thrift.protocol.TType.BOOL, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AdvancedOutputDataHandlingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AdvancedOutputDataHandlingTupleSchemeFactory());
+ }
+
+ public String outputdataDir; // optional
+ public String dataRegistryURL; // optional
+ public boolean persistOutputData; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ OUTPUTDATA_DIR((short)2, "outputdataDir"),
+ DATA_REGISTRY_URL((short)3, "dataRegistryURL"),
+ PERSIST_OUTPUT_DATA((short)4, "persistOutputData");
+
+ 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 2: // OUTPUTDATA_DIR
+ return OUTPUTDATA_DIR;
+ case 3: // DATA_REGISTRY_URL
+ return DATA_REGISTRY_URL;
+ case 4: // PERSIST_OUTPUT_DATA
+ return PERSIST_OUTPUT_DATA;
+ 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 __PERSISTOUTPUTDATA_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.OUTPUTDATA_DIR,_Fields.DATA_REGISTRY_URL,_Fields.PERSIST_OUTPUT_DATA};
+ 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.OUTPUTDATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputdataDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DATA_REGISTRY_URL, new org.apache.thrift.meta_data.FieldMetaData("dataRegistryURL", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PERSIST_OUTPUT_DATA, new org.apache.thrift.meta_data.FieldMetaData("persistOutputData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdvancedOutputDataHandling.class, metaDataMap);
+ }
+
+ public AdvancedOutputDataHandling() {
+ this.persistOutputData = true;
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AdvancedOutputDataHandling(AdvancedOutputDataHandling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetOutputdataDir()) {
+ this.outputdataDir = other.outputdataDir;
+ }
+ if (other.isSetDataRegistryURL()) {
+ this.dataRegistryURL = other.dataRegistryURL;
+ }
+ this.persistOutputData = other.persistOutputData;
+ }
+
+ public AdvancedOutputDataHandling deepCopy() {
+ return new AdvancedOutputDataHandling(this);
+ }
+
+ @Override
+ public void clear() {
+ this.outputdataDir = null;
+ this.dataRegistryURL = null;
+ this.persistOutputData = true;
+
+ }
+
+ public String getOutputdataDir() {
+ return this.outputdataDir;
+ }
+
+ public AdvancedOutputDataHandling setOutputdataDir(String outputdataDir) {
+ this.outputdataDir = outputdataDir;
+ return this;
+ }
+
+ public void unsetOutputdataDir() {
+ this.outputdataDir = null;
+ }
+
+ /** Returns true if field outputdataDir is set (has been assigned a value) and false otherwise */
+ public boolean isSetOutputdataDir() {
+ return this.outputdataDir != null;
+ }
+
+ public void setOutputdataDirIsSet(boolean value) {
+ if (!value) {
+ this.outputdataDir = null;
+ }
+ }
+
+ public String getDataRegistryURL() {
+ return this.dataRegistryURL;
+ }
+
+ public AdvancedOutputDataHandling setDataRegistryURL(String dataRegistryURL) {
+ this.dataRegistryURL = dataRegistryURL;
+ return this;
+ }
+
+ public void unsetDataRegistryURL() {
+ this.dataRegistryURL = null;
+ }
+
+ /** Returns true if field dataRegistryURL is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataRegistryURL() {
+ return this.dataRegistryURL != null;
+ }
+
+ public void setDataRegistryURLIsSet(boolean value) {
+ if (!value) {
+ this.dataRegistryURL = null;
+ }
+ }
+
+ public boolean isPersistOutputData() {
+ return this.persistOutputData;
+ }
+
+ public AdvancedOutputDataHandling setPersistOutputData(boolean persistOutputData) {
+ this.persistOutputData = persistOutputData;
+ setPersistOutputDataIsSet(true);
+ return this;
+ }
+
+ public void unsetPersistOutputData() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID);
+ }
+
+ /** Returns true if field persistOutputData is set (has been assigned a value) and false otherwise */
+ public boolean isSetPersistOutputData() {
+ return EncodingUtils.testBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID);
+ }
+
+ public void setPersistOutputDataIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTOUTPUTDATA_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OUTPUTDATA_DIR:
+ if (value == null) {
+ unsetOutputdataDir();
+ } else {
+ setOutputdataDir((String)value);
+ }
+ break;
+
+ case DATA_REGISTRY_URL:
+ if (value == null) {
+ unsetDataRegistryURL();
+ } else {
+ setDataRegistryURL((String)value);
+ }
+ break;
+
+ case PERSIST_OUTPUT_DATA:
+ if (value == null) {
+ unsetPersistOutputData();
+ } else {
+ setPersistOutputData((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OUTPUTDATA_DIR:
+ return getOutputdataDir();
+
+ case DATA_REGISTRY_URL:
+ return getDataRegistryURL();
+
+ case PERSIST_OUTPUT_DATA:
+ return Boolean.valueOf(isPersistOutputData());
+
+ }
+ 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 OUTPUTDATA_DIR:
+ return isSetOutputdataDir();
+ case DATA_REGISTRY_URL:
+ return isSetDataRegistryURL();
+ case PERSIST_OUTPUT_DATA:
+ return isSetPersistOutputData();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AdvancedOutputDataHandling)
+ return this.equals((AdvancedOutputDataHandling)that);
+ return false;
+ }
+
+ public boolean equals(AdvancedOutputDataHandling that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_outputdataDir = true && this.isSetOutputdataDir();
+ boolean that_present_outputdataDir = true && that.isSetOutputdataDir();
+ if (this_present_outputdataDir || that_present_outputdataDir) {
+ if (!(this_present_outputdataDir && that_present_outputdataDir))
+ return false;
+ if (!this.outputdataDir.equals(that.outputdataDir))
+ return false;
+ }
+
+ boolean this_present_dataRegistryURL = true && this.isSetDataRegistryURL();
+ boolean that_present_dataRegistryURL = true && that.isSetDataRegistryURL();
+ if (this_present_dataRegistryURL || that_present_dataRegistryURL) {
+ if (!(this_present_dataRegistryURL && that_present_dataRegistryURL))
+ return false;
+ if (!this.dataRegistryURL.equals(that.dataRegistryURL))
+ return false;
+ }
+
+ boolean this_present_persistOutputData = true && this.isSetPersistOutputData();
+ boolean that_present_persistOutputData = true && that.isSetPersistOutputData();
+ if (this_present_persistOutputData || that_present_persistOutputData) {
+ if (!(this_present_persistOutputData && that_present_persistOutputData))
+ return false;
+ if (this.persistOutputData != that.persistOutputData)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(AdvancedOutputDataHandling other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOutputdataDir()).compareTo(other.isSetOutputdataDir());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOutputdataDir()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputdataDir, other.outputdataDir);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataRegistryURL()).compareTo(other.isSetDataRegistryURL());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataRegistryURL()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataRegistryURL, other.dataRegistryURL);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPersistOutputData()).compareTo(other.isSetPersistOutputData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPersistOutputData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistOutputData, other.persistOutputData);
+ 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("AdvancedOutputDataHandling(");
+ boolean first = true;
+
+ if (isSetOutputdataDir()) {
+ sb.append("outputdataDir:");
+ if (this.outputdataDir == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.outputdataDir);
+ }
+ first = false;
+ }
+ if (isSetDataRegistryURL()) {
+ if (!first) sb.append(", ");
+ sb.append("dataRegistryURL:");
+ if (this.dataRegistryURL == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataRegistryURL);
+ }
+ first = false;
+ }
+ if (isSetPersistOutputData()) {
+ if (!first) sb.append(", ");
+ sb.append("persistOutputData:");
+ sb.append(this.persistOutputData);
+ 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 AdvancedOutputDataHandlingStandardSchemeFactory implements SchemeFactory {
+ public AdvancedOutputDataHandlingStandardScheme getScheme() {
+ return new AdvancedOutputDataHandlingStandardScheme();
+ }
+ }
+
+ private static class AdvancedOutputDataHandlingStandardScheme extends StandardScheme<AdvancedOutputDataHandling> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AdvancedOutputDataHandling 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 2: // OUTPUTDATA_DIR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.outputdataDir = iprot.readString();
+ struct.setOutputdataDirIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DATA_REGISTRY_URL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataRegistryURL = iprot.readString();
+ struct.setDataRegistryURLIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PERSIST_OUTPUT_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.persistOutputData = iprot.readBool();
+ struct.setPersistOutputDataIsSet(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, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.outputdataDir != null) {
+ if (struct.isSetOutputdataDir()) {
+ oprot.writeFieldBegin(OUTPUTDATA_DIR_FIELD_DESC);
+ oprot.writeString(struct.outputdataDir);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dataRegistryURL != null) {
+ if (struct.isSetDataRegistryURL()) {
+ oprot.writeFieldBegin(DATA_REGISTRY_URL_FIELD_DESC);
+ oprot.writeString(struct.dataRegistryURL);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetPersistOutputData()) {
+ oprot.writeFieldBegin(PERSIST_OUTPUT_DATA_FIELD_DESC);
+ oprot.writeBool(struct.persistOutputData);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AdvancedOutputDataHandlingTupleSchemeFactory implements SchemeFactory {
+ public AdvancedOutputDataHandlingTupleScheme getScheme() {
+ return new AdvancedOutputDataHandlingTupleScheme();
+ }
+ }
+
+ private static class AdvancedOutputDataHandlingTupleScheme extends TupleScheme<AdvancedOutputDataHandling> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOutputdataDir()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDataRegistryURL()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPersistOutputData()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetOutputdataDir()) {
+ oprot.writeString(struct.outputdataDir);
+ }
+ if (struct.isSetDataRegistryURL()) {
+ oprot.writeString(struct.dataRegistryURL);
+ }
+ if (struct.isSetPersistOutputData()) {
+ oprot.writeBool(struct.persistOutputData);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.outputdataDir = iprot.readString();
+ struct.setOutputdataDirIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dataRegistryURL = iprot.readString();
+ struct.setDataRegistryURLIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.persistOutputData = iprot.readBool();
+ struct.setPersistOutputDataIsSet(true);
+ }
+ }
+ }
+
+}
+
[11/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
new file mode 100644
index 0000000..5ffacf9
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
@@ -0,0 +1,1402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the experiment configuration.
+ *
+ *
+ */
+@SuppressWarnings("all") public class ConfigurationData implements org.apache.thrift.TBase<ConfigurationData, ConfigurationData._Fields>, java.io.Serializable, Cloneable, Comparable<ConfigurationData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConfigurationData");
+
+ private static final org.apache.thrift.protocol.TField BASIC_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("basicMetadata", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField WORKLFOW_TEMPLATE_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("worklfowTemplateVersion", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentInputs", org.apache.thrift.protocol.TType.MAP, (short)6);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("computationalResourceScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ConfigurationDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ConfigurationDataTupleSchemeFactory());
+ }
+
+ public BasicMetadata basicMetadata; // optional
+ public String applicationId; // optional
+ public String applicationVersion; // optional
+ public String workflowTemplateId; // optional
+ public String worklfowTemplateVersion; // optional
+ public Map<String,String> experimentInputs; // optional
+ public ComputationalResourceScheduling computationalResourceScheduling; // optional
+ public AdvancedInputDataHandling advanceInputDataHandling; // optional
+ public AdvancedOutputDataHandling advanceOutputDataHandling; // optional
+ public QualityOfServiceParams qosParams; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ BASIC_METADATA((short)1, "basicMetadata"),
+ APPLICATION_ID((short)2, "applicationId"),
+ APPLICATION_VERSION((short)3, "applicationVersion"),
+ WORKFLOW_TEMPLATE_ID((short)4, "workflowTemplateId"),
+ WORKLFOW_TEMPLATE_VERSION((short)5, "worklfowTemplateVersion"),
+ EXPERIMENT_INPUTS((short)6, "experimentInputs"),
+ COMPUTATIONAL_RESOURCE_SCHEDULING((short)7, "computationalResourceScheduling"),
+ ADVANCE_INPUT_DATA_HANDLING((short)8, "advanceInputDataHandling"),
+ ADVANCE_OUTPUT_DATA_HANDLING((short)9, "advanceOutputDataHandling"),
+ QOS_PARAMS((short)10, "qosParams");
+
+ 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: // BASIC_METADATA
+ return BASIC_METADATA;
+ case 2: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 3: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ return WORKFLOW_TEMPLATE_ID;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ return WORKLFOW_TEMPLATE_VERSION;
+ case 6: // EXPERIMENT_INPUTS
+ return EXPERIMENT_INPUTS;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ return COMPUTATIONAL_RESOURCE_SCHEDULING;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ return ADVANCE_INPUT_DATA_HANDLING;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ return ADVANCE_OUTPUT_DATA_HANDLING;
+ case 10: // QOS_PARAMS
+ return QOS_PARAMS;
+ 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 _Fields optionals[] = {_Fields.BASIC_METADATA,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.WORKFLOW_TEMPLATE_ID,_Fields.WORKLFOW_TEMPLATE_VERSION,_Fields.EXPERIMENT_INPUTS,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS};
+ 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.BASIC_METADATA, new org.apache.thrift.meta_data.FieldMetaData("basicMetadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BasicMetadata.class)));
+ tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_VERSION, new org.apache.thrift.meta_data.FieldMetaData("applicationVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKLFOW_TEMPLATE_VERSION, new org.apache.thrift.meta_data.FieldMetaData("worklfowTemplateVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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))));
+ tmpMap.put(_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("computationalResourceScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCE_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCE_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.QOS_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("qosParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConfigurationData.class, metaDataMap);
+ }
+
+ public ConfigurationData() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ConfigurationData(ConfigurationData other) {
+ if (other.isSetBasicMetadata()) {
+ this.basicMetadata = new BasicMetadata(other.basicMetadata);
+ }
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetWorkflowTemplateId()) {
+ this.workflowTemplateId = other.workflowTemplateId;
+ }
+ if (other.isSetWorklfowTemplateVersion()) {
+ this.worklfowTemplateVersion = other.worklfowTemplateVersion;
+ }
+ if (other.isSetExperimentInputs()) {
+ Map<String,String> __this__experimentInputs = new HashMap<String,String>(other.experimentInputs);
+ this.experimentInputs = __this__experimentInputs;
+ }
+ if (other.isSetComputationalResourceScheduling()) {
+ this.computationalResourceScheduling = new ComputationalResourceScheduling(other.computationalResourceScheduling);
+ }
+ if (other.isSetAdvanceInputDataHandling()) {
+ this.advanceInputDataHandling = new AdvancedInputDataHandling(other.advanceInputDataHandling);
+ }
+ if (other.isSetAdvanceOutputDataHandling()) {
+ this.advanceOutputDataHandling = new AdvancedOutputDataHandling(other.advanceOutputDataHandling);
+ }
+ if (other.isSetQosParams()) {
+ this.qosParams = new QualityOfServiceParams(other.qosParams);
+ }
+ }
+
+ public ConfigurationData deepCopy() {
+ return new ConfigurationData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.basicMetadata = null;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.workflowTemplateId = null;
+ this.worklfowTemplateVersion = null;
+ this.experimentInputs = null;
+ this.computationalResourceScheduling = null;
+ this.advanceInputDataHandling = null;
+ this.advanceOutputDataHandling = null;
+ this.qosParams = null;
+ }
+
+ public BasicMetadata getBasicMetadata() {
+ return this.basicMetadata;
+ }
+
+ public ConfigurationData setBasicMetadata(BasicMetadata basicMetadata) {
+ this.basicMetadata = basicMetadata;
+ return this;
+ }
+
+ public void unsetBasicMetadata() {
+ this.basicMetadata = null;
+ }
+
+ /** Returns true if field basicMetadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetBasicMetadata() {
+ return this.basicMetadata != null;
+ }
+
+ public void setBasicMetadataIsSet(boolean value) {
+ if (!value) {
+ this.basicMetadata = null;
+ }
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public ConfigurationData setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ return this;
+ }
+
+ public void unsetApplicationId() {
+ this.applicationId = null;
+ }
+
+ /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationId() {
+ return this.applicationId != null;
+ }
+
+ public void setApplicationIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationId = null;
+ }
+ }
+
+ public String getApplicationVersion() {
+ return this.applicationVersion;
+ }
+
+ public ConfigurationData setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ return this;
+ }
+
+ public void unsetApplicationVersion() {
+ this.applicationVersion = null;
+ }
+
+ /** Returns true if field applicationVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationVersion() {
+ return this.applicationVersion != null;
+ }
+
+ public void setApplicationVersionIsSet(boolean value) {
+ if (!value) {
+ this.applicationVersion = null;
+ }
+ }
+
+ public String getWorkflowTemplateId() {
+ return this.workflowTemplateId;
+ }
+
+ public ConfigurationData setWorkflowTemplateId(String workflowTemplateId) {
+ this.workflowTemplateId = workflowTemplateId;
+ return this;
+ }
+
+ public void unsetWorkflowTemplateId() {
+ this.workflowTemplateId = null;
+ }
+
+ /** Returns true if field workflowTemplateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateId() {
+ return this.workflowTemplateId != null;
+ }
+
+ public void setWorkflowTemplateIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateId = null;
+ }
+ }
+
+ public String getWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion;
+ }
+
+ public ConfigurationData setWorklfowTemplateVersion(String worklfowTemplateVersion) {
+ this.worklfowTemplateVersion = worklfowTemplateVersion;
+ return this;
+ }
+
+ public void unsetWorklfowTemplateVersion() {
+ this.worklfowTemplateVersion = null;
+ }
+
+ /** Returns true if field worklfowTemplateVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion != null;
+ }
+
+ public void setWorklfowTemplateVersionIsSet(boolean value) {
+ if (!value) {
+ this.worklfowTemplateVersion = null;
+ }
+ }
+
+ public int getExperimentInputsSize() {
+ return (this.experimentInputs == null) ? 0 : this.experimentInputs.size();
+ }
+
+ public void putToExperimentInputs(String key, String val) {
+ if (this.experimentInputs == null) {
+ this.experimentInputs = new HashMap<String,String>();
+ }
+ this.experimentInputs.put(key, val);
+ }
+
+ public Map<String,String> getExperimentInputs() {
+ return this.experimentInputs;
+ }
+
+ public ConfigurationData setExperimentInputs(Map<String,String> experimentInputs) {
+ this.experimentInputs = experimentInputs;
+ return this;
+ }
+
+ public void unsetExperimentInputs() {
+ this.experimentInputs = null;
+ }
+
+ /** Returns true if field experimentInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentInputs() {
+ return this.experimentInputs != null;
+ }
+
+ public void setExperimentInputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentInputs = null;
+ }
+ }
+
+ public ComputationalResourceScheduling getComputationalResourceScheduling() {
+ return this.computationalResourceScheduling;
+ }
+
+ public ConfigurationData setComputationalResourceScheduling(ComputationalResourceScheduling computationalResourceScheduling) {
+ this.computationalResourceScheduling = computationalResourceScheduling;
+ return this;
+ }
+
+ public void unsetComputationalResourceScheduling() {
+ this.computationalResourceScheduling = null;
+ }
+
+ /** Returns true if field computationalResourceScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalResourceScheduling() {
+ return this.computationalResourceScheduling != null;
+ }
+
+ public void setComputationalResourceSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.computationalResourceScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceInputDataHandling(AdvancedInputDataHandling advanceInputDataHandling) {
+ this.advanceInputDataHandling = advanceInputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceInputDataHandling() {
+ this.advanceInputDataHandling = null;
+ }
+
+ /** Returns true if field advanceInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling != null;
+ }
+
+ public void setAdvanceInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceOutputDataHandling(AdvancedOutputDataHandling advanceOutputDataHandling) {
+ this.advanceOutputDataHandling = advanceOutputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceOutputDataHandling() {
+ this.advanceOutputDataHandling = null;
+ }
+
+ /** Returns true if field advanceOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling != null;
+ }
+
+ public void setAdvanceOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceOutputDataHandling = null;
+ }
+ }
+
+ public QualityOfServiceParams getQosParams() {
+ return this.qosParams;
+ }
+
+ public ConfigurationData setQosParams(QualityOfServiceParams qosParams) {
+ this.qosParams = qosParams;
+ return this;
+ }
+
+ public void unsetQosParams() {
+ this.qosParams = null;
+ }
+
+ /** Returns true if field qosParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetQosParams() {
+ return this.qosParams != null;
+ }
+
+ public void setQosParamsIsSet(boolean value) {
+ if (!value) {
+ this.qosParams = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case BASIC_METADATA:
+ if (value == null) {
+ unsetBasicMetadata();
+ } else {
+ setBasicMetadata((BasicMetadata)value);
+ }
+ break;
+
+ case APPLICATION_ID:
+ if (value == null) {
+ unsetApplicationId();
+ } else {
+ setApplicationId((String)value);
+ }
+ break;
+
+ case APPLICATION_VERSION:
+ if (value == null) {
+ unsetApplicationVersion();
+ } else {
+ setApplicationVersion((String)value);
+ }
+ break;
+
+ case WORKFLOW_TEMPLATE_ID:
+ if (value == null) {
+ unsetWorkflowTemplateId();
+ } else {
+ setWorkflowTemplateId((String)value);
+ }
+ break;
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ if (value == null) {
+ unsetWorklfowTemplateVersion();
+ } else {
+ setWorklfowTemplateVersion((String)value);
+ }
+ break;
+
+ case EXPERIMENT_INPUTS:
+ if (value == null) {
+ unsetExperimentInputs();
+ } else {
+ setExperimentInputs((Map<String,String>)value);
+ }
+ break;
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ if (value == null) {
+ unsetComputationalResourceScheduling();
+ } else {
+ setComputationalResourceScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceInputDataHandling();
+ } else {
+ setAdvanceInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceOutputDataHandling();
+ } else {
+ setAdvanceOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case QOS_PARAMS:
+ if (value == null) {
+ unsetQosParams();
+ } else {
+ setQosParams((QualityOfServiceParams)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case BASIC_METADATA:
+ return getBasicMetadata();
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case WORKFLOW_TEMPLATE_ID:
+ return getWorkflowTemplateId();
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ return getWorklfowTemplateVersion();
+
+ case EXPERIMENT_INPUTS:
+ return getExperimentInputs();
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return getComputationalResourceScheduling();
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return getAdvanceInputDataHandling();
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return getAdvanceOutputDataHandling();
+
+ case QOS_PARAMS:
+ return getQosParams();
+
+ }
+ 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 BASIC_METADATA:
+ return isSetBasicMetadata();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case WORKFLOW_TEMPLATE_ID:
+ return isSetWorkflowTemplateId();
+ case WORKLFOW_TEMPLATE_VERSION:
+ return isSetWorklfowTemplateVersion();
+ case EXPERIMENT_INPUTS:
+ return isSetExperimentInputs();
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return isSetComputationalResourceScheduling();
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return isSetAdvanceInputDataHandling();
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return isSetAdvanceOutputDataHandling();
+ case QOS_PARAMS:
+ return isSetQosParams();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ConfigurationData)
+ return this.equals((ConfigurationData)that);
+ return false;
+ }
+
+ public boolean equals(ConfigurationData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_basicMetadata = true && this.isSetBasicMetadata();
+ boolean that_present_basicMetadata = true && that.isSetBasicMetadata();
+ if (this_present_basicMetadata || that_present_basicMetadata) {
+ if (!(this_present_basicMetadata && that_present_basicMetadata))
+ return false;
+ if (!this.basicMetadata.equals(that.basicMetadata))
+ return false;
+ }
+
+ boolean this_present_applicationId = true && this.isSetApplicationId();
+ boolean that_present_applicationId = true && that.isSetApplicationId();
+ if (this_present_applicationId || that_present_applicationId) {
+ if (!(this_present_applicationId && that_present_applicationId))
+ return false;
+ if (!this.applicationId.equals(that.applicationId))
+ return false;
+ }
+
+ boolean this_present_applicationVersion = true && this.isSetApplicationVersion();
+ boolean that_present_applicationVersion = true && that.isSetApplicationVersion();
+ if (this_present_applicationVersion || that_present_applicationVersion) {
+ if (!(this_present_applicationVersion && that_present_applicationVersion))
+ return false;
+ if (!this.applicationVersion.equals(that.applicationVersion))
+ return false;
+ }
+
+ boolean this_present_workflowTemplateId = true && this.isSetWorkflowTemplateId();
+ boolean that_present_workflowTemplateId = true && that.isSetWorkflowTemplateId();
+ if (this_present_workflowTemplateId || that_present_workflowTemplateId) {
+ if (!(this_present_workflowTemplateId && that_present_workflowTemplateId))
+ return false;
+ if (!this.workflowTemplateId.equals(that.workflowTemplateId))
+ return false;
+ }
+
+ boolean this_present_worklfowTemplateVersion = true && this.isSetWorklfowTemplateVersion();
+ boolean that_present_worklfowTemplateVersion = true && that.isSetWorklfowTemplateVersion();
+ if (this_present_worklfowTemplateVersion || that_present_worklfowTemplateVersion) {
+ if (!(this_present_worklfowTemplateVersion && that_present_worklfowTemplateVersion))
+ return false;
+ if (!this.worklfowTemplateVersion.equals(that.worklfowTemplateVersion))
+ return false;
+ }
+
+ boolean this_present_experimentInputs = true && this.isSetExperimentInputs();
+ boolean that_present_experimentInputs = true && that.isSetExperimentInputs();
+ if (this_present_experimentInputs || that_present_experimentInputs) {
+ if (!(this_present_experimentInputs && that_present_experimentInputs))
+ return false;
+ if (!this.experimentInputs.equals(that.experimentInputs))
+ return false;
+ }
+
+ boolean this_present_computationalResourceScheduling = true && this.isSetComputationalResourceScheduling();
+ boolean that_present_computationalResourceScheduling = true && that.isSetComputationalResourceScheduling();
+ if (this_present_computationalResourceScheduling || that_present_computationalResourceScheduling) {
+ if (!(this_present_computationalResourceScheduling && that_present_computationalResourceScheduling))
+ return false;
+ if (!this.computationalResourceScheduling.equals(that.computationalResourceScheduling))
+ return false;
+ }
+
+ boolean this_present_advanceInputDataHandling = true && this.isSetAdvanceInputDataHandling();
+ boolean that_present_advanceInputDataHandling = true && that.isSetAdvanceInputDataHandling();
+ if (this_present_advanceInputDataHandling || that_present_advanceInputDataHandling) {
+ if (!(this_present_advanceInputDataHandling && that_present_advanceInputDataHandling))
+ return false;
+ if (!this.advanceInputDataHandling.equals(that.advanceInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advanceOutputDataHandling = true && this.isSetAdvanceOutputDataHandling();
+ boolean that_present_advanceOutputDataHandling = true && that.isSetAdvanceOutputDataHandling();
+ if (this_present_advanceOutputDataHandling || that_present_advanceOutputDataHandling) {
+ if (!(this_present_advanceOutputDataHandling && that_present_advanceOutputDataHandling))
+ return false;
+ if (!this.advanceOutputDataHandling.equals(that.advanceOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_qosParams = true && this.isSetQosParams();
+ boolean that_present_qosParams = true && that.isSetQosParams();
+ if (this_present_qosParams || that_present_qosParams) {
+ if (!(this_present_qosParams && that_present_qosParams))
+ return false;
+ if (!this.qosParams.equals(that.qosParams))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ConfigurationData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetBasicMetadata()).compareTo(other.isSetBasicMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBasicMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.basicMetadata, other.basicMetadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationVersion()).compareTo(other.isSetApplicationVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationVersion, other.applicationVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowTemplateId()).compareTo(other.isSetWorkflowTemplateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateId, other.workflowTemplateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorklfowTemplateVersion()).compareTo(other.isSetWorklfowTemplateVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.worklfowTemplateVersion, other.worklfowTemplateVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentInputs()).compareTo(other.isSetExperimentInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentInputs, other.experimentInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computationalResourceScheduling, other.computationalResourceScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceInputDataHandling()).compareTo(other.isSetAdvanceInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceInputDataHandling, other.advanceInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceOutputDataHandling()).compareTo(other.isSetAdvanceOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceOutputDataHandling, other.advanceOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQosParams()).compareTo(other.isSetQosParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQosParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qosParams, other.qosParams);
+ 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("ConfigurationData(");
+ boolean first = true;
+
+ if (isSetBasicMetadata()) {
+ sb.append("basicMetadata:");
+ if (this.basicMetadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.basicMetadata);
+ }
+ first = false;
+ }
+ if (isSetApplicationId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationId:");
+ if (this.applicationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationId);
+ }
+ first = false;
+ }
+ if (isSetApplicationVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationVersion:");
+ if (this.applicationVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationVersion);
+ }
+ first = false;
+ }
+ if (isSetWorkflowTemplateId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateId:");
+ if (this.workflowTemplateId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateId);
+ }
+ first = false;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("worklfowTemplateVersion:");
+ if (this.worklfowTemplateVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.worklfowTemplateVersion);
+ }
+ first = false;
+ }
+ if (isSetExperimentInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentInputs:");
+ if (this.experimentInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentInputs);
+ }
+ first = false;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("computationalResourceScheduling:");
+ if (this.computationalResourceScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computationalResourceScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceInputDataHandling:");
+ if (this.advanceInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceOutputDataHandling:");
+ if (this.advanceOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetQosParams()) {
+ if (!first) sb.append(", ");
+ sb.append("qosParams:");
+ if (this.qosParams == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.qosParams);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (basicMetadata != null) {
+ basicMetadata.validate();
+ }
+ if (computationalResourceScheduling != null) {
+ computationalResourceScheduling.validate();
+ }
+ if (advanceInputDataHandling != null) {
+ advanceInputDataHandling.validate();
+ }
+ if (advanceOutputDataHandling != null) {
+ advanceOutputDataHandling.validate();
+ }
+ if (qosParams != null) {
+ qosParams.validate();
+ }
+ }
+
+ 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 ConfigurationDataStandardSchemeFactory implements SchemeFactory {
+ public ConfigurationDataStandardScheme getScheme() {
+ return new ConfigurationDataStandardScheme();
+ }
+ }
+
+ private static class ConfigurationDataStandardScheme extends StandardScheme<ConfigurationData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ConfigurationData 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: // BASIC_METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // APPLICATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // APPLICATION_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // EXPERIMENT_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.experimentInputs = new HashMap<String,String>(2*_map0.size);
+ for (int _i1 = 0; _i1 < _map0.size; ++_i1)
+ {
+ String _key2;
+ String _val3;
+ _key2 = iprot.readString();
+ _val3 = iprot.readString();
+ struct.experimentInputs.put(_key2, _val3);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setExperimentInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // QOS_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(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, ConfigurationData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.basicMetadata != null) {
+ if (struct.isSetBasicMetadata()) {
+ oprot.writeFieldBegin(BASIC_METADATA_FIELD_DESC);
+ struct.basicMetadata.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationId != null) {
+ if (struct.isSetApplicationId()) {
+ oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationVersion != null) {
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeFieldBegin(APPLICATION_VERSION_FIELD_DESC);
+ oprot.writeString(struct.applicationVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowTemplateId != null) {
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.worklfowTemplateVersion != null) {
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeFieldBegin(WORKLFOW_TEMPLATE_VERSION_FIELD_DESC);
+ oprot.writeString(struct.worklfowTemplateVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentInputs != null) {
+ if (struct.isSetExperimentInputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_INPUTS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.experimentInputs.size()));
+ for (Map.Entry<String, String> _iter4 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.computationalResourceScheduling != null) {
+ if (struct.isSetComputationalResourceScheduling()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC);
+ struct.computationalResourceScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceInputDataHandling != null) {
+ if (struct.isSetAdvanceInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceOutputDataHandling != null) {
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.qosParams != null) {
+ if (struct.isSetQosParams()) {
+ oprot.writeFieldBegin(QOS_PARAMS_FIELD_DESC);
+ struct.qosParams.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ConfigurationDataTupleSchemeFactory implements SchemeFactory {
+ public ConfigurationDataTupleScheme getScheme() {
+ return new ConfigurationDataTupleScheme();
+ }
+ }
+
+ private static class ConfigurationDataTupleScheme extends TupleScheme<ConfigurationData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetBasicMetadata()) {
+ optionals.set(0);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ optionals.set(4);
+ }
+ if (struct.isSetExperimentInputs()) {
+ optionals.set(5);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ optionals.set(6);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ optionals.set(7);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ optionals.set(8);
+ }
+ if (struct.isSetQosParams()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetBasicMetadata()) {
+ struct.basicMetadata.write(oprot);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeString(struct.workflowTemplateId);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeString(struct.worklfowTemplateVersion);
+ }
+ if (struct.isSetExperimentInputs()) {
+ {
+ oprot.writeI32(struct.experimentInputs.size());
+ for (Map.Entry<String, String> _iter5 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ struct.computationalResourceScheduling.write(oprot);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ struct.advanceInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ struct.advanceOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetQosParams()) {
+ struct.qosParams.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.experimentInputs = new HashMap<String,String>(2*_map6.size);
+ for (int _i7 = 0; _i7 < _map6.size; ++_i7)
+ {
+ String _key8;
+ String _val9;
+ _key8 = iprot.readString();
+ _val9 = iprot.readString();
+ struct.experimentInputs.put(_key8, _val9);
+ }
+ }
+ struct.setExperimentInputsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
----------------------------------------------------------------------
diff --git a/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
new file mode 100644
index 0000000..12eceba
--- /dev/null
+++ b/airavata-api/client-sdks/java-client-sdk/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
@@ -0,0 +1,607 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding Quality of Service Parameters.
+ *
+ */
+@SuppressWarnings("all") public class QualityOfServiceParams implements org.apache.thrift.TBase<QualityOfServiceParams, QualityOfServiceParams._Fields>, java.io.Serializable, Cloneable, Comparable<QualityOfServiceParams> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QualityOfServiceParams");
+
+ private static final org.apache.thrift.protocol.TField START_EXECUTION_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("startExecutionAt", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXECUTE_BEFORE_FIELD_DESC = new org.apache.thrift.protocol.TField("executeBefore", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NUMBEROF_RETRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("numberofRetries", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new QualityOfServiceParamsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new QualityOfServiceParamsTupleSchemeFactory());
+ }
+
+ public String startExecutionAt; // optional
+ public String executeBefore; // optional
+ public int numberofRetries; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ START_EXECUTION_AT((short)1, "startExecutionAt"),
+ EXECUTE_BEFORE((short)2, "executeBefore"),
+ NUMBEROF_RETRIES((short)3, "numberofRetries");
+
+ 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: // START_EXECUTION_AT
+ return START_EXECUTION_AT;
+ case 2: // EXECUTE_BEFORE
+ return EXECUTE_BEFORE;
+ case 3: // NUMBEROF_RETRIES
+ return NUMBEROF_RETRIES;
+ 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 __NUMBEROFRETRIES_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.START_EXECUTION_AT,_Fields.EXECUTE_BEFORE,_Fields.NUMBEROF_RETRIES};
+ 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.START_EXECUTION_AT, new org.apache.thrift.meta_data.FieldMetaData("startExecutionAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXECUTE_BEFORE, new org.apache.thrift.meta_data.FieldMetaData("executeBefore", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NUMBEROF_RETRIES, new org.apache.thrift.meta_data.FieldMetaData("numberofRetries", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QualityOfServiceParams.class, metaDataMap);
+ }
+
+ public QualityOfServiceParams() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public QualityOfServiceParams(QualityOfServiceParams other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetStartExecutionAt()) {
+ this.startExecutionAt = other.startExecutionAt;
+ }
+ if (other.isSetExecuteBefore()) {
+ this.executeBefore = other.executeBefore;
+ }
+ this.numberofRetries = other.numberofRetries;
+ }
+
+ public QualityOfServiceParams deepCopy() {
+ return new QualityOfServiceParams(this);
+ }
+
+ @Override
+ public void clear() {
+ this.startExecutionAt = null;
+ this.executeBefore = null;
+ setNumberofRetriesIsSet(false);
+ this.numberofRetries = 0;
+ }
+
+ public String getStartExecutionAt() {
+ return this.startExecutionAt;
+ }
+
+ public QualityOfServiceParams setStartExecutionAt(String startExecutionAt) {
+ this.startExecutionAt = startExecutionAt;
+ return this;
+ }
+
+ public void unsetStartExecutionAt() {
+ this.startExecutionAt = null;
+ }
+
+ /** Returns true if field startExecutionAt is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartExecutionAt() {
+ return this.startExecutionAt != null;
+ }
+
+ public void setStartExecutionAtIsSet(boolean value) {
+ if (!value) {
+ this.startExecutionAt = null;
+ }
+ }
+
+ public String getExecuteBefore() {
+ return this.executeBefore;
+ }
+
+ public QualityOfServiceParams setExecuteBefore(String executeBefore) {
+ this.executeBefore = executeBefore;
+ return this;
+ }
+
+ public void unsetExecuteBefore() {
+ this.executeBefore = null;
+ }
+
+ /** Returns true if field executeBefore is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecuteBefore() {
+ return this.executeBefore != null;
+ }
+
+ public void setExecuteBeforeIsSet(boolean value) {
+ if (!value) {
+ this.executeBefore = null;
+ }
+ }
+
+ public int getNumberofRetries() {
+ return this.numberofRetries;
+ }
+
+ public QualityOfServiceParams setNumberofRetries(int numberofRetries) {
+ this.numberofRetries = numberofRetries;
+ setNumberofRetriesIsSet(true);
+ return this;
+ }
+
+ public void unsetNumberofRetries() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ /** Returns true if field numberofRetries is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumberofRetries() {
+ return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ public void setNumberofRetriesIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ if (value == null) {
+ unsetStartExecutionAt();
+ } else {
+ setStartExecutionAt((String)value);
+ }
+ break;
+
+ case EXECUTE_BEFORE:
+ if (value == null) {
+ unsetExecuteBefore();
+ } else {
+ setExecuteBefore((String)value);
+ }
+ break;
+
+ case NUMBEROF_RETRIES:
+ if (value == null) {
+ unsetNumberofRetries();
+ } else {
+ setNumberofRetries((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ return getStartExecutionAt();
+
+ case EXECUTE_BEFORE:
+ return getExecuteBefore();
+
+ case NUMBEROF_RETRIES:
+ return Integer.valueOf(getNumberofRetries());
+
+ }
+ 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 START_EXECUTION_AT:
+ return isSetStartExecutionAt();
+ case EXECUTE_BEFORE:
+ return isSetExecuteBefore();
+ case NUMBEROF_RETRIES:
+ return isSetNumberofRetries();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof QualityOfServiceParams)
+ return this.equals((QualityOfServiceParams)that);
+ return false;
+ }
+
+ public boolean equals(QualityOfServiceParams that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_startExecutionAt = true && this.isSetStartExecutionAt();
+ boolean that_present_startExecutionAt = true && that.isSetStartExecutionAt();
+ if (this_present_startExecutionAt || that_present_startExecutionAt) {
+ if (!(this_present_startExecutionAt && that_present_startExecutionAt))
+ return false;
+ if (!this.startExecutionAt.equals(that.startExecutionAt))
+ return false;
+ }
+
+ boolean this_present_executeBefore = true && this.isSetExecuteBefore();
+ boolean that_present_executeBefore = true && that.isSetExecuteBefore();
+ if (this_present_executeBefore || that_present_executeBefore) {
+ if (!(this_present_executeBefore && that_present_executeBefore))
+ return false;
+ if (!this.executeBefore.equals(that.executeBefore))
+ return false;
+ }
+
+ boolean this_present_numberofRetries = true && this.isSetNumberofRetries();
+ boolean that_present_numberofRetries = true && that.isSetNumberofRetries();
+ if (this_present_numberofRetries || that_present_numberofRetries) {
+ if (!(this_present_numberofRetries && that_present_numberofRetries))
+ return false;
+ if (this.numberofRetries != that.numberofRetries)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(QualityOfServiceParams other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStartExecutionAt()).compareTo(other.isSetStartExecutionAt());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartExecutionAt()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startExecutionAt, other.startExecutionAt);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExecuteBefore()).compareTo(other.isSetExecuteBefore());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecuteBefore()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executeBefore, other.executeBefore);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNumberofRetries()).compareTo(other.isSetNumberofRetries());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumberofRetries()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberofRetries, other.numberofRetries);
+ 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("QualityOfServiceParams(");
+ boolean first = true;
+
+ if (isSetStartExecutionAt()) {
+ sb.append("startExecutionAt:");
+ if (this.startExecutionAt == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.startExecutionAt);
+ }
+ first = false;
+ }
+ if (isSetExecuteBefore()) {
+ if (!first) sb.append(", ");
+ sb.append("executeBefore:");
+ if (this.executeBefore == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executeBefore);
+ }
+ first = false;
+ }
+ if (isSetNumberofRetries()) {
+ if (!first) sb.append(", ");
+ sb.append("numberofRetries:");
+ sb.append(this.numberofRetries);
+ 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 QualityOfServiceParamsStandardSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsStandardScheme getScheme() {
+ return new QualityOfServiceParamsStandardScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsStandardScheme extends StandardScheme<QualityOfServiceParams> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, QualityOfServiceParams 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: // START_EXECUTION_AT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXECUTE_BEFORE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NUMBEROF_RETRIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(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, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.startExecutionAt != null) {
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeFieldBegin(START_EXECUTION_AT_FIELD_DESC);
+ oprot.writeString(struct.startExecutionAt);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.executeBefore != null) {
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeFieldBegin(EXECUTE_BEFORE_FIELD_DESC);
+ oprot.writeString(struct.executeBefore);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeFieldBegin(NUMBEROF_RETRIES_FIELD_DESC);
+ oprot.writeI32(struct.numberofRetries);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class QualityOfServiceParamsTupleSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsTupleScheme getScheme() {
+ return new QualityOfServiceParamsTupleScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsTupleScheme extends TupleScheme<QualityOfServiceParams> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStartExecutionAt()) {
+ optionals.set(0);
+ }
+ if (struct.isSetExecuteBefore()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNumberofRetries()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeString(struct.startExecutionAt);
+ }
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeString(struct.executeBefore);
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeI32(struct.numberofRetries);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(true);
+ }
+ }
+ }
+
+}
+
[03/16] adding generated code for API AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
new file mode 100644
index 0000000..5ffacf9
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
@@ -0,0 +1,1402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding the experiment configuration.
+ *
+ *
+ */
+@SuppressWarnings("all") public class ConfigurationData implements org.apache.thrift.TBase<ConfigurationData, ConfigurationData._Fields>, java.io.Serializable, Cloneable, Comparable<ConfigurationData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConfigurationData");
+
+ private static final org.apache.thrift.protocol.TField BASIC_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("basicMetadata", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField WORKLFOW_TEMPLATE_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("worklfowTemplateVersion", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentInputs", org.apache.thrift.protocol.TType.MAP, (short)6);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("computationalResourceScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ConfigurationDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ConfigurationDataTupleSchemeFactory());
+ }
+
+ public BasicMetadata basicMetadata; // optional
+ public String applicationId; // optional
+ public String applicationVersion; // optional
+ public String workflowTemplateId; // optional
+ public String worklfowTemplateVersion; // optional
+ public Map<String,String> experimentInputs; // optional
+ public ComputationalResourceScheduling computationalResourceScheduling; // optional
+ public AdvancedInputDataHandling advanceInputDataHandling; // optional
+ public AdvancedOutputDataHandling advanceOutputDataHandling; // optional
+ public QualityOfServiceParams qosParams; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ BASIC_METADATA((short)1, "basicMetadata"),
+ APPLICATION_ID((short)2, "applicationId"),
+ APPLICATION_VERSION((short)3, "applicationVersion"),
+ WORKFLOW_TEMPLATE_ID((short)4, "workflowTemplateId"),
+ WORKLFOW_TEMPLATE_VERSION((short)5, "worklfowTemplateVersion"),
+ EXPERIMENT_INPUTS((short)6, "experimentInputs"),
+ COMPUTATIONAL_RESOURCE_SCHEDULING((short)7, "computationalResourceScheduling"),
+ ADVANCE_INPUT_DATA_HANDLING((short)8, "advanceInputDataHandling"),
+ ADVANCE_OUTPUT_DATA_HANDLING((short)9, "advanceOutputDataHandling"),
+ QOS_PARAMS((short)10, "qosParams");
+
+ 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: // BASIC_METADATA
+ return BASIC_METADATA;
+ case 2: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 3: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ return WORKFLOW_TEMPLATE_ID;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ return WORKLFOW_TEMPLATE_VERSION;
+ case 6: // EXPERIMENT_INPUTS
+ return EXPERIMENT_INPUTS;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ return COMPUTATIONAL_RESOURCE_SCHEDULING;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ return ADVANCE_INPUT_DATA_HANDLING;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ return ADVANCE_OUTPUT_DATA_HANDLING;
+ case 10: // QOS_PARAMS
+ return QOS_PARAMS;
+ 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 _Fields optionals[] = {_Fields.BASIC_METADATA,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.WORKFLOW_TEMPLATE_ID,_Fields.WORKLFOW_TEMPLATE_VERSION,_Fields.EXPERIMENT_INPUTS,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS};
+ 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.BASIC_METADATA, new org.apache.thrift.meta_data.FieldMetaData("basicMetadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BasicMetadata.class)));
+ tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_VERSION, new org.apache.thrift.meta_data.FieldMetaData("applicationVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKLFOW_TEMPLATE_VERSION, new org.apache.thrift.meta_data.FieldMetaData("worklfowTemplateVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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))));
+ tmpMap.put(_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("computationalResourceScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCE_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCE_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.QOS_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("qosParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConfigurationData.class, metaDataMap);
+ }
+
+ public ConfigurationData() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ConfigurationData(ConfigurationData other) {
+ if (other.isSetBasicMetadata()) {
+ this.basicMetadata = new BasicMetadata(other.basicMetadata);
+ }
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetWorkflowTemplateId()) {
+ this.workflowTemplateId = other.workflowTemplateId;
+ }
+ if (other.isSetWorklfowTemplateVersion()) {
+ this.worklfowTemplateVersion = other.worklfowTemplateVersion;
+ }
+ if (other.isSetExperimentInputs()) {
+ Map<String,String> __this__experimentInputs = new HashMap<String,String>(other.experimentInputs);
+ this.experimentInputs = __this__experimentInputs;
+ }
+ if (other.isSetComputationalResourceScheduling()) {
+ this.computationalResourceScheduling = new ComputationalResourceScheduling(other.computationalResourceScheduling);
+ }
+ if (other.isSetAdvanceInputDataHandling()) {
+ this.advanceInputDataHandling = new AdvancedInputDataHandling(other.advanceInputDataHandling);
+ }
+ if (other.isSetAdvanceOutputDataHandling()) {
+ this.advanceOutputDataHandling = new AdvancedOutputDataHandling(other.advanceOutputDataHandling);
+ }
+ if (other.isSetQosParams()) {
+ this.qosParams = new QualityOfServiceParams(other.qosParams);
+ }
+ }
+
+ public ConfigurationData deepCopy() {
+ return new ConfigurationData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.basicMetadata = null;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.workflowTemplateId = null;
+ this.worklfowTemplateVersion = null;
+ this.experimentInputs = null;
+ this.computationalResourceScheduling = null;
+ this.advanceInputDataHandling = null;
+ this.advanceOutputDataHandling = null;
+ this.qosParams = null;
+ }
+
+ public BasicMetadata getBasicMetadata() {
+ return this.basicMetadata;
+ }
+
+ public ConfigurationData setBasicMetadata(BasicMetadata basicMetadata) {
+ this.basicMetadata = basicMetadata;
+ return this;
+ }
+
+ public void unsetBasicMetadata() {
+ this.basicMetadata = null;
+ }
+
+ /** Returns true if field basicMetadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetBasicMetadata() {
+ return this.basicMetadata != null;
+ }
+
+ public void setBasicMetadataIsSet(boolean value) {
+ if (!value) {
+ this.basicMetadata = null;
+ }
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public ConfigurationData setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ return this;
+ }
+
+ public void unsetApplicationId() {
+ this.applicationId = null;
+ }
+
+ /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationId() {
+ return this.applicationId != null;
+ }
+
+ public void setApplicationIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationId = null;
+ }
+ }
+
+ public String getApplicationVersion() {
+ return this.applicationVersion;
+ }
+
+ public ConfigurationData setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ return this;
+ }
+
+ public void unsetApplicationVersion() {
+ this.applicationVersion = null;
+ }
+
+ /** Returns true if field applicationVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationVersion() {
+ return this.applicationVersion != null;
+ }
+
+ public void setApplicationVersionIsSet(boolean value) {
+ if (!value) {
+ this.applicationVersion = null;
+ }
+ }
+
+ public String getWorkflowTemplateId() {
+ return this.workflowTemplateId;
+ }
+
+ public ConfigurationData setWorkflowTemplateId(String workflowTemplateId) {
+ this.workflowTemplateId = workflowTemplateId;
+ return this;
+ }
+
+ public void unsetWorkflowTemplateId() {
+ this.workflowTemplateId = null;
+ }
+
+ /** Returns true if field workflowTemplateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateId() {
+ return this.workflowTemplateId != null;
+ }
+
+ public void setWorkflowTemplateIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateId = null;
+ }
+ }
+
+ public String getWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion;
+ }
+
+ public ConfigurationData setWorklfowTemplateVersion(String worklfowTemplateVersion) {
+ this.worklfowTemplateVersion = worklfowTemplateVersion;
+ return this;
+ }
+
+ public void unsetWorklfowTemplateVersion() {
+ this.worklfowTemplateVersion = null;
+ }
+
+ /** Returns true if field worklfowTemplateVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion != null;
+ }
+
+ public void setWorklfowTemplateVersionIsSet(boolean value) {
+ if (!value) {
+ this.worklfowTemplateVersion = null;
+ }
+ }
+
+ public int getExperimentInputsSize() {
+ return (this.experimentInputs == null) ? 0 : this.experimentInputs.size();
+ }
+
+ public void putToExperimentInputs(String key, String val) {
+ if (this.experimentInputs == null) {
+ this.experimentInputs = new HashMap<String,String>();
+ }
+ this.experimentInputs.put(key, val);
+ }
+
+ public Map<String,String> getExperimentInputs() {
+ return this.experimentInputs;
+ }
+
+ public ConfigurationData setExperimentInputs(Map<String,String> experimentInputs) {
+ this.experimentInputs = experimentInputs;
+ return this;
+ }
+
+ public void unsetExperimentInputs() {
+ this.experimentInputs = null;
+ }
+
+ /** Returns true if field experimentInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentInputs() {
+ return this.experimentInputs != null;
+ }
+
+ public void setExperimentInputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentInputs = null;
+ }
+ }
+
+ public ComputationalResourceScheduling getComputationalResourceScheduling() {
+ return this.computationalResourceScheduling;
+ }
+
+ public ConfigurationData setComputationalResourceScheduling(ComputationalResourceScheduling computationalResourceScheduling) {
+ this.computationalResourceScheduling = computationalResourceScheduling;
+ return this;
+ }
+
+ public void unsetComputationalResourceScheduling() {
+ this.computationalResourceScheduling = null;
+ }
+
+ /** Returns true if field computationalResourceScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalResourceScheduling() {
+ return this.computationalResourceScheduling != null;
+ }
+
+ public void setComputationalResourceSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.computationalResourceScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceInputDataHandling(AdvancedInputDataHandling advanceInputDataHandling) {
+ this.advanceInputDataHandling = advanceInputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceInputDataHandling() {
+ this.advanceInputDataHandling = null;
+ }
+
+ /** Returns true if field advanceInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling != null;
+ }
+
+ public void setAdvanceInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceOutputDataHandling(AdvancedOutputDataHandling advanceOutputDataHandling) {
+ this.advanceOutputDataHandling = advanceOutputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceOutputDataHandling() {
+ this.advanceOutputDataHandling = null;
+ }
+
+ /** Returns true if field advanceOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling != null;
+ }
+
+ public void setAdvanceOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceOutputDataHandling = null;
+ }
+ }
+
+ public QualityOfServiceParams getQosParams() {
+ return this.qosParams;
+ }
+
+ public ConfigurationData setQosParams(QualityOfServiceParams qosParams) {
+ this.qosParams = qosParams;
+ return this;
+ }
+
+ public void unsetQosParams() {
+ this.qosParams = null;
+ }
+
+ /** Returns true if field qosParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetQosParams() {
+ return this.qosParams != null;
+ }
+
+ public void setQosParamsIsSet(boolean value) {
+ if (!value) {
+ this.qosParams = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case BASIC_METADATA:
+ if (value == null) {
+ unsetBasicMetadata();
+ } else {
+ setBasicMetadata((BasicMetadata)value);
+ }
+ break;
+
+ case APPLICATION_ID:
+ if (value == null) {
+ unsetApplicationId();
+ } else {
+ setApplicationId((String)value);
+ }
+ break;
+
+ case APPLICATION_VERSION:
+ if (value == null) {
+ unsetApplicationVersion();
+ } else {
+ setApplicationVersion((String)value);
+ }
+ break;
+
+ case WORKFLOW_TEMPLATE_ID:
+ if (value == null) {
+ unsetWorkflowTemplateId();
+ } else {
+ setWorkflowTemplateId((String)value);
+ }
+ break;
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ if (value == null) {
+ unsetWorklfowTemplateVersion();
+ } else {
+ setWorklfowTemplateVersion((String)value);
+ }
+ break;
+
+ case EXPERIMENT_INPUTS:
+ if (value == null) {
+ unsetExperimentInputs();
+ } else {
+ setExperimentInputs((Map<String,String>)value);
+ }
+ break;
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ if (value == null) {
+ unsetComputationalResourceScheduling();
+ } else {
+ setComputationalResourceScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceInputDataHandling();
+ } else {
+ setAdvanceInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceOutputDataHandling();
+ } else {
+ setAdvanceOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case QOS_PARAMS:
+ if (value == null) {
+ unsetQosParams();
+ } else {
+ setQosParams((QualityOfServiceParams)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case BASIC_METADATA:
+ return getBasicMetadata();
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case WORKFLOW_TEMPLATE_ID:
+ return getWorkflowTemplateId();
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ return getWorklfowTemplateVersion();
+
+ case EXPERIMENT_INPUTS:
+ return getExperimentInputs();
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return getComputationalResourceScheduling();
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return getAdvanceInputDataHandling();
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return getAdvanceOutputDataHandling();
+
+ case QOS_PARAMS:
+ return getQosParams();
+
+ }
+ 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 BASIC_METADATA:
+ return isSetBasicMetadata();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case WORKFLOW_TEMPLATE_ID:
+ return isSetWorkflowTemplateId();
+ case WORKLFOW_TEMPLATE_VERSION:
+ return isSetWorklfowTemplateVersion();
+ case EXPERIMENT_INPUTS:
+ return isSetExperimentInputs();
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return isSetComputationalResourceScheduling();
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return isSetAdvanceInputDataHandling();
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return isSetAdvanceOutputDataHandling();
+ case QOS_PARAMS:
+ return isSetQosParams();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ConfigurationData)
+ return this.equals((ConfigurationData)that);
+ return false;
+ }
+
+ public boolean equals(ConfigurationData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_basicMetadata = true && this.isSetBasicMetadata();
+ boolean that_present_basicMetadata = true && that.isSetBasicMetadata();
+ if (this_present_basicMetadata || that_present_basicMetadata) {
+ if (!(this_present_basicMetadata && that_present_basicMetadata))
+ return false;
+ if (!this.basicMetadata.equals(that.basicMetadata))
+ return false;
+ }
+
+ boolean this_present_applicationId = true && this.isSetApplicationId();
+ boolean that_present_applicationId = true && that.isSetApplicationId();
+ if (this_present_applicationId || that_present_applicationId) {
+ if (!(this_present_applicationId && that_present_applicationId))
+ return false;
+ if (!this.applicationId.equals(that.applicationId))
+ return false;
+ }
+
+ boolean this_present_applicationVersion = true && this.isSetApplicationVersion();
+ boolean that_present_applicationVersion = true && that.isSetApplicationVersion();
+ if (this_present_applicationVersion || that_present_applicationVersion) {
+ if (!(this_present_applicationVersion && that_present_applicationVersion))
+ return false;
+ if (!this.applicationVersion.equals(that.applicationVersion))
+ return false;
+ }
+
+ boolean this_present_workflowTemplateId = true && this.isSetWorkflowTemplateId();
+ boolean that_present_workflowTemplateId = true && that.isSetWorkflowTemplateId();
+ if (this_present_workflowTemplateId || that_present_workflowTemplateId) {
+ if (!(this_present_workflowTemplateId && that_present_workflowTemplateId))
+ return false;
+ if (!this.workflowTemplateId.equals(that.workflowTemplateId))
+ return false;
+ }
+
+ boolean this_present_worklfowTemplateVersion = true && this.isSetWorklfowTemplateVersion();
+ boolean that_present_worklfowTemplateVersion = true && that.isSetWorklfowTemplateVersion();
+ if (this_present_worklfowTemplateVersion || that_present_worklfowTemplateVersion) {
+ if (!(this_present_worklfowTemplateVersion && that_present_worklfowTemplateVersion))
+ return false;
+ if (!this.worklfowTemplateVersion.equals(that.worklfowTemplateVersion))
+ return false;
+ }
+
+ boolean this_present_experimentInputs = true && this.isSetExperimentInputs();
+ boolean that_present_experimentInputs = true && that.isSetExperimentInputs();
+ if (this_present_experimentInputs || that_present_experimentInputs) {
+ if (!(this_present_experimentInputs && that_present_experimentInputs))
+ return false;
+ if (!this.experimentInputs.equals(that.experimentInputs))
+ return false;
+ }
+
+ boolean this_present_computationalResourceScheduling = true && this.isSetComputationalResourceScheduling();
+ boolean that_present_computationalResourceScheduling = true && that.isSetComputationalResourceScheduling();
+ if (this_present_computationalResourceScheduling || that_present_computationalResourceScheduling) {
+ if (!(this_present_computationalResourceScheduling && that_present_computationalResourceScheduling))
+ return false;
+ if (!this.computationalResourceScheduling.equals(that.computationalResourceScheduling))
+ return false;
+ }
+
+ boolean this_present_advanceInputDataHandling = true && this.isSetAdvanceInputDataHandling();
+ boolean that_present_advanceInputDataHandling = true && that.isSetAdvanceInputDataHandling();
+ if (this_present_advanceInputDataHandling || that_present_advanceInputDataHandling) {
+ if (!(this_present_advanceInputDataHandling && that_present_advanceInputDataHandling))
+ return false;
+ if (!this.advanceInputDataHandling.equals(that.advanceInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advanceOutputDataHandling = true && this.isSetAdvanceOutputDataHandling();
+ boolean that_present_advanceOutputDataHandling = true && that.isSetAdvanceOutputDataHandling();
+ if (this_present_advanceOutputDataHandling || that_present_advanceOutputDataHandling) {
+ if (!(this_present_advanceOutputDataHandling && that_present_advanceOutputDataHandling))
+ return false;
+ if (!this.advanceOutputDataHandling.equals(that.advanceOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_qosParams = true && this.isSetQosParams();
+ boolean that_present_qosParams = true && that.isSetQosParams();
+ if (this_present_qosParams || that_present_qosParams) {
+ if (!(this_present_qosParams && that_present_qosParams))
+ return false;
+ if (!this.qosParams.equals(that.qosParams))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ConfigurationData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetBasicMetadata()).compareTo(other.isSetBasicMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBasicMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.basicMetadata, other.basicMetadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationVersion()).compareTo(other.isSetApplicationVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationVersion, other.applicationVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowTemplateId()).compareTo(other.isSetWorkflowTemplateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateId, other.workflowTemplateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorklfowTemplateVersion()).compareTo(other.isSetWorklfowTemplateVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.worklfowTemplateVersion, other.worklfowTemplateVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentInputs()).compareTo(other.isSetExperimentInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentInputs, other.experimentInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computationalResourceScheduling, other.computationalResourceScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceInputDataHandling()).compareTo(other.isSetAdvanceInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceInputDataHandling, other.advanceInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceOutputDataHandling()).compareTo(other.isSetAdvanceOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceOutputDataHandling, other.advanceOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQosParams()).compareTo(other.isSetQosParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQosParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qosParams, other.qosParams);
+ 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("ConfigurationData(");
+ boolean first = true;
+
+ if (isSetBasicMetadata()) {
+ sb.append("basicMetadata:");
+ if (this.basicMetadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.basicMetadata);
+ }
+ first = false;
+ }
+ if (isSetApplicationId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationId:");
+ if (this.applicationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationId);
+ }
+ first = false;
+ }
+ if (isSetApplicationVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationVersion:");
+ if (this.applicationVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationVersion);
+ }
+ first = false;
+ }
+ if (isSetWorkflowTemplateId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateId:");
+ if (this.workflowTemplateId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateId);
+ }
+ first = false;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("worklfowTemplateVersion:");
+ if (this.worklfowTemplateVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.worklfowTemplateVersion);
+ }
+ first = false;
+ }
+ if (isSetExperimentInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentInputs:");
+ if (this.experimentInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentInputs);
+ }
+ first = false;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("computationalResourceScheduling:");
+ if (this.computationalResourceScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computationalResourceScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceInputDataHandling:");
+ if (this.advanceInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceOutputDataHandling:");
+ if (this.advanceOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetQosParams()) {
+ if (!first) sb.append(", ");
+ sb.append("qosParams:");
+ if (this.qosParams == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.qosParams);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (basicMetadata != null) {
+ basicMetadata.validate();
+ }
+ if (computationalResourceScheduling != null) {
+ computationalResourceScheduling.validate();
+ }
+ if (advanceInputDataHandling != null) {
+ advanceInputDataHandling.validate();
+ }
+ if (advanceOutputDataHandling != null) {
+ advanceOutputDataHandling.validate();
+ }
+ if (qosParams != null) {
+ qosParams.validate();
+ }
+ }
+
+ 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 ConfigurationDataStandardSchemeFactory implements SchemeFactory {
+ public ConfigurationDataStandardScheme getScheme() {
+ return new ConfigurationDataStandardScheme();
+ }
+ }
+
+ private static class ConfigurationDataStandardScheme extends StandardScheme<ConfigurationData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ConfigurationData 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: // BASIC_METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // APPLICATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // APPLICATION_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // EXPERIMENT_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.experimentInputs = new HashMap<String,String>(2*_map0.size);
+ for (int _i1 = 0; _i1 < _map0.size; ++_i1)
+ {
+ String _key2;
+ String _val3;
+ _key2 = iprot.readString();
+ _val3 = iprot.readString();
+ struct.experimentInputs.put(_key2, _val3);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setExperimentInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // QOS_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(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, ConfigurationData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.basicMetadata != null) {
+ if (struct.isSetBasicMetadata()) {
+ oprot.writeFieldBegin(BASIC_METADATA_FIELD_DESC);
+ struct.basicMetadata.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationId != null) {
+ if (struct.isSetApplicationId()) {
+ oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationVersion != null) {
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeFieldBegin(APPLICATION_VERSION_FIELD_DESC);
+ oprot.writeString(struct.applicationVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowTemplateId != null) {
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.worklfowTemplateVersion != null) {
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeFieldBegin(WORKLFOW_TEMPLATE_VERSION_FIELD_DESC);
+ oprot.writeString(struct.worklfowTemplateVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentInputs != null) {
+ if (struct.isSetExperimentInputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_INPUTS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.experimentInputs.size()));
+ for (Map.Entry<String, String> _iter4 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.computationalResourceScheduling != null) {
+ if (struct.isSetComputationalResourceScheduling()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC);
+ struct.computationalResourceScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceInputDataHandling != null) {
+ if (struct.isSetAdvanceInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceOutputDataHandling != null) {
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.qosParams != null) {
+ if (struct.isSetQosParams()) {
+ oprot.writeFieldBegin(QOS_PARAMS_FIELD_DESC);
+ struct.qosParams.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ConfigurationDataTupleSchemeFactory implements SchemeFactory {
+ public ConfigurationDataTupleScheme getScheme() {
+ return new ConfigurationDataTupleScheme();
+ }
+ }
+
+ private static class ConfigurationDataTupleScheme extends TupleScheme<ConfigurationData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetBasicMetadata()) {
+ optionals.set(0);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ optionals.set(4);
+ }
+ if (struct.isSetExperimentInputs()) {
+ optionals.set(5);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ optionals.set(6);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ optionals.set(7);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ optionals.set(8);
+ }
+ if (struct.isSetQosParams()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetBasicMetadata()) {
+ struct.basicMetadata.write(oprot);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeString(struct.workflowTemplateId);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeString(struct.worklfowTemplateVersion);
+ }
+ if (struct.isSetExperimentInputs()) {
+ {
+ oprot.writeI32(struct.experimentInputs.size());
+ for (Map.Entry<String, String> _iter5 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ struct.computationalResourceScheduling.write(oprot);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ struct.advanceInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ struct.advanceOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetQosParams()) {
+ struct.qosParams.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.experimentInputs = new HashMap<String,String>(2*_map6.size);
+ for (int _i7 = 0; _i7 < _map6.size; ++_i7)
+ {
+ String _key8;
+ String _val9;
+ _key8 = iprot.readString();
+ _val9 = iprot.readString();
+ struct.experimentInputs.put(_key8, _val9);
+ }
+ }
+ struct.setExperimentInputsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
new file mode 100644
index 0000000..12eceba
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
@@ -0,0 +1,607 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+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;
+
+/**
+ * A structure holding Quality of Service Parameters.
+ *
+ */
+@SuppressWarnings("all") public class QualityOfServiceParams implements org.apache.thrift.TBase<QualityOfServiceParams, QualityOfServiceParams._Fields>, java.io.Serializable, Cloneable, Comparable<QualityOfServiceParams> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QualityOfServiceParams");
+
+ private static final org.apache.thrift.protocol.TField START_EXECUTION_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("startExecutionAt", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXECUTE_BEFORE_FIELD_DESC = new org.apache.thrift.protocol.TField("executeBefore", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NUMBEROF_RETRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("numberofRetries", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new QualityOfServiceParamsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new QualityOfServiceParamsTupleSchemeFactory());
+ }
+
+ public String startExecutionAt; // optional
+ public String executeBefore; // optional
+ public int numberofRetries; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ START_EXECUTION_AT((short)1, "startExecutionAt"),
+ EXECUTE_BEFORE((short)2, "executeBefore"),
+ NUMBEROF_RETRIES((short)3, "numberofRetries");
+
+ 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: // START_EXECUTION_AT
+ return START_EXECUTION_AT;
+ case 2: // EXECUTE_BEFORE
+ return EXECUTE_BEFORE;
+ case 3: // NUMBEROF_RETRIES
+ return NUMBEROF_RETRIES;
+ 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 __NUMBEROFRETRIES_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.START_EXECUTION_AT,_Fields.EXECUTE_BEFORE,_Fields.NUMBEROF_RETRIES};
+ 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.START_EXECUTION_AT, new org.apache.thrift.meta_data.FieldMetaData("startExecutionAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXECUTE_BEFORE, new org.apache.thrift.meta_data.FieldMetaData("executeBefore", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NUMBEROF_RETRIES, new org.apache.thrift.meta_data.FieldMetaData("numberofRetries", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QualityOfServiceParams.class, metaDataMap);
+ }
+
+ public QualityOfServiceParams() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public QualityOfServiceParams(QualityOfServiceParams other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetStartExecutionAt()) {
+ this.startExecutionAt = other.startExecutionAt;
+ }
+ if (other.isSetExecuteBefore()) {
+ this.executeBefore = other.executeBefore;
+ }
+ this.numberofRetries = other.numberofRetries;
+ }
+
+ public QualityOfServiceParams deepCopy() {
+ return new QualityOfServiceParams(this);
+ }
+
+ @Override
+ public void clear() {
+ this.startExecutionAt = null;
+ this.executeBefore = null;
+ setNumberofRetriesIsSet(false);
+ this.numberofRetries = 0;
+ }
+
+ public String getStartExecutionAt() {
+ return this.startExecutionAt;
+ }
+
+ public QualityOfServiceParams setStartExecutionAt(String startExecutionAt) {
+ this.startExecutionAt = startExecutionAt;
+ return this;
+ }
+
+ public void unsetStartExecutionAt() {
+ this.startExecutionAt = null;
+ }
+
+ /** Returns true if field startExecutionAt is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartExecutionAt() {
+ return this.startExecutionAt != null;
+ }
+
+ public void setStartExecutionAtIsSet(boolean value) {
+ if (!value) {
+ this.startExecutionAt = null;
+ }
+ }
+
+ public String getExecuteBefore() {
+ return this.executeBefore;
+ }
+
+ public QualityOfServiceParams setExecuteBefore(String executeBefore) {
+ this.executeBefore = executeBefore;
+ return this;
+ }
+
+ public void unsetExecuteBefore() {
+ this.executeBefore = null;
+ }
+
+ /** Returns true if field executeBefore is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecuteBefore() {
+ return this.executeBefore != null;
+ }
+
+ public void setExecuteBeforeIsSet(boolean value) {
+ if (!value) {
+ this.executeBefore = null;
+ }
+ }
+
+ public int getNumberofRetries() {
+ return this.numberofRetries;
+ }
+
+ public QualityOfServiceParams setNumberofRetries(int numberofRetries) {
+ this.numberofRetries = numberofRetries;
+ setNumberofRetriesIsSet(true);
+ return this;
+ }
+
+ public void unsetNumberofRetries() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ /** Returns true if field numberofRetries is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumberofRetries() {
+ return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ public void setNumberofRetriesIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ if (value == null) {
+ unsetStartExecutionAt();
+ } else {
+ setStartExecutionAt((String)value);
+ }
+ break;
+
+ case EXECUTE_BEFORE:
+ if (value == null) {
+ unsetExecuteBefore();
+ } else {
+ setExecuteBefore((String)value);
+ }
+ break;
+
+ case NUMBEROF_RETRIES:
+ if (value == null) {
+ unsetNumberofRetries();
+ } else {
+ setNumberofRetries((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ return getStartExecutionAt();
+
+ case EXECUTE_BEFORE:
+ return getExecuteBefore();
+
+ case NUMBEROF_RETRIES:
+ return Integer.valueOf(getNumberofRetries());
+
+ }
+ 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 START_EXECUTION_AT:
+ return isSetStartExecutionAt();
+ case EXECUTE_BEFORE:
+ return isSetExecuteBefore();
+ case NUMBEROF_RETRIES:
+ return isSetNumberofRetries();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof QualityOfServiceParams)
+ return this.equals((QualityOfServiceParams)that);
+ return false;
+ }
+
+ public boolean equals(QualityOfServiceParams that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_startExecutionAt = true && this.isSetStartExecutionAt();
+ boolean that_present_startExecutionAt = true && that.isSetStartExecutionAt();
+ if (this_present_startExecutionAt || that_present_startExecutionAt) {
+ if (!(this_present_startExecutionAt && that_present_startExecutionAt))
+ return false;
+ if (!this.startExecutionAt.equals(that.startExecutionAt))
+ return false;
+ }
+
+ boolean this_present_executeBefore = true && this.isSetExecuteBefore();
+ boolean that_present_executeBefore = true && that.isSetExecuteBefore();
+ if (this_present_executeBefore || that_present_executeBefore) {
+ if (!(this_present_executeBefore && that_present_executeBefore))
+ return false;
+ if (!this.executeBefore.equals(that.executeBefore))
+ return false;
+ }
+
+ boolean this_present_numberofRetries = true && this.isSetNumberofRetries();
+ boolean that_present_numberofRetries = true && that.isSetNumberofRetries();
+ if (this_present_numberofRetries || that_present_numberofRetries) {
+ if (!(this_present_numberofRetries && that_present_numberofRetries))
+ return false;
+ if (this.numberofRetries != that.numberofRetries)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(QualityOfServiceParams other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStartExecutionAt()).compareTo(other.isSetStartExecutionAt());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartExecutionAt()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startExecutionAt, other.startExecutionAt);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExecuteBefore()).compareTo(other.isSetExecuteBefore());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecuteBefore()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executeBefore, other.executeBefore);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNumberofRetries()).compareTo(other.isSetNumberofRetries());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumberofRetries()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberofRetries, other.numberofRetries);
+ 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("QualityOfServiceParams(");
+ boolean first = true;
+
+ if (isSetStartExecutionAt()) {
+ sb.append("startExecutionAt:");
+ if (this.startExecutionAt == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.startExecutionAt);
+ }
+ first = false;
+ }
+ if (isSetExecuteBefore()) {
+ if (!first) sb.append(", ");
+ sb.append("executeBefore:");
+ if (this.executeBefore == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executeBefore);
+ }
+ first = false;
+ }
+ if (isSetNumberofRetries()) {
+ if (!first) sb.append(", ");
+ sb.append("numberofRetries:");
+ sb.append(this.numberofRetries);
+ 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 QualityOfServiceParamsStandardSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsStandardScheme getScheme() {
+ return new QualityOfServiceParamsStandardScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsStandardScheme extends StandardScheme<QualityOfServiceParams> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, QualityOfServiceParams 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: // START_EXECUTION_AT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXECUTE_BEFORE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NUMBEROF_RETRIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(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, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.startExecutionAt != null) {
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeFieldBegin(START_EXECUTION_AT_FIELD_DESC);
+ oprot.writeString(struct.startExecutionAt);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.executeBefore != null) {
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeFieldBegin(EXECUTE_BEFORE_FIELD_DESC);
+ oprot.writeString(struct.executeBefore);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeFieldBegin(NUMBEROF_RETRIES_FIELD_DESC);
+ oprot.writeI32(struct.numberofRetries);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class QualityOfServiceParamsTupleSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsTupleScheme getScheme() {
+ return new QualityOfServiceParamsTupleScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsTupleScheme extends TupleScheme<QualityOfServiceParams> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStartExecutionAt()) {
+ optionals.set(0);
+ }
+ if (struct.isSetExecuteBefore()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNumberofRetries()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeString(struct.startExecutionAt);
+ }
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeString(struct.executeBefore);
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeI32(struct.numberofRetries);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(true);
+ }
+ }
+ }
+
+}
+