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/25 22:22:28 UTC
[01/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Repository: airavata
Updated Branches:
refs/heads/master b5d57f8ba -> 204aab12f
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeDetails.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeDetails.java
new file mode 100644
index 0000000..57dd02c
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeDetails.java
@@ -0,0 +1,1337 @@
+ /*
+ * 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.workspace.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 node data.
+ * nodeInstanceId - unique node identifier for each run
+ */
+@SuppressWarnings("all") public class WorkflowNodeDetails implements org.apache.thrift.TBase<WorkflowNodeDetails, WorkflowNodeDetails._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowNodeDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowNodeDetails");
+
+ private static final org.apache.thrift.protocol.TField NODE_INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeInstanceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField NODE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField NODE_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeInputs", org.apache.thrift.protocol.TType.LIST, (short)4);
+ private static final org.apache.thrift.protocol.TField NODE_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeOutputs", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeStatus", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField TASK_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDetailsList", org.apache.thrift.protocol.TType.LIST, (short)7);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)8);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowNodeDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowNodeDetailsTupleSchemeFactory());
+ }
+
+ public String nodeInstanceId; // required
+ public long creationTime; // optional
+ public String nodeName; // required
+ public List<DataObjectType> nodeInputs; // optional
+ public List<DataObjectType> nodeOutputs; // optional
+ public WorkflowNodeStatus workflowNodeStatus; // optional
+ public List<TaskDetails> taskDetailsList; // optional
+ public List<ErrorDetails> errors; // 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 {
+ NODE_INSTANCE_ID((short)1, "nodeInstanceId"),
+ CREATION_TIME((short)2, "creationTime"),
+ NODE_NAME((short)3, "nodeName"),
+ NODE_INPUTS((short)4, "nodeInputs"),
+ NODE_OUTPUTS((short)5, "nodeOutputs"),
+ WORKFLOW_NODE_STATUS((short)6, "workflowNodeStatus"),
+ TASK_DETAILS_LIST((short)7, "taskDetailsList"),
+ ERRORS((short)8, "errors");
+
+ 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_INSTANCE_ID
+ return NODE_INSTANCE_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // NODE_NAME
+ return NODE_NAME;
+ case 4: // NODE_INPUTS
+ return NODE_INPUTS;
+ case 5: // NODE_OUTPUTS
+ return NODE_OUTPUTS;
+ case 6: // WORKFLOW_NODE_STATUS
+ return WORKFLOW_NODE_STATUS;
+ case 7: // TASK_DETAILS_LIST
+ return TASK_DETAILS_LIST;
+ case 8: // ERRORS
+ return ERRORS;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.NODE_INPUTS,_Fields.NODE_OUTPUTS,_Fields.WORKFLOW_NODE_STATUS,_Fields.TASK_DETAILS_LIST,_Fields.ERRORS};
+ 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_INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeInstanceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.NODE_NAME, new org.apache.thrift.meta_data.FieldMetaData("nodeName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NODE_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("nodeInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataObjectType.class))));
+ tmpMap.put(_Fields.NODE_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("nodeOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataObjectType.class))));
+ tmpMap.put(_Fields.WORKFLOW_NODE_STATUS, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowNodeStatus.class)));
+ tmpMap.put(_Fields.TASK_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("taskDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, TaskDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowNodeDetails.class, metaDataMap);
+ }
+
+ public WorkflowNodeDetails() {
+ this.nodeInstanceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.nodeName = "SINGLE_APP_NODE";
+
+ }
+
+ public WorkflowNodeDetails(
+ String nodeInstanceId,
+ String nodeName)
+ {
+ this();
+ this.nodeInstanceId = nodeInstanceId;
+ this.nodeName = nodeName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowNodeDetails(WorkflowNodeDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetNodeInstanceId()) {
+ this.nodeInstanceId = other.nodeInstanceId;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetNodeName()) {
+ this.nodeName = other.nodeName;
+ }
+ if (other.isSetNodeInputs()) {
+ List<DataObjectType> __this__nodeInputs = new ArrayList<DataObjectType>(other.nodeInputs.size());
+ for (DataObjectType other_element : other.nodeInputs) {
+ __this__nodeInputs.add(new DataObjectType(other_element));
+ }
+ this.nodeInputs = __this__nodeInputs;
+ }
+ if (other.isSetNodeOutputs()) {
+ List<DataObjectType> __this__nodeOutputs = new ArrayList<DataObjectType>(other.nodeOutputs.size());
+ for (DataObjectType other_element : other.nodeOutputs) {
+ __this__nodeOutputs.add(new DataObjectType(other_element));
+ }
+ this.nodeOutputs = __this__nodeOutputs;
+ }
+ if (other.isSetWorkflowNodeStatus()) {
+ this.workflowNodeStatus = new WorkflowNodeStatus(other.workflowNodeStatus);
+ }
+ if (other.isSetTaskDetailsList()) {
+ List<TaskDetails> __this__taskDetailsList = new ArrayList<TaskDetails>(other.taskDetailsList.size());
+ for (TaskDetails other_element : other.taskDetailsList) {
+ __this__taskDetailsList.add(new TaskDetails(other_element));
+ }
+ this.taskDetailsList = __this__taskDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public WorkflowNodeDetails deepCopy() {
+ return new WorkflowNodeDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.nodeInstanceId = "DO_NOT_SET_AT_CLIENTS";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.nodeName = "SINGLE_APP_NODE";
+
+ this.nodeInputs = null;
+ this.nodeOutputs = null;
+ this.workflowNodeStatus = null;
+ this.taskDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getNodeInstanceId() {
+ return this.nodeInstanceId;
+ }
+
+ public WorkflowNodeDetails setNodeInstanceId(String nodeInstanceId) {
+ this.nodeInstanceId = nodeInstanceId;
+ return this;
+ }
+
+ public void unsetNodeInstanceId() {
+ this.nodeInstanceId = null;
+ }
+
+ /** Returns true if field nodeInstanceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeInstanceId() {
+ return this.nodeInstanceId != null;
+ }
+
+ public void setNodeInstanceIdIsSet(boolean value) {
+ if (!value) {
+ this.nodeInstanceId = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public WorkflowNodeDetails setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getNodeName() {
+ return this.nodeName;
+ }
+
+ public WorkflowNodeDetails setNodeName(String nodeName) {
+ this.nodeName = nodeName;
+ return this;
+ }
+
+ public void unsetNodeName() {
+ this.nodeName = null;
+ }
+
+ /** Returns true if field nodeName is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeName() {
+ return this.nodeName != null;
+ }
+
+ public void setNodeNameIsSet(boolean value) {
+ if (!value) {
+ this.nodeName = null;
+ }
+ }
+
+ public int getNodeInputsSize() {
+ return (this.nodeInputs == null) ? 0 : this.nodeInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getNodeInputsIterator() {
+ return (this.nodeInputs == null) ? null : this.nodeInputs.iterator();
+ }
+
+ public void addToNodeInputs(DataObjectType elem) {
+ if (this.nodeInputs == null) {
+ this.nodeInputs = new ArrayList<DataObjectType>();
+ }
+ this.nodeInputs.add(elem);
+ }
+
+ public List<DataObjectType> getNodeInputs() {
+ return this.nodeInputs;
+ }
+
+ public WorkflowNodeDetails setNodeInputs(List<DataObjectType> nodeInputs) {
+ this.nodeInputs = nodeInputs;
+ return this;
+ }
+
+ public void unsetNodeInputs() {
+ this.nodeInputs = null;
+ }
+
+ /** Returns true if field nodeInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeInputs() {
+ return this.nodeInputs != null;
+ }
+
+ public void setNodeInputsIsSet(boolean value) {
+ if (!value) {
+ this.nodeInputs = null;
+ }
+ }
+
+ public int getNodeOutputsSize() {
+ return (this.nodeOutputs == null) ? 0 : this.nodeOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getNodeOutputsIterator() {
+ return (this.nodeOutputs == null) ? null : this.nodeOutputs.iterator();
+ }
+
+ public void addToNodeOutputs(DataObjectType elem) {
+ if (this.nodeOutputs == null) {
+ this.nodeOutputs = new ArrayList<DataObjectType>();
+ }
+ this.nodeOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getNodeOutputs() {
+ return this.nodeOutputs;
+ }
+
+ public WorkflowNodeDetails setNodeOutputs(List<DataObjectType> nodeOutputs) {
+ this.nodeOutputs = nodeOutputs;
+ return this;
+ }
+
+ public void unsetNodeOutputs() {
+ this.nodeOutputs = null;
+ }
+
+ /** Returns true if field nodeOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeOutputs() {
+ return this.nodeOutputs != null;
+ }
+
+ public void setNodeOutputsIsSet(boolean value) {
+ if (!value) {
+ this.nodeOutputs = null;
+ }
+ }
+
+ public WorkflowNodeStatus getWorkflowNodeStatus() {
+ return this.workflowNodeStatus;
+ }
+
+ public WorkflowNodeDetails setWorkflowNodeStatus(WorkflowNodeStatus workflowNodeStatus) {
+ this.workflowNodeStatus = workflowNodeStatus;
+ return this;
+ }
+
+ public void unsetWorkflowNodeStatus() {
+ this.workflowNodeStatus = null;
+ }
+
+ /** Returns true if field workflowNodeStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeStatus() {
+ return this.workflowNodeStatus != null;
+ }
+
+ public void setWorkflowNodeStatusIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeStatus = null;
+ }
+ }
+
+ public int getTaskDetailsListSize() {
+ return (this.taskDetailsList == null) ? 0 : this.taskDetailsList.size();
+ }
+
+ public java.util.Iterator<TaskDetails> getTaskDetailsListIterator() {
+ return (this.taskDetailsList == null) ? null : this.taskDetailsList.iterator();
+ }
+
+ public void addToTaskDetailsList(TaskDetails elem) {
+ if (this.taskDetailsList == null) {
+ this.taskDetailsList = new ArrayList<TaskDetails>();
+ }
+ this.taskDetailsList.add(elem);
+ }
+
+ public List<TaskDetails> getTaskDetailsList() {
+ return this.taskDetailsList;
+ }
+
+ public WorkflowNodeDetails setTaskDetailsList(List<TaskDetails> taskDetailsList) {
+ this.taskDetailsList = taskDetailsList;
+ return this;
+ }
+
+ public void unsetTaskDetailsList() {
+ this.taskDetailsList = null;
+ }
+
+ /** Returns true if field taskDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskDetailsList() {
+ return this.taskDetailsList != null;
+ }
+
+ public void setTaskDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.taskDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public WorkflowNodeDetails setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NODE_INSTANCE_ID:
+ if (value == null) {
+ unsetNodeInstanceId();
+ } else {
+ setNodeInstanceId((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case NODE_NAME:
+ if (value == null) {
+ unsetNodeName();
+ } else {
+ setNodeName((String)value);
+ }
+ break;
+
+ case NODE_INPUTS:
+ if (value == null) {
+ unsetNodeInputs();
+ } else {
+ setNodeInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case NODE_OUTPUTS:
+ if (value == null) {
+ unsetNodeOutputs();
+ } else {
+ setNodeOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case WORKFLOW_NODE_STATUS:
+ if (value == null) {
+ unsetWorkflowNodeStatus();
+ } else {
+ setWorkflowNodeStatus((WorkflowNodeStatus)value);
+ }
+ break;
+
+ case TASK_DETAILS_LIST:
+ if (value == null) {
+ unsetTaskDetailsList();
+ } else {
+ setTaskDetailsList((List<TaskDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NODE_INSTANCE_ID:
+ return getNodeInstanceId();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case NODE_NAME:
+ return getNodeName();
+
+ case NODE_INPUTS:
+ return getNodeInputs();
+
+ case NODE_OUTPUTS:
+ return getNodeOutputs();
+
+ case WORKFLOW_NODE_STATUS:
+ return getWorkflowNodeStatus();
+
+ case TASK_DETAILS_LIST:
+ return getTaskDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ 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_INSTANCE_ID:
+ return isSetNodeInstanceId();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case NODE_NAME:
+ return isSetNodeName();
+ case NODE_INPUTS:
+ return isSetNodeInputs();
+ case NODE_OUTPUTS:
+ return isSetNodeOutputs();
+ case WORKFLOW_NODE_STATUS:
+ return isSetWorkflowNodeStatus();
+ case TASK_DETAILS_LIST:
+ return isSetTaskDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowNodeDetails)
+ return this.equals((WorkflowNodeDetails)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowNodeDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_nodeInstanceId = true && this.isSetNodeInstanceId();
+ boolean that_present_nodeInstanceId = true && that.isSetNodeInstanceId();
+ if (this_present_nodeInstanceId || that_present_nodeInstanceId) {
+ if (!(this_present_nodeInstanceId && that_present_nodeInstanceId))
+ return false;
+ if (!this.nodeInstanceId.equals(that.nodeInstanceId))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_nodeName = true && this.isSetNodeName();
+ boolean that_present_nodeName = true && that.isSetNodeName();
+ if (this_present_nodeName || that_present_nodeName) {
+ if (!(this_present_nodeName && that_present_nodeName))
+ return false;
+ if (!this.nodeName.equals(that.nodeName))
+ return false;
+ }
+
+ boolean this_present_nodeInputs = true && this.isSetNodeInputs();
+ boolean that_present_nodeInputs = true && that.isSetNodeInputs();
+ if (this_present_nodeInputs || that_present_nodeInputs) {
+ if (!(this_present_nodeInputs && that_present_nodeInputs))
+ return false;
+ if (!this.nodeInputs.equals(that.nodeInputs))
+ return false;
+ }
+
+ boolean this_present_nodeOutputs = true && this.isSetNodeOutputs();
+ boolean that_present_nodeOutputs = true && that.isSetNodeOutputs();
+ if (this_present_nodeOutputs || that_present_nodeOutputs) {
+ if (!(this_present_nodeOutputs && that_present_nodeOutputs))
+ return false;
+ if (!this.nodeOutputs.equals(that.nodeOutputs))
+ return false;
+ }
+
+ boolean this_present_workflowNodeStatus = true && this.isSetWorkflowNodeStatus();
+ boolean that_present_workflowNodeStatus = true && that.isSetWorkflowNodeStatus();
+ if (this_present_workflowNodeStatus || that_present_workflowNodeStatus) {
+ if (!(this_present_workflowNodeStatus && that_present_workflowNodeStatus))
+ return false;
+ if (!this.workflowNodeStatus.equals(that.workflowNodeStatus))
+ return false;
+ }
+
+ boolean this_present_taskDetailsList = true && this.isSetTaskDetailsList();
+ boolean that_present_taskDetailsList = true && that.isSetTaskDetailsList();
+ if (this_present_taskDetailsList || that_present_taskDetailsList) {
+ if (!(this_present_taskDetailsList && that_present_taskDetailsList))
+ return false;
+ if (!this.taskDetailsList.equals(that.taskDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(WorkflowNodeDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNodeInstanceId()).compareTo(other.isSetNodeInstanceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeInstanceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeInstanceId, other.nodeInstanceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeName()).compareTo(other.isSetNodeName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeName, other.nodeName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeInputs()).compareTo(other.isSetNodeInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeInputs, other.nodeInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeOutputs()).compareTo(other.isSetNodeOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeOutputs, other.nodeOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeStatus()).compareTo(other.isSetWorkflowNodeStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeStatus, other.workflowNodeStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTaskDetailsList()).compareTo(other.isSetTaskDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskDetailsList, other.taskDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ 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("WorkflowNodeDetails(");
+ boolean first = true;
+
+ sb.append("nodeInstanceId:");
+ if (this.nodeInstanceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeInstanceId);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("nodeName:");
+ if (this.nodeName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeName);
+ }
+ first = false;
+ if (isSetNodeInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeInputs:");
+ if (this.nodeInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeInputs);
+ }
+ first = false;
+ }
+ if (isSetNodeOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeOutputs:");
+ if (this.nodeOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeOutputs);
+ }
+ first = false;
+ }
+ if (isSetWorkflowNodeStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowNodeStatus:");
+ if (this.workflowNodeStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeStatus);
+ }
+ first = false;
+ }
+ if (isSetTaskDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("taskDetailsList:");
+ if (this.taskDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (nodeInstanceId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeInstanceId' was not present! Struct: " + toString());
+ }
+ if (nodeName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeName' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (workflowNodeStatus != null) {
+ workflowNodeStatus.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 {
+ // 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 WorkflowNodeDetailsStandardSchemeFactory implements SchemeFactory {
+ public WorkflowNodeDetailsStandardScheme getScheme() {
+ return new WorkflowNodeDetailsStandardScheme();
+ }
+ }
+
+ private static class WorkflowNodeDetailsStandardScheme extends StandardScheme<WorkflowNodeDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowNodeDetails 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_INSTANCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeInstanceId = iprot.readString();
+ struct.setNodeInstanceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NODE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeName = iprot.readString();
+ struct.setNodeNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // NODE_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
+ struct.nodeInputs = new ArrayList<DataObjectType>(_list56.size);
+ for (int _i57 = 0; _i57 < _list56.size; ++_i57)
+ {
+ DataObjectType _elem58;
+ _elem58 = new DataObjectType();
+ _elem58.read(iprot);
+ struct.nodeInputs.add(_elem58);
+ }
+ iprot.readListEnd();
+ }
+ struct.setNodeInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NODE_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
+ struct.nodeOutputs = new ArrayList<DataObjectType>(_list59.size);
+ for (int _i60 = 0; _i60 < _list59.size; ++_i60)
+ {
+ DataObjectType _elem61;
+ _elem61 = new DataObjectType();
+ _elem61.read(iprot);
+ struct.nodeOutputs.add(_elem61);
+ }
+ iprot.readListEnd();
+ }
+ struct.setNodeOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // WORKFLOW_NODE_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.workflowNodeStatus = new WorkflowNodeStatus();
+ struct.workflowNodeStatus.read(iprot);
+ struct.setWorkflowNodeStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // TASK_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
+ struct.taskDetailsList = new ArrayList<TaskDetails>(_list62.size);
+ for (int _i63 = 0; _i63 < _list62.size; ++_i63)
+ {
+ TaskDetails _elem64;
+ _elem64 = new TaskDetails();
+ _elem64.read(iprot);
+ struct.taskDetailsList.add(_elem64);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTaskDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list65 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list65.size);
+ for (int _i66 = 0; _i66 < _list65.size; ++_i66)
+ {
+ ErrorDetails _elem67;
+ _elem67 = new ErrorDetails();
+ _elem67.read(iprot);
+ struct.errors.add(_elem67);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(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, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.nodeInstanceId != null) {
+ oprot.writeFieldBegin(NODE_INSTANCE_ID_FIELD_DESC);
+ oprot.writeString(struct.nodeInstanceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nodeName != null) {
+ oprot.writeFieldBegin(NODE_NAME_FIELD_DESC);
+ oprot.writeString(struct.nodeName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nodeInputs != null) {
+ if (struct.isSetNodeInputs()) {
+ oprot.writeFieldBegin(NODE_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodeInputs.size()));
+ for (DataObjectType _iter68 : struct.nodeInputs)
+ {
+ _iter68.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.nodeOutputs != null) {
+ if (struct.isSetNodeOutputs()) {
+ oprot.writeFieldBegin(NODE_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodeOutputs.size()));
+ for (DataObjectType _iter69 : struct.nodeOutputs)
+ {
+ _iter69.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowNodeStatus != null) {
+ if (struct.isSetWorkflowNodeStatus()) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_STATUS_FIELD_DESC);
+ struct.workflowNodeStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.taskDetailsList != null) {
+ if (struct.isSetTaskDetailsList()) {
+ oprot.writeFieldBegin(TASK_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskDetailsList.size()));
+ for (TaskDetails _iter70 : struct.taskDetailsList)
+ {
+ _iter70.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter71 : struct.errors)
+ {
+ _iter71.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowNodeDetailsTupleSchemeFactory implements SchemeFactory {
+ public WorkflowNodeDetailsTupleScheme getScheme() {
+ return new WorkflowNodeDetailsTupleScheme();
+ }
+ }
+
+ private static class WorkflowNodeDetailsTupleScheme extends TupleScheme<WorkflowNodeDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.nodeInstanceId);
+ oprot.writeString(struct.nodeName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNodeInputs()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNodeOutputs()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWorkflowNodeStatus()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTaskDetailsList()) {
+ optionals.set(4);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetNodeInputs()) {
+ {
+ oprot.writeI32(struct.nodeInputs.size());
+ for (DataObjectType _iter72 : struct.nodeInputs)
+ {
+ _iter72.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetNodeOutputs()) {
+ {
+ oprot.writeI32(struct.nodeOutputs.size());
+ for (DataObjectType _iter73 : struct.nodeOutputs)
+ {
+ _iter73.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetWorkflowNodeStatus()) {
+ struct.workflowNodeStatus.write(oprot);
+ }
+ if (struct.isSetTaskDetailsList()) {
+ {
+ oprot.writeI32(struct.taskDetailsList.size());
+ for (TaskDetails _iter74 : struct.taskDetailsList)
+ {
+ _iter74.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter75 : struct.errors)
+ {
+ _iter75.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.nodeInstanceId = iprot.readString();
+ struct.setNodeInstanceIdIsSet(true);
+ struct.nodeName = iprot.readString();
+ struct.setNodeNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.nodeInputs = new ArrayList<DataObjectType>(_list76.size);
+ for (int _i77 = 0; _i77 < _list76.size; ++_i77)
+ {
+ DataObjectType _elem78;
+ _elem78 = new DataObjectType();
+ _elem78.read(iprot);
+ struct.nodeInputs.add(_elem78);
+ }
+ }
+ struct.setNodeInputsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.nodeOutputs = new ArrayList<DataObjectType>(_list79.size);
+ for (int _i80 = 0; _i80 < _list79.size; ++_i80)
+ {
+ DataObjectType _elem81;
+ _elem81 = new DataObjectType();
+ _elem81.read(iprot);
+ struct.nodeOutputs.add(_elem81);
+ }
+ }
+ struct.setNodeOutputsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.workflowNodeStatus = new WorkflowNodeStatus();
+ struct.workflowNodeStatus.read(iprot);
+ struct.setWorkflowNodeStatusIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list82 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.taskDetailsList = new ArrayList<TaskDetails>(_list82.size);
+ for (int _i83 = 0; _i83 < _list82.size; ++_i83)
+ {
+ TaskDetails _elem84;
+ _elem84 = new TaskDetails();
+ _elem84.read(iprot);
+ struct.taskDetailsList.add(_elem84);
+ }
+ }
+ struct.setTaskDetailsListIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list85.size);
+ for (int _i86 = 0; _i86 < _list85.size; ++_i86)
+ {
+ ErrorDetails _elem87;
+ _elem87 = new ErrorDetails();
+ _elem87.read(iprot);
+ struct.errors.add(_elem87);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeState.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeState.java
new file mode 100644
index 0000000..a20cb5b
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeState.java
@@ -0,0 +1,73 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum WorkflowNodeState implements org.apache.thrift.TEnum {
+ INVOKED(0),
+ EXECUTING(1),
+ CANCELED(2),
+ COMPLETED(3),
+ FAILED(4),
+ UNKNOWN(5);
+
+ private final int value;
+
+ private WorkflowNodeState(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 WorkflowNodeState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return INVOKED;
+ case 1:
+ return EXECUTING;
+ case 2:
+ return CANCELED;
+ case 3:
+ return COMPLETED;
+ case 4:
+ return FAILED;
+ case 5:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeStatus.java
new file mode 100644
index 0000000..2ff8c92
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/WorkflowNodeStatus.java
@@ -0,0 +1,516 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class WorkflowNodeStatus implements org.apache.thrift.TBase<WorkflowNodeStatus, WorkflowNodeStatus._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowNodeStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowNodeStatus");
+
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowNodeStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowNodeStatusTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ public WorkflowNodeState workflowNodeState; // required
+ public long timeOfStateChange; // 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 WorkflowNodeState
+ */
+ WORKFLOW_NODE_STATE((short)1, "workflowNodeState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // WORKFLOW_NODE_STATE
+ return WORKFLOW_NODE_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.WORKFLOW_NODE_STATE, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WorkflowNodeState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowNodeStatus.class, metaDataMap);
+ }
+
+ public WorkflowNodeStatus() {
+ }
+
+ public WorkflowNodeStatus(
+ WorkflowNodeState workflowNodeState)
+ {
+ this();
+ this.workflowNodeState = workflowNodeState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowNodeStatus(WorkflowNodeStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetWorkflowNodeState()) {
+ this.workflowNodeState = other.workflowNodeState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public WorkflowNodeStatus deepCopy() {
+ return new WorkflowNodeStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.workflowNodeState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ public WorkflowNodeState getWorkflowNodeState() {
+ return this.workflowNodeState;
+ }
+
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ public WorkflowNodeStatus setWorkflowNodeState(WorkflowNodeState workflowNodeState) {
+ this.workflowNodeState = workflowNodeState;
+ return this;
+ }
+
+ public void unsetWorkflowNodeState() {
+ this.workflowNodeState = null;
+ }
+
+ /** Returns true if field workflowNodeState is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeState() {
+ return this.workflowNodeState != null;
+ }
+
+ public void setWorkflowNodeStateIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public WorkflowNodeStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case WORKFLOW_NODE_STATE:
+ if (value == null) {
+ unsetWorkflowNodeState();
+ } else {
+ setWorkflowNodeState((WorkflowNodeState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case WORKFLOW_NODE_STATE:
+ return getWorkflowNodeState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 WORKFLOW_NODE_STATE:
+ return isSetWorkflowNodeState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowNodeStatus)
+ return this.equals((WorkflowNodeStatus)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowNodeStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_workflowNodeState = true && this.isSetWorkflowNodeState();
+ boolean that_present_workflowNodeState = true && that.isSetWorkflowNodeState();
+ if (this_present_workflowNodeState || that_present_workflowNodeState) {
+ if (!(this_present_workflowNodeState && that_present_workflowNodeState))
+ return false;
+ if (!this.workflowNodeState.equals(that.workflowNodeState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(WorkflowNodeStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeState()).compareTo(other.isSetWorkflowNodeState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeState, other.workflowNodeState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("WorkflowNodeStatus(");
+ boolean first = true;
+
+ sb.append("workflowNodeState:");
+ if (this.workflowNodeState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (workflowNodeState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'workflowNodeState' 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 WorkflowNodeStatusStandardSchemeFactory implements SchemeFactory {
+ public WorkflowNodeStatusStandardScheme getScheme() {
+ return new WorkflowNodeStatusStandardScheme();
+ }
+ }
+
+ private static class WorkflowNodeStatusStandardScheme extends StandardScheme<WorkflowNodeStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowNodeStatus 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: // WORKFLOW_NODE_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.workflowNodeState = WorkflowNodeState.findByValue(iprot.readI32());
+ struct.setWorkflowNodeStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.workflowNodeState != null) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_STATE_FIELD_DESC);
+ oprot.writeI32(struct.workflowNodeState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowNodeStatusTupleSchemeFactory implements SchemeFactory {
+ public WorkflowNodeStatusTupleScheme getScheme() {
+ return new WorkflowNodeStatusTupleScheme();
+ }
+ }
+
+ private static class WorkflowNodeStatusTupleScheme extends TupleScheme<WorkflowNodeStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.workflowNodeState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.workflowNodeState = WorkflowNodeState.findByValue(iprot.readI32());
+ struct.setWorkflowNodeStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/experimentModelConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/experimentModelConstants.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/experimentModelConstants.java
new file mode 100644
index 0000000..3c023ba
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/experimentModelConstants.java
@@ -0,0 +1,59 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class experimentModelConstants {
+
+ public static final String DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS";
+
+ public static final String DEFAULT_PROJECT_NAME = "DEFAULT";
+
+ public static final String SINGLE_APP_NODE_NAME = "SINGLE_APP_NODE";
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index d5b7ab4..15eebbc 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -94,7 +94,7 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- string createExperiment(1: experimentModel.Experiment experiment)
+ string createExperiment(1: required experimentModel.Experiment experiment)
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.AiravataClientException ace,
3: airavataErrors.AiravataSystemException ase)
@@ -132,7 +132,7 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- experimentModel.Experiment getBasicExperiment(1: string airavataExperimentId)
+ experimentModel.Experiment getExperiment(1: required string airavataExperimentId)
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.ExperimentNotFoundException enf,
3: airavataErrors.AiravataClientException ace,
@@ -177,51 +177,18 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- void updateExperiment(1: string airavataExperimentId,
- 2: experimentModel.Experiment experiment)
+ void updateExperiment(1: required string airavataExperimentId,
+ 2: required experimentModel.Experiment experiment)
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.ExperimentNotFoundException enf,
3: airavataErrors.AiravataClientException ace,
4: airavataErrors.AiravataSystemException ase)
- /**
- * 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.
- *
- */
- experimentModel.ExperimentStatus getExperimentStatus(1: string airavataExperimentId)
- throws (1: airavataErrors.InvalidRequestException ire,
- 2: airavataErrors.ExperimentNotFoundException enf,
- 3: airavataErrors.AiravataClientException ace,
- 4: airavataErrors.AiravataSystemException ase)
+ void updateExperimentConfiguration(1: required string airavataExperimentId,
+ 2: required experimentModel.UserConfigurationData userConfiguration)
+
+ void updateResourceScheduleing(1: required string airavataExperimentId,
+ 2: required experimentModel.ComputationalResourceScheduling resourceScheduling)
/**
* Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
@@ -266,13 +233,25 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- void launchExperiment(1: string airavataExperimentId
- 2: string airavataCredStoreToken)
+ void launchExperiment(1: required string airavataExperimentId
+ 2: required string airavataCredStoreToken)
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.ExperimentNotFoundException enf,
3: airavataErrors.AiravataClientException ace,
4: airavataErrors.AiravataSystemException ase)
-
+
+
+ experimentModel.ExperimentStatus getExperimentStatus(1: required string airavataExperimentId)
+ throws (1: airavataErrors.InvalidRequestException ire,
+ 2: airavataErrors.ExperimentNotFoundException enf,
+ 3: airavataErrors.AiravataClientException ace,
+ 4: airavataErrors.AiravataSystemException ase)
+
+ list<experimentModel.DataObjectType> getExperimentOutputs (1: required string airavataExperimentId)
+
+ experimentModel.TaskStatus getJobStatus(1: required string resourceJobId)
+
+
/**
* 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
@@ -317,13 +296,13 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- string updateAndLaunchExperiment (1: string airavataExperimentId
- 2: experimentModel.Experiment experiment,
- 3: string airavataCredStoreToken)
- throws (1: airavataErrors.InvalidRequestException ire,
- 2: airavataErrors.ExperimentNotFoundException enf,
- 3: airavataErrors.AiravataClientException ace,
- 4: airavataErrors.AiravataSystemException ase)
+// string updateAndLaunchExperiment (1: string airavataExperimentId
+// 2: experimentModel.Experiment experiment,
+// 3: string airavataCredStoreToken)
+// throws (1: airavataErrors.InvalidRequestException ire,
+// 2: airavataErrors.ExperimentNotFoundException enf,
+// 3: airavataErrors.AiravataClientException ace,
+// 4: airavataErrors.AiravataSystemException ase)
/**
* Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataErrors.thrift b/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
index a3b4490..0031b5a 100644
--- a/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
@@ -50,6 +50,7 @@ namespace js AiravataAPIError
*
* UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
*/
+
enum AiravataErrorType {
UNKNOWN,
PERMISSION_DENIED,
[12/13] git commit: Adding API Methods to create and fetch basic
experiment status - AIRAVATA-991
Posted by sm...@apache.org.
Adding API Methods to create and fetch basic experiment status - AIRAVATA-991
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5f6d80a8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5f6d80a8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5f6d80a8
Branch: refs/heads/master
Commit: 5f6d80a83cbee988ce23ea58070b0ff4b9c86f51
Parents: 605ffaa
Author: Suresh Marru <sm...@apache.org>
Authored: Tue Feb 25 16:22:11 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Tue Feb 25 16:22:11 2014 -0500
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 63 +-
.../java/org/apache/airavata/api/Airavata.java | 5389 ++++++++++++------
.../airavata/model/workspace/Gateway.java | 496 ++
.../apache/airavata/model/workspace/Group.java | 503 ++
.../airavata/model/workspace/Project.java | 1099 ++++
.../apache/airavata/model/workspace/User.java | 557 ++
.../workspace/experiment/ActionableGroup.java | 70 +
.../experiment/AdvancedInputDataHandling.java | 706 +++
.../experiment/AdvancedOutputDataHandling.java | 609 ++
.../workspace/experiment/ApplicationStatus.java | 500 ++
.../ComputationalResourceScheduling.java | 1184 ++++
.../workspace/experiment/CorrectiveAction.java | 64 +
.../workspace/experiment/DataObjectType.java | 711 +++
.../experiment/DataTransferDetails.java | 706 +++
.../workspace/experiment/ErrorCategory.java | 79 +
.../workspace/experiment/ErrorDetails.java | 1309 +++++
.../model/workspace/experiment/Experiment.java | 2416 ++++++++
.../workspace/experiment/ExperimentState.java | 82 +
.../workspace/experiment/ExperimentStatus.java | 516 ++
.../model/workspace/experiment/JobDetails.java | 1071 ++++
.../model/workspace/experiment/JobState.java | 82 +
.../model/workspace/experiment/JobStatus.java | 516 ++
.../experiment/QualityOfServiceParams.java | 607 ++
.../model/workspace/experiment/TaskDetails.java | 1921 +++++++
.../model/workspace/experiment/TaskState.java | 91 +
.../model/workspace/experiment/TaskStatus.java | 516 ++
.../workspace/experiment/TransferState.java | 82 +
.../workspace/experiment/TransferStatus.java | 516 ++
.../experiment/UserConfigurationData.java | 1025 ++++
.../experiment/WorkflowNodeDetails.java | 1337 +++++
.../workspace/experiment/WorkflowNodeState.java | 73 +
.../experiment/WorkflowNodeStatus.java | 516 ++
.../experiment/experimentModelConstants.java | 59 +
.../airavataAPI.thrift | 83 +-
.../airavataErrors.thrift | 1 +
35 files changed, 23644 insertions(+), 1911 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index f0e7081..5319b18 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -26,10 +26,11 @@ import org.apache.airavata.api.error.AiravataClientException;
import org.apache.airavata.api.error.AiravataSystemException;
import org.apache.airavata.api.error.ExperimentNotFoundException;
import org.apache.airavata.api.error.InvalidRequestException;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.model.workspace.experiment.*;
import org.apache.thrift.TException;
+import java.util.List;
+
public class AiravataServerHandler implements Airavata.Iface {
/**
@@ -90,10 +91,11 @@ public class AiravataServerHandler implements Airavata.Iface {
* rather an Airavata Administrator will be notified to take corrective action.
*/
@Override
- public Experiment getBasicExperiment(String airavataExperimentId) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException {
+ public Experiment getExperiment(String airavataExperimentId) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException {
return null;
}
+
/**
* 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
@@ -123,6 +125,16 @@ public class AiravataServerHandler implements Airavata.Iface {
}
+ @Override
+ public void updateExperimentConfiguration(String airavataExperimentId, UserConfigurationData userConfiguration) throws TException {
+
+ }
+
+ @Override
+ public void updateResourceScheduleing(String airavataExperimentId, ComputationalResourceScheduling resourceScheduling) throws TException {
+
+ }
+
/**
* Fetch the previously configured experiment configuration information.
*
@@ -149,6 +161,16 @@ public class AiravataServerHandler implements Airavata.Iface {
return null;
}
+ @Override
+ public List<DataObjectType> getExperimentOutputs(String airavataExperimentId) throws TException {
+ return null;
+ }
+
+ @Override
+ public TaskStatus getJobStatus(String resourceJobId) throws TException {
+ return null;
+ }
+
/**
* 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.
@@ -185,41 +207,6 @@ public class AiravataServerHandler implements Airavata.Iface {
}
/**
- * 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 experiment
- * @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:
- * <p/>
- * 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.
- * <p/>
- * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
- * For now this is a place holder.
- * <p/>
- * 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.
- */
- @Override
- public String updateAndLaunchExperiment(String airavataExperimentId, Experiment experiment, String airavataCredStoreToken) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException {
- return null;
- }
-
- /**
* 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.
*
[04/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/QualityOfServiceParams.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/QualityOfServiceParams.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/QualityOfServiceParams.java
new file mode 100644
index 0000000..6eea8b5
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/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.workspace.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);
+ }
+ }
+ }
+
+}
+
[05/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentState.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentState.java
new file mode 100644
index 0000000..972e9ac
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentState.java
@@ -0,0 +1,82 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ExperimentState implements org.apache.thrift.TEnum {
+ CREATED(0),
+ VALIDATED(1),
+ SCHEDULED(2),
+ LAUNCHED(3),
+ EXECUTING(4),
+ CANCELED(5),
+ COMPLETED(6),
+ FAILED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private ExperimentState(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 ExperimentState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return CREATED;
+ case 1:
+ return VALIDATED;
+ case 2:
+ return SCHEDULED;
+ case 3:
+ return LAUNCHED;
+ case 4:
+ return EXECUTING;
+ case 5:
+ return CANCELED;
+ case 6:
+ return COMPLETED;
+ case 7:
+ return FAILED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentStatus.java
new file mode 100644
index 0000000..d559477
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentStatus.java
@@ -0,0 +1,516 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class ExperimentStatus implements org.apache.thrift.TBase<ExperimentStatus, ExperimentStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatus");
+
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentStatusTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see ExperimentState
+ */
+ public ExperimentState experimentState; // required
+ public long timeOfStateChange; // 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 ExperimentState
+ */
+ EXPERIMENT_STATE((short)1, "experimentState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // EXPERIMENT_STATE
+ return EXPERIMENT_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.EXPERIMENT_STATE, new org.apache.thrift.meta_data.FieldMetaData("experimentState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExperimentState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentStatus.class, metaDataMap);
+ }
+
+ public ExperimentStatus() {
+ }
+
+ public ExperimentStatus(
+ ExperimentState experimentState)
+ {
+ this();
+ this.experimentState = experimentState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ExperimentStatus(ExperimentStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExperimentState()) {
+ this.experimentState = other.experimentState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public ExperimentStatus deepCopy() {
+ return new ExperimentStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.experimentState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see ExperimentState
+ */
+ public ExperimentState getExperimentState() {
+ return this.experimentState;
+ }
+
+ /**
+ *
+ * @see ExperimentState
+ */
+ public ExperimentStatus setExperimentState(ExperimentState experimentState) {
+ this.experimentState = experimentState;
+ return this;
+ }
+
+ public void unsetExperimentState() {
+ this.experimentState = null;
+ }
+
+ /** Returns true if field experimentState is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentState() {
+ return this.experimentState != null;
+ }
+
+ public void setExperimentStateIsSet(boolean value) {
+ if (!value) {
+ this.experimentState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public ExperimentStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXPERIMENT_STATE:
+ if (value == null) {
+ unsetExperimentState();
+ } else {
+ setExperimentState((ExperimentState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXPERIMENT_STATE:
+ return getExperimentState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 EXPERIMENT_STATE:
+ return isSetExperimentState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ExperimentStatus)
+ return this.equals((ExperimentStatus)that);
+ return false;
+ }
+
+ public boolean equals(ExperimentStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_experimentState = true && this.isSetExperimentState();
+ boolean that_present_experimentState = true && that.isSetExperimentState();
+ if (this_present_experimentState || that_present_experimentState) {
+ if (!(this_present_experimentState && that_present_experimentState))
+ return false;
+ if (!this.experimentState.equals(that.experimentState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ExperimentStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetExperimentState()).compareTo(other.isSetExperimentState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentState, other.experimentState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("ExperimentStatus(");
+ boolean first = true;
+
+ sb.append("experimentState:");
+ if (this.experimentState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (experimentState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentState' 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 ExperimentStatusStandardSchemeFactory implements SchemeFactory {
+ public ExperimentStatusStandardScheme getScheme() {
+ return new ExperimentStatusStandardScheme();
+ }
+ }
+
+ private static class ExperimentStatusStandardScheme extends StandardScheme<ExperimentStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentStatus 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: // EXPERIMENT_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.experimentState = ExperimentState.findByValue(iprot.readI32());
+ struct.setExperimentStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, ExperimentStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.experimentState != null) {
+ oprot.writeFieldBegin(EXPERIMENT_STATE_FIELD_DESC);
+ oprot.writeI32(struct.experimentState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentStatusTupleSchemeFactory implements SchemeFactory {
+ public ExperimentStatusTupleScheme getScheme() {
+ return new ExperimentStatusTupleScheme();
+ }
+ }
+
+ private static class ExperimentStatusTupleScheme extends TupleScheme<ExperimentStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.experimentState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.experimentState = ExperimentState.findByValue(iprot.readI32());
+ struct.setExperimentStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
new file mode 100644
index 0000000..1665792
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
@@ -0,0 +1,1071 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class JobDetails implements org.apache.thrift.TBase<JobDetails, JobDetails._Fields>, java.io.Serializable, Cloneable, Comparable<JobDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobDetails");
+
+ private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField JOB_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDescription", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField JOB_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField APPLICATION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationStatus", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_CONSUMED_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceConsumed", org.apache.thrift.protocol.TType.STRING, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new JobDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new JobDetailsTupleSchemeFactory());
+ }
+
+ public String jobID; // required
+ public String jobDescription; // required
+ public long creationTime; // optional
+ public JobStatus jobStatus; // optional
+ public ApplicationStatus applicationStatus; // optional
+ public List<ErrorDetails> errors; // optional
+ public String computeResourceConsumed; // 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 {
+ JOB_ID((short)1, "jobID"),
+ JOB_DESCRIPTION((short)2, "jobDescription"),
+ CREATION_TIME((short)3, "creationTime"),
+ JOB_STATUS((short)4, "jobStatus"),
+ APPLICATION_STATUS((short)5, "applicationStatus"),
+ ERRORS((short)6, "errors"),
+ COMPUTE_RESOURCE_CONSUMED((short)7, "computeResourceConsumed");
+
+ 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: // JOB_ID
+ return JOB_ID;
+ case 2: // JOB_DESCRIPTION
+ return JOB_DESCRIPTION;
+ case 3: // CREATION_TIME
+ return CREATION_TIME;
+ case 4: // JOB_STATUS
+ return JOB_STATUS;
+ case 5: // APPLICATION_STATUS
+ return APPLICATION_STATUS;
+ case 6: // ERRORS
+ return ERRORS;
+ case 7: // COMPUTE_RESOURCE_CONSUMED
+ return COMPUTE_RESOURCE_CONSUMED;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.JOB_STATUS,_Fields.APPLICATION_STATUS,_Fields.ERRORS,_Fields.COMPUTE_RESOURCE_CONSUMED};
+ 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.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.JOB_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("jobDescription", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.JOB_STATUS, new org.apache.thrift.meta_data.FieldMetaData("jobStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobStatus.class)));
+ tmpMap.put(_Fields.APPLICATION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("applicationStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ApplicationStatus.class)));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, ErrorDetails.class))));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_CONSUMED, new org.apache.thrift.meta_data.FieldMetaData("computeResourceConsumed", 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(JobDetails.class, metaDataMap);
+ }
+
+ public JobDetails() {
+ this.jobID = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public JobDetails(
+ String jobID,
+ String jobDescription)
+ {
+ this();
+ this.jobID = jobID;
+ this.jobDescription = jobDescription;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public JobDetails(JobDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobID()) {
+ this.jobID = other.jobID;
+ }
+ if (other.isSetJobDescription()) {
+ this.jobDescription = other.jobDescription;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetJobStatus()) {
+ this.jobStatus = new JobStatus(other.jobStatus);
+ }
+ if (other.isSetApplicationStatus()) {
+ this.applicationStatus = new ApplicationStatus(other.applicationStatus);
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ if (other.isSetComputeResourceConsumed()) {
+ this.computeResourceConsumed = other.computeResourceConsumed;
+ }
+ }
+
+ public JobDetails deepCopy() {
+ return new JobDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.jobDescription = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.jobStatus = null;
+ this.applicationStatus = null;
+ this.errors = null;
+ this.computeResourceConsumed = null;
+ }
+
+ public String getJobID() {
+ return this.jobID;
+ }
+
+ public JobDetails setJobID(String jobID) {
+ this.jobID = jobID;
+ return this;
+ }
+
+ public void unsetJobID() {
+ this.jobID = null;
+ }
+
+ /** Returns true if field jobID is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobID() {
+ return this.jobID != null;
+ }
+
+ public void setJobIDIsSet(boolean value) {
+ if (!value) {
+ this.jobID = null;
+ }
+ }
+
+ public String getJobDescription() {
+ return this.jobDescription;
+ }
+
+ public JobDetails setJobDescription(String jobDescription) {
+ this.jobDescription = jobDescription;
+ return this;
+ }
+
+ public void unsetJobDescription() {
+ this.jobDescription = null;
+ }
+
+ /** Returns true if field jobDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobDescription() {
+ return this.jobDescription != null;
+ }
+
+ public void setJobDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.jobDescription = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public JobDetails setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public JobStatus getJobStatus() {
+ return this.jobStatus;
+ }
+
+ public JobDetails setJobStatus(JobStatus jobStatus) {
+ this.jobStatus = jobStatus;
+ return this;
+ }
+
+ public void unsetJobStatus() {
+ this.jobStatus = null;
+ }
+
+ /** Returns true if field jobStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobStatus() {
+ return this.jobStatus != null;
+ }
+
+ public void setJobStatusIsSet(boolean value) {
+ if (!value) {
+ this.jobStatus = null;
+ }
+ }
+
+ public ApplicationStatus getApplicationStatus() {
+ return this.applicationStatus;
+ }
+
+ public JobDetails setApplicationStatus(ApplicationStatus applicationStatus) {
+ this.applicationStatus = applicationStatus;
+ return this;
+ }
+
+ public void unsetApplicationStatus() {
+ this.applicationStatus = null;
+ }
+
+ /** Returns true if field applicationStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationStatus() {
+ return this.applicationStatus != null;
+ }
+
+ public void setApplicationStatusIsSet(boolean value) {
+ if (!value) {
+ this.applicationStatus = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public JobDetails setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public String getComputeResourceConsumed() {
+ return this.computeResourceConsumed;
+ }
+
+ public JobDetails setComputeResourceConsumed(String computeResourceConsumed) {
+ this.computeResourceConsumed = computeResourceConsumed;
+ return this;
+ }
+
+ public void unsetComputeResourceConsumed() {
+ this.computeResourceConsumed = null;
+ }
+
+ /** Returns true if field computeResourceConsumed is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourceConsumed() {
+ return this.computeResourceConsumed != null;
+ }
+
+ public void setComputeResourceConsumedIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceConsumed = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_ID:
+ if (value == null) {
+ unsetJobID();
+ } else {
+ setJobID((String)value);
+ }
+ break;
+
+ case JOB_DESCRIPTION:
+ if (value == null) {
+ unsetJobDescription();
+ } else {
+ setJobDescription((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case JOB_STATUS:
+ if (value == null) {
+ unsetJobStatus();
+ } else {
+ setJobStatus((JobStatus)value);
+ }
+ break;
+
+ case APPLICATION_STATUS:
+ if (value == null) {
+ unsetApplicationStatus();
+ } else {
+ setApplicationStatus((ApplicationStatus)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_CONSUMED:
+ if (value == null) {
+ unsetComputeResourceConsumed();
+ } else {
+ setComputeResourceConsumed((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_ID:
+ return getJobID();
+
+ case JOB_DESCRIPTION:
+ return getJobDescription();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case JOB_STATUS:
+ return getJobStatus();
+
+ case APPLICATION_STATUS:
+ return getApplicationStatus();
+
+ case ERRORS:
+ return getErrors();
+
+ case COMPUTE_RESOURCE_CONSUMED:
+ return getComputeResourceConsumed();
+
+ }
+ 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 JOB_ID:
+ return isSetJobID();
+ case JOB_DESCRIPTION:
+ return isSetJobDescription();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case JOB_STATUS:
+ return isSetJobStatus();
+ case APPLICATION_STATUS:
+ return isSetApplicationStatus();
+ case ERRORS:
+ return isSetErrors();
+ case COMPUTE_RESOURCE_CONSUMED:
+ return isSetComputeResourceConsumed();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof JobDetails)
+ return this.equals((JobDetails)that);
+ return false;
+ }
+
+ public boolean equals(JobDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobID = true && this.isSetJobID();
+ boolean that_present_jobID = true && that.isSetJobID();
+ if (this_present_jobID || that_present_jobID) {
+ if (!(this_present_jobID && that_present_jobID))
+ return false;
+ if (!this.jobID.equals(that.jobID))
+ return false;
+ }
+
+ boolean this_present_jobDescription = true && this.isSetJobDescription();
+ boolean that_present_jobDescription = true && that.isSetJobDescription();
+ if (this_present_jobDescription || that_present_jobDescription) {
+ if (!(this_present_jobDescription && that_present_jobDescription))
+ return false;
+ if (!this.jobDescription.equals(that.jobDescription))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_jobStatus = true && this.isSetJobStatus();
+ boolean that_present_jobStatus = true && that.isSetJobStatus();
+ if (this_present_jobStatus || that_present_jobStatus) {
+ if (!(this_present_jobStatus && that_present_jobStatus))
+ return false;
+ if (!this.jobStatus.equals(that.jobStatus))
+ return false;
+ }
+
+ boolean this_present_applicationStatus = true && this.isSetApplicationStatus();
+ boolean that_present_applicationStatus = true && that.isSetApplicationStatus();
+ if (this_present_applicationStatus || that_present_applicationStatus) {
+ if (!(this_present_applicationStatus && that_present_applicationStatus))
+ return false;
+ if (!this.applicationStatus.equals(that.applicationStatus))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ boolean this_present_computeResourceConsumed = true && this.isSetComputeResourceConsumed();
+ boolean that_present_computeResourceConsumed = true && that.isSetComputeResourceConsumed();
+ if (this_present_computeResourceConsumed || that_present_computeResourceConsumed) {
+ if (!(this_present_computeResourceConsumed && that_present_computeResourceConsumed))
+ return false;
+ if (!this.computeResourceConsumed.equals(that.computeResourceConsumed))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(JobDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobID()).compareTo(other.isSetJobID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobID, other.jobID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobDescription()).compareTo(other.isSetJobDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDescription, other.jobDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobStatus()).compareTo(other.isSetJobStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStatus, other.jobStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationStatus()).compareTo(other.isSetApplicationStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationStatus, other.applicationStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputeResourceConsumed()).compareTo(other.isSetComputeResourceConsumed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceConsumed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceConsumed, other.computeResourceConsumed);
+ 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("JobDetails(");
+ boolean first = true;
+
+ sb.append("jobID:");
+ if (this.jobID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("jobDescription:");
+ if (this.jobDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobDescription);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetJobStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("jobStatus:");
+ if (this.jobStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobStatus);
+ }
+ first = false;
+ }
+ if (isSetApplicationStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationStatus:");
+ if (this.applicationStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationStatus);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ if (isSetComputeResourceConsumed()) {
+ if (!first) sb.append(", ");
+ sb.append("computeResourceConsumed:");
+ if (this.computeResourceConsumed == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceConsumed);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (jobID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobID' was not present! Struct: " + toString());
+ }
+ if (jobDescription == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobDescription' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (jobStatus != null) {
+ jobStatus.validate();
+ }
+ if (applicationStatus != null) {
+ applicationStatus.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 {
+ // 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 JobDetailsStandardSchemeFactory implements SchemeFactory {
+ public JobDetailsStandardScheme getScheme() {
+ return new JobDetailsStandardScheme();
+ }
+ }
+
+ private static class JobDetailsStandardScheme extends StandardScheme<JobDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, JobDetails 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: // JOB_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobID = iprot.readString();
+ struct.setJobIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // JOB_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobDescription = iprot.readString();
+ struct.setJobDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // JOB_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.jobStatus = new JobStatus();
+ struct.jobStatus.read(iprot);
+ struct.setJobStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // APPLICATION_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.applicationStatus = new ApplicationStatus();
+ struct.applicationStatus.read(iprot);
+ struct.setApplicationStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ ErrorDetails _elem10;
+ _elem10 = new ErrorDetails();
+ _elem10.read(iprot);
+ struct.errors.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // COMPUTE_RESOURCE_CONSUMED
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceConsumed = iprot.readString();
+ struct.setComputeResourceConsumedIsSet(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, JobDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobID != null) {
+ oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
+ oprot.writeString(struct.jobID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.jobDescription != null) {
+ oprot.writeFieldBegin(JOB_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.jobDescription);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.jobStatus != null) {
+ if (struct.isSetJobStatus()) {
+ oprot.writeFieldBegin(JOB_STATUS_FIELD_DESC);
+ struct.jobStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationStatus != null) {
+ if (struct.isSetApplicationStatus()) {
+ oprot.writeFieldBegin(APPLICATION_STATUS_FIELD_DESC);
+ struct.applicationStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter11 : struct.errors)
+ {
+ _iter11.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.computeResourceConsumed != null) {
+ if (struct.isSetComputeResourceConsumed()) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_CONSUMED_FIELD_DESC);
+ oprot.writeString(struct.computeResourceConsumed);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class JobDetailsTupleSchemeFactory implements SchemeFactory {
+ public JobDetailsTupleScheme getScheme() {
+ return new JobDetailsTupleScheme();
+ }
+ }
+
+ private static class JobDetailsTupleScheme extends TupleScheme<JobDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobID);
+ oprot.writeString(struct.jobDescription);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetJobStatus()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationStatus()) {
+ optionals.set(2);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(3);
+ }
+ if (struct.isSetComputeResourceConsumed()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetJobStatus()) {
+ struct.jobStatus.write(oprot);
+ }
+ if (struct.isSetApplicationStatus()) {
+ struct.applicationStatus.write(oprot);
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter12 : struct.errors)
+ {
+ _iter12.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetComputeResourceConsumed()) {
+ oprot.writeString(struct.computeResourceConsumed);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobID = iprot.readString();
+ struct.setJobIDIsSet(true);
+ struct.jobDescription = iprot.readString();
+ struct.setJobDescriptionIsSet(true);
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.jobStatus = new JobStatus();
+ struct.jobStatus.read(iprot);
+ struct.setJobStatusIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationStatus = new ApplicationStatus();
+ struct.applicationStatus.read(iprot);
+ struct.setApplicationStatusIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ ErrorDetails _elem15;
+ _elem15 = new ErrorDetails();
+ _elem15.read(iprot);
+ struct.errors.add(_elem15);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.computeResourceConsumed = iprot.readString();
+ struct.setComputeResourceConsumedIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
new file mode 100644
index 0000000..58f0c06
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
@@ -0,0 +1,82 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum JobState implements org.apache.thrift.TEnum {
+ SUBMITTED(0),
+ QUEUED(1),
+ ACTIVE(2),
+ COMPLETE(3),
+ CANCELED(4),
+ FAILED(5),
+ HELD(6),
+ SUSPENDED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private JobState(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 JobState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SUBMITTED;
+ case 1:
+ return QUEUED;
+ case 2:
+ return ACTIVE;
+ case 3:
+ return COMPLETE;
+ case 4:
+ return CANCELED;
+ case 5:
+ return FAILED;
+ case 6:
+ return HELD;
+ case 7:
+ return SUSPENDED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobStatus.java
new file mode 100644
index 0000000..5c08870
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/JobStatus.java
@@ -0,0 +1,516 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class JobStatus implements org.apache.thrift.TBase<JobStatus, JobStatus._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatus");
+
+ private static final org.apache.thrift.protocol.TField JOB_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("jobState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new JobStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new JobStatusTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see JobState
+ */
+ public JobState jobState; // required
+ public long timeOfStateChange; // 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 JobState
+ */
+ JOB_STATE((short)1, "jobState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // JOB_STATE
+ return JOB_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.JOB_STATE, new org.apache.thrift.meta_data.FieldMetaData("jobState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobStatus.class, metaDataMap);
+ }
+
+ public JobStatus() {
+ }
+
+ public JobStatus(
+ JobState jobState)
+ {
+ this();
+ this.jobState = jobState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public JobStatus(JobStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobState()) {
+ this.jobState = other.jobState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public JobStatus deepCopy() {
+ return new JobStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see JobState
+ */
+ public JobState getJobState() {
+ return this.jobState;
+ }
+
+ /**
+ *
+ * @see JobState
+ */
+ public JobStatus setJobState(JobState jobState) {
+ this.jobState = jobState;
+ return this;
+ }
+
+ public void unsetJobState() {
+ this.jobState = null;
+ }
+
+ /** Returns true if field jobState is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobState() {
+ return this.jobState != null;
+ }
+
+ public void setJobStateIsSet(boolean value) {
+ if (!value) {
+ this.jobState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public JobStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_STATE:
+ if (value == null) {
+ unsetJobState();
+ } else {
+ setJobState((JobState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_STATE:
+ return getJobState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 JOB_STATE:
+ return isSetJobState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof JobStatus)
+ return this.equals((JobStatus)that);
+ return false;
+ }
+
+ public boolean equals(JobStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobState = true && this.isSetJobState();
+ boolean that_present_jobState = true && that.isSetJobState();
+ if (this_present_jobState || that_present_jobState) {
+ if (!(this_present_jobState && that_present_jobState))
+ return false;
+ if (!this.jobState.equals(that.jobState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(JobStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobState()).compareTo(other.isSetJobState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobState, other.jobState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("JobStatus(");
+ boolean first = true;
+
+ sb.append("jobState:");
+ if (this.jobState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (jobState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobState' 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 JobStatusStandardSchemeFactory implements SchemeFactory {
+ public JobStatusStandardScheme getScheme() {
+ return new JobStatusStandardScheme();
+ }
+ }
+
+ private static class JobStatusStandardScheme extends StandardScheme<JobStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, JobStatus 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: // JOB_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.jobState = JobState.findByValue(iprot.readI32());
+ struct.setJobStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, JobStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobState != null) {
+ oprot.writeFieldBegin(JOB_STATE_FIELD_DESC);
+ oprot.writeI32(struct.jobState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class JobStatusTupleSchemeFactory implements SchemeFactory {
+ public JobStatusTupleScheme getScheme() {
+ return new JobStatusTupleScheme();
+ }
+ }
+
+ private static class JobStatusTupleScheme extends TupleScheme<JobStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, JobStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.jobState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, JobStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobState = JobState.findByValue(iprot.readI32());
+ struct.setJobStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
[13/13] git commit: Merge remote-tracking branch 'origin/master'
Posted by sm...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/204aab12
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/204aab12
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/204aab12
Branch: refs/heads/master
Commit: 204aab12f36ea14f5c15a7f376140cbcbd18d25a
Parents: 5f6d80a b5d57f8
Author: Suresh Marru <sm...@apache.org>
Authored: Tue Feb 25 16:22:23 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Tue Feb 25 16:22:23 2014 -0500
----------------------------------------------------------------------
.../registry/jpa/impl/ExperimentRegistry.java | 101 ++++++++++++++++++-
.../registry/jpa/impl/RegistryImpl.java | 9 +-
.../src/main/resources/registry-derby.sql | 1 +
.../airavata/registry/cpi/utils/Constants.java | 9 +-
4 files changed, 117 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[11/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 2b2759d..7c4eafa 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -131,7 +131,7 @@ import org.slf4j.LoggerFactory;
*
* @param airavataExperimentId
*/
- public org.apache.airavata.model.workspace.experiment.Experiment getBasicExperiment(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 org.apache.airavata.model.workspace.experiment.Experiment getExperiment(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
@@ -177,42 +177,9 @@ import org.slf4j.LoggerFactory;
*/
public void updateExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment) 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.workspace.experiment.ExperimentStatus getExperimentStatus(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 void updateExperimentConfiguration(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration) throws org.apache.thrift.TException;
+
+ public void updateResourceScheduleing(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling) throws org.apache.thrift.TException;
/**
* Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
@@ -262,55 +229,11 @@ import org.slf4j.LoggerFactory;
*/
public void launchExperiment(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 experiment
- * @param airavataCredStoreToken
- */
- public String updateAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, 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;
+ public org.apache.airavata.model.workspace.experiment.ExperimentStatus getExperimentStatus(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 List<org.apache.airavata.model.workspace.experiment.DataObjectType> getExperimentOutputs(String airavataExperimentId) throws org.apache.thrift.TException;
+
+ public org.apache.airavata.model.workspace.experiment.TaskStatus getJobStatus(String resourceJobId) throws 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.
@@ -403,15 +326,21 @@ import org.slf4j.LoggerFactory;
public void createExperiment(org.apache.airavata.model.workspace.experiment.Experiment experiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getBasicExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void updateExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getExperimentStatus(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateExperimentConfiguration(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateResourceScheduleing(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void launchExperiment(String airavataExperimentId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void updateAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getExperimentStatus(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getExperimentOutputs(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getJobStatus(String resourceJobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void cloneExperiment(String airavataExperimentIdToBeCloned, org.apache.airavata.model.workspace.experiment.Experiment updatedExperiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -495,23 +424,23 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createExperiment failed: unknown result");
}
- public org.apache.airavata.model.workspace.experiment.Experiment getBasicExperiment(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 org.apache.airavata.model.workspace.experiment.Experiment getExperiment(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_getBasicExperiment(airavataExperimentId);
- return recv_getBasicExperiment();
+ send_getExperiment(airavataExperimentId);
+ return recv_getExperiment();
}
- public void send_getBasicExperiment(String airavataExperimentId) throws org.apache.thrift.TException
+ public void send_getExperiment(String airavataExperimentId) throws org.apache.thrift.TException
{
- getBasicExperiment_args args = new getBasicExperiment_args();
+ getExperiment_args args = new getExperiment_args();
args.setAiravataExperimentId(airavataExperimentId);
- sendBase("getBasicExperiment", args);
+ sendBase("getExperiment", args);
}
- public org.apache.airavata.model.workspace.experiment.Experiment recv_getBasicExperiment() 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 org.apache.airavata.model.workspace.experiment.Experiment recv_getExperiment() 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
{
- getBasicExperiment_result result = new getBasicExperiment_result();
- receiveBase(result, "getBasicExperiment");
+ getExperiment_result result = new getExperiment_result();
+ receiveBase(result, "getExperiment");
if (result.isSetSuccess()) {
return result.success;
}
@@ -527,7 +456,7 @@ import org.slf4j.LoggerFactory;
if (result.ase != null) {
throw result.ase;
}
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBasicExperiment failed: unknown result");
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperiment failed: unknown result");
}
public void updateExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment) 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
@@ -563,39 +492,46 @@ import org.slf4j.LoggerFactory;
return;
}
- public org.apache.airavata.model.workspace.experiment.ExperimentStatus getExperimentStatus(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 void updateExperimentConfiguration(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration) throws org.apache.thrift.TException
{
- send_getExperimentStatus(airavataExperimentId);
- return recv_getExperimentStatus();
+ send_updateExperimentConfiguration(airavataExperimentId, userConfiguration);
+ recv_updateExperimentConfiguration();
}
- public void send_getExperimentStatus(String airavataExperimentId) throws org.apache.thrift.TException
+ public void send_updateExperimentConfiguration(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration) throws org.apache.thrift.TException
{
- getExperimentStatus_args args = new getExperimentStatus_args();
+ updateExperimentConfiguration_args args = new updateExperimentConfiguration_args();
args.setAiravataExperimentId(airavataExperimentId);
- sendBase("getExperimentStatus", args);
+ args.setUserConfiguration(userConfiguration);
+ sendBase("updateExperimentConfiguration", args);
}
- public org.apache.airavata.model.workspace.experiment.ExperimentStatus recv_getExperimentStatus() 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 void recv_updateExperimentConfiguration() throws org.apache.thrift.TException
{
- getExperimentStatus_result result = new getExperimentStatus_result();
- receiveBase(result, "getExperimentStatus");
- 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, "getExperimentStatus failed: unknown result");
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ receiveBase(result, "updateExperimentConfiguration");
+ return;
+ }
+
+ public void updateResourceScheduleing(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling) throws org.apache.thrift.TException
+ {
+ send_updateResourceScheduleing(airavataExperimentId, resourceScheduling);
+ recv_updateResourceScheduleing();
+ }
+
+ public void send_updateResourceScheduleing(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling) throws org.apache.thrift.TException
+ {
+ updateResourceScheduleing_args args = new updateResourceScheduleing_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setResourceScheduling(resourceScheduling);
+ sendBase("updateResourceScheduleing", args);
+ }
+
+ public void recv_updateResourceScheduleing() throws org.apache.thrift.TException
+ {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ receiveBase(result, "updateResourceScheduleing");
+ return;
}
public void launchExperiment(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
@@ -631,25 +567,23 @@ import org.slf4j.LoggerFactory;
return;
}
- public String updateAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, 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
+ public org.apache.airavata.model.workspace.experiment.ExperimentStatus getExperimentStatus(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_updateAndLaunchExperiment(airavataExperimentId, experiment, airavataCredStoreToken);
- return recv_updateAndLaunchExperiment();
+ send_getExperimentStatus(airavataExperimentId);
+ return recv_getExperimentStatus();
}
- public void send_updateAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, String airavataCredStoreToken) throws org.apache.thrift.TException
+ public void send_getExperimentStatus(String airavataExperimentId) throws org.apache.thrift.TException
{
- updateAndLaunchExperiment_args args = new updateAndLaunchExperiment_args();
+ getExperimentStatus_args args = new getExperimentStatus_args();
args.setAiravataExperimentId(airavataExperimentId);
- args.setExperiment(experiment);
- args.setAiravataCredStoreToken(airavataCredStoreToken);
- sendBase("updateAndLaunchExperiment", args);
+ sendBase("getExperimentStatus", args);
}
- public String recv_updateAndLaunchExperiment() 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 org.apache.airavata.model.workspace.experiment.ExperimentStatus recv_getExperimentStatus() 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
{
- updateAndLaunchExperiment_result result = new updateAndLaunchExperiment_result();
- receiveBase(result, "updateAndLaunchExperiment");
+ getExperimentStatus_result result = new getExperimentStatus_result();
+ receiveBase(result, "getExperimentStatus");
if (result.isSetSuccess()) {
return result.success;
}
@@ -665,7 +599,53 @@ import org.slf4j.LoggerFactory;
if (result.ase != null) {
throw result.ase;
}
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateAndLaunchExperiment failed: unknown result");
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentStatus failed: unknown result");
+ }
+
+ public List<org.apache.airavata.model.workspace.experiment.DataObjectType> getExperimentOutputs(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ send_getExperimentOutputs(airavataExperimentId);
+ return recv_getExperimentOutputs();
+ }
+
+ public void send_getExperimentOutputs(String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getExperimentOutputs_args args = new getExperimentOutputs_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getExperimentOutputs", args);
+ }
+
+ public List<org.apache.airavata.model.workspace.experiment.DataObjectType> recv_getExperimentOutputs() throws org.apache.thrift.TException
+ {
+ getExperimentOutputs_result result = new getExperimentOutputs_result();
+ receiveBase(result, "getExperimentOutputs");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentOutputs failed: unknown result");
+ }
+
+ public org.apache.airavata.model.workspace.experiment.TaskStatus getJobStatus(String resourceJobId) throws org.apache.thrift.TException
+ {
+ send_getJobStatus(resourceJobId);
+ return recv_getJobStatus();
+ }
+
+ public void send_getJobStatus(String resourceJobId) throws org.apache.thrift.TException
+ {
+ getJobStatus_args args = new getJobStatus_args();
+ args.setResourceJobId(resourceJobId);
+ sendBase("getJobStatus", args);
+ }
+
+ public org.apache.airavata.model.workspace.experiment.TaskStatus recv_getJobStatus() throws org.apache.thrift.TException
+ {
+ getJobStatus_result result = new getJobStatus_result();
+ receiveBase(result, "getJobStatus");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getJobStatus failed: unknown result");
}
public String cloneExperiment(String airavataExperimentIdToBeCloned, org.apache.airavata.model.workspace.experiment.Experiment updatedExperiment) 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
@@ -851,23 +831,23 @@ import org.slf4j.LoggerFactory;
}
}
- public void getBasicExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- getBasicExperiment_call method_call = new getBasicExperiment_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ getExperiment_call method_call = new getExperiment_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getBasicExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
private String airavataExperimentId;
- public getBasicExperiment_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 {
+ public getExperiment_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("getBasicExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getBasicExperiment_args args = new getBasicExperiment_args();
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperiment_args args = new getExperiment_args();
args.setAiravataExperimentId(airavataExperimentId);
args.write(prot);
prot.writeMessageEnd();
@@ -879,7 +859,7 @@ import org.slf4j.LoggerFactory;
}
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_getBasicExperiment();
+ return (new Client(prot)).recv_getExperiment();
}
}
@@ -918,35 +898,73 @@ import org.slf4j.LoggerFactory;
}
}
- public void getExperimentStatus(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void updateExperimentConfiguration(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- getExperimentStatus_call method_call = new getExperimentStatus_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ updateExperimentConfiguration_call method_call = new updateExperimentConfiguration_call(airavataExperimentId, userConfiguration, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getExperimentStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class updateExperimentConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
private String airavataExperimentId;
- public getExperimentStatus_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 {
+ private org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration;
+ public updateExperimentConfiguration_call(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.UserConfigurationData userConfiguration, 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.userConfiguration = userConfiguration;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getExperimentStatus_args args = new getExperimentStatus_args();
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateExperimentConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateExperimentConfiguration_args args = new updateExperimentConfiguration_args();
args.setAiravataExperimentId(airavataExperimentId);
+ args.setUserConfiguration(userConfiguration);
args.write(prot);
prot.writeMessageEnd();
}
- public org.apache.airavata.model.workspace.experiment.ExperimentStatus 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 {
+ public void 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_getExperimentStatus();
+ (new Client(prot)).recv_updateExperimentConfiguration();
+ }
+ }
+
+ public void updateResourceScheduleing(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateResourceScheduleing_call method_call = new updateResourceScheduleing_call(airavataExperimentId, resourceScheduling, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateResourceScheduleing_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ private org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling;
+ public updateResourceScheduleing_call(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling resourceScheduling, 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.resourceScheduling = resourceScheduling;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateResourceScheduleing", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateResourceScheduleing_args args = new updateResourceScheduleing_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.setResourceScheduling(resourceScheduling);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void 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);
+ (new Client(prot)).recv_updateResourceScheduleing();
}
}
@@ -985,41 +1003,99 @@ import org.slf4j.LoggerFactory;
}
}
- public void updateAndLaunchExperiment(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getExperimentStatus(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- updateAndLaunchExperiment_call method_call = new updateAndLaunchExperiment_call(airavataExperimentId, experiment, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+ getExperimentStatus_call method_call = new getExperimentStatus_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateAndLaunchExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getExperimentStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
private String airavataExperimentId;
- private org.apache.airavata.model.workspace.experiment.Experiment experiment;
- private String airavataCredStoreToken;
- public updateAndLaunchExperiment_call(String airavataExperimentId, org.apache.airavata.model.workspace.experiment.Experiment experiment, 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 {
+ public getExperimentStatus_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;
- this.experiment = experiment;
- 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("updateAndLaunchExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateAndLaunchExperiment_args args = new updateAndLaunchExperiment_args();
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperimentStatus_args args = new getExperimentStatus_args();
args.setAiravataExperimentId(airavataExperimentId);
- args.setExperiment(experiment);
- 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 {
+ public org.apache.airavata.model.workspace.experiment.ExperimentStatus 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_getExperimentStatus();
+ }
+ }
+
+ public void getExperimentOutputs(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getExperimentOutputs_call method_call = new getExperimentOutputs_call(airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getExperimentOutputs_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String airavataExperimentId;
+ public getExperimentOutputs_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("getExperimentOutputs", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperimentOutputs_args args = new getExperimentOutputs_args();
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.model.workspace.experiment.DataObjectType> 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_getExperimentOutputs();
+ }
+ }
+
+ public void getJobStatus(String resourceJobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getJobStatus_call method_call = new getJobStatus_call(resourceJobId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getJobStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String resourceJobId;
+ public getJobStatus_call(String resourceJobId, 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.resourceJobId = resourceJobId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getJobStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getJobStatus_args args = new getJobStatus_args();
+ args.setResourceJobId(resourceJobId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.workspace.experiment.TaskStatus 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_updateAndLaunchExperiment();
+ return (new Client(prot)).recv_getJobStatus();
}
}
@@ -1140,11 +1216,14 @@ import org.slf4j.LoggerFactory;
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("getBasicExperiment", new getBasicExperiment());
+ processMap.put("getExperiment", new getExperiment());
processMap.put("updateExperiment", new updateExperiment());
- processMap.put("getExperimentStatus", new getExperimentStatus());
+ processMap.put("updateExperimentConfiguration", new updateExperimentConfiguration());
+ processMap.put("updateResourceScheduleing", new updateResourceScheduleing());
processMap.put("launchExperiment", new launchExperiment());
- processMap.put("updateAndLaunchExperiment", new updateAndLaunchExperiment());
+ processMap.put("getExperimentStatus", new getExperimentStatus());
+ processMap.put("getExperimentOutputs", new getExperimentOutputs());
+ processMap.put("getJobStatus", new getJobStatus());
processMap.put("cloneExperiment", new cloneExperiment());
processMap.put("terminateExperiment", new terminateExperiment());
processMap.put("createProject", new createProject());
@@ -1199,23 +1278,23 @@ import org.slf4j.LoggerFactory;
}
}
- public static class getBasicExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBasicExperiment_args> {
- public getBasicExperiment() {
- super("getBasicExperiment");
+ public static class getExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperiment_args> {
+ public getExperiment() {
+ super("getExperiment");
}
- public getBasicExperiment_args getEmptyArgsInstance() {
- return new getBasicExperiment_args();
+ public getExperiment_args getEmptyArgsInstance() {
+ return new getExperiment_args();
}
protected boolean isOneway() {
return false;
}
- public getBasicExperiment_result getResult(I iface, getBasicExperiment_args args) throws org.apache.thrift.TException {
- getBasicExperiment_result result = new getBasicExperiment_result();
+ public getExperiment_result getResult(I iface, getExperiment_args args) throws org.apache.thrift.TException {
+ getExperiment_result result = new getExperiment_result();
try {
- result.success = iface.getBasicExperiment(args.airavataExperimentId);
+ result.success = iface.getExperiment(args.airavataExperimentId);
} catch (org.apache.airavata.api.error.InvalidRequestException ire) {
result.ire = ire;
} catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
@@ -1259,32 +1338,42 @@ import org.slf4j.LoggerFactory;
}
}
- public static class getExperimentStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentStatus_args> {
- public getExperimentStatus() {
- super("getExperimentStatus");
+ public static class updateExperimentConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateExperimentConfiguration_args> {
+ public updateExperimentConfiguration() {
+ super("updateExperimentConfiguration");
}
- public getExperimentStatus_args getEmptyArgsInstance() {
- return new getExperimentStatus_args();
+ public updateExperimentConfiguration_args getEmptyArgsInstance() {
+ return new updateExperimentConfiguration_args();
}
protected boolean isOneway() {
return false;
}
- public getExperimentStatus_result getResult(I iface, getExperimentStatus_args args) throws org.apache.thrift.TException {
- getExperimentStatus_result result = new getExperimentStatus_result();
- try {
- result.success = iface.getExperimentStatus(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;
- }
+ public updateExperimentConfiguration_result getResult(I iface, updateExperimentConfiguration_args args) throws org.apache.thrift.TException {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ iface.updateExperimentConfiguration(args.airavataExperimentId, args.userConfiguration);
+ return result;
+ }
+ }
+
+ public static class updateResourceScheduleing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateResourceScheduleing_args> {
+ public updateResourceScheduleing() {
+ super("updateResourceScheduleing");
+ }
+
+ public updateResourceScheduleing_args getEmptyArgsInstance() {
+ return new updateResourceScheduleing_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateResourceScheduleing_result getResult(I iface, updateResourceScheduleing_args args) throws org.apache.thrift.TException {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ iface.updateResourceScheduleing(args.airavataExperimentId, args.resourceScheduling);
return result;
}
}
@@ -1319,23 +1408,23 @@ import org.slf4j.LoggerFactory;
}
}
- public static class updateAndLaunchExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateAndLaunchExperiment_args> {
- public updateAndLaunchExperiment() {
- super("updateAndLaunchExperiment");
+ public static class getExperimentStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentStatus_args> {
+ public getExperimentStatus() {
+ super("getExperimentStatus");
}
- public updateAndLaunchExperiment_args getEmptyArgsInstance() {
- return new updateAndLaunchExperiment_args();
+ public getExperimentStatus_args getEmptyArgsInstance() {
+ return new getExperimentStatus_args();
}
protected boolean isOneway() {
return false;
}
- public updateAndLaunchExperiment_result getResult(I iface, updateAndLaunchExperiment_args args) throws org.apache.thrift.TException {
- updateAndLaunchExperiment_result result = new updateAndLaunchExperiment_result();
+ public getExperimentStatus_result getResult(I iface, getExperimentStatus_args args) throws org.apache.thrift.TException {
+ getExperimentStatus_result result = new getExperimentStatus_result();
try {
- result.success = iface.updateAndLaunchExperiment(args.airavataExperimentId, args.experiment, args.airavataCredStoreToken);
+ result.success = iface.getExperimentStatus(args.airavataExperimentId);
} catch (org.apache.airavata.api.error.InvalidRequestException ire) {
result.ire = ire;
} catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
@@ -1349,6 +1438,46 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class getExperimentOutputs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentOutputs_args> {
+ public getExperimentOutputs() {
+ super("getExperimentOutputs");
+ }
+
+ public getExperimentOutputs_args getEmptyArgsInstance() {
+ return new getExperimentOutputs_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getExperimentOutputs_result getResult(I iface, getExperimentOutputs_args args) throws org.apache.thrift.TException {
+ getExperimentOutputs_result result = new getExperimentOutputs_result();
+ result.success = iface.getExperimentOutputs(args.airavataExperimentId);
+ return result;
+ }
+ }
+
+ public static class getJobStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getJobStatus_args> {
+ public getJobStatus() {
+ super("getJobStatus");
+ }
+
+ public getJobStatus_args getEmptyArgsInstance() {
+ return new getJobStatus_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getJobStatus_result getResult(I iface, getJobStatus_args args) throws org.apache.thrift.TException {
+ getJobStatus_result result = new getJobStatus_result();
+ result.success = iface.getJobStatus(args.resourceJobId);
+ return result;
+ }
+ }
+
public static class cloneExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cloneExperiment_args> {
public cloneExperiment() {
super("cloneExperiment");
@@ -1454,11 +1583,14 @@ import org.slf4j.LoggerFactory;
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("getBasicExperiment", new getBasicExperiment());
+ processMap.put("getExperiment", new getExperiment());
processMap.put("updateExperiment", new updateExperiment());
- processMap.put("getExperimentStatus", new getExperimentStatus());
+ processMap.put("updateExperimentConfiguration", new updateExperimentConfiguration());
+ processMap.put("updateResourceScheduleing", new updateResourceScheduleing());
processMap.put("launchExperiment", new launchExperiment());
- processMap.put("updateAndLaunchExperiment", new updateAndLaunchExperiment());
+ processMap.put("getExperimentStatus", new getExperimentStatus());
+ processMap.put("getExperimentOutputs", new getExperimentOutputs());
+ processMap.put("getJobStatus", new getJobStatus());
processMap.put("cloneExperiment", new cloneExperiment());
processMap.put("terminateExperiment", new terminateExperiment());
processMap.put("createProject", new createProject());
@@ -1583,20 +1715,20 @@ import org.slf4j.LoggerFactory;
}
}
- public static class getBasicExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getBasicExperiment_args, org.apache.airavata.model.workspace.experiment.Experiment> {
- public getBasicExperiment() {
- super("getBasicExperiment");
+ public static class getExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperiment_args, org.apache.airavata.model.workspace.experiment.Experiment> {
+ public getExperiment() {
+ super("getExperiment");
}
- public getBasicExperiment_args getEmptyArgsInstance() {
- return new getBasicExperiment_args();
+ public getExperiment_args getEmptyArgsInstance() {
+ return new getExperiment_args();
}
public AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.Experiment> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.Experiment>() {
public void onComplete(org.apache.airavata.model.workspace.experiment.Experiment o) {
- getBasicExperiment_result result = new getBasicExperiment_result();
+ getExperiment_result result = new getExperiment_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -1609,7 +1741,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getBasicExperiment_result result = new getBasicExperiment_result();
+ getExperiment_result result = new getExperiment_result();
if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -1650,8 +1782,8 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, getBasicExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.Experiment> resultHandler) throws TException {
- iface.getBasicExperiment(args.airavataExperimentId,resultHandler);
+ public void start(I iface, getExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.Experiment> resultHandler) throws TException {
+ iface.getExperiment(args.airavataExperimentId,resultHandler);
}
}
@@ -1726,21 +1858,20 @@ import org.slf4j.LoggerFactory;
}
}
- public static class getExperimentStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatus_args, org.apache.airavata.model.workspace.experiment.ExperimentStatus> {
- public getExperimentStatus() {
- super("getExperimentStatus");
+ public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
+ public updateExperimentConfiguration() {
+ super("updateExperimentConfiguration");
}
- public getExperimentStatus_args getEmptyArgsInstance() {
- return new getExperimentStatus_args();
+ public updateExperimentConfiguration_args getEmptyArgsInstance() {
+ return new updateExperimentConfiguration_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus>() {
- public void onComplete(org.apache.airavata.model.workspace.experiment.ExperimentStatus o) {
- getExperimentStatus_result result = new getExperimentStatus_result();
- result.success = o;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -1752,28 +1883,57 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperimentStatus_result result = new getExperimentStatus_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;
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_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());
}
- else if (e instanceof org.apache.airavata.api.error.AiravataClientException) {
- result.ace = (org.apache.airavata.api.error.AiravataClientException) e;
- result.setAceIsSet(true);
- msg = result;
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
}
- else if (e instanceof org.apache.airavata.api.error.AiravataSystemException) {
- result.ase = (org.apache.airavata.api.error.AiravataSystemException) e;
- result.setAseIsSet(true);
- msg = result;
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperimentConfiguration(args.airavataExperimentId, args.userConfiguration,resultHandler);
+ }
+ }
+
+ public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
+ public updateResourceScheduleing() {
+ super("updateResourceScheduleing");
+ }
+
+ public updateResourceScheduleing_args getEmptyArgsInstance() {
+ return new updateResourceScheduleing_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ 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);
}
- else
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ updateResourceScheduleing_result result = new updateResourceScheduleing_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());
@@ -1793,8 +1953,8 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, getExperimentStatus_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus> resultHandler) throws TException {
- iface.getExperimentStatus(args.airavataExperimentId,resultHandler);
+ public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateResourceScheduleing(args.airavataExperimentId, args.resourceScheduling,resultHandler);
}
}
@@ -1869,20 +2029,20 @@ import org.slf4j.LoggerFactory;
}
}
- public static class updateAndLaunchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateAndLaunchExperiment_args, String> {
- public updateAndLaunchExperiment() {
- super("updateAndLaunchExperiment");
+ public static class getExperimentStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatus_args, org.apache.airavata.model.workspace.experiment.ExperimentStatus> {
+ public getExperimentStatus() {
+ super("getExperimentStatus");
}
- public updateAndLaunchExperiment_args getEmptyArgsInstance() {
- return new updateAndLaunchExperiment_args();
+ public getExperimentStatus_args getEmptyArgsInstance() {
+ return new getExperimentStatus_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- updateAndLaunchExperiment_result result = new updateAndLaunchExperiment_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus>() {
+ public void onComplete(org.apache.airavata.model.workspace.experiment.ExperimentStatus o) {
+ getExperimentStatus_result result = new getExperimentStatus_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -1895,7 +2055,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateAndLaunchExperiment_result result = new updateAndLaunchExperiment_result();
+ getExperimentStatus_result result = new getExperimentStatus_result();
if (e instanceof org.apache.airavata.api.error.InvalidRequestException) {
result.ire = (org.apache.airavata.api.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -1936,8 +2096,110 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, updateAndLaunchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.updateAndLaunchExperiment(args.airavataExperimentId, args.experiment, args.airavataCredStoreToken,resultHandler);
+ public void start(I iface, getExperimentStatus_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ExperimentStatus> resultHandler) throws TException {
+ iface.getExperimentStatus(args.airavataExperimentId,resultHandler);
+ }
+ }
+
+ public static class getExperimentOutputs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentOutputs_args, List<org.apache.airavata.model.workspace.experiment.DataObjectType>> {
+ public getExperimentOutputs() {
+ super("getExperimentOutputs");
+ }
+
+ public getExperimentOutputs_args getEmptyArgsInstance() {
+ return new getExperimentOutputs_args();
+ }
+
+ public AsyncMethodCallback<List<org.apache.airavata.model.workspace.experiment.DataObjectType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.experiment.DataObjectType>>() {
+ public void onComplete(List<org.apache.airavata.model.workspace.experiment.DataObjectType> o) {
+ getExperimentOutputs_result result = new getExperimentOutputs_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;
+ getExperimentOutputs_result result = new getExperimentOutputs_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, getExperimentOutputs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.experiment.DataObjectType>> resultHandler) throws TException {
+ iface.getExperimentOutputs(args.airavataExperimentId,resultHandler);
+ }
+ }
+
+ public static class getJobStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getJobStatus_args, org.apache.airavata.model.workspace.experiment.TaskStatus> {
+ public getJobStatus() {
+ super("getJobStatus");
+ }
+
+ public getJobStatus_args getEmptyArgsInstance() {
+ return new getJobStatus_args();
+ }
+
+ public AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.TaskStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.TaskStatus>() {
+ public void onComplete(org.apache.airavata.model.workspace.experiment.TaskStatus o) {
+ getJobStatus_result result = new getJobStatus_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;
+ getJobStatus_result result = new getJobStatus_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, getJobStatus_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.TaskStatus> resultHandler) throws TException {
+ iface.getJobStatus(args.resourceJobId,resultHandler);
}
}
@@ -2833,7 +3095,7 @@ import org.slf4j.LoggerFactory;
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.EXPERIMENT, new org.apache.thrift.meta_data.FieldMetaData("experiment", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.EXPERIMENT, new org.apache.thrift.meta_data.FieldMetaData("experiment", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.experiment.Experiment.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createExperiment_args.class, metaDataMap);
@@ -3007,6 +3269,9 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (experiment == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experiment' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
if (experiment != null) {
experiment.validate();
@@ -3093,25 +3358,15 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createExperiment_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetExperiment()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetExperiment()) {
- struct.experiment.write(oprot);
- }
+ struct.experiment.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createExperiment_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.experiment = new org.apache.airavata.model.workspace.experiment.Experiment();
- struct.experiment.read(iprot);
- struct.setExperimentIsSet(true);
- }
+ struct.experiment = new org.apache.airavata.model.workspace.experiment.Experiment();
+ struct.experiment.read(iprot);
+ struct.setExperimentIsSet(true);
}
}
@@ -3777,15 +4032,15 @@ import org.slf4j.LoggerFactory;
}
- public static class getBasicExperiment_args implements org.apache.thrift.TBase<getBasicExperiment_args, getBasicExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBasicExperiment_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBasicExperiment_args");
+ public static class getExperiment_args implements org.apache.thrift.TBase<getExperiment_args, getExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<getExperiment_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getExperiment_args");
private static final org.apache.thrift.protocol.TField AIRAVATA_EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataExperimentId", 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 getBasicExperiment_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getBasicExperiment_argsTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new getExperiment_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getExperiment_argsTupleSchemeFactory());
}
public String airavataExperimentId; // required
@@ -3852,16 +4107,16 @@ import org.slf4j.LoggerFactory;
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_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.AIRAVATA_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId", 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(getBasicExperiment_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getExperiment_args.class, metaDataMap);
}
- public getBasicExperiment_args() {
+ public getExperiment_args() {
}
- public getBasicExperiment_args(
+ public getExperiment_args(
String airavataExperimentId)
{
this();
@@ -3871,14 +4126,14 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public getBasicExperiment_args(getBasicExperiment_args other) {
+ public getExperiment_args(getExperiment_args other) {
if (other.isSetAiravataExperimentId()) {
this.airavataExperimentId = other.airavataExperimentId;
}
}
- public getBasicExperiment_args deepCopy() {
- return new getBasicExperiment_args(this);
+ public getExperiment_args deepCopy() {
+ return new getExperiment_args(this);
}
@Override
@@ -3890,7 +4145,7 @@ import org.slf4j.LoggerFactory;
return this.airavataExperimentId;
}
- public getBasicExperiment_args setAiravataExperimentId(String airavataExperimentId) {
+ public getExperiment_args setAiravataExperimentId(String airavataExperimentId) {
this.airavataExperimentId = airavataExperimentId;
return this;
}
@@ -3949,12 +4204,12 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getBasicExperiment_args)
- return this.equals((getBasicExperiment_args)that);
+ if (that instanceof getExperiment_args)
+ return this.equals((getExperiment_args)that);
return false;
}
- public boolean equals(getBasicExperiment_args that) {
+ public boolean equals(getExperiment_args that) {
if (that == null)
return false;
@@ -3976,7 +4231,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(getBasicExperiment_args other) {
+ public int compareTo(getExperiment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -4010,7 +4265,7 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getBasicExperiment_args(");
+ StringBuilder sb = new StringBuilder("getExperiment_args(");
boolean first = true;
sb.append("airavataExperimentId:");
@@ -4026,6 +4281,9 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (airavataExperimentId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataExperimentId' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -4045,15 +4303,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class getBasicExperiment_argsStandardSchemeFactory implements SchemeFactory {
- public getBasicExperiment_argsStandardScheme getScheme() {
- return new getBasicExperiment_argsStandardScheme();
+ private static class getExperiment_argsStandardSchemeFactory implements SchemeFactory {
+ public getExperiment_argsStandardScheme getScheme() {
+ return new getExperiment_argsStandardScheme();
}
}
- private static class getBasicExperiment_argsStandardScheme extends StandardScheme<getBasicExperiment_args> {
+ private static class getExperiment_argsStandardScheme extends StandardScheme<getExperiment_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getBasicExperiment_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -4082,7 +4340,7 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getBasicExperiment_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getExperiment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -4097,42 +4355,32 @@ import org.slf4j.LoggerFactory;
}
- private static class getBasicExperiment_argsTupleSchemeFactory implements SchemeFactory {
- public getBasicExperiment_argsTupleScheme getScheme() {
- return new getBasicExperiment_argsTupleScheme();
+ private static class getExperiment_argsTupleSchemeFactory implements SchemeFactory {
+ public getExperiment_argsTupleScheme getScheme() {
+ return new getExperiment_argsTupleScheme();
}
}
- private static class getBasicExperiment_argsTupleScheme extends TupleScheme<getBasicExperiment_args> {
+ private static class getExperiment_argsTupleScheme extends TupleScheme<getExperiment_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getBasicExperiment_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, getExperiment_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetAiravataExperimentId()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetAiravataExperimentId()) {
- oprot.writeString(struct.airavataExperimentId);
- }
+ oprot.writeString(struct.airavataExperimentId);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getBasicExperiment_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, getExperiment_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.airavataExperimentId = iprot.readString();
- struct.setAiravataExperimentIdIsSet(true);
- }
+ struct.airavataExperimentId = iprot.readString();
+ struct.setAiravataExperimentIdIsSet(true);
}
}
}
- public static class getBasicExperiment_result implements org.apache.thrift.TBase<getBasicExperiment_result, getBasicExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBasicExperiment_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBasicExperiment_result");
+ public static class getExperiment_result implements org.apache.thrift.TBase<getExperiment_result, getExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<getExperiment_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getExperiment_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -4142,8 +4390,8 @@ import org.slf4j.LoggerFactory;
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new getBasicExperiment_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getBasicExperiment_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new getExperiment_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getExperiment_resultTupleSchemeFactory());
}
public org.apache.airavata.model.workspace.experiment.Experiment success; // required
@@ -4237,13 +4485,13 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBasicExperiment_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getExperiment_result.class, metaDataMap);
}
- public getBasicExperiment_result() {
+ public getExperiment_result() {
}
- public getBasicExperiment_result(
+ public getExperiment_result(
org.apache.airavata.model.workspace.experiment.Experiment success,
org.apache.airavata.api.error.InvalidRequestException ire,
org.apache.airavata.api.error.ExperimentNotFoundException enf,
@@ -4261,7 +4509,7 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public getBasicExperiment_result(getBasicExperiment_result other) {
+ public getExperiment_result(getExperiment_result other) {
if (other.isSetSuccess()) {
this.success = new org.apache.airavata.model.workspace.experiment.Experiment(other.success);
}
@@ -4279,8 +4527,8 @@ import org.slf4j.LoggerFactory;
}
}
- public getBasicExperiment_result deepCopy() {
- return new getBasicExperiment_result(this);
+ public getExperiment_result deepCopy() {
+ return new getExperiment_result(this);
}
@Override
@@ -4296,7 +4544,7 @@ import org.slf4j.LoggerFactory;
return this.success;
}
- public getBasicExperiment_result setSuccess(org.apache.airavata.model.workspace.experiment.Experiment success) {
+ public getExperiment_result setSuccess(org.apache.airavata.model.workspace.experiment.Experiment success) {
this.success = success;
return this;
}
@@ -4320,7 +4568,7 @@ import org.slf4j.LoggerFactory;
return this.ire;
}
- public getBasicExperiment_result setIre(org.apache.airavata.api.error.InvalidRequestException ire) {
+ public getExperiment_result setIre(org.apache.airavata.api.error.InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -4344,7 +4592,7 @@ import org.slf4j.LoggerFactory;
return this.enf;
}
- public getBasicExperiment_result setEnf(org.apache.airavata.api.error.ExperimentNotFoundException enf) {
+ public getExperiment_result setEnf(org.apache.airavata.api.error.ExperimentNotFoundException enf) {
this.enf = enf;
return this;
}
@@ -4368,7 +4616,7 @@ import org.slf4j.LoggerFactory;
return this.ace;
}
- public getBasicExperiment_result setAce(org.apache.airavata.api.error.AiravataClientException ace) {
+ public getExperiment_result setAce(org.apache.airavata.api.error.AiravataClientException ace) {
this.ace = ace;
return this;
}
@@ -4392,7 +4640,7 @@ import org.slf4j.LoggerFactory;
return this.ase;
}
- public getBasicExperiment_result setAse(org.apache.airavata.api.error.AiravataSystemException ase) {
+ public getExperiment_result setAse(org.apache.airavata.api.error.AiravataSystemException ase) {
this.ase = ase;
return this;
}
@@ -4503,12 +4751,12 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getBasicExperiment_result)
- return this.equ
<TRUNCATED>
[10/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Gateway.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Gateway.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Gateway.java
new file mode 100644
index 0000000..44c6cc3
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Gateway.java
@@ -0,0 +1,496 @@
+ /*
+ * 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.workspace;
+
+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 Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields>, java.io.Serializable, Cloneable, Comparable<Gateway> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Gateway");
+
+ private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GatewayStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GatewayTupleSchemeFactory());
+ }
+
+ public String gatewayId; // required
+ public String name; // 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 {
+ GATEWAY_ID((short)1, "gatewayId"),
+ NAME((short)2, "name");
+
+ 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: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 2: // NAME
+ return NAME;
+ 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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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(Gateway.class, metaDataMap);
+ }
+
+ public Gateway() {
+ this.gatewayId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public Gateway(
+ String gatewayId,
+ String name)
+ {
+ this();
+ this.gatewayId = gatewayId;
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Gateway(Gateway other) {
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ }
+
+ public Gateway deepCopy() {
+ return new Gateway(this);
+ }
+
+ @Override
+ public void clear() {
+ this.gatewayId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.name = null;
+ }
+
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public Gateway setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ return this;
+ }
+
+ public void unsetGatewayId() {
+ this.gatewayId = null;
+ }
+
+ /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGatewayId() {
+ return this.gatewayId != null;
+ }
+
+ public void setGatewayIdIsSet(boolean value) {
+ if (!value) {
+ this.gatewayId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Gateway setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GATEWAY_ID:
+ if (value == null) {
+ unsetGatewayId();
+ } else {
+ setGatewayId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case NAME:
+ return getName();
+
+ }
+ 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 GATEWAY_ID:
+ return isSetGatewayId();
+ case NAME:
+ return isSetName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Gateway)
+ return this.equals((Gateway)that);
+ return false;
+ }
+
+ public boolean equals(Gateway that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_gatewayId = true && this.isSetGatewayId();
+ boolean that_present_gatewayId = true && that.isSetGatewayId();
+ if (this_present_gatewayId || that_present_gatewayId) {
+ if (!(this_present_gatewayId && that_present_gatewayId))
+ return false;
+ if (!this.gatewayId.equals(that.gatewayId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Gateway other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGatewayId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Gateway(");
+ boolean first = true;
+
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (gatewayId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+ }
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' 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 GatewayStandardSchemeFactory implements SchemeFactory {
+ public GatewayStandardScheme getScheme() {
+ return new GatewayStandardScheme();
+ }
+ }
+
+ private static class GatewayStandardScheme extends StandardScheme<Gateway> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Gateway 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: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, Gateway struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GatewayTupleSchemeFactory implements SchemeFactory {
+ public GatewayTupleScheme getScheme() {
+ return new GatewayTupleScheme();
+ }
+ }
+
+ private static class GatewayTupleScheme extends TupleScheme<Gateway> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Gateway struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.name);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Gateway struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Group.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Group.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Group.java
new file mode 100644
index 0000000..0da7a6f
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Group.java
@@ -0,0 +1,503 @@
+ /*
+ * 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.workspace;
+
+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 Group implements org.apache.thrift.TBase<Group, Group._Fields>, java.io.Serializable, Cloneable, Comparable<Group> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Group");
+
+ private static final org.apache.thrift.protocol.TField GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("groupName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", 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 GroupStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GroupTupleSchemeFactory());
+ }
+
+ public String groupName; // required
+ public String description; // 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 {
+ GROUP_NAME((short)1, "groupName"),
+ DESCRIPTION((short)2, "description");
+
+ 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: // GROUP_NAME
+ return GROUP_NAME;
+ case 2: // DESCRIPTION
+ return DESCRIPTION;
+ 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.DESCRIPTION};
+ 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.GROUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("groupName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(Group.class, metaDataMap);
+ }
+
+ public Group() {
+ }
+
+ public Group(
+ String groupName)
+ {
+ this();
+ this.groupName = groupName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Group(Group other) {
+ if (other.isSetGroupName()) {
+ this.groupName = other.groupName;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
+
+ public Group deepCopy() {
+ return new Group(this);
+ }
+
+ @Override
+ public void clear() {
+ this.groupName = null;
+ this.description = null;
+ }
+
+ public String getGroupName() {
+ return this.groupName;
+ }
+
+ public Group setGroupName(String groupName) {
+ this.groupName = groupName;
+ return this;
+ }
+
+ public void unsetGroupName() {
+ this.groupName = null;
+ }
+
+ /** Returns true if field groupName is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupName() {
+ return this.groupName != null;
+ }
+
+ public void setGroupNameIsSet(boolean value) {
+ if (!value) {
+ this.groupName = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Group setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GROUP_NAME:
+ if (value == null) {
+ unsetGroupName();
+ } else {
+ setGroupName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GROUP_NAME:
+ return getGroupName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ }
+ 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 GROUP_NAME:
+ return isSetGroupName();
+ case DESCRIPTION:
+ return isSetDescription();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Group)
+ return this.equals((Group)that);
+ return false;
+ }
+
+ public boolean equals(Group that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_groupName = true && this.isSetGroupName();
+ boolean that_present_groupName = true && that.isSetGroupName();
+ if (this_present_groupName || that_present_groupName) {
+ if (!(this_present_groupName && that_present_groupName))
+ return false;
+ if (!this.groupName.equals(that.groupName))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Group other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGroupName()).compareTo(other.isSetGroupName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupName, other.groupName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ 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("Group(");
+ boolean first = true;
+
+ sb.append("groupName:");
+ if (this.groupName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupName);
+ }
+ first = false;
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (groupName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupName' 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 GroupStandardSchemeFactory implements SchemeFactory {
+ public GroupStandardScheme getScheme() {
+ return new GroupStandardScheme();
+ }
+ }
+
+ private static class GroupStandardScheme extends StandardScheme<Group> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Group 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: // GROUP_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupName = iprot.readString();
+ struct.setGroupNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(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, Group struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.groupName != null) {
+ oprot.writeFieldBegin(GROUP_NAME_FIELD_DESC);
+ oprot.writeString(struct.groupName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GroupTupleSchemeFactory implements SchemeFactory {
+ public GroupTupleScheme getScheme() {
+ return new GroupTupleScheme();
+ }
+ }
+
+ private static class GroupTupleScheme extends TupleScheme<Group> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.groupName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetDescription()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.groupName = iprot.readString();
+ struct.setGroupNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Project.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Project.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Project.java
new file mode 100644
index 0000000..338e63b
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/Project.java
@@ -0,0 +1,1099 @@
+ /*
+ * 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.workspace;
+
+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 Project implements org.apache.thrift.TBase<Project, Project._Fields>, java.io.Serializable, Cloneable, Comparable<Project> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Project");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)5);
+ private static final org.apache.thrift.protocol.TField SHARED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedUsers", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField SHARED_GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedGroups", org.apache.thrift.protocol.TType.LIST, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ProjectStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ProjectTupleSchemeFactory());
+ }
+
+ public String projectID; // required
+ public String owner; // required
+ public String name; // required
+ public String description; // optional
+ public long creationTime; // optional
+ public List<String> sharedUsers; // optional
+ public List<String> sharedGroups; // 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 {
+ PROJECT_ID((short)1, "projectID"),
+ OWNER((short)2, "owner"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)4, "description"),
+ CREATION_TIME((short)5, "creationTime"),
+ SHARED_USERS((short)6, "sharedUsers"),
+ SHARED_GROUPS((short)7, "sharedGroups");
+
+ 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: // PROJECT_ID
+ return PROJECT_ID;
+ case 2: // OWNER
+ return OWNER;
+ case 3: // NAME
+ return NAME;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ case 5: // CREATION_TIME
+ return CREATION_TIME;
+ case 6: // SHARED_USERS
+ return SHARED_USERS;
+ case 7: // SHARED_GROUPS
+ return SHARED_GROUPS;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.DESCRIPTION,_Fields.CREATION_TIME,_Fields.SHARED_USERS,_Fields.SHARED_GROUPS};
+ 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.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.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.SHARED_USERS, new org.apache.thrift.meta_data.FieldMetaData("sharedUsers", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.SHARED_GROUPS, new org.apache.thrift.meta_data.FieldMetaData("sharedGroups", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Project.class, metaDataMap);
+ }
+
+ public Project() {
+ this.projectID = "DEFAULT";
+
+ }
+
+ public Project(
+ String projectID,
+ String owner,
+ String name)
+ {
+ this();
+ this.projectID = projectID;
+ this.owner = owner;
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Project(Project other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetProjectID()) {
+ this.projectID = other.projectID;
+ }
+ if (other.isSetOwner()) {
+ this.owner = other.owner;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetSharedUsers()) {
+ List<String> __this__sharedUsers = new ArrayList<String>(other.sharedUsers);
+ this.sharedUsers = __this__sharedUsers;
+ }
+ if (other.isSetSharedGroups()) {
+ List<String> __this__sharedGroups = new ArrayList<String>(other.sharedGroups);
+ this.sharedGroups = __this__sharedGroups;
+ }
+ }
+
+ public Project deepCopy() {
+ return new Project(this);
+ }
+
+ @Override
+ public void clear() {
+ this.projectID = "DEFAULT";
+
+ this.owner = null;
+ this.name = null;
+ this.description = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.sharedUsers = null;
+ this.sharedGroups = null;
+ }
+
+ public String getProjectID() {
+ return this.projectID;
+ }
+
+ public Project 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 getOwner() {
+ return this.owner;
+ }
+
+ public Project setOwner(String owner) {
+ this.owner = owner;
+ return this;
+ }
+
+ public void unsetOwner() {
+ this.owner = null;
+ }
+
+ /** Returns true if field owner is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwner() {
+ return this.owner != null;
+ }
+
+ public void setOwnerIsSet(boolean value) {
+ if (!value) {
+ this.owner = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Project setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Project setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public Project setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public int getSharedUsersSize() {
+ return (this.sharedUsers == null) ? 0 : this.sharedUsers.size();
+ }
+
+ public java.util.Iterator<String> getSharedUsersIterator() {
+ return (this.sharedUsers == null) ? null : this.sharedUsers.iterator();
+ }
+
+ public void addToSharedUsers(String elem) {
+ if (this.sharedUsers == null) {
+ this.sharedUsers = new ArrayList<String>();
+ }
+ this.sharedUsers.add(elem);
+ }
+
+ public List<String> getSharedUsers() {
+ return this.sharedUsers;
+ }
+
+ public Project setSharedUsers(List<String> sharedUsers) {
+ this.sharedUsers = sharedUsers;
+ return this;
+ }
+
+ public void unsetSharedUsers() {
+ this.sharedUsers = null;
+ }
+
+ /** Returns true if field sharedUsers is set (has been assigned a value) and false otherwise */
+ public boolean isSetSharedUsers() {
+ return this.sharedUsers != null;
+ }
+
+ public void setSharedUsersIsSet(boolean value) {
+ if (!value) {
+ this.sharedUsers = null;
+ }
+ }
+
+ public int getSharedGroupsSize() {
+ return (this.sharedGroups == null) ? 0 : this.sharedGroups.size();
+ }
+
+ public java.util.Iterator<String> getSharedGroupsIterator() {
+ return (this.sharedGroups == null) ? null : this.sharedGroups.iterator();
+ }
+
+ public void addToSharedGroups(String elem) {
+ if (this.sharedGroups == null) {
+ this.sharedGroups = new ArrayList<String>();
+ }
+ this.sharedGroups.add(elem);
+ }
+
+ public List<String> getSharedGroups() {
+ return this.sharedGroups;
+ }
+
+ public Project setSharedGroups(List<String> sharedGroups) {
+ this.sharedGroups = sharedGroups;
+ return this;
+ }
+
+ public void unsetSharedGroups() {
+ this.sharedGroups = null;
+ }
+
+ /** Returns true if field sharedGroups is set (has been assigned a value) and false otherwise */
+ public boolean isSetSharedGroups() {
+ return this.sharedGroups != null;
+ }
+
+ public void setSharedGroupsIsSet(boolean value) {
+ if (!value) {
+ this.sharedGroups = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PROJECT_ID:
+ if (value == null) {
+ unsetProjectID();
+ } else {
+ setProjectID((String)value);
+ }
+ break;
+
+ case OWNER:
+ if (value == null) {
+ unsetOwner();
+ } else {
+ setOwner((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case SHARED_USERS:
+ if (value == null) {
+ unsetSharedUsers();
+ } else {
+ setSharedUsers((List<String>)value);
+ }
+ break;
+
+ case SHARED_GROUPS:
+ if (value == null) {
+ unsetSharedGroups();
+ } else {
+ setSharedGroups((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PROJECT_ID:
+ return getProjectID();
+
+ case OWNER:
+ return getOwner();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case SHARED_USERS:
+ return getSharedUsers();
+
+ case SHARED_GROUPS:
+ return getSharedGroups();
+
+ }
+ 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 PROJECT_ID:
+ return isSetProjectID();
+ case OWNER:
+ return isSetOwner();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case SHARED_USERS:
+ return isSetSharedUsers();
+ case SHARED_GROUPS:
+ return isSetSharedGroups();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Project)
+ return this.equals((Project)that);
+ return false;
+ }
+
+ public boolean equals(Project that) {
+ if (that == null)
+ 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_owner = true && this.isSetOwner();
+ boolean that_present_owner = true && that.isSetOwner();
+ if (this_present_owner || that_present_owner) {
+ if (!(this_present_owner && that_present_owner))
+ return false;
+ if (!this.owner.equals(that.owner))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_sharedUsers = true && this.isSetSharedUsers();
+ boolean that_present_sharedUsers = true && that.isSetSharedUsers();
+ if (this_present_sharedUsers || that_present_sharedUsers) {
+ if (!(this_present_sharedUsers && that_present_sharedUsers))
+ return false;
+ if (!this.sharedUsers.equals(that.sharedUsers))
+ return false;
+ }
+
+ boolean this_present_sharedGroups = true && this.isSetSharedGroups();
+ boolean that_present_sharedGroups = true && that.isSetSharedGroups();
+ if (this_present_sharedGroups || that_present_sharedGroups) {
+ if (!(this_present_sharedGroups && that_present_sharedGroups))
+ return false;
+ if (!this.sharedGroups.equals(that.sharedGroups))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Project other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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(isSetOwner()).compareTo(other.isSetOwner());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwner()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSharedUsers()).compareTo(other.isSetSharedUsers());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSharedUsers()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedUsers, other.sharedUsers);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSharedGroups()).compareTo(other.isSetSharedGroups());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSharedGroups()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedGroups, other.sharedGroups);
+ 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("Project(");
+ boolean first = true;
+
+ sb.append("projectID:");
+ if (this.projectID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("owner:");
+ if (this.owner == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.owner);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetSharedUsers()) {
+ if (!first) sb.append(", ");
+ sb.append("sharedUsers:");
+ if (this.sharedUsers == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sharedUsers);
+ }
+ first = false;
+ }
+ if (isSetSharedGroups()) {
+ if (!first) sb.append(", ");
+ sb.append("sharedGroups:");
+ if (this.sharedGroups == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sharedGroups);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (projectID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' was not present! Struct: " + toString());
+ }
+ if (owner == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'owner' was not present! Struct: " + toString());
+ }
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' 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 ProjectStandardSchemeFactory implements SchemeFactory {
+ public ProjectStandardScheme getScheme() {
+ return new ProjectStandardScheme();
+ }
+ }
+
+ private static class ProjectStandardScheme extends StandardScheme<Project> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Project 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: // 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 2: // OWNER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.owner = iprot.readString();
+ struct.setOwnerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // SHARED_USERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.sharedUsers = new ArrayList<String>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.sharedUsers.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSharedUsersIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // SHARED_GROUPS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
+ struct.sharedGroups = new ArrayList<String>(_list3.size);
+ for (int _i4 = 0; _i4 < _list3.size; ++_i4)
+ {
+ String _elem5;
+ _elem5 = iprot.readString();
+ struct.sharedGroups.add(_elem5);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSharedGroupsIsSet(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, Project struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.projectID != null) {
+ oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
+ oprot.writeString(struct.projectID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.owner != null) {
+ oprot.writeFieldBegin(OWNER_FIELD_DESC);
+ oprot.writeString(struct.owner);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.sharedUsers != null) {
+ if (struct.isSetSharedUsers()) {
+ oprot.writeFieldBegin(SHARED_USERS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sharedUsers.size()));
+ for (String _iter6 : struct.sharedUsers)
+ {
+ oprot.writeString(_iter6);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.sharedGroups != null) {
+ if (struct.isSetSharedGroups()) {
+ oprot.writeFieldBegin(SHARED_GROUPS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sharedGroups.size()));
+ for (String _iter7 : struct.sharedGroups)
+ {
+ oprot.writeString(_iter7);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ProjectTupleSchemeFactory implements SchemeFactory {
+ public ProjectTupleScheme getScheme() {
+ return new ProjectTupleScheme();
+ }
+ }
+
+ private static class ProjectTupleScheme extends TupleScheme<Project> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.projectID);
+ oprot.writeString(struct.owner);
+ oprot.writeString(struct.name);
+ BitSet optionals = new BitSet();
+ if (struct.isSetDescription()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCreationTime()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSharedUsers()) {
+ optionals.set(2);
+ }
+ if (struct.isSetSharedGroups()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetSharedUsers()) {
+ {
+ oprot.writeI32(struct.sharedUsers.size());
+ for (String _iter8 : struct.sharedUsers)
+ {
+ oprot.writeString(_iter8);
+ }
+ }
+ }
+ if (struct.isSetSharedGroups()) {
+ {
+ oprot.writeI32(struct.sharedGroups.size());
+ for (String _iter9 : struct.sharedGroups)
+ {
+ oprot.writeString(_iter9);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ struct.owner = iprot.readString();
+ struct.setOwnerIsSet(true);
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.sharedUsers = new ArrayList<String>(_list10.size);
+ for (int _i11 = 0; _i11 < _list10.size; ++_i11)
+ {
+ String _elem12;
+ _elem12 = iprot.readString();
+ struct.sharedUsers.add(_elem12);
+ }
+ }
+ struct.setSharedUsersIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.sharedGroups = new ArrayList<String>(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ String _elem15;
+ _elem15 = iprot.readString();
+ struct.sharedGroups.add(_elem15);
+ }
+ }
+ struct.setSharedGroupsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/User.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/User.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/User.java
new file mode 100644
index 0000000..ef30f1d
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/User.java
@@ -0,0 +1,557 @@
+ /*
+ * 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.workspace;
+
+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 User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
+
+ 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 GROUP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("groupList", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
+ }
+
+ public String userName; // required
+ public List<Group> groupList; // 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 {
+ USER_NAME((short)1, "userName"),
+ GROUP_LIST((short)2, "groupList");
+
+ 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: // GROUP_LIST
+ return GROUP_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
+ private _Fields optionals[] = {_Fields.GROUP_LIST};
+ 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.GROUP_LIST, new org.apache.thrift.meta_data.FieldMetaData("groupList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, Group.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
+ }
+
+ public User() {
+ }
+
+ public User(
+ String userName)
+ {
+ this();
+ this.userName = userName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public User(User other) {
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetGroupList()) {
+ List<Group> __this__groupList = new ArrayList<Group>(other.groupList.size());
+ for (Group other_element : other.groupList) {
+ __this__groupList.add(new Group(other_element));
+ }
+ this.groupList = __this__groupList;
+ }
+ }
+
+ public User deepCopy() {
+ return new User(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userName = null;
+ this.groupList = null;
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public User 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 int getGroupListSize() {
+ return (this.groupList == null) ? 0 : this.groupList.size();
+ }
+
+ public java.util.Iterator<Group> getGroupListIterator() {
+ return (this.groupList == null) ? null : this.groupList.iterator();
+ }
+
+ public void addToGroupList(Group elem) {
+ if (this.groupList == null) {
+ this.groupList = new ArrayList<Group>();
+ }
+ this.groupList.add(elem);
+ }
+
+ public List<Group> getGroupList() {
+ return this.groupList;
+ }
+
+ public User setGroupList(List<Group> groupList) {
+ this.groupList = groupList;
+ return this;
+ }
+
+ public void unsetGroupList() {
+ this.groupList = null;
+ }
+
+ /** Returns true if field groupList is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupList() {
+ return this.groupList != null;
+ }
+
+ public void setGroupListIsSet(boolean value) {
+ if (!value) {
+ this.groupList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case GROUP_LIST:
+ if (value == null) {
+ unsetGroupList();
+ } else {
+ setGroupList((List<Group>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_NAME:
+ return getUserName();
+
+ case GROUP_LIST:
+ return getGroupList();
+
+ }
+ 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 GROUP_LIST:
+ return isSetGroupList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof User)
+ return this.equals((User)that);
+ return false;
+ }
+
+ public boolean equals(User 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_groupList = true && this.isSetGroupList();
+ boolean that_present_groupList = true && that.isSetGroupList();
+ if (this_present_groupList || that_present_groupList) {
+ if (!(this_present_groupList && that_present_groupList))
+ return false;
+ if (!this.groupList.equals(that.groupList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(User 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(isSetGroupList()).compareTo(other.isSetGroupList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupList, other.groupList);
+ 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("User(");
+ boolean first = true;
+
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (isSetGroupList()) {
+ if (!first) sb.append(", ");
+ sb.append("groupList:");
+ if (this.groupList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupList);
+ }
+ 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());
+ }
+ // 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 UserStandardSchemeFactory implements SchemeFactory {
+ public UserStandardScheme getScheme() {
+ return new UserStandardScheme();
+ }
+ }
+
+ private static class UserStandardScheme extends StandardScheme<User> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, User 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: // GROUP_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
+ struct.groupList = new ArrayList<Group>(_list16.size);
+ for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+ {
+ Group _elem18;
+ _elem18 = new Group();
+ _elem18.read(iprot);
+ struct.groupList.add(_elem18);
+ }
+ iprot.readListEnd();
+ }
+ struct.setGroupListIsSet(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, User 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.groupList != null) {
+ if (struct.isSetGroupList()) {
+ oprot.writeFieldBegin(GROUP_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.groupList.size()));
+ for (Group _iter19 : struct.groupList)
+ {
+ _iter19.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserTupleSchemeFactory implements SchemeFactory {
+ public UserTupleScheme getScheme() {
+ return new UserTupleScheme();
+ }
+ }
+
+ private static class UserTupleScheme extends TupleScheme<User> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.userName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetGroupList()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetGroupList()) {
+ {
+ oprot.writeI32(struct.groupList.size());
+ for (Group _iter20 : struct.groupList)
+ {
+ _iter20.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ 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.groupList = new ArrayList<Group>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ Group _elem23;
+ _elem23 = new Group();
+ _elem23.read(iprot);
+ struct.groupList.add(_elem23);
+ }
+ }
+ struct.setGroupListIsSet(true);
+ }
+ }
+ }
+
+}
+
[09/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ActionableGroup.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ActionableGroup.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ActionableGroup.java
new file mode 100644
index 0000000..c14934d
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ActionableGroup.java
@@ -0,0 +1,70 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ActionableGroup implements org.apache.thrift.TEnum {
+ RESOURCE_ADMINS(0),
+ AIRAVATA_ADMINS(1),
+ GATEWAYS_ADMINS(2),
+ USER(3),
+ CANNOT_BE_DETERMINED(4);
+
+ private final int value;
+
+ private ActionableGroup(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 ActionableGroup findByValue(int value) {
+ switch (value) {
+ case 0:
+ return RESOURCE_ADMINS;
+ case 1:
+ return AIRAVATA_ADMINS;
+ case 2:
+ return GATEWAYS_ADMINS;
+ case 3:
+ return USER;
+ case 4:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedInputDataHandling.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedInputDataHandling.java
new file mode 100644
index 0000000..299c2ba
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/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.workspace.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 PARENT_WORKING_DIRECTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("parentWorkingDirectory", 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 parentWorkingDirectory; // 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"),
+ PARENT_WORKING_DIRECTORY((short)2, "parentWorkingDirectory"),
+ 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: // PARENT_WORKING_DIRECTORY
+ return PARENT_WORKING_DIRECTORY;
+ 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.PARENT_WORKING_DIRECTORY,_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.PARENT_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("parentWorkingDirectory", 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.isSetParentWorkingDirectory()) {
+ this.parentWorkingDirectory = other.parentWorkingDirectory;
+ }
+ 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.parentWorkingDirectory = 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 getParentWorkingDirectory() {
+ return this.parentWorkingDirectory;
+ }
+
+ public AdvancedInputDataHandling setParentWorkingDirectory(String parentWorkingDirectory) {
+ this.parentWorkingDirectory = parentWorkingDirectory;
+ return this;
+ }
+
+ public void unsetParentWorkingDirectory() {
+ this.parentWorkingDirectory = null;
+ }
+
+ /** Returns true if field parentWorkingDirectory is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentWorkingDirectory() {
+ return this.parentWorkingDirectory != null;
+ }
+
+ public void setParentWorkingDirectoryIsSet(boolean value) {
+ if (!value) {
+ this.parentWorkingDirectory = 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 PARENT_WORKING_DIRECTORY:
+ if (value == null) {
+ unsetParentWorkingDirectory();
+ } else {
+ setParentWorkingDirectory((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 PARENT_WORKING_DIRECTORY:
+ return getParentWorkingDirectory();
+
+ 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 PARENT_WORKING_DIRECTORY:
+ return isSetParentWorkingDirectory();
+ 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_parentWorkingDirectory = true && this.isSetParentWorkingDirectory();
+ boolean that_present_parentWorkingDirectory = true && that.isSetParentWorkingDirectory();
+ if (this_present_parentWorkingDirectory || that_present_parentWorkingDirectory) {
+ if (!(this_present_parentWorkingDirectory && that_present_parentWorkingDirectory))
+ return false;
+ if (!this.parentWorkingDirectory.equals(that.parentWorkingDirectory))
+ 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(isSetParentWorkingDirectory()).compareTo(other.isSetParentWorkingDirectory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentWorkingDirectory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentWorkingDirectory, other.parentWorkingDirectory);
+ 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 (isSetParentWorkingDirectory()) {
+ if (!first) sb.append(", ");
+ sb.append("parentWorkingDirectory:");
+ if (this.parentWorkingDirectory == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentWorkingDirectory);
+ }
+ 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: // PARENT_WORKING_DIRECTORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentWorkingDirectory = iprot.readString();
+ struct.setParentWorkingDirectoryIsSet(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.parentWorkingDirectory != null) {
+ if (struct.isSetParentWorkingDirectory()) {
+ oprot.writeFieldBegin(PARENT_WORKING_DIRECTORY_FIELD_DESC);
+ oprot.writeString(struct.parentWorkingDirectory);
+ 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.isSetParentWorkingDirectory()) {
+ 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.isSetParentWorkingDirectory()) {
+ oprot.writeString(struct.parentWorkingDirectory);
+ }
+ 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.parentWorkingDirectory = iprot.readString();
+ struct.setParentWorkingDirectoryIsSet(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/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedOutputDataHandling.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/AdvancedOutputDataHandling.java
new file mode 100644
index 0000000..5494d8b
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/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.workspace.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 OUTPUT_DATA_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 {
+ OUTPUT_DATA_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: // OUTPUT_DATA_DIR
+ return OUTPUT_DATA_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.OUTPUT_DATA_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.OUTPUT_DATA_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 OUTPUT_DATA_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 OUTPUT_DATA_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 OUTPUT_DATA_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: // OUTPUT_DATA_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(OUTPUT_DATA_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);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ApplicationStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ApplicationStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ApplicationStatus.java
new file mode 100644
index 0000000..0e0f09a
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ApplicationStatus.java
@@ -0,0 +1,500 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class ApplicationStatus implements org.apache.thrift.TBase<ApplicationStatus, ApplicationStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationStatus");
+
+ private static final org.apache.thrift.protocol.TField APPLICATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationState", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ApplicationStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ApplicationStatusTupleSchemeFactory());
+ }
+
+ public String applicationState; // required
+ public long timeOfStateChange; // 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 {
+ APPLICATION_STATE((short)1, "applicationState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // APPLICATION_STATE
+ return APPLICATION_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.APPLICATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("applicationState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationStatus.class, metaDataMap);
+ }
+
+ public ApplicationStatus() {
+ }
+
+ public ApplicationStatus(
+ String applicationState)
+ {
+ this();
+ this.applicationState = applicationState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ApplicationStatus(ApplicationStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetApplicationState()) {
+ this.applicationState = other.applicationState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public ApplicationStatus deepCopy() {
+ return new ApplicationStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.applicationState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ public String getApplicationState() {
+ return this.applicationState;
+ }
+
+ public ApplicationStatus setApplicationState(String applicationState) {
+ this.applicationState = applicationState;
+ return this;
+ }
+
+ public void unsetApplicationState() {
+ this.applicationState = null;
+ }
+
+ /** Returns true if field applicationState is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationState() {
+ return this.applicationState != null;
+ }
+
+ public void setApplicationStateIsSet(boolean value) {
+ if (!value) {
+ this.applicationState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public ApplicationStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case APPLICATION_STATE:
+ if (value == null) {
+ unsetApplicationState();
+ } else {
+ setApplicationState((String)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case APPLICATION_STATE:
+ return getApplicationState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 APPLICATION_STATE:
+ return isSetApplicationState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ApplicationStatus)
+ return this.equals((ApplicationStatus)that);
+ return false;
+ }
+
+ public boolean equals(ApplicationStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_applicationState = true && this.isSetApplicationState();
+ boolean that_present_applicationState = true && that.isSetApplicationState();
+ if (this_present_applicationState || that_present_applicationState) {
+ if (!(this_present_applicationState && that_present_applicationState))
+ return false;
+ if (!this.applicationState.equals(that.applicationState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ApplicationStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetApplicationState()).compareTo(other.isSetApplicationState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationState, other.applicationState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("ApplicationStatus(");
+ boolean first = true;
+
+ sb.append("applicationState:");
+ if (this.applicationState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (applicationState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'applicationState' 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 ApplicationStatusStandardSchemeFactory implements SchemeFactory {
+ public ApplicationStatusStandardScheme getScheme() {
+ return new ApplicationStatusStandardScheme();
+ }
+ }
+
+ private static class ApplicationStatusStandardScheme extends StandardScheme<ApplicationStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationStatus 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: // APPLICATION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationState = iprot.readString();
+ struct.setApplicationStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, ApplicationStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.applicationState != null) {
+ oprot.writeFieldBegin(APPLICATION_STATE_FIELD_DESC);
+ oprot.writeString(struct.applicationState);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ApplicationStatusTupleSchemeFactory implements SchemeFactory {
+ public ApplicationStatusTupleScheme getScheme() {
+ return new ApplicationStatusTupleScheme();
+ }
+ }
+
+ private static class ApplicationStatusTupleScheme extends TupleScheme<ApplicationStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.applicationState);
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.applicationState = iprot.readString();
+ struct.setApplicationStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
[07/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
new file mode 100644
index 0000000..a141c84
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.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.workspace.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;
+
+@SuppressWarnings("all") public class DataTransferDetails implements org.apache.thrift.TBase<DataTransferDetails, DataTransferDetails._Fields>, java.io.Serializable, Cloneable, Comparable<DataTransferDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataTransferDetails");
+
+ private static final org.apache.thrift.protocol.TField TRANSFER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transferID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField TRANSFER_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField TRANSFER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStatus", 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 DataTransferDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataTransferDetailsTupleSchemeFactory());
+ }
+
+ public String transferID; // required
+ public long creationTime; // optional
+ public String transferDescription; // required
+ public TransferStatus transferStatus; // 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 {
+ TRANSFER_ID((short)1, "transferID"),
+ CREATION_TIME((short)2, "creationTime"),
+ TRANSFER_DESCRIPTION((short)3, "transferDescription"),
+ TRANSFER_STATUS((short)4, "transferStatus");
+
+ 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: // TRANSFER_ID
+ return TRANSFER_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // TRANSFER_DESCRIPTION
+ return TRANSFER_DESCRIPTION;
+ case 4: // TRANSFER_STATUS
+ return TRANSFER_STATUS;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.TRANSFER_STATUS};
+ 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.TRANSFER_ID, new org.apache.thrift.meta_data.FieldMetaData("transferID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.TRANSFER_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("transferDescription", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TRANSFER_STATUS, new org.apache.thrift.meta_data.FieldMetaData("transferStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataTransferDetails.class, metaDataMap);
+ }
+
+ public DataTransferDetails() {
+ this.transferID = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public DataTransferDetails(
+ String transferID,
+ String transferDescription)
+ {
+ this();
+ this.transferID = transferID;
+ this.transferDescription = transferDescription;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataTransferDetails(DataTransferDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTransferID()) {
+ this.transferID = other.transferID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetTransferDescription()) {
+ this.transferDescription = other.transferDescription;
+ }
+ if (other.isSetTransferStatus()) {
+ this.transferStatus = new TransferStatus(other.transferStatus);
+ }
+ }
+
+ public DataTransferDetails deepCopy() {
+ return new DataTransferDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.transferID = "DO_NOT_SET_AT_CLIENTS";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.transferDescription = null;
+ this.transferStatus = null;
+ }
+
+ public String getTransferID() {
+ return this.transferID;
+ }
+
+ public DataTransferDetails setTransferID(String transferID) {
+ this.transferID = transferID;
+ return this;
+ }
+
+ public void unsetTransferID() {
+ this.transferID = null;
+ }
+
+ /** Returns true if field transferID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferID() {
+ return this.transferID != null;
+ }
+
+ public void setTransferIDIsSet(boolean value) {
+ if (!value) {
+ this.transferID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public DataTransferDetails setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getTransferDescription() {
+ return this.transferDescription;
+ }
+
+ public DataTransferDetails setTransferDescription(String transferDescription) {
+ this.transferDescription = transferDescription;
+ return this;
+ }
+
+ public void unsetTransferDescription() {
+ this.transferDescription = null;
+ }
+
+ /** Returns true if field transferDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferDescription() {
+ return this.transferDescription != null;
+ }
+
+ public void setTransferDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.transferDescription = null;
+ }
+ }
+
+ public TransferStatus getTransferStatus() {
+ return this.transferStatus;
+ }
+
+ public DataTransferDetails setTransferStatus(TransferStatus transferStatus) {
+ this.transferStatus = transferStatus;
+ return this;
+ }
+
+ public void unsetTransferStatus() {
+ this.transferStatus = null;
+ }
+
+ /** Returns true if field transferStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferStatus() {
+ return this.transferStatus != null;
+ }
+
+ public void setTransferStatusIsSet(boolean value) {
+ if (!value) {
+ this.transferStatus = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRANSFER_ID:
+ if (value == null) {
+ unsetTransferID();
+ } else {
+ setTransferID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case TRANSFER_DESCRIPTION:
+ if (value == null) {
+ unsetTransferDescription();
+ } else {
+ setTransferDescription((String)value);
+ }
+ break;
+
+ case TRANSFER_STATUS:
+ if (value == null) {
+ unsetTransferStatus();
+ } else {
+ setTransferStatus((TransferStatus)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRANSFER_ID:
+ return getTransferID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case TRANSFER_DESCRIPTION:
+ return getTransferDescription();
+
+ case TRANSFER_STATUS:
+ return getTransferStatus();
+
+ }
+ 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 TRANSFER_ID:
+ return isSetTransferID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case TRANSFER_DESCRIPTION:
+ return isSetTransferDescription();
+ case TRANSFER_STATUS:
+ return isSetTransferStatus();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataTransferDetails)
+ return this.equals((DataTransferDetails)that);
+ return false;
+ }
+
+ public boolean equals(DataTransferDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_transferID = true && this.isSetTransferID();
+ boolean that_present_transferID = true && that.isSetTransferID();
+ if (this_present_transferID || that_present_transferID) {
+ if (!(this_present_transferID && that_present_transferID))
+ return false;
+ if (!this.transferID.equals(that.transferID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_transferDescription = true && this.isSetTransferDescription();
+ boolean that_present_transferDescription = true && that.isSetTransferDescription();
+ if (this_present_transferDescription || that_present_transferDescription) {
+ if (!(this_present_transferDescription && that_present_transferDescription))
+ return false;
+ if (!this.transferDescription.equals(that.transferDescription))
+ return false;
+ }
+
+ boolean this_present_transferStatus = true && this.isSetTransferStatus();
+ boolean that_present_transferStatus = true && that.isSetTransferStatus();
+ if (this_present_transferStatus || that_present_transferStatus) {
+ if (!(this_present_transferStatus && that_present_transferStatus))
+ return false;
+ if (!this.transferStatus.equals(that.transferStatus))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(DataTransferDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTransferID()).compareTo(other.isSetTransferID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferID, other.transferID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransferDescription()).compareTo(other.isSetTransferDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDescription, other.transferDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransferStatus()).compareTo(other.isSetTransferStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferStatus, other.transferStatus);
+ 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("DataTransferDetails(");
+ boolean first = true;
+
+ sb.append("transferID:");
+ if (this.transferID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("transferDescription:");
+ if (this.transferDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferDescription);
+ }
+ first = false;
+ if (isSetTransferStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("transferStatus:");
+ if (this.transferStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferStatus);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (transferID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferID' was not present! Struct: " + toString());
+ }
+ if (transferDescription == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferDescription' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (transferStatus != null) {
+ transferStatus.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 {
+ // 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 DataTransferDetailsStandardSchemeFactory implements SchemeFactory {
+ public DataTransferDetailsStandardScheme getScheme() {
+ return new DataTransferDetailsStandardScheme();
+ }
+ }
+
+ private static class DataTransferDetailsStandardScheme extends StandardScheme<DataTransferDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataTransferDetails 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: // TRANSFER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.transferID = iprot.readString();
+ struct.setTransferIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TRANSFER_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.transferDescription = iprot.readString();
+ struct.setTransferDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // TRANSFER_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.transferStatus = new TransferStatus();
+ struct.transferStatus.read(iprot);
+ struct.setTransferStatusIsSet(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, DataTransferDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.transferID != null) {
+ oprot.writeFieldBegin(TRANSFER_ID_FIELD_DESC);
+ oprot.writeString(struct.transferID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.transferDescription != null) {
+ oprot.writeFieldBegin(TRANSFER_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.transferDescription);
+ oprot.writeFieldEnd();
+ }
+ if (struct.transferStatus != null) {
+ if (struct.isSetTransferStatus()) {
+ oprot.writeFieldBegin(TRANSFER_STATUS_FIELD_DESC);
+ struct.transferStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataTransferDetailsTupleSchemeFactory implements SchemeFactory {
+ public DataTransferDetailsTupleScheme getScheme() {
+ return new DataTransferDetailsTupleScheme();
+ }
+ }
+
+ private static class DataTransferDetailsTupleScheme extends TupleScheme<DataTransferDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.transferID);
+ oprot.writeString(struct.transferDescription);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTransferStatus()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetTransferStatus()) {
+ struct.transferStatus.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.transferID = iprot.readString();
+ struct.setTransferIDIsSet(true);
+ struct.transferDescription = iprot.readString();
+ struct.setTransferDescriptionIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.transferStatus = new TransferStatus();
+ struct.transferStatus.read(iprot);
+ struct.setTransferStatusIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorCategory.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorCategory.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorCategory.java
new file mode 100644
index 0000000..d2a6c12
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorCategory.java
@@ -0,0 +1,79 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ErrorCategory implements org.apache.thrift.TEnum {
+ FILE_SYSTEM_FAILURE(0),
+ APPLICATION_FAILURE(1),
+ RESOURCE_NODE_FAILURE(2),
+ DISK_FULL(3),
+ INSUFFICIENT_ALLOCATION(4),
+ SYSTEM_MAINTENANCE(5),
+ AIRAVATA_INTERNAL_ERROR(6),
+ CANNOT_BE_DETERMINED(7);
+
+ private final int value;
+
+ private ErrorCategory(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 ErrorCategory findByValue(int value) {
+ switch (value) {
+ case 0:
+ return FILE_SYSTEM_FAILURE;
+ case 1:
+ return APPLICATION_FAILURE;
+ case 2:
+ return RESOURCE_NODE_FAILURE;
+ case 3:
+ return DISK_FULL;
+ case 4:
+ return INSUFFICIENT_ALLOCATION;
+ case 5:
+ return SYSTEM_MAINTENANCE;
+ case 6:
+ return AIRAVATA_INTERNAL_ERROR;
+ case 7:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
new file mode 100644
index 0000000..2e717e6
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
@@ -0,0 +1,1309 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class ErrorDetails implements org.apache.thrift.TBase<ErrorDetails, ErrorDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorDetails");
+
+ private static final org.apache.thrift.protocol.TField ERROR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("errorID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField ACTUAL_ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("actualErrorMessage", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField USER_FRIENDLY_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyMessage", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField ERROR_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCategory", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField TRANSIENT_OR_PERSISTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("transientOrPersistent", org.apache.thrift.protocol.TType.BOOL, (short)6);
+ private static final org.apache.thrift.protocol.TField CORRECTIVE_ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("correctiveAction", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField ACTIONABLE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("actionableGroup", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField ROOT_CAUSE_ERROR_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("rootCauseErrorIdList", org.apache.thrift.protocol.TType.LIST, (short)9);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ErrorDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ErrorDetailsTupleSchemeFactory());
+ }
+
+ public String errorID; // required
+ public long creationTime; // optional
+ public String actualErrorMessage; // optional
+ public String userFriendlyMessage; // optional
+ /**
+ *
+ * @see ErrorCategory
+ */
+ public ErrorCategory errorCategory; // optional
+ public boolean transientOrPersistent; // optional
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ public CorrectiveAction correctiveAction; // optional
+ /**
+ *
+ * @see ActionableGroup
+ */
+ public ActionableGroup actionableGroup; // optional
+ public List<String> rootCauseErrorIdList; // 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 {
+ ERROR_ID((short)1, "errorID"),
+ CREATION_TIME((short)2, "creationTime"),
+ ACTUAL_ERROR_MESSAGE((short)3, "actualErrorMessage"),
+ USER_FRIENDLY_MESSAGE((short)4, "userFriendlyMessage"),
+ /**
+ *
+ * @see ErrorCategory
+ */
+ ERROR_CATEGORY((short)5, "errorCategory"),
+ TRANSIENT_OR_PERSISTENT((short)6, "transientOrPersistent"),
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ CORRECTIVE_ACTION((short)7, "correctiveAction"),
+ /**
+ *
+ * @see ActionableGroup
+ */
+ ACTIONABLE_GROUP((short)8, "actionableGroup"),
+ ROOT_CAUSE_ERROR_ID_LIST((short)9, "rootCauseErrorIdList");
+
+ 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: // ERROR_ID
+ return ERROR_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // ACTUAL_ERROR_MESSAGE
+ return ACTUAL_ERROR_MESSAGE;
+ case 4: // USER_FRIENDLY_MESSAGE
+ return USER_FRIENDLY_MESSAGE;
+ case 5: // ERROR_CATEGORY
+ return ERROR_CATEGORY;
+ case 6: // TRANSIENT_OR_PERSISTENT
+ return TRANSIENT_OR_PERSISTENT;
+ case 7: // CORRECTIVE_ACTION
+ return CORRECTIVE_ACTION;
+ case 8: // ACTIONABLE_GROUP
+ return ACTIONABLE_GROUP;
+ case 9: // ROOT_CAUSE_ERROR_ID_LIST
+ return ROOT_CAUSE_ERROR_ID_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
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private static final int __TRANSIENTORPERSISTENT_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.ACTUAL_ERROR_MESSAGE,_Fields.USER_FRIENDLY_MESSAGE,_Fields.ERROR_CATEGORY,_Fields.TRANSIENT_OR_PERSISTENT,_Fields.CORRECTIVE_ACTION,_Fields.ACTIONABLE_GROUP,_Fields.ROOT_CAUSE_ERROR_ID_LIST};
+ 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.ERROR_ID, new org.apache.thrift.meta_data.FieldMetaData("errorID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.ACTUAL_ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("actualErrorMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_FRIENDLY_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("userFriendlyMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ERROR_CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("errorCategory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ErrorCategory.class)));
+ tmpMap.put(_Fields.TRANSIENT_OR_PERSISTENT, new org.apache.thrift.meta_data.FieldMetaData("transientOrPersistent", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.CORRECTIVE_ACTION, new org.apache.thrift.meta_data.FieldMetaData("correctiveAction", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CorrectiveAction.class)));
+ tmpMap.put(_Fields.ACTIONABLE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("actionableGroup", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ActionableGroup.class)));
+ tmpMap.put(_Fields.ROOT_CAUSE_ERROR_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("rootCauseErrorIdList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ErrorDetails.class, metaDataMap);
+ }
+
+ public ErrorDetails() {
+ this.errorID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.transientOrPersistent = false;
+
+ }
+
+ public ErrorDetails(
+ String errorID)
+ {
+ this();
+ this.errorID = errorID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ErrorDetails(ErrorDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetErrorID()) {
+ this.errorID = other.errorID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetActualErrorMessage()) {
+ this.actualErrorMessage = other.actualErrorMessage;
+ }
+ if (other.isSetUserFriendlyMessage()) {
+ this.userFriendlyMessage = other.userFriendlyMessage;
+ }
+ if (other.isSetErrorCategory()) {
+ this.errorCategory = other.errorCategory;
+ }
+ this.transientOrPersistent = other.transientOrPersistent;
+ if (other.isSetCorrectiveAction()) {
+ this.correctiveAction = other.correctiveAction;
+ }
+ if (other.isSetActionableGroup()) {
+ this.actionableGroup = other.actionableGroup;
+ }
+ if (other.isSetRootCauseErrorIdList()) {
+ List<String> __this__rootCauseErrorIdList = new ArrayList<String>(other.rootCauseErrorIdList);
+ this.rootCauseErrorIdList = __this__rootCauseErrorIdList;
+ }
+ }
+
+ public ErrorDetails deepCopy() {
+ return new ErrorDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.errorID = "DO_NOT_SET_AT_CLIENTS";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.actualErrorMessage = null;
+ this.userFriendlyMessage = null;
+ this.errorCategory = null;
+ this.transientOrPersistent = false;
+
+ this.correctiveAction = null;
+ this.actionableGroup = null;
+ this.rootCauseErrorIdList = null;
+ }
+
+ public String getErrorID() {
+ return this.errorID;
+ }
+
+ public ErrorDetails setErrorID(String errorID) {
+ this.errorID = errorID;
+ return this;
+ }
+
+ public void unsetErrorID() {
+ this.errorID = null;
+ }
+
+ /** Returns true if field errorID is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorID() {
+ return this.errorID != null;
+ }
+
+ public void setErrorIDIsSet(boolean value) {
+ if (!value) {
+ this.errorID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public ErrorDetails setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getActualErrorMessage() {
+ return this.actualErrorMessage;
+ }
+
+ public ErrorDetails setActualErrorMessage(String actualErrorMessage) {
+ this.actualErrorMessage = actualErrorMessage;
+ return this;
+ }
+
+ public void unsetActualErrorMessage() {
+ this.actualErrorMessage = null;
+ }
+
+ /** Returns true if field actualErrorMessage is set (has been assigned a value) and false otherwise */
+ public boolean isSetActualErrorMessage() {
+ return this.actualErrorMessage != null;
+ }
+
+ public void setActualErrorMessageIsSet(boolean value) {
+ if (!value) {
+ this.actualErrorMessage = null;
+ }
+ }
+
+ public String getUserFriendlyMessage() {
+ return this.userFriendlyMessage;
+ }
+
+ public ErrorDetails setUserFriendlyMessage(String userFriendlyMessage) {
+ this.userFriendlyMessage = userFriendlyMessage;
+ return this;
+ }
+
+ public void unsetUserFriendlyMessage() {
+ this.userFriendlyMessage = null;
+ }
+
+ /** Returns true if field userFriendlyMessage is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserFriendlyMessage() {
+ return this.userFriendlyMessage != null;
+ }
+
+ public void setUserFriendlyMessageIsSet(boolean value) {
+ if (!value) {
+ this.userFriendlyMessage = null;
+ }
+ }
+
+ /**
+ *
+ * @see ErrorCategory
+ */
+ public ErrorCategory getErrorCategory() {
+ return this.errorCategory;
+ }
+
+ /**
+ *
+ * @see ErrorCategory
+ */
+ public ErrorDetails setErrorCategory(ErrorCategory errorCategory) {
+ this.errorCategory = errorCategory;
+ return this;
+ }
+
+ public void unsetErrorCategory() {
+ this.errorCategory = null;
+ }
+
+ /** Returns true if field errorCategory is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorCategory() {
+ return this.errorCategory != null;
+ }
+
+ public void setErrorCategoryIsSet(boolean value) {
+ if (!value) {
+ this.errorCategory = null;
+ }
+ }
+
+ public boolean isTransientOrPersistent() {
+ return this.transientOrPersistent;
+ }
+
+ public ErrorDetails setTransientOrPersistent(boolean transientOrPersistent) {
+ this.transientOrPersistent = transientOrPersistent;
+ setTransientOrPersistentIsSet(true);
+ return this;
+ }
+
+ public void unsetTransientOrPersistent() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID);
+ }
+
+ /** Returns true if field transientOrPersistent is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransientOrPersistent() {
+ return EncodingUtils.testBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID);
+ }
+
+ public void setTransientOrPersistentIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ public CorrectiveAction getCorrectiveAction() {
+ return this.correctiveAction;
+ }
+
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ public ErrorDetails setCorrectiveAction(CorrectiveAction correctiveAction) {
+ this.correctiveAction = correctiveAction;
+ return this;
+ }
+
+ public void unsetCorrectiveAction() {
+ this.correctiveAction = null;
+ }
+
+ /** Returns true if field correctiveAction is set (has been assigned a value) and false otherwise */
+ public boolean isSetCorrectiveAction() {
+ return this.correctiveAction != null;
+ }
+
+ public void setCorrectiveActionIsSet(boolean value) {
+ if (!value) {
+ this.correctiveAction = null;
+ }
+ }
+
+ /**
+ *
+ * @see ActionableGroup
+ */
+ public ActionableGroup getActionableGroup() {
+ return this.actionableGroup;
+ }
+
+ /**
+ *
+ * @see ActionableGroup
+ */
+ public ErrorDetails setActionableGroup(ActionableGroup actionableGroup) {
+ this.actionableGroup = actionableGroup;
+ return this;
+ }
+
+ public void unsetActionableGroup() {
+ this.actionableGroup = null;
+ }
+
+ /** Returns true if field actionableGroup is set (has been assigned a value) and false otherwise */
+ public boolean isSetActionableGroup() {
+ return this.actionableGroup != null;
+ }
+
+ public void setActionableGroupIsSet(boolean value) {
+ if (!value) {
+ this.actionableGroup = null;
+ }
+ }
+
+ public int getRootCauseErrorIdListSize() {
+ return (this.rootCauseErrorIdList == null) ? 0 : this.rootCauseErrorIdList.size();
+ }
+
+ public java.util.Iterator<String> getRootCauseErrorIdListIterator() {
+ return (this.rootCauseErrorIdList == null) ? null : this.rootCauseErrorIdList.iterator();
+ }
+
+ public void addToRootCauseErrorIdList(String elem) {
+ if (this.rootCauseErrorIdList == null) {
+ this.rootCauseErrorIdList = new ArrayList<String>();
+ }
+ this.rootCauseErrorIdList.add(elem);
+ }
+
+ public List<String> getRootCauseErrorIdList() {
+ return this.rootCauseErrorIdList;
+ }
+
+ public ErrorDetails setRootCauseErrorIdList(List<String> rootCauseErrorIdList) {
+ this.rootCauseErrorIdList = rootCauseErrorIdList;
+ return this;
+ }
+
+ public void unsetRootCauseErrorIdList() {
+ this.rootCauseErrorIdList = null;
+ }
+
+ /** Returns true if field rootCauseErrorIdList is set (has been assigned a value) and false otherwise */
+ public boolean isSetRootCauseErrorIdList() {
+ return this.rootCauseErrorIdList != null;
+ }
+
+ public void setRootCauseErrorIdListIsSet(boolean value) {
+ if (!value) {
+ this.rootCauseErrorIdList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ERROR_ID:
+ if (value == null) {
+ unsetErrorID();
+ } else {
+ setErrorID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case ACTUAL_ERROR_MESSAGE:
+ if (value == null) {
+ unsetActualErrorMessage();
+ } else {
+ setActualErrorMessage((String)value);
+ }
+ break;
+
+ case USER_FRIENDLY_MESSAGE:
+ if (value == null) {
+ unsetUserFriendlyMessage();
+ } else {
+ setUserFriendlyMessage((String)value);
+ }
+ break;
+
+ case ERROR_CATEGORY:
+ if (value == null) {
+ unsetErrorCategory();
+ } else {
+ setErrorCategory((ErrorCategory)value);
+ }
+ break;
+
+ case TRANSIENT_OR_PERSISTENT:
+ if (value == null) {
+ unsetTransientOrPersistent();
+ } else {
+ setTransientOrPersistent((Boolean)value);
+ }
+ break;
+
+ case CORRECTIVE_ACTION:
+ if (value == null) {
+ unsetCorrectiveAction();
+ } else {
+ setCorrectiveAction((CorrectiveAction)value);
+ }
+ break;
+
+ case ACTIONABLE_GROUP:
+ if (value == null) {
+ unsetActionableGroup();
+ } else {
+ setActionableGroup((ActionableGroup)value);
+ }
+ break;
+
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ if (value == null) {
+ unsetRootCauseErrorIdList();
+ } else {
+ setRootCauseErrorIdList((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ERROR_ID:
+ return getErrorID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case ACTUAL_ERROR_MESSAGE:
+ return getActualErrorMessage();
+
+ case USER_FRIENDLY_MESSAGE:
+ return getUserFriendlyMessage();
+
+ case ERROR_CATEGORY:
+ return getErrorCategory();
+
+ case TRANSIENT_OR_PERSISTENT:
+ return Boolean.valueOf(isTransientOrPersistent());
+
+ case CORRECTIVE_ACTION:
+ return getCorrectiveAction();
+
+ case ACTIONABLE_GROUP:
+ return getActionableGroup();
+
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ return getRootCauseErrorIdList();
+
+ }
+ 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 ERROR_ID:
+ return isSetErrorID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case ACTUAL_ERROR_MESSAGE:
+ return isSetActualErrorMessage();
+ case USER_FRIENDLY_MESSAGE:
+ return isSetUserFriendlyMessage();
+ case ERROR_CATEGORY:
+ return isSetErrorCategory();
+ case TRANSIENT_OR_PERSISTENT:
+ return isSetTransientOrPersistent();
+ case CORRECTIVE_ACTION:
+ return isSetCorrectiveAction();
+ case ACTIONABLE_GROUP:
+ return isSetActionableGroup();
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ return isSetRootCauseErrorIdList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ErrorDetails)
+ return this.equals((ErrorDetails)that);
+ return false;
+ }
+
+ public boolean equals(ErrorDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_errorID = true && this.isSetErrorID();
+ boolean that_present_errorID = true && that.isSetErrorID();
+ if (this_present_errorID || that_present_errorID) {
+ if (!(this_present_errorID && that_present_errorID))
+ return false;
+ if (!this.errorID.equals(that.errorID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_actualErrorMessage = true && this.isSetActualErrorMessage();
+ boolean that_present_actualErrorMessage = true && that.isSetActualErrorMessage();
+ if (this_present_actualErrorMessage || that_present_actualErrorMessage) {
+ if (!(this_present_actualErrorMessage && that_present_actualErrorMessage))
+ return false;
+ if (!this.actualErrorMessage.equals(that.actualErrorMessage))
+ return false;
+ }
+
+ boolean this_present_userFriendlyMessage = true && this.isSetUserFriendlyMessage();
+ boolean that_present_userFriendlyMessage = true && that.isSetUserFriendlyMessage();
+ if (this_present_userFriendlyMessage || that_present_userFriendlyMessage) {
+ if (!(this_present_userFriendlyMessage && that_present_userFriendlyMessage))
+ return false;
+ if (!this.userFriendlyMessage.equals(that.userFriendlyMessage))
+ return false;
+ }
+
+ boolean this_present_errorCategory = true && this.isSetErrorCategory();
+ boolean that_present_errorCategory = true && that.isSetErrorCategory();
+ if (this_present_errorCategory || that_present_errorCategory) {
+ if (!(this_present_errorCategory && that_present_errorCategory))
+ return false;
+ if (!this.errorCategory.equals(that.errorCategory))
+ return false;
+ }
+
+ boolean this_present_transientOrPersistent = true && this.isSetTransientOrPersistent();
+ boolean that_present_transientOrPersistent = true && that.isSetTransientOrPersistent();
+ if (this_present_transientOrPersistent || that_present_transientOrPersistent) {
+ if (!(this_present_transientOrPersistent && that_present_transientOrPersistent))
+ return false;
+ if (this.transientOrPersistent != that.transientOrPersistent)
+ return false;
+ }
+
+ boolean this_present_correctiveAction = true && this.isSetCorrectiveAction();
+ boolean that_present_correctiveAction = true && that.isSetCorrectiveAction();
+ if (this_present_correctiveAction || that_present_correctiveAction) {
+ if (!(this_present_correctiveAction && that_present_correctiveAction))
+ return false;
+ if (!this.correctiveAction.equals(that.correctiveAction))
+ return false;
+ }
+
+ boolean this_present_actionableGroup = true && this.isSetActionableGroup();
+ boolean that_present_actionableGroup = true && that.isSetActionableGroup();
+ if (this_present_actionableGroup || that_present_actionableGroup) {
+ if (!(this_present_actionableGroup && that_present_actionableGroup))
+ return false;
+ if (!this.actionableGroup.equals(that.actionableGroup))
+ return false;
+ }
+
+ boolean this_present_rootCauseErrorIdList = true && this.isSetRootCauseErrorIdList();
+ boolean that_present_rootCauseErrorIdList = true && that.isSetRootCauseErrorIdList();
+ if (this_present_rootCauseErrorIdList || that_present_rootCauseErrorIdList) {
+ if (!(this_present_rootCauseErrorIdList && that_present_rootCauseErrorIdList))
+ return false;
+ if (!this.rootCauseErrorIdList.equals(that.rootCauseErrorIdList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ErrorDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetErrorID()).compareTo(other.isSetErrorID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorID, other.errorID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetActualErrorMessage()).compareTo(other.isSetActualErrorMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetActualErrorMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actualErrorMessage, other.actualErrorMessage);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserFriendlyMessage()).compareTo(other.isSetUserFriendlyMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserFriendlyMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userFriendlyMessage, other.userFriendlyMessage);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrorCategory()).compareTo(other.isSetErrorCategory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorCategory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCategory, other.errorCategory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransientOrPersistent()).compareTo(other.isSetTransientOrPersistent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransientOrPersistent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transientOrPersistent, other.transientOrPersistent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCorrectiveAction()).compareTo(other.isSetCorrectiveAction());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCorrectiveAction()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.correctiveAction, other.correctiveAction);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetActionableGroup()).compareTo(other.isSetActionableGroup());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetActionableGroup()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actionableGroup, other.actionableGroup);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRootCauseErrorIdList()).compareTo(other.isSetRootCauseErrorIdList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRootCauseErrorIdList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootCauseErrorIdList, other.rootCauseErrorIdList);
+ 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("ErrorDetails(");
+ boolean first = true;
+
+ sb.append("errorID:");
+ if (this.errorID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetActualErrorMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("actualErrorMessage:");
+ if (this.actualErrorMessage == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.actualErrorMessage);
+ }
+ first = false;
+ }
+ if (isSetUserFriendlyMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("userFriendlyMessage:");
+ if (this.userFriendlyMessage == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userFriendlyMessage);
+ }
+ first = false;
+ }
+ if (isSetErrorCategory()) {
+ if (!first) sb.append(", ");
+ sb.append("errorCategory:");
+ if (this.errorCategory == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorCategory);
+ }
+ first = false;
+ }
+ if (isSetTransientOrPersistent()) {
+ if (!first) sb.append(", ");
+ sb.append("transientOrPersistent:");
+ sb.append(this.transientOrPersistent);
+ first = false;
+ }
+ if (isSetCorrectiveAction()) {
+ if (!first) sb.append(", ");
+ sb.append("correctiveAction:");
+ if (this.correctiveAction == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.correctiveAction);
+ }
+ first = false;
+ }
+ if (isSetActionableGroup()) {
+ if (!first) sb.append(", ");
+ sb.append("actionableGroup:");
+ if (this.actionableGroup == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.actionableGroup);
+ }
+ first = false;
+ }
+ if (isSetRootCauseErrorIdList()) {
+ if (!first) sb.append(", ");
+ sb.append("rootCauseErrorIdList:");
+ if (this.rootCauseErrorIdList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rootCauseErrorIdList);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (errorID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorID' 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 ErrorDetailsStandardSchemeFactory implements SchemeFactory {
+ public ErrorDetailsStandardScheme getScheme() {
+ return new ErrorDetailsStandardScheme();
+ }
+ }
+
+ private static class ErrorDetailsStandardScheme extends StandardScheme<ErrorDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ErrorDetails 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: // ERROR_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.errorID = iprot.readString();
+ struct.setErrorIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ACTUAL_ERROR_MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.actualErrorMessage = iprot.readString();
+ struct.setActualErrorMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // USER_FRIENDLY_MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userFriendlyMessage = iprot.readString();
+ struct.setUserFriendlyMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ERROR_CATEGORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.errorCategory = ErrorCategory.findByValue(iprot.readI32());
+ struct.setErrorCategoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // TRANSIENT_OR_PERSISTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.transientOrPersistent = iprot.readBool();
+ struct.setTransientOrPersistentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // CORRECTIVE_ACTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.correctiveAction = CorrectiveAction.findByValue(iprot.readI32());
+ struct.setCorrectiveActionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ACTIONABLE_GROUP
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.actionableGroup = ActionableGroup.findByValue(iprot.readI32());
+ struct.setActionableGroupIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ROOT_CAUSE_ERROR_ID_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.rootCauseErrorIdList = new ArrayList<String>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.rootCauseErrorIdList.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setRootCauseErrorIdListIsSet(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, ErrorDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.errorID != null) {
+ oprot.writeFieldBegin(ERROR_ID_FIELD_DESC);
+ oprot.writeString(struct.errorID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.actualErrorMessage != null) {
+ if (struct.isSetActualErrorMessage()) {
+ oprot.writeFieldBegin(ACTUAL_ERROR_MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.actualErrorMessage);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userFriendlyMessage != null) {
+ if (struct.isSetUserFriendlyMessage()) {
+ oprot.writeFieldBegin(USER_FRIENDLY_MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.userFriendlyMessage);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errorCategory != null) {
+ if (struct.isSetErrorCategory()) {
+ oprot.writeFieldBegin(ERROR_CATEGORY_FIELD_DESC);
+ oprot.writeI32(struct.errorCategory.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ oprot.writeFieldBegin(TRANSIENT_OR_PERSISTENT_FIELD_DESC);
+ oprot.writeBool(struct.transientOrPersistent);
+ oprot.writeFieldEnd();
+ }
+ if (struct.correctiveAction != null) {
+ if (struct.isSetCorrectiveAction()) {
+ oprot.writeFieldBegin(CORRECTIVE_ACTION_FIELD_DESC);
+ oprot.writeI32(struct.correctiveAction.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.actionableGroup != null) {
+ if (struct.isSetActionableGroup()) {
+ oprot.writeFieldBegin(ACTIONABLE_GROUP_FIELD_DESC);
+ oprot.writeI32(struct.actionableGroup.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.rootCauseErrorIdList != null) {
+ if (struct.isSetRootCauseErrorIdList()) {
+ oprot.writeFieldBegin(ROOT_CAUSE_ERROR_ID_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rootCauseErrorIdList.size()));
+ for (String _iter3 : struct.rootCauseErrorIdList)
+ {
+ oprot.writeString(_iter3);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ErrorDetailsTupleSchemeFactory implements SchemeFactory {
+ public ErrorDetailsTupleScheme getScheme() {
+ return new ErrorDetailsTupleScheme();
+ }
+ }
+
+ private static class ErrorDetailsTupleScheme extends TupleScheme<ErrorDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.errorID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetActualErrorMessage()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUserFriendlyMessage()) {
+ optionals.set(2);
+ }
+ if (struct.isSetErrorCategory()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCorrectiveAction()) {
+ optionals.set(5);
+ }
+ if (struct.isSetActionableGroup()) {
+ optionals.set(6);
+ }
+ if (struct.isSetRootCauseErrorIdList()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetActualErrorMessage()) {
+ oprot.writeString(struct.actualErrorMessage);
+ }
+ if (struct.isSetUserFriendlyMessage()) {
+ oprot.writeString(struct.userFriendlyMessage);
+ }
+ if (struct.isSetErrorCategory()) {
+ oprot.writeI32(struct.errorCategory.getValue());
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ oprot.writeBool(struct.transientOrPersistent);
+ }
+ if (struct.isSetCorrectiveAction()) {
+ oprot.writeI32(struct.correctiveAction.getValue());
+ }
+ if (struct.isSetActionableGroup()) {
+ oprot.writeI32(struct.actionableGroup.getValue());
+ }
+ if (struct.isSetRootCauseErrorIdList()) {
+ {
+ oprot.writeI32(struct.rootCauseErrorIdList.size());
+ for (String _iter4 : struct.rootCauseErrorIdList)
+ {
+ oprot.writeString(_iter4);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.errorID = iprot.readString();
+ struct.setErrorIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.actualErrorMessage = iprot.readString();
+ struct.setActualErrorMessageIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.userFriendlyMessage = iprot.readString();
+ struct.setUserFriendlyMessageIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.errorCategory = ErrorCategory.findByValue(iprot.readI32());
+ struct.setErrorCategoryIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.transientOrPersistent = iprot.readBool();
+ struct.setTransientOrPersistentIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.correctiveAction = CorrectiveAction.findByValue(iprot.readI32());
+ struct.setCorrectiveActionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.actionableGroup = ActionableGroup.findByValue(iprot.readI32());
+ struct.setActionableGroupIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.rootCauseErrorIdList = new ArrayList<String>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ String _elem7;
+ _elem7 = iprot.readString();
+ struct.rootCauseErrorIdList.add(_elem7);
+ }
+ }
+ struct.setRootCauseErrorIdListIsSet(true);
+ }
+ }
+ }
+
+}
+
[02/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskStatus.java
new file mode 100644
index 0000000..c623eaf
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskStatus.java
@@ -0,0 +1,516 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class TaskStatus implements org.apache.thrift.TBase<TaskStatus, TaskStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatus");
+
+ private static final org.apache.thrift.protocol.TField EXECUTION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("executionState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TaskStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TaskStatusTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see TaskState
+ */
+ public TaskState executionState; // required
+ public long timeOfStateChange; // 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 TaskState
+ */
+ EXECUTION_STATE((short)1, "executionState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // EXECUTION_STATE
+ return EXECUTION_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.EXECUTION_STATE, new org.apache.thrift.meta_data.FieldMetaData("executionState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TaskState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskStatus.class, metaDataMap);
+ }
+
+ public TaskStatus() {
+ }
+
+ public TaskStatus(
+ TaskState executionState)
+ {
+ this();
+ this.executionState = executionState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TaskStatus(TaskStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExecutionState()) {
+ this.executionState = other.executionState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public TaskStatus deepCopy() {
+ return new TaskStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.executionState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see TaskState
+ */
+ public TaskState getExecutionState() {
+ return this.executionState;
+ }
+
+ /**
+ *
+ * @see TaskState
+ */
+ public TaskStatus setExecutionState(TaskState executionState) {
+ this.executionState = executionState;
+ return this;
+ }
+
+ public void unsetExecutionState() {
+ this.executionState = null;
+ }
+
+ /** Returns true if field executionState is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecutionState() {
+ return this.executionState != null;
+ }
+
+ public void setExecutionStateIsSet(boolean value) {
+ if (!value) {
+ this.executionState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public TaskStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXECUTION_STATE:
+ if (value == null) {
+ unsetExecutionState();
+ } else {
+ setExecutionState((TaskState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXECUTION_STATE:
+ return getExecutionState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 EXECUTION_STATE:
+ return isSetExecutionState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TaskStatus)
+ return this.equals((TaskStatus)that);
+ return false;
+ }
+
+ public boolean equals(TaskStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_executionState = true && this.isSetExecutionState();
+ boolean that_present_executionState = true && that.isSetExecutionState();
+ if (this_present_executionState || that_present_executionState) {
+ if (!(this_present_executionState && that_present_executionState))
+ return false;
+ if (!this.executionState.equals(that.executionState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TaskStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetExecutionState()).compareTo(other.isSetExecutionState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecutionState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionState, other.executionState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("TaskStatus(");
+ boolean first = true;
+
+ sb.append("executionState:");
+ if (this.executionState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executionState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (executionState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'executionState' 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 TaskStatusStandardSchemeFactory implements SchemeFactory {
+ public TaskStatusStandardScheme getScheme() {
+ return new TaskStatusStandardScheme();
+ }
+ }
+
+ private static class TaskStatusStandardScheme extends StandardScheme<TaskStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TaskStatus 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: // EXECUTION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.executionState = TaskState.findByValue(iprot.readI32());
+ struct.setExecutionStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, TaskStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.executionState != null) {
+ oprot.writeFieldBegin(EXECUTION_STATE_FIELD_DESC);
+ oprot.writeI32(struct.executionState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TaskStatusTupleSchemeFactory implements SchemeFactory {
+ public TaskStatusTupleScheme getScheme() {
+ return new TaskStatusTupleScheme();
+ }
+ }
+
+ private static class TaskStatusTupleScheme extends TupleScheme<TaskStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TaskStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.executionState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TaskStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.executionState = TaskState.findByValue(iprot.readI32());
+ struct.setExecutionStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferState.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferState.java
new file mode 100644
index 0000000..63d750f
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferState.java
@@ -0,0 +1,82 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum TransferState implements org.apache.thrift.TEnum {
+ SUBMITTED(0),
+ QUEUED(1),
+ ACTIVE(2),
+ COMPLETE(3),
+ CANCELED(4),
+ FAILED(5),
+ HELD(6),
+ SUSPENDED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private TransferState(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 TransferState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SUBMITTED;
+ case 1:
+ return QUEUED;
+ case 2:
+ return ACTIVE;
+ case 3:
+ return COMPLETE;
+ case 4:
+ return CANCELED;
+ case 5:
+ return FAILED;
+ case 6:
+ return HELD;
+ case 7:
+ return SUSPENDED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferStatus.java
new file mode 100644
index 0000000..b84127a
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TransferStatus.java
@@ -0,0 +1,516 @@
+ /*
+ * 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.workspace.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;
+
+@SuppressWarnings("all") public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, TransferStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TransferStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TransferStatus");
+
+ private static final org.apache.thrift.protocol.TField TRANSFER_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("transferState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TransferStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TransferStatusTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see TransferState
+ */
+ public TransferState transferState; // required
+ public long timeOfStateChange; // 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 TransferState
+ */
+ TRANSFER_STATE((short)1, "transferState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ 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: // TRANSFER_STATE
+ return TRANSFER_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ 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 __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ 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.TRANSFER_STATE, new org.apache.thrift.meta_data.FieldMetaData("transferState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TransferState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TransferStatus.class, metaDataMap);
+ }
+
+ public TransferStatus() {
+ }
+
+ public TransferStatus(
+ TransferState transferState)
+ {
+ this();
+ this.transferState = transferState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TransferStatus(TransferStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTransferState()) {
+ this.transferState = other.transferState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public TransferStatus deepCopy() {
+ return new TransferStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.transferState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see TransferState
+ */
+ public TransferState getTransferState() {
+ return this.transferState;
+ }
+
+ /**
+ *
+ * @see TransferState
+ */
+ public TransferStatus setTransferState(TransferState transferState) {
+ this.transferState = transferState;
+ return this;
+ }
+
+ public void unsetTransferState() {
+ this.transferState = null;
+ }
+
+ /** Returns true if field transferState is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferState() {
+ return this.transferState != null;
+ }
+
+ public void setTransferStateIsSet(boolean value) {
+ if (!value) {
+ this.transferState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public TransferStatus setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ return this;
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRANSFER_STATE:
+ if (value == null) {
+ unsetTransferState();
+ } else {
+ setTransferState((TransferState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRANSFER_STATE:
+ return getTransferState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ 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 TRANSFER_STATE:
+ return isSetTransferState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TransferStatus)
+ return this.equals((TransferStatus)that);
+ return false;
+ }
+
+ public boolean equals(TransferStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_transferState = true && this.isSetTransferState();
+ boolean that_present_transferState = true && that.isSetTransferState();
+ if (this_present_transferState || that_present_transferState) {
+ if (!(this_present_transferState && that_present_transferState))
+ return false;
+ if (!this.transferState.equals(that.transferState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TransferStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTransferState()).compareTo(other.isSetTransferState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferState, other.transferState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ 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("TransferStatus(");
+ boolean first = true;
+
+ sb.append("transferState:");
+ if (this.transferState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (transferState == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferState' 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 TransferStatusStandardSchemeFactory implements SchemeFactory {
+ public TransferStatusStandardScheme getScheme() {
+ return new TransferStatusStandardScheme();
+ }
+ }
+
+ private static class TransferStatusStandardScheme extends StandardScheme<TransferStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TransferStatus 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: // TRANSFER_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.transferState = TransferState.findByValue(iprot.readI32());
+ struct.setTransferStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(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, TransferStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.transferState != null) {
+ oprot.writeFieldBegin(TRANSFER_STATE_FIELD_DESC);
+ oprot.writeI32(struct.transferState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TransferStatusTupleSchemeFactory implements SchemeFactory {
+ public TransferStatusTupleScheme getScheme() {
+ return new TransferStatusTupleScheme();
+ }
+ }
+
+ private static class TransferStatusTupleScheme extends TupleScheme<TransferStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TransferStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.transferState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TransferStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.transferState = TransferState.findByValue(iprot.readI32());
+ struct.setTransferStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
new file mode 100644
index 0000000..53c19d0
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
@@ -0,0 +1,1025 @@
+ /*
+ * 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.workspace.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 UserConfigurationData implements org.apache.thrift.TBase<UserConfigurationData, UserConfigurationData._Fields>, java.io.Serializable, Cloneable, Comparable<UserConfigurationData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserConfigurationData");
+
+ 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 SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC = new org.apache.thrift.protocol.TField("shareExperimentPublicly", org.apache.thrift.protocol.TType.BOOL, (short)3);
+ 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)4);
+ 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)5);
+ 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)6);
+ 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)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserConfigurationDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserConfigurationDataTupleSchemeFactory());
+ }
+
+ public boolean airavataAutoSchedule; // required
+ public boolean overrideManualScheduledParams; // required
+ public boolean shareExperimentPublicly; // 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 {
+ AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
+ OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
+ SHARE_EXPERIMENT_PUBLICLY((short)3, "shareExperimentPublicly"),
+ COMPUTATIONAL_RESOURCE_SCHEDULING((short)4, "computationalResourceScheduling"),
+ ADVANCE_INPUT_DATA_HANDLING((short)5, "advanceInputDataHandling"),
+ ADVANCE_OUTPUT_DATA_HANDLING((short)6, "advanceOutputDataHandling"),
+ QOS_PARAMS((short)7, "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: // AIRAVATA_AUTO_SCHEDULE
+ return AIRAVATA_AUTO_SCHEDULE;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ return OVERRIDE_MANUAL_SCHEDULED_PARAMS;
+ case 3: // SHARE_EXPERIMENT_PUBLICLY
+ return SHARE_EXPERIMENT_PUBLICLY;
+ case 4: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ return COMPUTATIONAL_RESOURCE_SCHEDULING;
+ case 5: // ADVANCE_INPUT_DATA_HANDLING
+ return ADVANCE_INPUT_DATA_HANDLING;
+ case 6: // ADVANCE_OUTPUT_DATA_HANDLING
+ return ADVANCE_OUTPUT_DATA_HANDLING;
+ case 7: // 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 static final int __AIRAVATAAUTOSCHEDULE_ISSET_ID = 0;
+ private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
+ private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 2;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_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.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.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.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(UserConfigurationData.class, metaDataMap);
+ }
+
+ public UserConfigurationData() {
+ this.airavataAutoSchedule = false;
+
+ this.overrideManualScheduledParams = false;
+
+ this.shareExperimentPublicly = false;
+
+ }
+
+ public UserConfigurationData(
+ boolean airavataAutoSchedule,
+ boolean overrideManualScheduledParams)
+ {
+ this();
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserConfigurationData(UserConfigurationData other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.airavataAutoSchedule = other.airavataAutoSchedule;
+ this.overrideManualScheduledParams = other.overrideManualScheduledParams;
+ this.shareExperimentPublicly = other.shareExperimentPublicly;
+ 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 UserConfigurationData deepCopy() {
+ return new UserConfigurationData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataAutoSchedule = false;
+
+ this.overrideManualScheduledParams = false;
+
+ this.shareExperimentPublicly = false;
+
+ this.computationalResourceScheduling = null;
+ this.advanceInputDataHandling = null;
+ this.advanceOutputDataHandling = null;
+ this.qosParams = null;
+ }
+
+ public boolean isAiravataAutoSchedule() {
+ return this.airavataAutoSchedule;
+ }
+
+ public UserConfigurationData 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 UserConfigurationData 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 boolean isShareExperimentPublicly() {
+ return this.shareExperimentPublicly;
+ }
+
+ public UserConfigurationData 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 ComputationalResourceScheduling getComputationalResourceScheduling() {
+ return this.computationalResourceScheduling;
+ }
+
+ public UserConfigurationData 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 UserConfigurationData 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 UserConfigurationData 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 UserConfigurationData 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 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 SHARE_EXPERIMENT_PUBLICLY:
+ if (value == null) {
+ unsetShareExperimentPublicly();
+ } else {
+ setShareExperimentPublicly((Boolean)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 AIRAVATA_AUTO_SCHEDULE:
+ return Boolean.valueOf(isAiravataAutoSchedule());
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return Boolean.valueOf(isOverrideManualScheduledParams());
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return Boolean.valueOf(isShareExperimentPublicly());
+
+ 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 AIRAVATA_AUTO_SCHEDULE:
+ return isSetAiravataAutoSchedule();
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return isSetOverrideManualScheduledParams();
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return isSetShareExperimentPublicly();
+ 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 UserConfigurationData)
+ return this.equals((UserConfigurationData)that);
+ return false;
+ }
+
+ public boolean equals(UserConfigurationData 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_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_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(UserConfigurationData 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(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(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("UserConfigurationData(");
+ 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 (isSetShareExperimentPublicly()) {
+ if (!first) sb.append(", ");
+ sb.append("shareExperimentPublicly:");
+ sb.append(this.shareExperimentPublicly);
+ 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
+ // 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
+ 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 {
+ // 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 UserConfigurationDataStandardSchemeFactory implements SchemeFactory {
+ public UserConfigurationDataStandardScheme getScheme() {
+ return new UserConfigurationDataStandardScheme();
+ }
+ }
+
+ private static class UserConfigurationDataStandardScheme extends StandardScheme<UserConfigurationData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserConfigurationData 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: // 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 4: // 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 5: // 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 6: // 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 7: // 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
+ 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, UserConfigurationData 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.isSetShareExperimentPublicly()) {
+ oprot.writeFieldBegin(SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC);
+ oprot.writeBool(struct.shareExperimentPublicly);
+ 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 UserConfigurationDataTupleSchemeFactory implements SchemeFactory {
+ public UserConfigurationDataTupleScheme getScheme() {
+ return new UserConfigurationDataTupleScheme();
+ }
+ }
+
+ private static class UserConfigurationDataTupleScheme extends TupleScheme<UserConfigurationData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ BitSet optionals = new BitSet();
+ if (struct.isSetShareExperimentPublicly()) {
+ optionals.set(0);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ optionals.set(3);
+ }
+ if (struct.isSetQosParams()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeBool(struct.shareExperimentPublicly);
+ }
+ 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, UserConfigurationData 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(5);
+ if (incoming.get(0)) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ }
+ }
+ }
+
+}
+
[08/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
new file mode 100644
index 0000000..e4a5d84
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
@@ -0,0 +1,1184 @@
+ /*
+ * 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.workspace.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 RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ 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)2);
+ 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)3);
+ 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)4);
+ 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)5);
+ 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)6);
+ 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)7);
+ 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)8);
+ 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)9);
+
+ 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 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 {
+ RESOURCE_HOST_ID((short)1, "resourceHostId"),
+ TOTAL_CPUCOUNT((short)2, "totalCPUCount"),
+ NODE_COUNT((short)3, "nodeCount"),
+ NUMBER_OF_THREADS((short)4, "numberOfThreads"),
+ QUEUE_NAME((short)5, "queueName"),
+ WALL_TIME_LIMIT((short)6, "wallTimeLimit"),
+ JOB_START_TIME((short)7, "jobStartTime"),
+ TOTAL_PHYSICAL_MEMORY((short)8, "totalPhysicalMemory"),
+ COMPUTATIONAL_PROJECT_ACCOUNT((short)9, "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: // RESOURCE_HOST_ID
+ return RESOURCE_HOST_ID;
+ case 2: // TOTAL_CPUCOUNT
+ return TOTAL_CPUCOUNT;
+ case 3: // NODE_COUNT
+ return NODE_COUNT;
+ case 4: // NUMBER_OF_THREADS
+ return NUMBER_OF_THREADS;
+ case 5: // QUEUE_NAME
+ return QUEUE_NAME;
+ case 6: // WALL_TIME_LIMIT
+ return WALL_TIME_LIMIT;
+ case 7: // JOB_START_TIME
+ return JOB_START_TIME;
+ case 8: // TOTAL_PHYSICAL_MEMORY
+ return TOTAL_PHYSICAL_MEMORY;
+ case 9: // 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 __TOTALCPUCOUNT_ISSET_ID = 0;
+ private static final int __NODECOUNT_ISSET_ID = 1;
+ private static final int __NUMBEROFTHREADS_ISSET_ID = 2;
+ private static final int __WALLTIMELIMIT_ISSET_ID = 3;
+ private static final int __JOBSTARTTIME_ISSET_ID = 4;
+ private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 5;
+ 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.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() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ComputationalResourceScheduling(ComputationalResourceScheduling other) {
+ __isset_bitfield = other.__isset_bitfield;
+ 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.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 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 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 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 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_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(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;
+
+ if (isSetResourceHostId()) {
+ 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
+ // 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: // 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 2: // 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 3: // 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 4: // 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 5: // 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 6: // 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 7: // 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 8: // 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 9: // 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
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ 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;
+ 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;
+ 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);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/CorrectiveAction.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/CorrectiveAction.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/CorrectiveAction.java
new file mode 100644
index 0000000..ca5b3af
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/CorrectiveAction.java
@@ -0,0 +1,64 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum CorrectiveAction implements org.apache.thrift.TEnum {
+ RETRY_SUBMISSION(0),
+ CONTACT_SUPPORT(1),
+ CANNOT_BE_DETERMINED(2);
+
+ private final int value;
+
+ private CorrectiveAction(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 CorrectiveAction findByValue(int value) {
+ switch (value) {
+ case 0:
+ return RETRY_SUBMISSION;
+ case 1:
+ return CONTACT_SUPPORT;
+ case 2:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataObjectType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataObjectType.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataObjectType.java
new file mode 100644
index 0000000..1a434a9
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/DataObjectType.java
@@ -0,0 +1,711 @@
+ /*
+ * 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.workspace.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 hold experiment input output
+ *
+ */
+@SuppressWarnings("all") public class DataObjectType implements org.apache.thrift.TBase<DataObjectType, DataObjectType._Fields>, java.io.Serializable, Cloneable, Comparable<DataObjectType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataObjectType");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField META_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metaData", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DataObjectTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataObjectTypeTupleSchemeFactory());
+ }
+
+ public String key; // required
+ public String value; // optional
+ public String type; // optional
+ public String metaData; // 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 {
+ KEY((short)1, "key"),
+ VALUE((short)2, "value"),
+ TYPE((short)3, "type"),
+ META_DATA((short)4, "metaData");
+
+ 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: // KEY
+ return KEY;
+ case 2: // VALUE
+ return VALUE;
+ case 3: // TYPE
+ return TYPE;
+ case 4: // META_DATA
+ return META_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 _Fields optionals[] = {_Fields.VALUE,_Fields.TYPE,_Fields.META_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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.META_DATA, new org.apache.thrift.meta_data.FieldMetaData("metaData", 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(DataObjectType.class, metaDataMap);
+ }
+
+ public DataObjectType() {
+ }
+
+ public DataObjectType(
+ String key)
+ {
+ this();
+ this.key = key;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataObjectType(DataObjectType other) {
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ if (other.isSetType()) {
+ this.type = other.type;
+ }
+ if (other.isSetMetaData()) {
+ this.metaData = other.metaData;
+ }
+ }
+
+ public DataObjectType deepCopy() {
+ return new DataObjectType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.key = null;
+ this.value = null;
+ this.type = null;
+ this.metaData = null;
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public DataObjectType 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 String getValue() {
+ return this.value;
+ }
+
+ public DataObjectType setValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public DataObjectType setType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ public void unsetType() {
+ this.type = null;
+ }
+
+ /** Returns true if field type is set (has been assigned a value) and false otherwise */
+ public boolean isSetType() {
+ return this.type != null;
+ }
+
+ public void setTypeIsSet(boolean value) {
+ if (!value) {
+ this.type = null;
+ }
+ }
+
+ public String getMetaData() {
+ return this.metaData;
+ }
+
+ public DataObjectType setMetaData(String metaData) {
+ this.metaData = metaData;
+ return this;
+ }
+
+ public void unsetMetaData() {
+ this.metaData = null;
+ }
+
+ /** Returns true if field metaData is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetaData() {
+ return this.metaData != null;
+ }
+
+ public void setMetaDataIsSet(boolean value) {
+ if (!value) {
+ this.metaData = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((String)value);
+ }
+ break;
+
+ case META_DATA:
+ if (value == null) {
+ unsetMetaData();
+ } else {
+ setMetaData((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case KEY:
+ return getKey();
+
+ case VALUE:
+ return getValue();
+
+ case TYPE:
+ return getType();
+
+ case META_DATA:
+ return getMetaData();
+
+ }
+ 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 KEY:
+ return isSetKey();
+ case VALUE:
+ return isSetValue();
+ case TYPE:
+ return isSetType();
+ case META_DATA:
+ return isSetMetaData();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataObjectType)
+ return this.equals((DataObjectType)that);
+ return false;
+ }
+
+ public boolean equals(DataObjectType that) {
+ if (that == null)
+ 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;
+ }
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
+ if (this_present_type || that_present_type) {
+ if (!(this_present_type && that_present_type))
+ return false;
+ if (!this.type.equals(that.type))
+ return false;
+ }
+
+ boolean this_present_metaData = true && this.isSetMetaData();
+ boolean that_present_metaData = true && that.isSetMetaData();
+ if (this_present_metaData || that_present_metaData) {
+ if (!(this_present_metaData && that_present_metaData))
+ return false;
+ if (!this.metaData.equals(that.metaData))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(DataObjectType other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetaData()).compareTo(other.isSetMetaData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetaData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaData, other.metaData);
+ 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("DataObjectType(");
+ boolean first = true;
+
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (isSetValue()) {
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ }
+ if (isSetType()) {
+ if (!first) sb.append(", ");
+ sb.append("type:");
+ if (this.type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.type);
+ }
+ first = false;
+ }
+ if (isSetMetaData()) {
+ if (!first) sb.append(", ");
+ sb.append("metaData:");
+ if (this.metaData == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metaData);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (key == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' 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 DataObjectTypeStandardSchemeFactory implements SchemeFactory {
+ public DataObjectTypeStandardScheme getScheme() {
+ return new DataObjectTypeStandardScheme();
+ }
+ }
+
+ private static class DataObjectTypeStandardScheme extends StandardScheme<DataObjectType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataObjectType 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: // 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;
+ case 2: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.type = iprot.readString();
+ struct.setTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // META_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.metaData = iprot.readString();
+ struct.setMetaDataIsSet(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, DataObjectType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.value != null) {
+ if (struct.isSetValue()) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.type != null) {
+ if (struct.isSetType()) {
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
+ oprot.writeString(struct.type);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metaData != null) {
+ if (struct.isSetMetaData()) {
+ oprot.writeFieldBegin(META_DATA_FIELD_DESC);
+ oprot.writeString(struct.metaData);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataObjectTypeTupleSchemeFactory implements SchemeFactory {
+ public DataObjectTypeTupleScheme getScheme() {
+ return new DataObjectTypeTupleScheme();
+ }
+ }
+
+ private static class DataObjectTypeTupleScheme extends TupleScheme<DataObjectType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataObjectType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.key);
+ BitSet optionals = new BitSet();
+ if (struct.isSetValue()) {
+ optionals.set(0);
+ }
+ if (struct.isSetType()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMetaData()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ if (struct.isSetType()) {
+ oprot.writeString(struct.type);
+ }
+ if (struct.isSetMetaData()) {
+ oprot.writeString(struct.metaData);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataObjectType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.type = iprot.readString();
+ struct.setTypeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.metaData = iprot.readString();
+ struct.setMetaDataIsSet(true);
+ }
+ }
+ }
+
+}
+
[03/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
new file mode 100644
index 0000000..f386b57
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
@@ -0,0 +1,1921 @@
+ /*
+ * 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.workspace.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 actual execution context decided based on user provided configuration data or system inferred
+ * information from scheduling and QoS parameters. One experiment can have multiple tasks. Each tasks results in
+ * data transfers and jobs
+ *
+ */
+@SuppressWarnings("all") public class TaskDetails implements org.apache.thrift.TBase<TaskDetails, TaskDetails._Fields>, java.io.Serializable, Cloneable, Comparable<TaskDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskDetails");
+
+ private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ 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)3);
+ 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)4);
+ private static final org.apache.thrift.protocol.TField APPLICATION_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInputs", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField APPLICATION_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationOutputs", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField TASK_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("taskScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField ADVANCED_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advancedInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField ADVANCED_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advancedOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskStatus", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+ private static final org.apache.thrift.protocol.TField JOB_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDetailsList", org.apache.thrift.protocol.TType.LIST, (short)11);
+ private static final org.apache.thrift.protocol.TField DATA_TRANSFER_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTransferDetailsList", org.apache.thrift.protocol.TType.LIST, (short)12);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)13);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TaskDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TaskDetailsTupleSchemeFactory());
+ }
+
+ public String taskID; // required
+ public long creationTime; // optional
+ public String applicationId; // optional
+ public String applicationVersion; // optional
+ public List<DataObjectType> applicationInputs; // optional
+ public List<DataObjectType> applicationOutputs; // optional
+ public ComputationalResourceScheduling taskScheduling; // optional
+ public AdvancedInputDataHandling advancedInputDataHandling; // optional
+ public AdvancedOutputDataHandling advancedOutputDataHandling; // optional
+ public TaskStatus taskStatus; // optional
+ public List<JobDetails> jobDetailsList; // optional
+ public List<DataTransferDetails> dataTransferDetailsList; // optional
+ public List<ErrorDetails> errors; // 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 {
+ TASK_ID((short)1, "taskID"),
+ CREATION_TIME((short)2, "creationTime"),
+ APPLICATION_ID((short)3, "applicationId"),
+ APPLICATION_VERSION((short)4, "applicationVersion"),
+ APPLICATION_INPUTS((short)5, "applicationInputs"),
+ APPLICATION_OUTPUTS((short)6, "applicationOutputs"),
+ TASK_SCHEDULING((short)7, "taskScheduling"),
+ ADVANCED_INPUT_DATA_HANDLING((short)8, "advancedInputDataHandling"),
+ ADVANCED_OUTPUT_DATA_HANDLING((short)9, "advancedOutputDataHandling"),
+ TASK_STATUS((short)10, "taskStatus"),
+ JOB_DETAILS_LIST((short)11, "jobDetailsList"),
+ DATA_TRANSFER_DETAILS_LIST((short)12, "dataTransferDetailsList"),
+ ERRORS((short)13, "errors");
+
+ 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: // TASK_ID
+ return TASK_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 4: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 5: // APPLICATION_INPUTS
+ return APPLICATION_INPUTS;
+ case 6: // APPLICATION_OUTPUTS
+ return APPLICATION_OUTPUTS;
+ case 7: // TASK_SCHEDULING
+ return TASK_SCHEDULING;
+ case 8: // ADVANCED_INPUT_DATA_HANDLING
+ return ADVANCED_INPUT_DATA_HANDLING;
+ case 9: // ADVANCED_OUTPUT_DATA_HANDLING
+ return ADVANCED_OUTPUT_DATA_HANDLING;
+ case 10: // TASK_STATUS
+ return TASK_STATUS;
+ case 11: // JOB_DETAILS_LIST
+ return JOB_DETAILS_LIST;
+ case 12: // DATA_TRANSFER_DETAILS_LIST
+ return DATA_TRANSFER_DETAILS_LIST;
+ case 13: // ERRORS
+ return ERRORS;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.APPLICATION_INPUTS,_Fields.APPLICATION_OUTPUTS,_Fields.TASK_SCHEDULING,_Fields.ADVANCED_INPUT_DATA_HANDLING,_Fields.ADVANCED_OUTPUT_DATA_HANDLING,_Fields.TASK_STATUS,_Fields.JOB_DETAILS_LIST,_Fields.DATA_TRANSFER_DETAILS_LIST,_Fields.ERRORS};
+ 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.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ 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.APPLICATION_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("applicationInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataObjectType.class))));
+ tmpMap.put(_Fields.APPLICATION_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("applicationOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataObjectType.class))));
+ tmpMap.put(_Fields.TASK_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("taskScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCED_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advancedInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCED_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advancedOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.TASK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("taskStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TaskStatus.class)));
+ tmpMap.put(_Fields.JOB_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("jobDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, JobDetails.class))));
+ tmpMap.put(_Fields.DATA_TRANSFER_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("dataTransferDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataTransferDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskDetails.class, metaDataMap);
+ }
+
+ public TaskDetails() {
+ this.taskID = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public TaskDetails(
+ String taskID)
+ {
+ this();
+ this.taskID = taskID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TaskDetails(TaskDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTaskID()) {
+ this.taskID = other.taskID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetApplicationInputs()) {
+ List<DataObjectType> __this__applicationInputs = new ArrayList<DataObjectType>(other.applicationInputs.size());
+ for (DataObjectType other_element : other.applicationInputs) {
+ __this__applicationInputs.add(new DataObjectType(other_element));
+ }
+ this.applicationInputs = __this__applicationInputs;
+ }
+ if (other.isSetApplicationOutputs()) {
+ List<DataObjectType> __this__applicationOutputs = new ArrayList<DataObjectType>(other.applicationOutputs.size());
+ for (DataObjectType other_element : other.applicationOutputs) {
+ __this__applicationOutputs.add(new DataObjectType(other_element));
+ }
+ this.applicationOutputs = __this__applicationOutputs;
+ }
+ if (other.isSetTaskScheduling()) {
+ this.taskScheduling = new ComputationalResourceScheduling(other.taskScheduling);
+ }
+ if (other.isSetAdvancedInputDataHandling()) {
+ this.advancedInputDataHandling = new AdvancedInputDataHandling(other.advancedInputDataHandling);
+ }
+ if (other.isSetAdvancedOutputDataHandling()) {
+ this.advancedOutputDataHandling = new AdvancedOutputDataHandling(other.advancedOutputDataHandling);
+ }
+ if (other.isSetTaskStatus()) {
+ this.taskStatus = new TaskStatus(other.taskStatus);
+ }
+ if (other.isSetJobDetailsList()) {
+ List<JobDetails> __this__jobDetailsList = new ArrayList<JobDetails>(other.jobDetailsList.size());
+ for (JobDetails other_element : other.jobDetailsList) {
+ __this__jobDetailsList.add(new JobDetails(other_element));
+ }
+ this.jobDetailsList = __this__jobDetailsList;
+ }
+ if (other.isSetDataTransferDetailsList()) {
+ List<DataTransferDetails> __this__dataTransferDetailsList = new ArrayList<DataTransferDetails>(other.dataTransferDetailsList.size());
+ for (DataTransferDetails other_element : other.dataTransferDetailsList) {
+ __this__dataTransferDetailsList.add(new DataTransferDetails(other_element));
+ }
+ this.dataTransferDetailsList = __this__dataTransferDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public TaskDetails deepCopy() {
+ return new TaskDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.taskID = "DO_NOT_SET_AT_CLIENTS";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.applicationInputs = null;
+ this.applicationOutputs = null;
+ this.taskScheduling = null;
+ this.advancedInputDataHandling = null;
+ this.advancedOutputDataHandling = null;
+ this.taskStatus = null;
+ this.jobDetailsList = null;
+ this.dataTransferDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getTaskID() {
+ return this.taskID;
+ }
+
+ public TaskDetails setTaskID(String taskID) {
+ this.taskID = taskID;
+ return this;
+ }
+
+ public void unsetTaskID() {
+ this.taskID = null;
+ }
+
+ /** Returns true if field taskID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskID() {
+ return this.taskID != null;
+ }
+
+ public void setTaskIDIsSet(boolean value) {
+ if (!value) {
+ this.taskID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public TaskDetails setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public TaskDetails 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 TaskDetails 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 int getApplicationInputsSize() {
+ return (this.applicationInputs == null) ? 0 : this.applicationInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getApplicationInputsIterator() {
+ return (this.applicationInputs == null) ? null : this.applicationInputs.iterator();
+ }
+
+ public void addToApplicationInputs(DataObjectType elem) {
+ if (this.applicationInputs == null) {
+ this.applicationInputs = new ArrayList<DataObjectType>();
+ }
+ this.applicationInputs.add(elem);
+ }
+
+ public List<DataObjectType> getApplicationInputs() {
+ return this.applicationInputs;
+ }
+
+ public TaskDetails setApplicationInputs(List<DataObjectType> applicationInputs) {
+ this.applicationInputs = applicationInputs;
+ return this;
+ }
+
+ public void unsetApplicationInputs() {
+ this.applicationInputs = null;
+ }
+
+ /** Returns true if field applicationInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationInputs() {
+ return this.applicationInputs != null;
+ }
+
+ public void setApplicationInputsIsSet(boolean value) {
+ if (!value) {
+ this.applicationInputs = null;
+ }
+ }
+
+ public int getApplicationOutputsSize() {
+ return (this.applicationOutputs == null) ? 0 : this.applicationOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getApplicationOutputsIterator() {
+ return (this.applicationOutputs == null) ? null : this.applicationOutputs.iterator();
+ }
+
+ public void addToApplicationOutputs(DataObjectType elem) {
+ if (this.applicationOutputs == null) {
+ this.applicationOutputs = new ArrayList<DataObjectType>();
+ }
+ this.applicationOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getApplicationOutputs() {
+ return this.applicationOutputs;
+ }
+
+ public TaskDetails setApplicationOutputs(List<DataObjectType> applicationOutputs) {
+ this.applicationOutputs = applicationOutputs;
+ return this;
+ }
+
+ public void unsetApplicationOutputs() {
+ this.applicationOutputs = null;
+ }
+
+ /** Returns true if field applicationOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationOutputs() {
+ return this.applicationOutputs != null;
+ }
+
+ public void setApplicationOutputsIsSet(boolean value) {
+ if (!value) {
+ this.applicationOutputs = null;
+ }
+ }
+
+ public ComputationalResourceScheduling getTaskScheduling() {
+ return this.taskScheduling;
+ }
+
+ public TaskDetails setTaskScheduling(ComputationalResourceScheduling taskScheduling) {
+ this.taskScheduling = taskScheduling;
+ return this;
+ }
+
+ public void unsetTaskScheduling() {
+ this.taskScheduling = null;
+ }
+
+ /** Returns true if field taskScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskScheduling() {
+ return this.taskScheduling != null;
+ }
+
+ public void setTaskSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.taskScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvancedInputDataHandling() {
+ return this.advancedInputDataHandling;
+ }
+
+ public TaskDetails setAdvancedInputDataHandling(AdvancedInputDataHandling advancedInputDataHandling) {
+ this.advancedInputDataHandling = advancedInputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvancedInputDataHandling() {
+ this.advancedInputDataHandling = null;
+ }
+
+ /** Returns true if field advancedInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvancedInputDataHandling() {
+ return this.advancedInputDataHandling != null;
+ }
+
+ public void setAdvancedInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advancedInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvancedOutputDataHandling() {
+ return this.advancedOutputDataHandling;
+ }
+
+ public TaskDetails setAdvancedOutputDataHandling(AdvancedOutputDataHandling advancedOutputDataHandling) {
+ this.advancedOutputDataHandling = advancedOutputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvancedOutputDataHandling() {
+ this.advancedOutputDataHandling = null;
+ }
+
+ /** Returns true if field advancedOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvancedOutputDataHandling() {
+ return this.advancedOutputDataHandling != null;
+ }
+
+ public void setAdvancedOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advancedOutputDataHandling = null;
+ }
+ }
+
+ public TaskStatus getTaskStatus() {
+ return this.taskStatus;
+ }
+
+ public TaskDetails setTaskStatus(TaskStatus taskStatus) {
+ this.taskStatus = taskStatus;
+ return this;
+ }
+
+ public void unsetTaskStatus() {
+ this.taskStatus = null;
+ }
+
+ /** Returns true if field taskStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskStatus() {
+ return this.taskStatus != null;
+ }
+
+ public void setTaskStatusIsSet(boolean value) {
+ if (!value) {
+ this.taskStatus = null;
+ }
+ }
+
+ public int getJobDetailsListSize() {
+ return (this.jobDetailsList == null) ? 0 : this.jobDetailsList.size();
+ }
+
+ public java.util.Iterator<JobDetails> getJobDetailsListIterator() {
+ return (this.jobDetailsList == null) ? null : this.jobDetailsList.iterator();
+ }
+
+ public void addToJobDetailsList(JobDetails elem) {
+ if (this.jobDetailsList == null) {
+ this.jobDetailsList = new ArrayList<JobDetails>();
+ }
+ this.jobDetailsList.add(elem);
+ }
+
+ public List<JobDetails> getJobDetailsList() {
+ return this.jobDetailsList;
+ }
+
+ public TaskDetails setJobDetailsList(List<JobDetails> jobDetailsList) {
+ this.jobDetailsList = jobDetailsList;
+ return this;
+ }
+
+ public void unsetJobDetailsList() {
+ this.jobDetailsList = null;
+ }
+
+ /** Returns true if field jobDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobDetailsList() {
+ return this.jobDetailsList != null;
+ }
+
+ public void setJobDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.jobDetailsList = null;
+ }
+ }
+
+ public int getDataTransferDetailsListSize() {
+ return (this.dataTransferDetailsList == null) ? 0 : this.dataTransferDetailsList.size();
+ }
+
+ public java.util.Iterator<DataTransferDetails> getDataTransferDetailsListIterator() {
+ return (this.dataTransferDetailsList == null) ? null : this.dataTransferDetailsList.iterator();
+ }
+
+ public void addToDataTransferDetailsList(DataTransferDetails elem) {
+ if (this.dataTransferDetailsList == null) {
+ this.dataTransferDetailsList = new ArrayList<DataTransferDetails>();
+ }
+ this.dataTransferDetailsList.add(elem);
+ }
+
+ public List<DataTransferDetails> getDataTransferDetailsList() {
+ return this.dataTransferDetailsList;
+ }
+
+ public TaskDetails setDataTransferDetailsList(List<DataTransferDetails> dataTransferDetailsList) {
+ this.dataTransferDetailsList = dataTransferDetailsList;
+ return this;
+ }
+
+ public void unsetDataTransferDetailsList() {
+ this.dataTransferDetailsList = null;
+ }
+
+ /** Returns true if field dataTransferDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataTransferDetailsList() {
+ return this.dataTransferDetailsList != null;
+ }
+
+ public void setDataTransferDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.dataTransferDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public TaskDetails setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TASK_ID:
+ if (value == null) {
+ unsetTaskID();
+ } else {
+ setTaskID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)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 APPLICATION_INPUTS:
+ if (value == null) {
+ unsetApplicationInputs();
+ } else {
+ setApplicationInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case APPLICATION_OUTPUTS:
+ if (value == null) {
+ unsetApplicationOutputs();
+ } else {
+ setApplicationOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case TASK_SCHEDULING:
+ if (value == null) {
+ unsetTaskScheduling();
+ } else {
+ setTaskScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCED_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvancedInputDataHandling();
+ } else {
+ setAdvancedInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvancedOutputDataHandling();
+ } else {
+ setAdvancedOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case TASK_STATUS:
+ if (value == null) {
+ unsetTaskStatus();
+ } else {
+ setTaskStatus((TaskStatus)value);
+ }
+ break;
+
+ case JOB_DETAILS_LIST:
+ if (value == null) {
+ unsetJobDetailsList();
+ } else {
+ setJobDetailsList((List<JobDetails>)value);
+ }
+ break;
+
+ case DATA_TRANSFER_DETAILS_LIST:
+ if (value == null) {
+ unsetDataTransferDetailsList();
+ } else {
+ setDataTransferDetailsList((List<DataTransferDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TASK_ID:
+ return getTaskID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case APPLICATION_INPUTS:
+ return getApplicationInputs();
+
+ case APPLICATION_OUTPUTS:
+ return getApplicationOutputs();
+
+ case TASK_SCHEDULING:
+ return getTaskScheduling();
+
+ case ADVANCED_INPUT_DATA_HANDLING:
+ return getAdvancedInputDataHandling();
+
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ return getAdvancedOutputDataHandling();
+
+ case TASK_STATUS:
+ return getTaskStatus();
+
+ case JOB_DETAILS_LIST:
+ return getJobDetailsList();
+
+ case DATA_TRANSFER_DETAILS_LIST:
+ return getDataTransferDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ 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 TASK_ID:
+ return isSetTaskID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case APPLICATION_INPUTS:
+ return isSetApplicationInputs();
+ case APPLICATION_OUTPUTS:
+ return isSetApplicationOutputs();
+ case TASK_SCHEDULING:
+ return isSetTaskScheduling();
+ case ADVANCED_INPUT_DATA_HANDLING:
+ return isSetAdvancedInputDataHandling();
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ return isSetAdvancedOutputDataHandling();
+ case TASK_STATUS:
+ return isSetTaskStatus();
+ case JOB_DETAILS_LIST:
+ return isSetJobDetailsList();
+ case DATA_TRANSFER_DETAILS_LIST:
+ return isSetDataTransferDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TaskDetails)
+ return this.equals((TaskDetails)that);
+ return false;
+ }
+
+ public boolean equals(TaskDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_taskID = true && this.isSetTaskID();
+ boolean that_present_taskID = true && that.isSetTaskID();
+ if (this_present_taskID || that_present_taskID) {
+ if (!(this_present_taskID && that_present_taskID))
+ return false;
+ if (!this.taskID.equals(that.taskID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ 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_applicationInputs = true && this.isSetApplicationInputs();
+ boolean that_present_applicationInputs = true && that.isSetApplicationInputs();
+ if (this_present_applicationInputs || that_present_applicationInputs) {
+ if (!(this_present_applicationInputs && that_present_applicationInputs))
+ return false;
+ if (!this.applicationInputs.equals(that.applicationInputs))
+ return false;
+ }
+
+ boolean this_present_applicationOutputs = true && this.isSetApplicationOutputs();
+ boolean that_present_applicationOutputs = true && that.isSetApplicationOutputs();
+ if (this_present_applicationOutputs || that_present_applicationOutputs) {
+ if (!(this_present_applicationOutputs && that_present_applicationOutputs))
+ return false;
+ if (!this.applicationOutputs.equals(that.applicationOutputs))
+ return false;
+ }
+
+ boolean this_present_taskScheduling = true && this.isSetTaskScheduling();
+ boolean that_present_taskScheduling = true && that.isSetTaskScheduling();
+ if (this_present_taskScheduling || that_present_taskScheduling) {
+ if (!(this_present_taskScheduling && that_present_taskScheduling))
+ return false;
+ if (!this.taskScheduling.equals(that.taskScheduling))
+ return false;
+ }
+
+ boolean this_present_advancedInputDataHandling = true && this.isSetAdvancedInputDataHandling();
+ boolean that_present_advancedInputDataHandling = true && that.isSetAdvancedInputDataHandling();
+ if (this_present_advancedInputDataHandling || that_present_advancedInputDataHandling) {
+ if (!(this_present_advancedInputDataHandling && that_present_advancedInputDataHandling))
+ return false;
+ if (!this.advancedInputDataHandling.equals(that.advancedInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advancedOutputDataHandling = true && this.isSetAdvancedOutputDataHandling();
+ boolean that_present_advancedOutputDataHandling = true && that.isSetAdvancedOutputDataHandling();
+ if (this_present_advancedOutputDataHandling || that_present_advancedOutputDataHandling) {
+ if (!(this_present_advancedOutputDataHandling && that_present_advancedOutputDataHandling))
+ return false;
+ if (!this.advancedOutputDataHandling.equals(that.advancedOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_taskStatus = true && this.isSetTaskStatus();
+ boolean that_present_taskStatus = true && that.isSetTaskStatus();
+ if (this_present_taskStatus || that_present_taskStatus) {
+ if (!(this_present_taskStatus && that_present_taskStatus))
+ return false;
+ if (!this.taskStatus.equals(that.taskStatus))
+ return false;
+ }
+
+ boolean this_present_jobDetailsList = true && this.isSetJobDetailsList();
+ boolean that_present_jobDetailsList = true && that.isSetJobDetailsList();
+ if (this_present_jobDetailsList || that_present_jobDetailsList) {
+ if (!(this_present_jobDetailsList && that_present_jobDetailsList))
+ return false;
+ if (!this.jobDetailsList.equals(that.jobDetailsList))
+ return false;
+ }
+
+ boolean this_present_dataTransferDetailsList = true && this.isSetDataTransferDetailsList();
+ boolean that_present_dataTransferDetailsList = true && that.isSetDataTransferDetailsList();
+ if (this_present_dataTransferDetailsList || that_present_dataTransferDetailsList) {
+ if (!(this_present_dataTransferDetailsList && that_present_dataTransferDetailsList))
+ return false;
+ if (!this.dataTransferDetailsList.equals(that.dataTransferDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TaskDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTaskID()).compareTo(other.isSetTaskID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskID, other.taskID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ 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(isSetApplicationInputs()).compareTo(other.isSetApplicationInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationInputs, other.applicationInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationOutputs()).compareTo(other.isSetApplicationOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationOutputs, other.applicationOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTaskScheduling()).compareTo(other.isSetTaskScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskScheduling, other.taskScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvancedInputDataHandling()).compareTo(other.isSetAdvancedInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvancedInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advancedInputDataHandling, other.advancedInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvancedOutputDataHandling()).compareTo(other.isSetAdvancedOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvancedOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advancedOutputDataHandling, other.advancedOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(other.isSetTaskStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, other.taskStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobDetailsList()).compareTo(other.isSetJobDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDetailsList, other.jobDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataTransferDetailsList()).compareTo(other.isSetDataTransferDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataTransferDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTransferDetailsList, other.dataTransferDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ 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("TaskDetails(");
+ boolean first = true;
+
+ sb.append("taskID:");
+ if (this.taskID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ 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 (isSetApplicationInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationInputs:");
+ if (this.applicationInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationInputs);
+ }
+ first = false;
+ }
+ if (isSetApplicationOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationOutputs:");
+ if (this.applicationOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationOutputs);
+ }
+ first = false;
+ }
+ if (isSetTaskScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("taskScheduling:");
+ if (this.taskScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvancedInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advancedInputDataHandling:");
+ if (this.advancedInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advancedInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvancedOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advancedOutputDataHandling:");
+ if (this.advancedOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advancedOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetTaskStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("taskStatus:");
+ if (this.taskStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskStatus);
+ }
+ first = false;
+ }
+ if (isSetJobDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("jobDetailsList:");
+ if (this.jobDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobDetailsList);
+ }
+ first = false;
+ }
+ if (isSetDataTransferDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("dataTransferDetailsList:");
+ if (this.dataTransferDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataTransferDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (taskID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskID' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (taskScheduling != null) {
+ taskScheduling.validate();
+ }
+ if (advancedInputDataHandling != null) {
+ advancedInputDataHandling.validate();
+ }
+ if (advancedOutputDataHandling != null) {
+ advancedOutputDataHandling.validate();
+ }
+ if (taskStatus != null) {
+ taskStatus.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 {
+ // 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 TaskDetailsStandardSchemeFactory implements SchemeFactory {
+ public TaskDetailsStandardScheme getScheme() {
+ return new TaskDetailsStandardScheme();
+ }
+ }
+
+ private static class TaskDetailsStandardScheme extends StandardScheme<TaskDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TaskDetails 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: // TASK_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.taskID = iprot.readString();
+ struct.setTaskIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // 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 4: // 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 5: // APPLICATION_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
+ struct.applicationInputs = new ArrayList<DataObjectType>(_list16.size);
+ for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+ {
+ DataObjectType _elem18;
+ _elem18 = new DataObjectType();
+ _elem18.read(iprot);
+ struct.applicationInputs.add(_elem18);
+ }
+ iprot.readListEnd();
+ }
+ struct.setApplicationInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // APPLICATION_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list19 = iprot.readListBegin();
+ struct.applicationOutputs = new ArrayList<DataObjectType>(_list19.size);
+ for (int _i20 = 0; _i20 < _list19.size; ++_i20)
+ {
+ DataObjectType _elem21;
+ _elem21 = new DataObjectType();
+ _elem21.read(iprot);
+ struct.applicationOutputs.add(_elem21);
+ }
+ iprot.readListEnd();
+ }
+ struct.setApplicationOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // TASK_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.taskScheduling = new ComputationalResourceScheduling();
+ struct.taskScheduling.read(iprot);
+ struct.setTaskSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ADVANCED_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advancedInputDataHandling = new AdvancedInputDataHandling();
+ struct.advancedInputDataHandling.read(iprot);
+ struct.setAdvancedInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ADVANCED_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advancedOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advancedOutputDataHandling.read(iprot);
+ struct.setAdvancedOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // TASK_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.taskStatus = new TaskStatus();
+ struct.taskStatus.read(iprot);
+ struct.setTaskStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // JOB_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
+ struct.jobDetailsList = new ArrayList<JobDetails>(_list22.size);
+ for (int _i23 = 0; _i23 < _list22.size; ++_i23)
+ {
+ JobDetails _elem24;
+ _elem24 = new JobDetails();
+ _elem24.read(iprot);
+ struct.jobDetailsList.add(_elem24);
+ }
+ iprot.readListEnd();
+ }
+ struct.setJobDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // DATA_TRANSFER_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
+ struct.dataTransferDetailsList = new ArrayList<DataTransferDetails>(_list25.size);
+ for (int _i26 = 0; _i26 < _list25.size; ++_i26)
+ {
+ DataTransferDetails _elem27;
+ _elem27 = new DataTransferDetails();
+ _elem27.read(iprot);
+ struct.dataTransferDetailsList.add(_elem27);
+ }
+ iprot.readListEnd();
+ }
+ struct.setDataTransferDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list28.size);
+ for (int _i29 = 0; _i29 < _list28.size; ++_i29)
+ {
+ ErrorDetails _elem30;
+ _elem30 = new ErrorDetails();
+ _elem30.read(iprot);
+ struct.errors.add(_elem30);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(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, TaskDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.taskID != null) {
+ oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+ oprot.writeString(struct.taskID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ 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.applicationInputs != null) {
+ if (struct.isSetApplicationInputs()) {
+ oprot.writeFieldBegin(APPLICATION_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.applicationInputs.size()));
+ for (DataObjectType _iter31 : struct.applicationInputs)
+ {
+ _iter31.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationOutputs != null) {
+ if (struct.isSetApplicationOutputs()) {
+ oprot.writeFieldBegin(APPLICATION_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.applicationOutputs.size()));
+ for (DataObjectType _iter32 : struct.applicationOutputs)
+ {
+ _iter32.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.taskScheduling != null) {
+ if (struct.isSetTaskScheduling()) {
+ oprot.writeFieldBegin(TASK_SCHEDULING_FIELD_DESC);
+ struct.taskScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advancedInputDataHandling != null) {
+ if (struct.isSetAdvancedInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCED_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advancedInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advancedOutputDataHandling != null) {
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCED_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advancedOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.taskStatus != null) {
+ if (struct.isSetTaskStatus()) {
+ oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC);
+ struct.taskStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.jobDetailsList != null) {
+ if (struct.isSetJobDetailsList()) {
+ oprot.writeFieldBegin(JOB_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.jobDetailsList.size()));
+ for (JobDetails _iter33 : struct.jobDetailsList)
+ {
+ _iter33.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dataTransferDetailsList != null) {
+ if (struct.isSetDataTransferDetailsList()) {
+ oprot.writeFieldBegin(DATA_TRANSFER_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.dataTransferDetailsList.size()));
+ for (DataTransferDetails _iter34 : struct.dataTransferDetailsList)
+ {
+ _iter34.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter35 : struct.errors)
+ {
+ _iter35.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TaskDetailsTupleSchemeFactory implements SchemeFactory {
+ public TaskDetailsTupleScheme getScheme() {
+ return new TaskDetailsTupleScheme();
+ }
+ }
+
+ private static class TaskDetailsTupleScheme extends TupleScheme<TaskDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.taskID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(2);
+ }
+ if (struct.isSetApplicationInputs()) {
+ optionals.set(3);
+ }
+ if (struct.isSetApplicationOutputs()) {
+ optionals.set(4);
+ }
+ if (struct.isSetTaskScheduling()) {
+ optionals.set(5);
+ }
+ if (struct.isSetAdvancedInputDataHandling()) {
+ optionals.set(6);
+ }
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ optionals.set(7);
+ }
+ if (struct.isSetTaskStatus()) {
+ optionals.set(8);
+ }
+ if (struct.isSetJobDetailsList()) {
+ optionals.set(9);
+ }
+ if (struct.isSetDataTransferDetailsList()) {
+ optionals.set(10);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(11);
+ }
+ oprot.writeBitSet(optionals, 12);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetApplicationInputs()) {
+ {
+ oprot.writeI32(struct.applicationInputs.size());
+ for (DataObjectType _iter36 : struct.applicationInputs)
+ {
+ _iter36.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetApplicationOutputs()) {
+ {
+ oprot.writeI32(struct.applicationOutputs.size());
+ for (DataObjectType _iter37 : struct.applicationOutputs)
+ {
+ _iter37.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetTaskScheduling()) {
+ struct.taskScheduling.write(oprot);
+ }
+ if (struct.isSetAdvancedInputDataHandling()) {
+ struct.advancedInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ struct.advancedOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetTaskStatus()) {
+ struct.taskStatus.write(oprot);
+ }
+ if (struct.isSetJobDetailsList()) {
+ {
+ oprot.writeI32(struct.jobDetailsList.size());
+ for (JobDetails _iter38 : struct.jobDetailsList)
+ {
+ _iter38.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDataTransferDetailsList()) {
+ {
+ oprot.writeI32(struct.dataTransferDetailsList.size());
+ for (DataTransferDetails _iter39 : struct.dataTransferDetailsList)
+ {
+ _iter39.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter40 : struct.errors)
+ {
+ _iter40.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.taskID = iprot.readString();
+ struct.setTaskIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(12);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(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)) {
+ {
+ org.apache.thrift.protocol.TList _list41 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.applicationInputs = new ArrayList<DataObjectType>(_list41.size);
+ for (int _i42 = 0; _i42 < _list41.size; ++_i42)
+ {
+ DataObjectType _elem43;
+ _elem43 = new DataObjectType();
+ _elem43.read(iprot);
+ struct.applicationInputs.add(_elem43);
+ }
+ }
+ struct.setApplicationInputsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.applicationOutputs = new ArrayList<DataObjectType>(_list44.size);
+ for (int _i45 = 0; _i45 < _list44.size; ++_i45)
+ {
+ DataObjectType _elem46;
+ _elem46 = new DataObjectType();
+ _elem46.read(iprot);
+ struct.applicationOutputs.add(_elem46);
+ }
+ }
+ struct.setApplicationOutputsIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.taskScheduling = new ComputationalResourceScheduling();
+ struct.taskScheduling.read(iprot);
+ struct.setTaskSchedulingIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.advancedInputDataHandling = new AdvancedInputDataHandling();
+ struct.advancedInputDataHandling.read(iprot);
+ struct.setAdvancedInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.advancedOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advancedOutputDataHandling.read(iprot);
+ struct.setAdvancedOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.taskStatus = new TaskStatus();
+ struct.taskStatus.read(iprot);
+ struct.setTaskStatusIsSet(true);
+ }
+ if (incoming.get(9)) {
+ {
+ org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.jobDetailsList = new ArrayList<JobDetails>(_list47.size);
+ for (int _i48 = 0; _i48 < _list47.size; ++_i48)
+ {
+ JobDetails _elem49;
+ _elem49 = new JobDetails();
+ _elem49.read(iprot);
+ struct.jobDetailsList.add(_elem49);
+ }
+ }
+ struct.setJobDetailsListIsSet(true);
+ }
+ if (incoming.get(10)) {
+ {
+ org.apache.thrift.protocol.TList _list50 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.dataTransferDetailsList = new ArrayList<DataTransferDetails>(_list50.size);
+ for (int _i51 = 0; _i51 < _list50.size; ++_i51)
+ {
+ DataTransferDetails _elem52;
+ _elem52 = new DataTransferDetails();
+ _elem52.read(iprot);
+ struct.dataTransferDetailsList.add(_elem52);
+ }
+ }
+ struct.setDataTransferDetailsListIsSet(true);
+ }
+ if (incoming.get(11)) {
+ {
+ org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list53.size);
+ for (int _i54 = 0; _i54 < _list53.size; ++_i54)
+ {
+ ErrorDetails _elem55;
+ _elem55 = new ErrorDetails();
+ _elem55.read(iprot);
+ struct.errors.add(_elem55);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskState.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskState.java
new file mode 100644
index 0000000..68d7a88
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/TaskState.java
@@ -0,0 +1,91 @@
+ /*
+ * 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.workspace.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum TaskState implements org.apache.thrift.TEnum {
+ WAITING(0),
+ STARTED(1),
+ PRE_PROCESSING(2),
+ CONFIGURING_WORKSPACE(3),
+ INPUT_DATA_STAGING(4),
+ OUTPUT_DATA_STAGING(5),
+ POST_PROCESSING(6),
+ EXECUTING(7),
+ CANCELED(8),
+ COMPLETED(9),
+ FAILED(10),
+ UNKNOWN(11);
+
+ private final int value;
+
+ private TaskState(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 TaskState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return WAITING;
+ case 1:
+ return STARTED;
+ case 2:
+ return PRE_PROCESSING;
+ case 3:
+ return CONFIGURING_WORKSPACE;
+ case 4:
+ return INPUT_DATA_STAGING;
+ case 5:
+ return OUTPUT_DATA_STAGING;
+ case 6:
+ return POST_PROCESSING;
+ case 7:
+ return EXECUTING;
+ case 8:
+ return CANCELED;
+ case 9:
+ return COMPLETED;
+ case 10:
+ return FAILED;
+ case 11:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
[06/13] Adding API Methods to create and fetch basic experiment
status - AIRAVATA-991
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f6d80a8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
new file mode 100644
index 0000000..f9c4a51
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
@@ -0,0 +1,2416 @@
+ /*
+ * 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.workspace.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 metadata and its child models.
+ *
+ * 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 Experiment implements org.apache.thrift.TBase<Experiment, Experiment._Fields>, java.io.Serializable, Cloneable, Comparable<Experiment> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Experiment");
+
+ 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)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
+ 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)4);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ 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)7);
+ 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)8);
+ 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)9);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateVersion", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField USER_CONFIGURATION_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userConfigurationData", org.apache.thrift.protocol.TType.STRUCT, (short)11);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionInstanceId", org.apache.thrift.protocol.TType.STRING, (short)12);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentInputs", org.apache.thrift.protocol.TType.LIST, (short)13);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentOutputs", org.apache.thrift.protocol.TType.LIST, (short)14);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentStatus", org.apache.thrift.protocol.TType.STRUCT, (short)15);
+ private static final org.apache.thrift.protocol.TField STATE_CHANGE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("stateChangeList", org.apache.thrift.protocol.TType.LIST, (short)16);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeDetailsList", org.apache.thrift.protocol.TType.LIST, (short)17);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)18);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentTupleSchemeFactory());
+ }
+
+ public String experimentID; // required
+ public String projectID; // required
+ public long creationTime; // optional
+ public String userName; // required
+ public String name; // required
+ public String description; // optional
+ public String applicationId; // optional
+ public String applicationVersion; // optional
+ public String workflowTemplateId; // optional
+ public String workflowTemplateVersion; // optional
+ public UserConfigurationData userConfigurationData; // optional
+ public String workflowExecutionInstanceId; // optional
+ public List<DataObjectType> experimentInputs; // optional
+ public List<DataObjectType> experimentOutputs; // optional
+ public ExperimentStatus experimentStatus; // optional
+ public List<WorkflowNodeStatus> stateChangeList; // optional
+ public List<WorkflowNodeDetails> workflowNodeDetailsList; // optional
+ public List<ErrorDetails> errors; // 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 {
+ EXPERIMENT_ID((short)1, "experimentID"),
+ PROJECT_ID((short)2, "projectID"),
+ CREATION_TIME((short)3, "creationTime"),
+ USER_NAME((short)4, "userName"),
+ NAME((short)5, "name"),
+ DESCRIPTION((short)6, "description"),
+ APPLICATION_ID((short)7, "applicationId"),
+ APPLICATION_VERSION((short)8, "applicationVersion"),
+ WORKFLOW_TEMPLATE_ID((short)9, "workflowTemplateId"),
+ WORKFLOW_TEMPLATE_VERSION((short)10, "workflowTemplateVersion"),
+ USER_CONFIGURATION_DATA((short)11, "userConfigurationData"),
+ WORKFLOW_EXECUTION_INSTANCE_ID((short)12, "workflowExecutionInstanceId"),
+ EXPERIMENT_INPUTS((short)13, "experimentInputs"),
+ EXPERIMENT_OUTPUTS((short)14, "experimentOutputs"),
+ EXPERIMENT_STATUS((short)15, "experimentStatus"),
+ STATE_CHANGE_LIST((short)16, "stateChangeList"),
+ WORKFLOW_NODE_DETAILS_LIST((short)17, "workflowNodeDetailsList"),
+ ERRORS((short)18, "errors");
+
+ 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: // EXPERIMENT_ID
+ return EXPERIMENT_ID;
+ case 2: // PROJECT_ID
+ return PROJECT_ID;
+ case 3: // CREATION_TIME
+ return CREATION_TIME;
+ case 4: // USER_NAME
+ return USER_NAME;
+ case 5: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 8: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 9: // WORKFLOW_TEMPLATE_ID
+ return WORKFLOW_TEMPLATE_ID;
+ case 10: // WORKFLOW_TEMPLATE_VERSION
+ return WORKFLOW_TEMPLATE_VERSION;
+ case 11: // USER_CONFIGURATION_DATA
+ return USER_CONFIGURATION_DATA;
+ case 12: // WORKFLOW_EXECUTION_INSTANCE_ID
+ return WORKFLOW_EXECUTION_INSTANCE_ID;
+ case 13: // EXPERIMENT_INPUTS
+ return EXPERIMENT_INPUTS;
+ case 14: // EXPERIMENT_OUTPUTS
+ return EXPERIMENT_OUTPUTS;
+ case 15: // EXPERIMENT_STATUS
+ return EXPERIMENT_STATUS;
+ case 16: // STATE_CHANGE_LIST
+ return STATE_CHANGE_LIST;
+ case 17: // WORKFLOW_NODE_DETAILS_LIST
+ return WORKFLOW_NODE_DETAILS_LIST;
+ case 18: // ERRORS
+ return ERRORS;
+ 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 __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.DESCRIPTION,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.WORKFLOW_TEMPLATE_ID,_Fields.WORKFLOW_TEMPLATE_VERSION,_Fields.USER_CONFIGURATION_DATA,_Fields.WORKFLOW_EXECUTION_INSTANCE_ID,_Fields.EXPERIMENT_INPUTS,_Fields.EXPERIMENT_OUTPUTS,_Fields.EXPERIMENT_STATUS,_Fields.STATE_CHANGE_LIST,_Fields.WORKFLOW_NODE_DETAILS_LIST,_Fields.ERRORS};
+ 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.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)));
+ 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.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ 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.WORKFLOW_TEMPLATE_VERSION, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_CONFIGURATION_DATA, new org.apache.thrift.meta_data.FieldMetaData("userConfigurationData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserConfigurationData.class)));
+ tmpMap.put(_Fields.WORKFLOW_EXECUTION_INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionInstanceId", 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.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.EXPERIMENT_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataObjectType.class))));
+ tmpMap.put(_Fields.EXPERIMENT_STATUS, new org.apache.thrift.meta_data.FieldMetaData("experimentStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExperimentStatus.class)));
+ tmpMap.put(_Fields.STATE_CHANGE_LIST, new org.apache.thrift.meta_data.FieldMetaData("stateChangeList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, WorkflowNodeStatus.class))));
+ tmpMap.put(_Fields.WORKFLOW_NODE_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, WorkflowNodeDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Experiment.class, metaDataMap);
+ }
+
+ public Experiment() {
+ this.experimentID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.projectID = "DEFAULT";
+
+ }
+
+ public Experiment(
+ String experimentID,
+ String projectID,
+ String userName,
+ String name)
+ {
+ this();
+ this.experimentID = experimentID;
+ this.projectID = projectID;
+ this.userName = userName;
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Experiment(Experiment other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExperimentID()) {
+ this.experimentID = other.experimentID;
+ }
+ if (other.isSetProjectID()) {
+ this.projectID = other.projectID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetWorkflowTemplateId()) {
+ this.workflowTemplateId = other.workflowTemplateId;
+ }
+ if (other.isSetWorkflowTemplateVersion()) {
+ this.workflowTemplateVersion = other.workflowTemplateVersion;
+ }
+ if (other.isSetUserConfigurationData()) {
+ this.userConfigurationData = new UserConfigurationData(other.userConfigurationData);
+ }
+ if (other.isSetWorkflowExecutionInstanceId()) {
+ this.workflowExecutionInstanceId = other.workflowExecutionInstanceId;
+ }
+ if (other.isSetExperimentInputs()) {
+ List<DataObjectType> __this__experimentInputs = new ArrayList<DataObjectType>(other.experimentInputs.size());
+ for (DataObjectType other_element : other.experimentInputs) {
+ __this__experimentInputs.add(new DataObjectType(other_element));
+ }
+ this.experimentInputs = __this__experimentInputs;
+ }
+ if (other.isSetExperimentOutputs()) {
+ List<DataObjectType> __this__experimentOutputs = new ArrayList<DataObjectType>(other.experimentOutputs.size());
+ for (DataObjectType other_element : other.experimentOutputs) {
+ __this__experimentOutputs.add(new DataObjectType(other_element));
+ }
+ this.experimentOutputs = __this__experimentOutputs;
+ }
+ if (other.isSetExperimentStatus()) {
+ this.experimentStatus = new ExperimentStatus(other.experimentStatus);
+ }
+ if (other.isSetStateChangeList()) {
+ List<WorkflowNodeStatus> __this__stateChangeList = new ArrayList<WorkflowNodeStatus>(other.stateChangeList.size());
+ for (WorkflowNodeStatus other_element : other.stateChangeList) {
+ __this__stateChangeList.add(new WorkflowNodeStatus(other_element));
+ }
+ this.stateChangeList = __this__stateChangeList;
+ }
+ if (other.isSetWorkflowNodeDetailsList()) {
+ List<WorkflowNodeDetails> __this__workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>(other.workflowNodeDetailsList.size());
+ for (WorkflowNodeDetails other_element : other.workflowNodeDetailsList) {
+ __this__workflowNodeDetailsList.add(new WorkflowNodeDetails(other_element));
+ }
+ this.workflowNodeDetailsList = __this__workflowNodeDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public Experiment deepCopy() {
+ return new Experiment(this);
+ }
+
+ @Override
+ public void clear() {
+ this.experimentID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.projectID = "DEFAULT";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.userName = null;
+ this.name = null;
+ this.description = null;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.workflowTemplateId = null;
+ this.workflowTemplateVersion = null;
+ this.userConfigurationData = null;
+ this.workflowExecutionInstanceId = null;
+ this.experimentInputs = null;
+ this.experimentOutputs = null;
+ this.experimentStatus = null;
+ this.stateChangeList = null;
+ this.workflowNodeDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getExperimentID() {
+ return this.experimentID;
+ }
+
+ public Experiment 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 String getProjectID() {
+ return this.projectID;
+ }
+
+ public Experiment 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 long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public Experiment setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public Experiment 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 getName() {
+ return this.name;
+ }
+
+ public Experiment setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Experiment setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public Experiment 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 Experiment 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 Experiment 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 getWorkflowTemplateVersion() {
+ return this.workflowTemplateVersion;
+ }
+
+ public Experiment setWorkflowTemplateVersion(String workflowTemplateVersion) {
+ this.workflowTemplateVersion = workflowTemplateVersion;
+ return this;
+ }
+
+ public void unsetWorkflowTemplateVersion() {
+ this.workflowTemplateVersion = null;
+ }
+
+ /** Returns true if field workflowTemplateVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateVersion() {
+ return this.workflowTemplateVersion != null;
+ }
+
+ public void setWorkflowTemplateVersionIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateVersion = null;
+ }
+ }
+
+ public UserConfigurationData getUserConfigurationData() {
+ return this.userConfigurationData;
+ }
+
+ public Experiment setUserConfigurationData(UserConfigurationData userConfigurationData) {
+ this.userConfigurationData = userConfigurationData;
+ return this;
+ }
+
+ public void unsetUserConfigurationData() {
+ this.userConfigurationData = null;
+ }
+
+ /** Returns true if field userConfigurationData is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserConfigurationData() {
+ return this.userConfigurationData != null;
+ }
+
+ public void setUserConfigurationDataIsSet(boolean value) {
+ if (!value) {
+ this.userConfigurationData = null;
+ }
+ }
+
+ public String getWorkflowExecutionInstanceId() {
+ return this.workflowExecutionInstanceId;
+ }
+
+ public Experiment setWorkflowExecutionInstanceId(String workflowExecutionInstanceId) {
+ this.workflowExecutionInstanceId = workflowExecutionInstanceId;
+ return this;
+ }
+
+ public void unsetWorkflowExecutionInstanceId() {
+ this.workflowExecutionInstanceId = null;
+ }
+
+ /** Returns true if field workflowExecutionInstanceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowExecutionInstanceId() {
+ return this.workflowExecutionInstanceId != null;
+ }
+
+ public void setWorkflowExecutionInstanceIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowExecutionInstanceId = null;
+ }
+ }
+
+ public int getExperimentInputsSize() {
+ return (this.experimentInputs == null) ? 0 : this.experimentInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getExperimentInputsIterator() {
+ return (this.experimentInputs == null) ? null : this.experimentInputs.iterator();
+ }
+
+ public void addToExperimentInputs(DataObjectType elem) {
+ if (this.experimentInputs == null) {
+ this.experimentInputs = new ArrayList<DataObjectType>();
+ }
+ this.experimentInputs.add(elem);
+ }
+
+ public List<DataObjectType> getExperimentInputs() {
+ return this.experimentInputs;
+ }
+
+ public Experiment setExperimentInputs(List<DataObjectType> 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 int getExperimentOutputsSize() {
+ return (this.experimentOutputs == null) ? 0 : this.experimentOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getExperimentOutputsIterator() {
+ return (this.experimentOutputs == null) ? null : this.experimentOutputs.iterator();
+ }
+
+ public void addToExperimentOutputs(DataObjectType elem) {
+ if (this.experimentOutputs == null) {
+ this.experimentOutputs = new ArrayList<DataObjectType>();
+ }
+ this.experimentOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getExperimentOutputs() {
+ return this.experimentOutputs;
+ }
+
+ public Experiment setExperimentOutputs(List<DataObjectType> experimentOutputs) {
+ this.experimentOutputs = experimentOutputs;
+ return this;
+ }
+
+ public void unsetExperimentOutputs() {
+ this.experimentOutputs = null;
+ }
+
+ /** Returns true if field experimentOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentOutputs() {
+ return this.experimentOutputs != null;
+ }
+
+ public void setExperimentOutputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentOutputs = null;
+ }
+ }
+
+ public ExperimentStatus getExperimentStatus() {
+ return this.experimentStatus;
+ }
+
+ public Experiment setExperimentStatus(ExperimentStatus experimentStatus) {
+ this.experimentStatus = experimentStatus;
+ return this;
+ }
+
+ public void unsetExperimentStatus() {
+ this.experimentStatus = null;
+ }
+
+ /** Returns true if field experimentStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentStatus() {
+ return this.experimentStatus != null;
+ }
+
+ public void setExperimentStatusIsSet(boolean value) {
+ if (!value) {
+ this.experimentStatus = null;
+ }
+ }
+
+ public int getStateChangeListSize() {
+ return (this.stateChangeList == null) ? 0 : this.stateChangeList.size();
+ }
+
+ public java.util.Iterator<WorkflowNodeStatus> getStateChangeListIterator() {
+ return (this.stateChangeList == null) ? null : this.stateChangeList.iterator();
+ }
+
+ public void addToStateChangeList(WorkflowNodeStatus elem) {
+ if (this.stateChangeList == null) {
+ this.stateChangeList = new ArrayList<WorkflowNodeStatus>();
+ }
+ this.stateChangeList.add(elem);
+ }
+
+ public List<WorkflowNodeStatus> getStateChangeList() {
+ return this.stateChangeList;
+ }
+
+ public Experiment setStateChangeList(List<WorkflowNodeStatus> stateChangeList) {
+ this.stateChangeList = stateChangeList;
+ return this;
+ }
+
+ public void unsetStateChangeList() {
+ this.stateChangeList = null;
+ }
+
+ /** Returns true if field stateChangeList is set (has been assigned a value) and false otherwise */
+ public boolean isSetStateChangeList() {
+ return this.stateChangeList != null;
+ }
+
+ public void setStateChangeListIsSet(boolean value) {
+ if (!value) {
+ this.stateChangeList = null;
+ }
+ }
+
+ public int getWorkflowNodeDetailsListSize() {
+ return (this.workflowNodeDetailsList == null) ? 0 : this.workflowNodeDetailsList.size();
+ }
+
+ public java.util.Iterator<WorkflowNodeDetails> getWorkflowNodeDetailsListIterator() {
+ return (this.workflowNodeDetailsList == null) ? null : this.workflowNodeDetailsList.iterator();
+ }
+
+ public void addToWorkflowNodeDetailsList(WorkflowNodeDetails elem) {
+ if (this.workflowNodeDetailsList == null) {
+ this.workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
+ }
+ this.workflowNodeDetailsList.add(elem);
+ }
+
+ public List<WorkflowNodeDetails> getWorkflowNodeDetailsList() {
+ return this.workflowNodeDetailsList;
+ }
+
+ public Experiment setWorkflowNodeDetailsList(List<WorkflowNodeDetails> workflowNodeDetailsList) {
+ this.workflowNodeDetailsList = workflowNodeDetailsList;
+ return this;
+ }
+
+ public void unsetWorkflowNodeDetailsList() {
+ this.workflowNodeDetailsList = null;
+ }
+
+ /** Returns true if field workflowNodeDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeDetailsList() {
+ return this.workflowNodeDetailsList != null;
+ }
+
+ public void setWorkflowNodeDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public Experiment setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXPERIMENT_ID:
+ if (value == null) {
+ unsetExperimentID();
+ } else {
+ setExperimentID((String)value);
+ }
+ break;
+
+ case PROJECT_ID:
+ if (value == null) {
+ unsetProjectID();
+ } else {
+ setProjectID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)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 WORKFLOW_TEMPLATE_VERSION:
+ if (value == null) {
+ unsetWorkflowTemplateVersion();
+ } else {
+ setWorkflowTemplateVersion((String)value);
+ }
+ break;
+
+ case USER_CONFIGURATION_DATA:
+ if (value == null) {
+ unsetUserConfigurationData();
+ } else {
+ setUserConfigurationData((UserConfigurationData)value);
+ }
+ break;
+
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ if (value == null) {
+ unsetWorkflowExecutionInstanceId();
+ } else {
+ setWorkflowExecutionInstanceId((String)value);
+ }
+ break;
+
+ case EXPERIMENT_INPUTS:
+ if (value == null) {
+ unsetExperimentInputs();
+ } else {
+ setExperimentInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case EXPERIMENT_OUTPUTS:
+ if (value == null) {
+ unsetExperimentOutputs();
+ } else {
+ setExperimentOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case EXPERIMENT_STATUS:
+ if (value == null) {
+ unsetExperimentStatus();
+ } else {
+ setExperimentStatus((ExperimentStatus)value);
+ }
+ break;
+
+ case STATE_CHANGE_LIST:
+ if (value == null) {
+ unsetStateChangeList();
+ } else {
+ setStateChangeList((List<WorkflowNodeStatus>)value);
+ }
+ break;
+
+ case WORKFLOW_NODE_DETAILS_LIST:
+ if (value == null) {
+ unsetWorkflowNodeDetailsList();
+ } else {
+ setWorkflowNodeDetailsList((List<WorkflowNodeDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXPERIMENT_ID:
+ return getExperimentID();
+
+ case PROJECT_ID:
+ return getProjectID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case USER_NAME:
+ return getUserName();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case WORKFLOW_TEMPLATE_ID:
+ return getWorkflowTemplateId();
+
+ case WORKFLOW_TEMPLATE_VERSION:
+ return getWorkflowTemplateVersion();
+
+ case USER_CONFIGURATION_DATA:
+ return getUserConfigurationData();
+
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ return getWorkflowExecutionInstanceId();
+
+ case EXPERIMENT_INPUTS:
+ return getExperimentInputs();
+
+ case EXPERIMENT_OUTPUTS:
+ return getExperimentOutputs();
+
+ case EXPERIMENT_STATUS:
+ return getExperimentStatus();
+
+ case STATE_CHANGE_LIST:
+ return getStateChangeList();
+
+ case WORKFLOW_NODE_DETAILS_LIST:
+ return getWorkflowNodeDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ 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 EXPERIMENT_ID:
+ return isSetExperimentID();
+ case PROJECT_ID:
+ return isSetProjectID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case USER_NAME:
+ return isSetUserName();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case WORKFLOW_TEMPLATE_ID:
+ return isSetWorkflowTemplateId();
+ case WORKFLOW_TEMPLATE_VERSION:
+ return isSetWorkflowTemplateVersion();
+ case USER_CONFIGURATION_DATA:
+ return isSetUserConfigurationData();
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ return isSetWorkflowExecutionInstanceId();
+ case EXPERIMENT_INPUTS:
+ return isSetExperimentInputs();
+ case EXPERIMENT_OUTPUTS:
+ return isSetExperimentOutputs();
+ case EXPERIMENT_STATUS:
+ return isSetExperimentStatus();
+ case STATE_CHANGE_LIST:
+ return isSetStateChangeList();
+ case WORKFLOW_NODE_DETAILS_LIST:
+ return isSetWorkflowNodeDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Experiment)
+ return this.equals((Experiment)that);
+ return false;
+ }
+
+ public boolean equals(Experiment that) {
+ if (that == null)
+ 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;
+ }
+
+ 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_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ 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_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ 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_workflowTemplateVersion = true && this.isSetWorkflowTemplateVersion();
+ boolean that_present_workflowTemplateVersion = true && that.isSetWorkflowTemplateVersion();
+ if (this_present_workflowTemplateVersion || that_present_workflowTemplateVersion) {
+ if (!(this_present_workflowTemplateVersion && that_present_workflowTemplateVersion))
+ return false;
+ if (!this.workflowTemplateVersion.equals(that.workflowTemplateVersion))
+ return false;
+ }
+
+ boolean this_present_userConfigurationData = true && this.isSetUserConfigurationData();
+ boolean that_present_userConfigurationData = true && that.isSetUserConfigurationData();
+ if (this_present_userConfigurationData || that_present_userConfigurationData) {
+ if (!(this_present_userConfigurationData && that_present_userConfigurationData))
+ return false;
+ if (!this.userConfigurationData.equals(that.userConfigurationData))
+ return false;
+ }
+
+ boolean this_present_workflowExecutionInstanceId = true && this.isSetWorkflowExecutionInstanceId();
+ boolean that_present_workflowExecutionInstanceId = true && that.isSetWorkflowExecutionInstanceId();
+ if (this_present_workflowExecutionInstanceId || that_present_workflowExecutionInstanceId) {
+ if (!(this_present_workflowExecutionInstanceId && that_present_workflowExecutionInstanceId))
+ return false;
+ if (!this.workflowExecutionInstanceId.equals(that.workflowExecutionInstanceId))
+ 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_experimentOutputs = true && this.isSetExperimentOutputs();
+ boolean that_present_experimentOutputs = true && that.isSetExperimentOutputs();
+ if (this_present_experimentOutputs || that_present_experimentOutputs) {
+ if (!(this_present_experimentOutputs && that_present_experimentOutputs))
+ return false;
+ if (!this.experimentOutputs.equals(that.experimentOutputs))
+ return false;
+ }
+
+ boolean this_present_experimentStatus = true && this.isSetExperimentStatus();
+ boolean that_present_experimentStatus = true && that.isSetExperimentStatus();
+ if (this_present_experimentStatus || that_present_experimentStatus) {
+ if (!(this_present_experimentStatus && that_present_experimentStatus))
+ return false;
+ if (!this.experimentStatus.equals(that.experimentStatus))
+ return false;
+ }
+
+ boolean this_present_stateChangeList = true && this.isSetStateChangeList();
+ boolean that_present_stateChangeList = true && that.isSetStateChangeList();
+ if (this_present_stateChangeList || that_present_stateChangeList) {
+ if (!(this_present_stateChangeList && that_present_stateChangeList))
+ return false;
+ if (!this.stateChangeList.equals(that.stateChangeList))
+ return false;
+ }
+
+ boolean this_present_workflowNodeDetailsList = true && this.isSetWorkflowNodeDetailsList();
+ boolean that_present_workflowNodeDetailsList = true && that.isSetWorkflowNodeDetailsList();
+ if (this_present_workflowNodeDetailsList || that_present_workflowNodeDetailsList) {
+ if (!(this_present_workflowNodeDetailsList && that_present_workflowNodeDetailsList))
+ return false;
+ if (!this.workflowNodeDetailsList.equals(that.workflowNodeDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Experiment other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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;
+ }
+ }
+ 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(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ 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(isSetWorkflowTemplateVersion()).compareTo(other.isSetWorkflowTemplateVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateVersion, other.workflowTemplateVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserConfigurationData()).compareTo(other.isSetUserConfigurationData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserConfigurationData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userConfigurationData, other.userConfigurationData);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowExecutionInstanceId()).compareTo(other.isSetWorkflowExecutionInstanceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowExecutionInstanceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionInstanceId, other.workflowExecutionInstanceId);
+ 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(isSetExperimentOutputs()).compareTo(other.isSetExperimentOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentOutputs, other.experimentOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentStatus()).compareTo(other.isSetExperimentStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentStatus, other.experimentStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStateChangeList()).compareTo(other.isSetStateChangeList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStateChangeList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateChangeList, other.stateChangeList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeDetailsList()).compareTo(other.isSetWorkflowNodeDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeDetailsList, other.workflowNodeDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ 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("Experiment(");
+ boolean first = true;
+
+ sb.append("experimentID:");
+ if (this.experimentID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("projectID:");
+ if (this.projectID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ 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 (isSetWorkflowTemplateVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateVersion:");
+ if (this.workflowTemplateVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateVersion);
+ }
+ first = false;
+ }
+ if (isSetUserConfigurationData()) {
+ if (!first) sb.append(", ");
+ sb.append("userConfigurationData:");
+ if (this.userConfigurationData == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userConfigurationData);
+ }
+ first = false;
+ }
+ if (isSetWorkflowExecutionInstanceId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowExecutionInstanceId:");
+ if (this.workflowExecutionInstanceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowExecutionInstanceId);
+ }
+ 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 (isSetExperimentOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentOutputs:");
+ if (this.experimentOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentOutputs);
+ }
+ first = false;
+ }
+ if (isSetExperimentStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentStatus:");
+ if (this.experimentStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentStatus);
+ }
+ first = false;
+ }
+ if (isSetStateChangeList()) {
+ if (!first) sb.append(", ");
+ sb.append("stateChangeList:");
+ if (this.stateChangeList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.stateChangeList);
+ }
+ first = false;
+ }
+ if (isSetWorkflowNodeDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowNodeDetailsList:");
+ if (this.workflowNodeDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (experimentID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' was not present! Struct: " + toString());
+ }
+ if (projectID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' was not present! Struct: " + toString());
+ }
+ if (userName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
+ }
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (userConfigurationData != null) {
+ userConfigurationData.validate();
+ }
+ if (experimentStatus != null) {
+ experimentStatus.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 {
+ // 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 ExperimentStandardSchemeFactory implements SchemeFactory {
+ public ExperimentStandardScheme getScheme() {
+ return new ExperimentStandardScheme();
+ }
+ }
+
+ private static class ExperimentStandardScheme extends StandardScheme<Experiment> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Experiment 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: // 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;
+ case 2: // 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 3: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // 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 5: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // 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 8: // 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 9: // 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 10: // WORKFLOW_TEMPLATE_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateVersion = iprot.readString();
+ struct.setWorkflowTemplateVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // USER_CONFIGURATION_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.userConfigurationData = new UserConfigurationData();
+ struct.userConfigurationData.read(iprot);
+ struct.setUserConfigurationDataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // WORKFLOW_EXECUTION_INSTANCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowExecutionInstanceId = iprot.readString();
+ struct.setWorkflowExecutionInstanceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // EXPERIMENT_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+ struct.experimentInputs = new ArrayList<DataObjectType>(_list88.size);
+ for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+ {
+ DataObjectType _elem90;
+ _elem90 = new DataObjectType();
+ _elem90.read(iprot);
+ struct.experimentInputs.add(_elem90);
+ }
+ iprot.readListEnd();
+ }
+ struct.setExperimentInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // EXPERIMENT_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list91 = iprot.readListBegin();
+ struct.experimentOutputs = new ArrayList<DataObjectType>(_list91.size);
+ for (int _i92 = 0; _i92 < _list91.size; ++_i92)
+ {
+ DataObjectType _elem93;
+ _elem93 = new DataObjectType();
+ _elem93.read(iprot);
+ struct.experimentOutputs.add(_elem93);
+ }
+ iprot.readListEnd();
+ }
+ struct.setExperimentOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // EXPERIMENT_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.experimentStatus = new ExperimentStatus();
+ struct.experimentStatus.read(iprot);
+ struct.setExperimentStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // STATE_CHANGE_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
+ struct.stateChangeList = new ArrayList<WorkflowNodeStatus>(_list94.size);
+ for (int _i95 = 0; _i95 < _list94.size; ++_i95)
+ {
+ WorkflowNodeStatus _elem96;
+ _elem96 = new WorkflowNodeStatus();
+ _elem96.read(iprot);
+ struct.stateChangeList.add(_elem96);
+ }
+ iprot.readListEnd();
+ }
+ struct.setStateChangeListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // WORKFLOW_NODE_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list97 = iprot.readListBegin();
+ struct.workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>(_list97.size);
+ for (int _i98 = 0; _i98 < _list97.size; ++_i98)
+ {
+ WorkflowNodeDetails _elem99;
+ _elem99 = new WorkflowNodeDetails();
+ _elem99.read(iprot);
+ struct.workflowNodeDetailsList.add(_elem99);
+ }
+ iprot.readListEnd();
+ }
+ struct.setWorkflowNodeDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 18: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list100 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list100.size);
+ for (int _i101 = 0; _i101 < _list100.size; ++_i101)
+ {
+ ErrorDetails _elem102;
+ _elem102 = new ErrorDetails();
+ _elem102.read(iprot);
+ struct.errors.add(_elem102);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(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, Experiment struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.experimentID != null) {
+ oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.experimentID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.projectID != null) {
+ oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
+ oprot.writeString(struct.projectID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ 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.workflowTemplateVersion != null) {
+ if (struct.isSetWorkflowTemplateVersion()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_VERSION_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userConfigurationData != null) {
+ if (struct.isSetUserConfigurationData()) {
+ oprot.writeFieldBegin(USER_CONFIGURATION_DATA_FIELD_DESC);
+ struct.userConfigurationData.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowExecutionInstanceId != null) {
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ oprot.writeFieldBegin(WORKFLOW_EXECUTION_INSTANCE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowExecutionInstanceId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentInputs != null) {
+ if (struct.isSetExperimentInputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.experimentInputs.size()));
+ for (DataObjectType _iter103 : struct.experimentInputs)
+ {
+ _iter103.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentOutputs != null) {
+ if (struct.isSetExperimentOutputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.experimentOutputs.size()));
+ for (DataObjectType _iter104 : struct.experimentOutputs)
+ {
+ _iter104.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentStatus != null) {
+ if (struct.isSetExperimentStatus()) {
+ oprot.writeFieldBegin(EXPERIMENT_STATUS_FIELD_DESC);
+ struct.experimentStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.stateChangeList != null) {
+ if (struct.isSetStateChangeList()) {
+ oprot.writeFieldBegin(STATE_CHANGE_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.stateChangeList.size()));
+ for (WorkflowNodeStatus _iter105 : struct.stateChangeList)
+ {
+ _iter105.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowNodeDetailsList != null) {
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.workflowNodeDetailsList.size()));
+ for (WorkflowNodeDetails _iter106 : struct.workflowNodeDetailsList)
+ {
+ _iter106.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter107 : struct.errors)
+ {
+ _iter107.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentTupleSchemeFactory implements SchemeFactory {
+ public ExperimentTupleScheme getScheme() {
+ return new ExperimentTupleScheme();
+ }
+ }
+
+ private static class ExperimentTupleScheme extends TupleScheme<Experiment> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.experimentID);
+ oprot.writeString(struct.projectID);
+ oprot.writeString(struct.userName);
+ oprot.writeString(struct.name);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(3);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetWorkflowTemplateVersion()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUserConfigurationData()) {
+ optionals.set(6);
+ }
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ optionals.set(7);
+ }
+ if (struct.isSetExperimentInputs()) {
+ optionals.set(8);
+ }
+ if (struct.isSetExperimentOutputs()) {
+ optionals.set(9);
+ }
+ if (struct.isSetExperimentStatus()) {
+ optionals.set(10);
+ }
+ if (struct.isSetStateChangeList()) {
+ optionals.set(11);
+ }
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ optionals.set(12);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(13);
+ }
+ oprot.writeBitSet(optionals, 14);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeString(struct.workflowTemplateId);
+ }
+ if (struct.isSetWorkflowTemplateVersion()) {
+ oprot.writeString(struct.workflowTemplateVersion);
+ }
+ if (struct.isSetUserConfigurationData()) {
+ struct.userConfigurationData.write(oprot);
+ }
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ oprot.writeString(struct.workflowExecutionInstanceId);
+ }
+ if (struct.isSetExperimentInputs()) {
+ {
+ oprot.writeI32(struct.experimentInputs.size());
+ for (DataObjectType _iter108 : struct.experimentInputs)
+ {
+ _iter108.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetExperimentOutputs()) {
+ {
+ oprot.writeI32(struct.experimentOutputs.size());
+ for (DataObjectType _iter109 : struct.experimentOutputs)
+ {
+ _iter109.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetExperimentStatus()) {
+ struct.experimentStatus.write(oprot);
+ }
+ if (struct.isSetStateChangeList()) {
+ {
+ oprot.writeI32(struct.stateChangeList.size());
+ for (WorkflowNodeStatus _iter110 : struct.stateChangeList)
+ {
+ _iter110.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ {
+ oprot.writeI32(struct.workflowNodeDetailsList.size());
+ for (WorkflowNodeDetails _iter111 : struct.workflowNodeDetailsList)
+ {
+ _iter111.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter112 : struct.errors)
+ {
+ _iter112.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(true);
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(14);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.workflowTemplateVersion = iprot.readString();
+ struct.setWorkflowTemplateVersionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.userConfigurationData = new UserConfigurationData();
+ struct.userConfigurationData.read(iprot);
+ struct.setUserConfigurationDataIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.workflowExecutionInstanceId = iprot.readString();
+ struct.setWorkflowExecutionInstanceIdIsSet(true);
+ }
+ if (incoming.get(8)) {
+ {
+ org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.experimentInputs = new ArrayList<DataObjectType>(_list113.size);
+ for (int _i114 = 0; _i114 < _list113.size; ++_i114)
+ {
+ DataObjectType _elem115;
+ _elem115 = new DataObjectType();
+ _elem115.read(iprot);
+ struct.experimentInputs.add(_elem115);
+ }
+ }
+ struct.setExperimentInputsIsSet(true);
+ }
+ if (incoming.get(9)) {
+ {
+ org.apache.thrift.protocol.TList _list116 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.experimentOutputs = new ArrayList<DataObjectType>(_list116.size);
+ for (int _i117 = 0; _i117 < _list116.size; ++_i117)
+ {
+ DataObjectType _elem118;
+ _elem118 = new DataObjectType();
+ _elem118.read(iprot);
+
<TRUNCATED>