You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2013/11/13 19:14:51 UTC
svn commit: r1541646 [5/6] - in /airavata/trunk: ./ modules/thrift/
modules/thrift/interpreter-service-client/
modules/thrift/interpreter-service-client/src/
modules/thrift/interpreter-service-client/src/main/
modules/thrift/interpreter-service-client/...
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,686 @@
+/**
+ * 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.experiment.execution;
+
+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 OutputDataSettings implements org.apache.thrift.TBase<OutputDataSettings, OutputDataSettings._Fields>, java.io.Serializable, Cloneable, Comparable<OutputDataSettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputDataSettings");
+
+ private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ 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_REG_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegURL", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField ISDATA_PERSISTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isdataPersisted", 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 OutputDataSettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new OutputDataSettingsTupleSchemeFactory());
+ }
+
+ public String nodeID; // required
+ public String outputdataDir; // required
+ public String dataRegURL; // required
+ public boolean isdataPersisted; // 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 {
+ NODE_ID((short)1, "nodeID"),
+ OUTPUTDATA_DIR((short)2, "outputdataDir"),
+ DATA_REG_URL((short)3, "dataRegURL"),
+ ISDATA_PERSISTED((short)4, "isdataPersisted");
+
+ 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: // NODE_ID
+ return NODE_ID;
+ case 2: // OUTPUTDATA_DIR
+ return OUTPUTDATA_DIR;
+ case 3: // DATA_REG_URL
+ return DATA_REG_URL;
+ case 4: // ISDATA_PERSISTED
+ return ISDATA_PERSISTED;
+ 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 __ISDATAPERSISTED_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeID", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OUTPUTDATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputdataDir", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DATA_REG_URL, new org.apache.thrift.meta_data.FieldMetaData("dataRegURL", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ISDATA_PERSISTED, new org.apache.thrift.meta_data.FieldMetaData("isdataPersisted", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputDataSettings.class, metaDataMap);
+ }
+
+ public OutputDataSettings() {
+ }
+
+ public OutputDataSettings(
+ String nodeID,
+ String outputdataDir,
+ String dataRegURL,
+ boolean isdataPersisted)
+ {
+ this();
+ this.nodeID = nodeID;
+ this.outputdataDir = outputdataDir;
+ this.dataRegURL = dataRegURL;
+ this.isdataPersisted = isdataPersisted;
+ setIsdataPersistedIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public OutputDataSettings(OutputDataSettings other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetNodeID()) {
+ this.nodeID = other.nodeID;
+ }
+ if (other.isSetOutputdataDir()) {
+ this.outputdataDir = other.outputdataDir;
+ }
+ if (other.isSetDataRegURL()) {
+ this.dataRegURL = other.dataRegURL;
+ }
+ this.isdataPersisted = other.isdataPersisted;
+ }
+
+ public OutputDataSettings deepCopy() {
+ return new OutputDataSettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.nodeID = null;
+ this.outputdataDir = null;
+ this.dataRegURL = null;
+ setIsdataPersistedIsSet(false);
+ this.isdataPersisted = false;
+ }
+
+ public String getNodeID() {
+ return this.nodeID;
+ }
+
+ public OutputDataSettings setNodeID(String nodeID) {
+ this.nodeID = nodeID;
+ return this;
+ }
+
+ public void unsetNodeID() {
+ this.nodeID = null;
+ }
+
+ /** Returns true if field nodeID is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeID() {
+ return this.nodeID != null;
+ }
+
+ public void setNodeIDIsSet(boolean value) {
+ if (!value) {
+ this.nodeID = null;
+ }
+ }
+
+ public String getOutputdataDir() {
+ return this.outputdataDir;
+ }
+
+ public OutputDataSettings 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 getDataRegURL() {
+ return this.dataRegURL;
+ }
+
+ public OutputDataSettings setDataRegURL(String dataRegURL) {
+ this.dataRegURL = dataRegURL;
+ return this;
+ }
+
+ public void unsetDataRegURL() {
+ this.dataRegURL = null;
+ }
+
+ /** Returns true if field dataRegURL is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataRegURL() {
+ return this.dataRegURL != null;
+ }
+
+ public void setDataRegURLIsSet(boolean value) {
+ if (!value) {
+ this.dataRegURL = null;
+ }
+ }
+
+ public boolean isIsdataPersisted() {
+ return this.isdataPersisted;
+ }
+
+ public OutputDataSettings setIsdataPersisted(boolean isdataPersisted) {
+ this.isdataPersisted = isdataPersisted;
+ setIsdataPersistedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsdataPersisted() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID);
+ }
+
+ /** Returns true if field isdataPersisted is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsdataPersisted() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID);
+ }
+
+ public void setIsdataPersistedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NODE_ID:
+ if (value == null) {
+ unsetNodeID();
+ } else {
+ setNodeID((String)value);
+ }
+ break;
+
+ case OUTPUTDATA_DIR:
+ if (value == null) {
+ unsetOutputdataDir();
+ } else {
+ setOutputdataDir((String)value);
+ }
+ break;
+
+ case DATA_REG_URL:
+ if (value == null) {
+ unsetDataRegURL();
+ } else {
+ setDataRegURL((String)value);
+ }
+ break;
+
+ case ISDATA_PERSISTED:
+ if (value == null) {
+ unsetIsdataPersisted();
+ } else {
+ setIsdataPersisted((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NODE_ID:
+ return getNodeID();
+
+ case OUTPUTDATA_DIR:
+ return getOutputdataDir();
+
+ case DATA_REG_URL:
+ return getDataRegURL();
+
+ case ISDATA_PERSISTED:
+ return Boolean.valueOf(isIsdataPersisted());
+
+ }
+ 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 NODE_ID:
+ return isSetNodeID();
+ case OUTPUTDATA_DIR:
+ return isSetOutputdataDir();
+ case DATA_REG_URL:
+ return isSetDataRegURL();
+ case ISDATA_PERSISTED:
+ return isSetIsdataPersisted();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof OutputDataSettings)
+ return this.equals((OutputDataSettings)that);
+ return false;
+ }
+
+ public boolean equals(OutputDataSettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_nodeID = true && this.isSetNodeID();
+ boolean that_present_nodeID = true && that.isSetNodeID();
+ if (this_present_nodeID || that_present_nodeID) {
+ if (!(this_present_nodeID && that_present_nodeID))
+ return false;
+ if (!this.nodeID.equals(that.nodeID))
+ 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_dataRegURL = true && this.isSetDataRegURL();
+ boolean that_present_dataRegURL = true && that.isSetDataRegURL();
+ if (this_present_dataRegURL || that_present_dataRegURL) {
+ if (!(this_present_dataRegURL && that_present_dataRegURL))
+ return false;
+ if (!this.dataRegURL.equals(that.dataRegURL))
+ return false;
+ }
+
+ boolean this_present_isdataPersisted = true;
+ boolean that_present_isdataPersisted = true;
+ if (this_present_isdataPersisted || that_present_isdataPersisted) {
+ if (!(this_present_isdataPersisted && that_present_isdataPersisted))
+ return false;
+ if (this.isdataPersisted != that.isdataPersisted)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(OutputDataSettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNodeID()).compareTo(other.isSetNodeID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeID, other.nodeID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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(isSetDataRegURL()).compareTo(other.isSetDataRegURL());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataRegURL()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataRegURL, other.dataRegURL);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsdataPersisted()).compareTo(other.isSetIsdataPersisted());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsdataPersisted()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isdataPersisted, other.isdataPersisted);
+ 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("OutputDataSettings(");
+ boolean first = true;
+
+ sb.append("nodeID:");
+ if (this.nodeID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("outputdataDir:");
+ if (this.outputdataDir == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.outputdataDir);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dataRegURL:");
+ if (this.dataRegURL == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataRegURL);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isdataPersisted:");
+ sb.append(this.isdataPersisted);
+ 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 OutputDataSettingsStandardSchemeFactory implements SchemeFactory {
+ public OutputDataSettingsStandardScheme getScheme() {
+ return new OutputDataSettingsStandardScheme();
+ }
+ }
+
+ private static class OutputDataSettingsStandardScheme extends StandardScheme<OutputDataSettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, OutputDataSettings 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: // NODE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeID = iprot.readString();
+ struct.setNodeIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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_REG_URL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataRegURL = iprot.readString();
+ struct.setDataRegURLIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ISDATA_PERSISTED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isdataPersisted = iprot.readBool();
+ struct.setIsdataPersistedIsSet(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, OutputDataSettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.nodeID != null) {
+ oprot.writeFieldBegin(NODE_ID_FIELD_DESC);
+ oprot.writeString(struct.nodeID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.outputdataDir != null) {
+ oprot.writeFieldBegin(OUTPUTDATA_DIR_FIELD_DESC);
+ oprot.writeString(struct.outputdataDir);
+ oprot.writeFieldEnd();
+ }
+ if (struct.dataRegURL != null) {
+ oprot.writeFieldBegin(DATA_REG_URL_FIELD_DESC);
+ oprot.writeString(struct.dataRegURL);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(ISDATA_PERSISTED_FIELD_DESC);
+ oprot.writeBool(struct.isdataPersisted);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class OutputDataSettingsTupleSchemeFactory implements SchemeFactory {
+ public OutputDataSettingsTupleScheme getScheme() {
+ return new OutputDataSettingsTupleScheme();
+ }
+ }
+
+ private static class OutputDataSettingsTupleScheme extends TupleScheme<OutputDataSettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, OutputDataSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNodeID()) {
+ optionals.set(0);
+ }
+ if (struct.isSetOutputdataDir()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDataRegURL()) {
+ optionals.set(2);
+ }
+ if (struct.isSetIsdataPersisted()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetNodeID()) {
+ oprot.writeString(struct.nodeID);
+ }
+ if (struct.isSetOutputdataDir()) {
+ oprot.writeString(struct.outputdataDir);
+ }
+ if (struct.isSetDataRegURL()) {
+ oprot.writeString(struct.dataRegURL);
+ }
+ if (struct.isSetIsdataPersisted()) {
+ oprot.writeBool(struct.isdataPersisted);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, OutputDataSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.nodeID = iprot.readString();
+ struct.setNodeIDIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.outputdataDir = iprot.readString();
+ struct.setOutputdataDirIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.dataRegURL = iprot.readString();
+ struct.setDataRegURLIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.isdataPersisted = iprot.readBool();
+ struct.setIsdataPersistedIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,488 @@
+/**
+ * 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.experiment.execution;
+
+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 SSHAuthenticationSettings implements org.apache.thrift.TBase<SSHAuthenticationSettings, SSHAuthenticationSettings._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAuthenticationSettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAuthenticationSettings");
+
+ private static final org.apache.thrift.protocol.TField ACCESS_KEY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("accessKeyID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECRET_ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("secretAccessKey", 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 SSHAuthenticationSettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SSHAuthenticationSettingsTupleSchemeFactory());
+ }
+
+ public String accessKeyID; // required
+ public String secretAccessKey; // 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 {
+ ACCESS_KEY_ID((short)1, "accessKeyID"),
+ SECRET_ACCESS_KEY((short)2, "secretAccessKey");
+
+ 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: // ACCESS_KEY_ID
+ return ACCESS_KEY_ID;
+ case 2: // SECRET_ACCESS_KEY
+ return SECRET_ACCESS_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
+ 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.ACCESS_KEY_ID, new org.apache.thrift.meta_data.FieldMetaData("accessKeyID", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SECRET_ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("secretAccessKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAuthenticationSettings.class, metaDataMap);
+ }
+
+ public SSHAuthenticationSettings() {
+ }
+
+ public SSHAuthenticationSettings(
+ String accessKeyID,
+ String secretAccessKey)
+ {
+ this();
+ this.accessKeyID = accessKeyID;
+ this.secretAccessKey = secretAccessKey;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public SSHAuthenticationSettings(SSHAuthenticationSettings other) {
+ if (other.isSetAccessKeyID()) {
+ this.accessKeyID = other.accessKeyID;
+ }
+ if (other.isSetSecretAccessKey()) {
+ this.secretAccessKey = other.secretAccessKey;
+ }
+ }
+
+ public SSHAuthenticationSettings deepCopy() {
+ return new SSHAuthenticationSettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.accessKeyID = null;
+ this.secretAccessKey = null;
+ }
+
+ public String getAccessKeyID() {
+ return this.accessKeyID;
+ }
+
+ public SSHAuthenticationSettings setAccessKeyID(String accessKeyID) {
+ this.accessKeyID = accessKeyID;
+ return this;
+ }
+
+ public void unsetAccessKeyID() {
+ this.accessKeyID = null;
+ }
+
+ /** Returns true if field accessKeyID is set (has been assigned a value) and false otherwise */
+ public boolean isSetAccessKeyID() {
+ return this.accessKeyID != null;
+ }
+
+ public void setAccessKeyIDIsSet(boolean value) {
+ if (!value) {
+ this.accessKeyID = null;
+ }
+ }
+
+ public String getSecretAccessKey() {
+ return this.secretAccessKey;
+ }
+
+ public SSHAuthenticationSettings setSecretAccessKey(String secretAccessKey) {
+ this.secretAccessKey = secretAccessKey;
+ return this;
+ }
+
+ public void unsetSecretAccessKey() {
+ this.secretAccessKey = null;
+ }
+
+ /** Returns true if field secretAccessKey is set (has been assigned a value) and false otherwise */
+ public boolean isSetSecretAccessKey() {
+ return this.secretAccessKey != null;
+ }
+
+ public void setSecretAccessKeyIsSet(boolean value) {
+ if (!value) {
+ this.secretAccessKey = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ACCESS_KEY_ID:
+ if (value == null) {
+ unsetAccessKeyID();
+ } else {
+ setAccessKeyID((String)value);
+ }
+ break;
+
+ case SECRET_ACCESS_KEY:
+ if (value == null) {
+ unsetSecretAccessKey();
+ } else {
+ setSecretAccessKey((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ACCESS_KEY_ID:
+ return getAccessKeyID();
+
+ case SECRET_ACCESS_KEY:
+ return getSecretAccessKey();
+
+ }
+ 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 ACCESS_KEY_ID:
+ return isSetAccessKeyID();
+ case SECRET_ACCESS_KEY:
+ return isSetSecretAccessKey();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof SSHAuthenticationSettings)
+ return this.equals((SSHAuthenticationSettings)that);
+ return false;
+ }
+
+ public boolean equals(SSHAuthenticationSettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_accessKeyID = true && this.isSetAccessKeyID();
+ boolean that_present_accessKeyID = true && that.isSetAccessKeyID();
+ if (this_present_accessKeyID || that_present_accessKeyID) {
+ if (!(this_present_accessKeyID && that_present_accessKeyID))
+ return false;
+ if (!this.accessKeyID.equals(that.accessKeyID))
+ return false;
+ }
+
+ boolean this_present_secretAccessKey = true && this.isSetSecretAccessKey();
+ boolean that_present_secretAccessKey = true && that.isSetSecretAccessKey();
+ if (this_present_secretAccessKey || that_present_secretAccessKey) {
+ if (!(this_present_secretAccessKey && that_present_secretAccessKey))
+ return false;
+ if (!this.secretAccessKey.equals(that.secretAccessKey))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(SSHAuthenticationSettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAccessKeyID()).compareTo(other.isSetAccessKeyID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAccessKeyID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessKeyID, other.accessKeyID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSecretAccessKey()).compareTo(other.isSetSecretAccessKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSecretAccessKey()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secretAccessKey, other.secretAccessKey);
+ 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("SSHAuthenticationSettings(");
+ boolean first = true;
+
+ sb.append("accessKeyID:");
+ if (this.accessKeyID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.accessKeyID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("secretAccessKey:");
+ if (this.secretAccessKey == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.secretAccessKey);
+ }
+ 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 SSHAuthenticationSettingsStandardSchemeFactory implements SchemeFactory {
+ public SSHAuthenticationSettingsStandardScheme getScheme() {
+ return new SSHAuthenticationSettingsStandardScheme();
+ }
+ }
+
+ private static class SSHAuthenticationSettingsStandardScheme extends StandardScheme<SSHAuthenticationSettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAuthenticationSettings 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: // ACCESS_KEY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.accessKeyID = iprot.readString();
+ struct.setAccessKeyIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECRET_ACCESS_KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.secretAccessKey = iprot.readString();
+ struct.setSecretAccessKeyIsSet(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, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.accessKeyID != null) {
+ oprot.writeFieldBegin(ACCESS_KEY_ID_FIELD_DESC);
+ oprot.writeString(struct.accessKeyID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.secretAccessKey != null) {
+ oprot.writeFieldBegin(SECRET_ACCESS_KEY_FIELD_DESC);
+ oprot.writeString(struct.secretAccessKey);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SSHAuthenticationSettingsTupleSchemeFactory implements SchemeFactory {
+ public SSHAuthenticationSettingsTupleScheme getScheme() {
+ return new SSHAuthenticationSettingsTupleScheme();
+ }
+ }
+
+ private static class SSHAuthenticationSettingsTupleScheme extends TupleScheme<SSHAuthenticationSettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAccessKeyID()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSecretAccessKey()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetAccessKeyID()) {
+ oprot.writeString(struct.accessKeyID);
+ }
+ if (struct.isSetSecretAccessKey()) {
+ oprot.writeString(struct.secretAccessKey);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.accessKeyID = iprot.readString();
+ struct.setAccessKeyIDIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.secretAccessKey = iprot.readString();
+ struct.setSecretAccessKeyIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,708 @@
+/**
+ * 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.experiment.execution;
+
+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 SecuritySettings implements org.apache.thrift.TBase<SecuritySettings, SecuritySettings._Fields>, java.io.Serializable, Cloneable, Comparable<SecuritySettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SecuritySettings");
+
+ private static final org.apache.thrift.protocol.TField AMAZON_WSSETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonWSSettings", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField CREDENTIAL_STORE_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentialStoreSettings", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField MYPROXY_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxySettings", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField SSH_AUTH_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAuthSettings", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SecuritySettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SecuritySettingsTupleSchemeFactory());
+ }
+
+ public AmazonWebServicesSettings amazonWSSettings; // required
+ public CredentialStoreSecuritySettings credentialStoreSettings; // required
+ public MyProxyRepositorySettings myproxySettings; // required
+ public SSHAuthenticationSettings sshAuthSettings; // 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 {
+ AMAZON_WSSETTINGS((short)1, "amazonWSSettings"),
+ CREDENTIAL_STORE_SETTINGS((short)2, "credentialStoreSettings"),
+ MYPROXY_SETTINGS((short)3, "myproxySettings"),
+ SSH_AUTH_SETTINGS((short)4, "sshAuthSettings");
+
+ 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: // AMAZON_WSSETTINGS
+ return AMAZON_WSSETTINGS;
+ case 2: // CREDENTIAL_STORE_SETTINGS
+ return CREDENTIAL_STORE_SETTINGS;
+ case 3: // MYPROXY_SETTINGS
+ return MYPROXY_SETTINGS;
+ case 4: // SSH_AUTH_SETTINGS
+ return SSH_AUTH_SETTINGS;
+ 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.AMAZON_WSSETTINGS, new org.apache.thrift.meta_data.FieldMetaData("amazonWSSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonWebServicesSettings.class)));
+ tmpMap.put(_Fields.CREDENTIAL_STORE_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("credentialStoreSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CredentialStoreSecuritySettings.class)));
+ tmpMap.put(_Fields.MYPROXY_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("myproxySettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MyProxyRepositorySettings.class)));
+ tmpMap.put(_Fields.SSH_AUTH_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("sshAuthSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHAuthenticationSettings.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SecuritySettings.class, metaDataMap);
+ }
+
+ public SecuritySettings() {
+ }
+
+ public SecuritySettings(
+ AmazonWebServicesSettings amazonWSSettings,
+ CredentialStoreSecuritySettings credentialStoreSettings,
+ MyProxyRepositorySettings myproxySettings,
+ SSHAuthenticationSettings sshAuthSettings)
+ {
+ this();
+ this.amazonWSSettings = amazonWSSettings;
+ this.credentialStoreSettings = credentialStoreSettings;
+ this.myproxySettings = myproxySettings;
+ this.sshAuthSettings = sshAuthSettings;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public SecuritySettings(SecuritySettings other) {
+ if (other.isSetAmazonWSSettings()) {
+ this.amazonWSSettings = new AmazonWebServicesSettings(other.amazonWSSettings);
+ }
+ if (other.isSetCredentialStoreSettings()) {
+ this.credentialStoreSettings = new CredentialStoreSecuritySettings(other.credentialStoreSettings);
+ }
+ if (other.isSetMyproxySettings()) {
+ this.myproxySettings = new MyProxyRepositorySettings(other.myproxySettings);
+ }
+ if (other.isSetSshAuthSettings()) {
+ this.sshAuthSettings = new SSHAuthenticationSettings(other.sshAuthSettings);
+ }
+ }
+
+ public SecuritySettings deepCopy() {
+ return new SecuritySettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.amazonWSSettings = null;
+ this.credentialStoreSettings = null;
+ this.myproxySettings = null;
+ this.sshAuthSettings = null;
+ }
+
+ public AmazonWebServicesSettings getAmazonWSSettings() {
+ return this.amazonWSSettings;
+ }
+
+ public SecuritySettings setAmazonWSSettings(AmazonWebServicesSettings amazonWSSettings) {
+ this.amazonWSSettings = amazonWSSettings;
+ return this;
+ }
+
+ public void unsetAmazonWSSettings() {
+ this.amazonWSSettings = null;
+ }
+
+ /** Returns true if field amazonWSSettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetAmazonWSSettings() {
+ return this.amazonWSSettings != null;
+ }
+
+ public void setAmazonWSSettingsIsSet(boolean value) {
+ if (!value) {
+ this.amazonWSSettings = null;
+ }
+ }
+
+ public CredentialStoreSecuritySettings getCredentialStoreSettings() {
+ return this.credentialStoreSettings;
+ }
+
+ public SecuritySettings setCredentialStoreSettings(CredentialStoreSecuritySettings credentialStoreSettings) {
+ this.credentialStoreSettings = credentialStoreSettings;
+ return this;
+ }
+
+ public void unsetCredentialStoreSettings() {
+ this.credentialStoreSettings = null;
+ }
+
+ /** Returns true if field credentialStoreSettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetCredentialStoreSettings() {
+ return this.credentialStoreSettings != null;
+ }
+
+ public void setCredentialStoreSettingsIsSet(boolean value) {
+ if (!value) {
+ this.credentialStoreSettings = null;
+ }
+ }
+
+ public MyProxyRepositorySettings getMyproxySettings() {
+ return this.myproxySettings;
+ }
+
+ public SecuritySettings setMyproxySettings(MyProxyRepositorySettings myproxySettings) {
+ this.myproxySettings = myproxySettings;
+ return this;
+ }
+
+ public void unsetMyproxySettings() {
+ this.myproxySettings = null;
+ }
+
+ /** Returns true if field myproxySettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetMyproxySettings() {
+ return this.myproxySettings != null;
+ }
+
+ public void setMyproxySettingsIsSet(boolean value) {
+ if (!value) {
+ this.myproxySettings = null;
+ }
+ }
+
+ public SSHAuthenticationSettings getSshAuthSettings() {
+ return this.sshAuthSettings;
+ }
+
+ public SecuritySettings setSshAuthSettings(SSHAuthenticationSettings sshAuthSettings) {
+ this.sshAuthSettings = sshAuthSettings;
+ return this;
+ }
+
+ public void unsetSshAuthSettings() {
+ this.sshAuthSettings = null;
+ }
+
+ /** Returns true if field sshAuthSettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetSshAuthSettings() {
+ return this.sshAuthSettings != null;
+ }
+
+ public void setSshAuthSettingsIsSet(boolean value) {
+ if (!value) {
+ this.sshAuthSettings = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AMAZON_WSSETTINGS:
+ if (value == null) {
+ unsetAmazonWSSettings();
+ } else {
+ setAmazonWSSettings((AmazonWebServicesSettings)value);
+ }
+ break;
+
+ case CREDENTIAL_STORE_SETTINGS:
+ if (value == null) {
+ unsetCredentialStoreSettings();
+ } else {
+ setCredentialStoreSettings((CredentialStoreSecuritySettings)value);
+ }
+ break;
+
+ case MYPROXY_SETTINGS:
+ if (value == null) {
+ unsetMyproxySettings();
+ } else {
+ setMyproxySettings((MyProxyRepositorySettings)value);
+ }
+ break;
+
+ case SSH_AUTH_SETTINGS:
+ if (value == null) {
+ unsetSshAuthSettings();
+ } else {
+ setSshAuthSettings((SSHAuthenticationSettings)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AMAZON_WSSETTINGS:
+ return getAmazonWSSettings();
+
+ case CREDENTIAL_STORE_SETTINGS:
+ return getCredentialStoreSettings();
+
+ case MYPROXY_SETTINGS:
+ return getMyproxySettings();
+
+ case SSH_AUTH_SETTINGS:
+ return getSshAuthSettings();
+
+ }
+ 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 AMAZON_WSSETTINGS:
+ return isSetAmazonWSSettings();
+ case CREDENTIAL_STORE_SETTINGS:
+ return isSetCredentialStoreSettings();
+ case MYPROXY_SETTINGS:
+ return isSetMyproxySettings();
+ case SSH_AUTH_SETTINGS:
+ return isSetSshAuthSettings();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof SecuritySettings)
+ return this.equals((SecuritySettings)that);
+ return false;
+ }
+
+ public boolean equals(SecuritySettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_amazonWSSettings = true && this.isSetAmazonWSSettings();
+ boolean that_present_amazonWSSettings = true && that.isSetAmazonWSSettings();
+ if (this_present_amazonWSSettings || that_present_amazonWSSettings) {
+ if (!(this_present_amazonWSSettings && that_present_amazonWSSettings))
+ return false;
+ if (!this.amazonWSSettings.equals(that.amazonWSSettings))
+ return false;
+ }
+
+ boolean this_present_credentialStoreSettings = true && this.isSetCredentialStoreSettings();
+ boolean that_present_credentialStoreSettings = true && that.isSetCredentialStoreSettings();
+ if (this_present_credentialStoreSettings || that_present_credentialStoreSettings) {
+ if (!(this_present_credentialStoreSettings && that_present_credentialStoreSettings))
+ return false;
+ if (!this.credentialStoreSettings.equals(that.credentialStoreSettings))
+ return false;
+ }
+
+ boolean this_present_myproxySettings = true && this.isSetMyproxySettings();
+ boolean that_present_myproxySettings = true && that.isSetMyproxySettings();
+ if (this_present_myproxySettings || that_present_myproxySettings) {
+ if (!(this_present_myproxySettings && that_present_myproxySettings))
+ return false;
+ if (!this.myproxySettings.equals(that.myproxySettings))
+ return false;
+ }
+
+ boolean this_present_sshAuthSettings = true && this.isSetSshAuthSettings();
+ boolean that_present_sshAuthSettings = true && that.isSetSshAuthSettings();
+ if (this_present_sshAuthSettings || that_present_sshAuthSettings) {
+ if (!(this_present_sshAuthSettings && that_present_sshAuthSettings))
+ return false;
+ if (!this.sshAuthSettings.equals(that.sshAuthSettings))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(SecuritySettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAmazonWSSettings()).compareTo(other.isSetAmazonWSSettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAmazonWSSettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonWSSettings, other.amazonWSSettings);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCredentialStoreSettings()).compareTo(other.isSetCredentialStoreSettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentialStoreSettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentialStoreSettings, other.credentialStoreSettings);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMyproxySettings()).compareTo(other.isSetMyproxySettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMyproxySettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxySettings, other.myproxySettings);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSshAuthSettings()).compareTo(other.isSetSshAuthSettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSshAuthSettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAuthSettings, other.sshAuthSettings);
+ 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("SecuritySettings(");
+ boolean first = true;
+
+ sb.append("amazonWSSettings:");
+ if (this.amazonWSSettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.amazonWSSettings);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("credentialStoreSettings:");
+ if (this.credentialStoreSettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.credentialStoreSettings);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("myproxySettings:");
+ if (this.myproxySettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.myproxySettings);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("sshAuthSettings:");
+ if (this.sshAuthSettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sshAuthSettings);
+ }
+ 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 (amazonWSSettings != null) {
+ amazonWSSettings.validate();
+ }
+ if (credentialStoreSettings != null) {
+ credentialStoreSettings.validate();
+ }
+ if (myproxySettings != null) {
+ myproxySettings.validate();
+ }
+ if (sshAuthSettings != null) {
+ sshAuthSettings.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 SecuritySettingsStandardSchemeFactory implements SchemeFactory {
+ public SecuritySettingsStandardScheme getScheme() {
+ return new SecuritySettingsStandardScheme();
+ }
+ }
+
+ private static class SecuritySettingsStandardScheme extends StandardScheme<SecuritySettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SecuritySettings 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: // AMAZON_WSSETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.amazonWSSettings = new AmazonWebServicesSettings();
+ struct.amazonWSSettings.read(iprot);
+ struct.setAmazonWSSettingsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIAL_STORE_SETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentialStoreSettings = new CredentialStoreSecuritySettings();
+ struct.credentialStoreSettings.read(iprot);
+ struct.setCredentialStoreSettingsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // MYPROXY_SETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.myproxySettings = new MyProxyRepositorySettings();
+ struct.myproxySettings.read(iprot);
+ struct.setMyproxySettingsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // SSH_AUTH_SETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sshAuthSettings = new SSHAuthenticationSettings();
+ struct.sshAuthSettings.read(iprot);
+ struct.setSshAuthSettingsIsSet(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, SecuritySettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.amazonWSSettings != null) {
+ oprot.writeFieldBegin(AMAZON_WSSETTINGS_FIELD_DESC);
+ struct.amazonWSSettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentialStoreSettings != null) {
+ oprot.writeFieldBegin(CREDENTIAL_STORE_SETTINGS_FIELD_DESC);
+ struct.credentialStoreSettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.myproxySettings != null) {
+ oprot.writeFieldBegin(MYPROXY_SETTINGS_FIELD_DESC);
+ struct.myproxySettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.sshAuthSettings != null) {
+ oprot.writeFieldBegin(SSH_AUTH_SETTINGS_FIELD_DESC);
+ struct.sshAuthSettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SecuritySettingsTupleSchemeFactory implements SchemeFactory {
+ public SecuritySettingsTupleScheme getScheme() {
+ return new SecuritySettingsTupleScheme();
+ }
+ }
+
+ private static class SecuritySettingsTupleScheme extends TupleScheme<SecuritySettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SecuritySettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAmazonWSSettings()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCredentialStoreSettings()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMyproxySettings()) {
+ optionals.set(2);
+ }
+ if (struct.isSetSshAuthSettings()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetAmazonWSSettings()) {
+ struct.amazonWSSettings.write(oprot);
+ }
+ if (struct.isSetCredentialStoreSettings()) {
+ struct.credentialStoreSettings.write(oprot);
+ }
+ if (struct.isSetMyproxySettings()) {
+ struct.myproxySettings.write(oprot);
+ }
+ if (struct.isSetSshAuthSettings()) {
+ struct.sshAuthSettings.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SecuritySettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.amazonWSSettings = new AmazonWebServicesSettings();
+ struct.amazonWSSettings.read(iprot);
+ struct.setAmazonWSSettingsIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentialStoreSettings = new CredentialStoreSecuritySettings();
+ struct.credentialStoreSettings.read(iprot);
+ struct.setCredentialStoreSettingsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.myproxySettings = new MyProxyRepositorySettings();
+ struct.myproxySettings.read(iprot);
+ struct.setMyproxySettingsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.sshAuthSettings = new SSHAuthenticationSettings();
+ struct.sshAuthSettings.read(iprot);
+ struct.setSshAuthSettingsIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,442 @@
+/**
+ * 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.experiment.execution;
+
+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 WorkflowOutputDataSettings implements org.apache.thrift.TBase<WorkflowOutputDataSettings, WorkflowOutputDataSettings._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowOutputDataSettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowOutputDataSettings");
+
+ private static final org.apache.thrift.protocol.TField OUTPUT_DATA_SETTINGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("outputDataSettingsList", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowOutputDataSettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowOutputDataSettingsTupleSchemeFactory());
+ }
+
+ public List<OutputDataSettings> outputDataSettingsList; // 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 {
+ OUTPUT_DATA_SETTINGS_LIST((short)1, "outputDataSettingsList");
+
+ 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: // OUTPUT_DATA_SETTINGS_LIST
+ return OUTPUT_DATA_SETTINGS_LIST;
+ 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.OUTPUT_DATA_SETTINGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("outputDataSettingsList", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OutputDataSettings.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowOutputDataSettings.class, metaDataMap);
+ }
+
+ public WorkflowOutputDataSettings() {
+ }
+
+ public WorkflowOutputDataSettings(
+ List<OutputDataSettings> outputDataSettingsList)
+ {
+ this();
+ this.outputDataSettingsList = outputDataSettingsList;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowOutputDataSettings(WorkflowOutputDataSettings other) {
+ if (other.isSetOutputDataSettingsList()) {
+ List<OutputDataSettings> __this__outputDataSettingsList = new ArrayList<OutputDataSettings>(other.outputDataSettingsList.size());
+ for (OutputDataSettings other_element : other.outputDataSettingsList) {
+ __this__outputDataSettingsList.add(new OutputDataSettings(other_element));
+ }
+ this.outputDataSettingsList = __this__outputDataSettingsList;
+ }
+ }
+
+ public WorkflowOutputDataSettings deepCopy() {
+ return new WorkflowOutputDataSettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.outputDataSettingsList = null;
+ }
+
+ public int getOutputDataSettingsListSize() {
+ return (this.outputDataSettingsList == null) ? 0 : this.outputDataSettingsList.size();
+ }
+
+ public java.util.Iterator<OutputDataSettings> getOutputDataSettingsListIterator() {
+ return (this.outputDataSettingsList == null) ? null : this.outputDataSettingsList.iterator();
+ }
+
+ public void addToOutputDataSettingsList(OutputDataSettings elem) {
+ if (this.outputDataSettingsList == null) {
+ this.outputDataSettingsList = new ArrayList<OutputDataSettings>();
+ }
+ this.outputDataSettingsList.add(elem);
+ }
+
+ public List<OutputDataSettings> getOutputDataSettingsList() {
+ return this.outputDataSettingsList;
+ }
+
+ public WorkflowOutputDataSettings setOutputDataSettingsList(List<OutputDataSettings> outputDataSettingsList) {
+ this.outputDataSettingsList = outputDataSettingsList;
+ return this;
+ }
+
+ public void unsetOutputDataSettingsList() {
+ this.outputDataSettingsList = null;
+ }
+
+ /** Returns true if field outputDataSettingsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetOutputDataSettingsList() {
+ return this.outputDataSettingsList != null;
+ }
+
+ public void setOutputDataSettingsListIsSet(boolean value) {
+ if (!value) {
+ this.outputDataSettingsList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OUTPUT_DATA_SETTINGS_LIST:
+ if (value == null) {
+ unsetOutputDataSettingsList();
+ } else {
+ setOutputDataSettingsList((List<OutputDataSettings>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OUTPUT_DATA_SETTINGS_LIST:
+ return getOutputDataSettingsList();
+
+ }
+ 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 OUTPUT_DATA_SETTINGS_LIST:
+ return isSetOutputDataSettingsList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowOutputDataSettings)
+ return this.equals((WorkflowOutputDataSettings)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowOutputDataSettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_outputDataSettingsList = true && this.isSetOutputDataSettingsList();
+ boolean that_present_outputDataSettingsList = true && that.isSetOutputDataSettingsList();
+ if (this_present_outputDataSettingsList || that_present_outputDataSettingsList) {
+ if (!(this_present_outputDataSettingsList && that_present_outputDataSettingsList))
+ return false;
+ if (!this.outputDataSettingsList.equals(that.outputDataSettingsList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(WorkflowOutputDataSettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOutputDataSettingsList()).compareTo(other.isSetOutputDataSettingsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOutputDataSettingsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputDataSettingsList, other.outputDataSettingsList);
+ 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("WorkflowOutputDataSettings(");
+ boolean first = true;
+
+ sb.append("outputDataSettingsList:");
+ if (this.outputDataSettingsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.outputDataSettingsList);
+ }
+ 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 WorkflowOutputDataSettingsStandardSchemeFactory implements SchemeFactory {
+ public WorkflowOutputDataSettingsStandardScheme getScheme() {
+ return new WorkflowOutputDataSettingsStandardScheme();
+ }
+ }
+
+ private static class WorkflowOutputDataSettingsStandardScheme extends StandardScheme<WorkflowOutputDataSettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowOutputDataSettings 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: // OUTPUT_DATA_SETTINGS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
+ struct.outputDataSettingsList = new ArrayList<OutputDataSettings>(_list16.size);
+ for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+ {
+ OutputDataSettings _elem18;
+ _elem18 = new OutputDataSettings();
+ _elem18.read(iprot);
+ struct.outputDataSettingsList.add(_elem18);
+ }
+ iprot.readListEnd();
+ }
+ struct.setOutputDataSettingsListIsSet(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, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.outputDataSettingsList != null) {
+ oprot.writeFieldBegin(OUTPUT_DATA_SETTINGS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.outputDataSettingsList.size()));
+ for (OutputDataSettings _iter19 : struct.outputDataSettingsList)
+ {
+ _iter19.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowOutputDataSettingsTupleSchemeFactory implements SchemeFactory {
+ public WorkflowOutputDataSettingsTupleScheme getScheme() {
+ return new WorkflowOutputDataSettingsTupleScheme();
+ }
+ }
+
+ private static class WorkflowOutputDataSettingsTupleScheme extends TupleScheme<WorkflowOutputDataSettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOutputDataSettingsList()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetOutputDataSettingsList()) {
+ {
+ oprot.writeI32(struct.outputDataSettingsList.size());
+ for (OutputDataSettings _iter20 : struct.outputDataSettingsList)
+ {
+ _iter20.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.outputDataSettingsList = new ArrayList<OutputDataSettings>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ OutputDataSettings _elem23;
+ _elem23 = new OutputDataSettings();
+ _elem23.read(iprot);
+ struct.outputDataSettingsList.add(_elem23);
+ }
+ }
+ struct.setOutputDataSettingsListIsSet(true);
+ }
+ }
+ }
+
+}
+