You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/11/04 19:40:34 UTC
[1/3] adding delete queue method
Repository: airavata
Updated Branches:
refs/heads/master 08fff2ce2 -> 9cf6d0d8b
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index ca5ead1..e1c3da2 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -19768,6 +19768,250 @@ uint32_t Airavata_deleteResourceJobManager_presult::read(::apache::thrift::proto
return xfer;
}
+uint32_t Airavata_deleteBatchQueue_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_computeResourceId = false;
+ bool isset_queueName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->computeResourceId);
+ isset_computeResourceId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->queueName);
+ isset_queueName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_computeResourceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_queueName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_args");
+
+ xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->computeResourceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->queueName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_pargs");
+
+ xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->computeResourceId)));
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString((*(this->queueName)));
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->success);
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ire.read(iprot);
+ this->__isset.ire = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ace.read(iprot);
+ this->__isset.ace = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ase.read(iprot);
+ this->__isset.ase = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+ xfer += oprot->writeBool(this->success);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ire) {
+ xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->ire.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ace) {
+ xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+ xfer += this->ace.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ase) {
+ xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+ xfer += this->ase.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool((*(this->success)));
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ire.read(iprot);
+ this->__isset.ire = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ace.read(iprot);
+ this->__isset.ace = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ase.read(iprot);
+ this->__isset.ase = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -27421,6 +27665,74 @@ bool AiravataClient::recv_deleteResourceJobManager()
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteResourceJobManager failed: unknown result");
}
+bool AiravataClient::deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName)
+{
+ send_deleteBatchQueue(computeResourceId, queueName);
+ return recv_deleteBatchQueue();
+}
+
+void AiravataClient::send_deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ Airavata_deleteBatchQueue_pargs args;
+ args.computeResourceId = &computeResourceId;
+ args.queueName = &queueName;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
+}
+
+bool AiravataClient::recv_deleteBatchQueue()
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+ ::apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != ::apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ if (fname.compare("deleteBatchQueue") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ bool _return;
+ Airavata_deleteBatchQueue_presult result;
+ result.success = &_return;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.success) {
+ return _return;
+ }
+ if (result.__isset.ire) {
+ throw result.ire;
+ }
+ if (result.__isset.ace) {
+ throw result.ace;
+ }
+ if (result.__isset.ase) {
+ throw result.ase;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteBatchQueue failed: unknown result");
+}
+
void AiravataClient::registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile)
{
send_registerGatewayResourceProfile(gatewayResourceProfile);
@@ -33174,6 +33486,69 @@ void AiravataProcessor::process_deleteResourceJobManager(int32_t seqid, ::apache
}
}
+void AiravataProcessor::process_deleteBatchQueue(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+ void* ctx = NULL;
+ if (this->eventHandler_.get() != NULL) {
+ ctx = this->eventHandler_->getContext("Airavata.deleteBatchQueue", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Airavata.deleteBatchQueue");
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->preRead(ctx, "Airavata.deleteBatchQueue");
+ }
+
+ Airavata_deleteBatchQueue_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->postRead(ctx, "Airavata.deleteBatchQueue", bytes);
+ }
+
+ Airavata_deleteBatchQueue_result result;
+ try {
+ result.success = iface_->deleteBatchQueue(args.computeResourceId, args.queueName);
+ result.__isset.success = true;
+ } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
+ result.ire = ire;
+ result.__isset.ire = true;
+ } catch ( ::apache::airavata::api::error::AiravataClientException &ace) {
+ result.ace = ace;
+ result.__isset.ace = true;
+ } catch ( ::apache::airavata::api::error::AiravataSystemException &ase) {
+ result.ase = ase;
+ result.__isset.ase = true;
+ } catch (const std::exception& e) {
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->handlerError(ctx, "Airavata.deleteBatchQueue");
+ }
+
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+ return;
+ }
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->preWrite(ctx, "Airavata.deleteBatchQueue");
+ }
+
+ oprot->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->postWrite(ctx, "Airavata.deleteBatchQueue", bytes);
+ }
+}
+
void AiravataProcessor::process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
void* ctx = NULL;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index a6168dd..7387517 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -113,6 +113,7 @@ class AiravataIf {
virtual bool updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) = 0;
virtual void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) = 0;
virtual bool deleteResourceJobManager(const std::string& resourceJobManagerId) = 0;
+ virtual bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) = 0;
virtual void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
virtual void getGatewayResourceProfile( ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& _return, const std::string& gatewayID) = 0;
virtual bool updateGatewayResourceProfile(const std::string& gatewayID, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
@@ -417,6 +418,10 @@ class AiravataNull : virtual public AiravataIf {
bool _return = false;
return _return;
}
+ bool deleteBatchQueue(const std::string& /* computeResourceId */, const std::string& /* queueName */) {
+ bool _return = false;
+ return _return;
+ }
void registerGatewayResourceProfile(std::string& /* _return */, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& /* gatewayResourceProfile */) {
return;
}
@@ -11479,6 +11484,146 @@ class Airavata_deleteResourceJobManager_presult {
};
+class Airavata_deleteBatchQueue_args {
+ public:
+
+ Airavata_deleteBatchQueue_args() : computeResourceId(), queueName() {
+ }
+
+ virtual ~Airavata_deleteBatchQueue_args() throw() {}
+
+ std::string computeResourceId;
+ std::string queueName;
+
+ void __set_computeResourceId(const std::string& val) {
+ computeResourceId = val;
+ }
+
+ void __set_queueName(const std::string& val) {
+ queueName = val;
+ }
+
+ bool operator == (const Airavata_deleteBatchQueue_args & rhs) const
+ {
+ if (!(computeResourceId == rhs.computeResourceId))
+ return false;
+ if (!(queueName == rhs.queueName))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteBatchQueue_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteBatchQueue_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteBatchQueue_pargs {
+ public:
+
+
+ virtual ~Airavata_deleteBatchQueue_pargs() throw() {}
+
+ const std::string* computeResourceId;
+ const std::string* queueName;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteBatchQueue_result__isset {
+ _Airavata_deleteBatchQueue_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+} _Airavata_deleteBatchQueue_result__isset;
+
+class Airavata_deleteBatchQueue_result {
+ public:
+
+ Airavata_deleteBatchQueue_result() : success(0) {
+ }
+
+ virtual ~Airavata_deleteBatchQueue_result() throw() {}
+
+ bool success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+
+ _Airavata_deleteBatchQueue_result__isset __isset;
+
+ void __set_success(const bool val) {
+ success = val;
+ }
+
+ void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) {
+ ire = val;
+ }
+
+ void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) {
+ ace = val;
+ }
+
+ void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) {
+ ase = val;
+ }
+
+ bool operator == (const Airavata_deleteBatchQueue_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ire == rhs.ire))
+ return false;
+ if (!(ace == rhs.ace))
+ return false;
+ if (!(ase == rhs.ase))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteBatchQueue_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteBatchQueue_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteBatchQueue_presult__isset {
+ _Airavata_deleteBatchQueue_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+} _Airavata_deleteBatchQueue_presult__isset;
+
+class Airavata_deleteBatchQueue_presult {
+ public:
+
+
+ virtual ~Airavata_deleteBatchQueue_presult() throw() {}
+
+ bool* success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+
+ _Airavata_deleteBatchQueue_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
class Airavata_registerGatewayResourceProfile_args {
public:
@@ -12985,6 +13130,9 @@ class AiravataClient : virtual public AiravataIf {
bool deleteResourceJobManager(const std::string& resourceJobManagerId);
void send_deleteResourceJobManager(const std::string& resourceJobManagerId);
bool recv_deleteResourceJobManager();
+ bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName);
+ void send_deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName);
+ bool recv_deleteBatchQueue();
void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
void send_registerGatewayResourceProfile(const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
void recv_registerGatewayResourceProfile(std::string& _return);
@@ -13108,6 +13256,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
void process_updateResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_deleteResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_deleteBatchQueue(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_updateGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -13201,6 +13350,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
processMap_["updateResourceJobManager"] = &AiravataProcessor::process_updateResourceJobManager;
processMap_["getResourceJobManager"] = &AiravataProcessor::process_getResourceJobManager;
processMap_["deleteResourceJobManager"] = &AiravataProcessor::process_deleteResourceJobManager;
+ processMap_["deleteBatchQueue"] = &AiravataProcessor::process_deleteBatchQueue;
processMap_["registerGatewayResourceProfile"] = &AiravataProcessor::process_registerGatewayResourceProfile;
processMap_["getGatewayResourceProfile"] = &AiravataProcessor::process_getGatewayResourceProfile;
processMap_["updateGatewayResourceProfile"] = &AiravataProcessor::process_updateGatewayResourceProfile;
@@ -14019,6 +14169,15 @@ class AiravataMultiface : virtual public AiravataIf {
return ifaces_[i]->deleteResourceJobManager(resourceJobManagerId);
}
+ bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->deleteBatchQueue(computeResourceId, queueName);
+ }
+ return ifaces_[i]->deleteBatchQueue(computeResourceId, queueName);
+ }
+
void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
size_t sz = ifaces_.size();
size_t i = 0;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index 4f36e0a..2b7e03f 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -444,6 +444,11 @@ class AiravataHandler : virtual public AiravataIf {
printf("deleteResourceJobManager\n");
}
+ bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) {
+ // Your implementation goes here
+ printf("deleteBatchQueue\n");
+ }
+
void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
// Your implementation goes here
printf("registerGatewayResourceProfile\n");
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 08c075b..806d317 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -98,6 +98,7 @@ interface AiravataIf {
public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager);
public function getResourceJobManager($resourceJobManagerId);
public function deleteResourceJobManager($resourceJobManagerId);
+ public function deleteBatchQueue($computeResourceId, $queueName);
public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
public function getGatewayResourceProfile($gatewayID);
public function updateGatewayResourceProfile($gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
@@ -5028,6 +5029,67 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("deleteResourceJobManager failed: unknown result");
}
+ public function deleteBatchQueue($computeResourceId, $queueName)
+ {
+ $this->send_deleteBatchQueue($computeResourceId, $queueName);
+ return $this->recv_deleteBatchQueue();
+ }
+
+ public function send_deleteBatchQueue($computeResourceId, $queueName)
+ {
+ $args = new \Airavata\API\Airavata_deleteBatchQueue_args();
+ $args->computeResourceId = $computeResourceId;
+ $args->queueName = $queueName;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'deleteBatchQueue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('deleteBatchQueue', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_deleteBatchQueue()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteBatchQueue_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \Airavata\API\Airavata_deleteBatchQueue_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ire !== null) {
+ throw $result->ire;
+ }
+ if ($result->ace !== null) {
+ throw $result->ace;
+ }
+ if ($result->ase !== null) {
+ throw $result->ase;
+ }
+ throw new \Exception("deleteBatchQueue failed: unknown result");
+ }
+
public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
{
$this->send_registerGatewayResourceProfile($gatewayResourceProfile);
@@ -24335,6 +24397,236 @@ class Airavata_deleteResourceJobManager_result {
}
+class Airavata_deleteBatchQueue_args {
+ static $_TSPEC;
+
+ public $computeResourceId = null;
+ public $queueName = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'computeResourceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'queueName',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['computeResourceId'])) {
+ $this->computeResourceId = $vals['computeResourceId'];
+ }
+ if (isset($vals['queueName'])) {
+ $this->queueName = $vals['queueName'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteBatchQueue_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->queueName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_deleteBatchQueue_args');
+ if ($this->computeResourceId !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->computeResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queueName !== null) {
+ $xfer += $output->writeFieldBegin('queueName', TType::STRING, 2);
+ $xfer += $output->writeString($this->queueName);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_deleteBatchQueue_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ire = null;
+ public $ace = null;
+ public $ase = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'ire',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\InvalidRequestException',
+ ),
+ 2 => array(
+ 'var' => 'ace',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataClientException',
+ ),
+ 3 => array(
+ 'var' => 'ase',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataSystemException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ire'])) {
+ $this->ire = $vals['ire'];
+ }
+ if (isset($vals['ace'])) {
+ $this->ace = $vals['ace'];
+ }
+ if (isset($vals['ase'])) {
+ $this->ase = $vals['ase'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteBatchQueue_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ire = new \Airavata\API\Error\InvalidRequestException();
+ $xfer += $this->ire->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->ace = new \Airavata\API\Error\AiravataClientException();
+ $xfer += $this->ace->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->ase = new \Airavata\API\Error\AiravataSystemException();
+ $xfer += $this->ase->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_deleteBatchQueue_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ire !== null) {
+ $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+ $xfer += $this->ire->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ace !== null) {
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+ $xfer += $this->ace->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ase !== null) {
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+ $xfer += $this->ase->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_registerGatewayResourceProfile_args {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/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 6b00d24..6006adb 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -1388,6 +1388,11 @@ service Airavata {
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.AiravataClientException ace,
3: airavataErrors.AiravataSystemException ase)
+
+ bool deleteBatchQueue(1: required string computeResourceId, 2: required string queueName)
+ throws (1: airavataErrors.InvalidRequestException ire,
+ 2: airavataErrors.AiravataClientException ace,
+ 3: airavataErrors.AiravataSystemException ase)
/*
* Gateway Resource Profile
*
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index b64903e..efa2f96 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -235,6 +235,8 @@ public interface ComputeResource {
*/
void removeDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws AppCatalogException;
+ void removeBatchQueue(String computeResourceId, String queueName) throws AppCatalogException;
+
LOCALSubmission getLocalJobSubmission(String submissionId) throws AppCatalogException;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 89a292b..7917b23 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -118,8 +118,6 @@ public class ComputeResourceImpl implements ComputeResource {
ComputeResourceResource computeHostResource)
throws AppCatalogException {
List<BatchQueue> batchQueueList = description.getBatchQueues();
- BatchQueueResource resource = new BatchQueueResource();
- resource.remove(description.getComputeResourceId());
if (batchQueueList != null && !batchQueueList.isEmpty()) {
for (BatchQueue batchQueue : batchQueueList) {
BatchQueueResource bq = AppCatalogThriftConversion.getBatchQueue(batchQueue);
@@ -733,6 +731,20 @@ public class ComputeResourceImpl implements ComputeResource {
}
@Override
+ public void removeBatchQueue(String computeResourceId, String queueName) throws AppCatalogException {
+ try {
+ BatchQueueResource resource = new BatchQueueResource();
+ Map<String, String> ids = new HashMap<String, String>();
+ ids.put(AbstractResource.BatchQueueConstants.COMPUTE_RESOURCE_ID, computeResourceId);
+ ids.put(AbstractResource.BatchQueueConstants.QUEUE_NAME, queueName);
+ resource.remove(ids);
+ }catch (Exception e){
+ logger.error("Error while removing batch queue..", e);
+ throw new AppCatalogException(e);
+ }
+ }
+
+ @Override
public String addResourceJobManager(ResourceJobManager resourceJobManager)
throws AppCatalogException {
resourceJobManager.setResourceJobManagerId(AppCatalogUtils.getID("RJM"));
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
index 5df3bd2..2dac680 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
@@ -53,12 +53,20 @@ public class BatchQueueResource extends AbstractResource {
@Override
public void remove(Object identifier) throws AppCatalogException {
+ HashMap<String, String> ids;
+ if (identifier instanceof Map) {
+ ids = (HashMap<String, String>) identifier;
+ } else {
+ logger.error("Identifier should be a map with the field name and it's value");
+ throw new AppCatalogException("Identifier should be a map with the field name and it's value");
+ }
EntityManager em = null;
try {
em = AppCatalogJPAUtils.getEntityManager();
em.getTransaction().begin();
AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
- generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, identifier);
+ generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, ids.get(BatchQueueConstants.COMPUTE_RESOURCE_ID));
+ generator.setParameter(BatchQueueConstants.QUEUE_NAME, ids.get(BatchQueueConstants.QUEUE_NAME));
Query q = generator.deleteQuery(em);
q.executeUpdate();
em.getTransaction().commit();
[3/3] git commit: adding delete queue method
Posted by ch...@apache.org.
adding delete queue method
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9cf6d0d8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9cf6d0d8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9cf6d0d8
Branch: refs/heads/master
Commit: 9cf6d0d8bd661e72c28e988c6f00737fbf221493
Parents: 08fff2c
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 13:40:26 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 13:40:26 2014 -0500
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 15 +
.../java/org/apache/airavata/api/Airavata.java | 21732 +++++++++--------
.../main/resources/lib/airavata/Airavata.cpp | 375 +
.../src/main/resources/lib/airavata/Airavata.h | 159 +
.../lib/airavata/Airavata_server.skeleton.cpp | 5 +
.../resources/lib/Airavata/API/Airavata.php | 292 +
.../airavataAPI.thrift | 5 +
.../appcatalog/cpi/ComputeResource.java | 2 +
.../catalog/data/impl/ComputeResourceImpl.java | 16 +-
.../data/resources/BatchQueueResource.java | 10 +-
10 files changed, 12379 insertions(+), 10232 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/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 9eb9c23..6f23d6c 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
@@ -2505,6 +2505,21 @@ public class AiravataServerHandler implements Airavata.Iface {
}
}
+ @Override
+ public boolean deleteBatchQueue(String computeResourceId, String queueName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+ try {
+ appCatalog = AppCatalogFactory.getAppCatalog();
+ appCatalog.getComputeResource().removeBatchQueue(computeResourceId, queueName);
+ return true;
+ } catch (AppCatalogException e) {
+ logger.errorId(computeResourceId, "Error while deleting batch queue...", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while deleting batch queue. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
/**
* Register a Gateway Resource Profile.
*
[2/3] adding delete queue method
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/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 acd303a..8d1f9a8 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
@@ -1226,6 +1226,8 @@ import org.slf4j.LoggerFactory;
public boolean deleteResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+ public boolean deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
/**
* Register a Gateway Resource Profile.
*
@@ -1549,6 +1551,8 @@ import org.slf4j.LoggerFactory;
public void deleteResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteBatchQueue(String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getGatewayResourceProfile(String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -4229,6 +4233,39 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteResourceJobManager failed: unknown result");
}
+ public boolean deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ send_deleteBatchQueue(computeResourceId, queueName);
+ return recv_deleteBatchQueue();
+ }
+
+ public void send_deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.thrift.TException
+ {
+ deleteBatchQueue_args args = new deleteBatchQueue_args();
+ args.setComputeResourceId(computeResourceId);
+ args.setQueueName(queueName);
+ sendBase("deleteBatchQueue", args);
+ }
+
+ public boolean recv_deleteBatchQueue() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ deleteBatchQueue_result result = new deleteBatchQueue_result();
+ receiveBase(result, "deleteBatchQueue");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteBatchQueue failed: unknown result");
+ }
+
public String registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
{
send_registerGatewayResourceProfile(gatewayResourceProfile);
@@ -7251,6 +7288,41 @@ import org.slf4j.LoggerFactory;
}
}
+ public void deleteBatchQueue(String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteBatchQueue_call method_call = new deleteBatchQueue_call(computeResourceId, queueName, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteBatchQueue_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String computeResourceId;
+ private String queueName;
+ public deleteBatchQueue_call(String computeResourceId, String queueName, 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.computeResourceId = computeResourceId;
+ this.queueName = queueName;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteBatchQueue", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteBatchQueue_args args = new deleteBatchQueue_args();
+ args.setComputeResourceId(computeResourceId);
+ args.setQueueName(queueName);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.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_deleteBatchQueue();
+ }
+ }
+
public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
registerGatewayResourceProfile_call method_call = new registerGatewayResourceProfile_call(gatewayResourceProfile, resultHandler, this, ___protocolFactory, ___transport);
@@ -7654,6 +7726,7 @@ import org.slf4j.LoggerFactory;
processMap.put("updateResourceJobManager", new updateResourceJobManager());
processMap.put("getResourceJobManager", new getResourceJobManager());
processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
+ processMap.put("deleteBatchQueue", new deleteBatchQueue());
processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -9971,6 +10044,35 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class deleteBatchQueue<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteBatchQueue_args> {
+ public deleteBatchQueue() {
+ super("deleteBatchQueue");
+ }
+
+ public deleteBatchQueue_args getEmptyArgsInstance() {
+ return new deleteBatchQueue_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteBatchQueue_result getResult(I iface, deleteBatchQueue_args args) throws org.apache.thrift.TException {
+ deleteBatchQueue_result result = new deleteBatchQueue_result();
+ try {
+ result.success = iface.deleteBatchQueue(args.computeResourceId, args.queueName);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+ result.ase = ase;
+ }
+ return result;
+ }
+ }
+
public static class registerGatewayResourceProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerGatewayResourceProfile_args> {
public registerGatewayResourceProfile() {
super("registerGatewayResourceProfile");
@@ -10322,6 +10424,7 @@ import org.slf4j.LoggerFactory;
processMap.put("updateResourceJobManager", new updateResourceJobManager());
processMap.put("getResourceJobManager", new getResourceJobManager());
processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
+ processMap.put("deleteBatchQueue", new deleteBatchQueue());
processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -15821,21 +15924,22 @@ import org.slf4j.LoggerFactory;
}
}
- public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
- public registerGatewayResourceProfile() {
- super("registerGatewayResourceProfile");
+ public static class deleteBatchQueue<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteBatchQueue_args, Boolean> {
+ public deleteBatchQueue() {
+ super("deleteBatchQueue");
}
- public registerGatewayResourceProfile_args getEmptyArgsInstance() {
- return new registerGatewayResourceProfile_args();
+ public deleteBatchQueue_args getEmptyArgsInstance() {
+ return new deleteBatchQueue_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteBatchQueue_result result = new deleteBatchQueue_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -15847,7 +15951,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+ deleteBatchQueue_result result = new deleteBatchQueue_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -15883,25 +15987,25 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
+ public void start(I iface, deleteBatchQueue_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteBatchQueue(args.computeResourceId, args.queueName,resultHandler);
}
}
- public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
- public getGatewayResourceProfile() {
- super("getGatewayResourceProfile");
+ public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
+ public registerGatewayResourceProfile() {
+ super("registerGatewayResourceProfile");
}
- public getGatewayResourceProfile_args getEmptyArgsInstance() {
- return new getGatewayResourceProfile_args();
+ public registerGatewayResourceProfile_args getEmptyArgsInstance() {
+ return new registerGatewayResourceProfile_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() {
- public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
- getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -15914,7 +16018,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+ registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -15950,27 +16054,26 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
- iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
+ public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
}
}
- public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
- public updateGatewayResourceProfile() {
- super("updateGatewayResourceProfile");
+ public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
+ public getGatewayResourceProfile() {
+ super("getGatewayResourceProfile");
}
- public updateGatewayResourceProfile_args getEmptyArgsInstance() {
- return new updateGatewayResourceProfile_args();
+ public getGatewayResourceProfile_args getEmptyArgsInstance() {
+ return new getGatewayResourceProfile_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() {
+ public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
+ getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -15982,7 +16085,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+ getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -16018,25 +16121,25 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
+ public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
+ iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
}
}
- public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
- public deleteGatewayResourceProfile() {
- super("deleteGatewayResourceProfile");
+ public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
+ public updateGatewayResourceProfile() {
+ super("updateGatewayResourceProfile");
}
- public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
- return new deleteGatewayResourceProfile_args();
+ public updateGatewayResourceProfile_args getEmptyArgsInstance() {
+ return new updateGatewayResourceProfile_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
- deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+ updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -16050,7 +16153,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+ updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -16086,25 +16189,25 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
+ public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
}
}
- public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
- public addGatewayComputeResourcePreference() {
- super("addGatewayComputeResourcePreference");
+ public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
+ public deleteGatewayResourceProfile() {
+ super("deleteGatewayResourceProfile");
}
- public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
- return new addGatewayComputeResourcePreference_args();
+ public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
+ return new deleteGatewayResourceProfile_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
- addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+ deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -16118,74 +16221,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
- if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
- result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
- result.setIreIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
- result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
- result.setAceIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
- result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
- result.setAseIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
- }
- }
-
- public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
- public getGatewayComputeResourcePreference() {
- super("getGatewayComputeResourcePreference");
- }
-
- public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
- return new getGatewayComputeResourcePreference_args();
- }
-
- public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() {
- public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
- getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_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;
- getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+ deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -16221,26 +16257,27 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
- iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+ public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
}
}
- public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
- public getAllGatewayComputeResourcePreferences() {
- super("getAllGatewayComputeResourcePreferences");
+ public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
+ public addGatewayComputeResourcePreference() {
+ super("addGatewayComputeResourcePreference");
}
- public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
- return new getAllGatewayComputeResourcePreferences_args();
+ public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+ return new addGatewayComputeResourcePreference_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() {
- public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
- getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -16252,7 +16289,141 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+ addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+ if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+ }
+ }
+
+ public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
+ public getGatewayComputeResourcePreference() {
+ super("getGatewayComputeResourcePreference");
+ }
+
+ public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+ return new getGatewayComputeResourcePreference_args();
+ }
+
+ public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() {
+ public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
+ getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_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;
+ getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+ if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
+ iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+ }
+ }
+
+ public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
+ public getAllGatewayComputeResourcePreferences() {
+ super("getAllGatewayComputeResourcePreferences");
+ }
+
+ public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
+ return new getAllGatewayComputeResourcePreferences_args();
+ }
+
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
+ getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_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;
+ getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -36765,42 +36936,1164 @@ import org.slf4j.LoggerFactory;
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(validateExperiment_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_args.class, metaDataMap);
+ }
+
+ public validateExperiment_args() {
+ }
+
+ public validateExperiment_args(
+ String airavataExperimentId)
+ {
+ this();
+ this.airavataExperimentId = airavataExperimentId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public validateExperiment_args(validateExperiment_args other) {
+ if (other.isSetAiravataExperimentId()) {
+ this.airavataExperimentId = other.airavataExperimentId;
+ }
+ }
+
+ public validateExperiment_args deepCopy() {
+ return new validateExperiment_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataExperimentId = null;
+ }
+
+ public String getAiravataExperimentId() {
+ return this.airavataExperimentId;
+ }
+
+ public validateExperiment_args setAiravataExperimentId(String airavataExperimentId) {
+ this.airavataExperimentId = airavataExperimentId;
+ return this;
+ }
+
+ public void unsetAiravataExperimentId() {
+ this.airavataExperimentId = null;
+ }
+
+ /** Returns true if field airavataExperimentId is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataExperimentId() {
+ return this.airavataExperimentId != null;
+ }
+
+ public void setAiravataExperimentIdIsSet(boolean value) {
+ if (!value) {
+ this.airavataExperimentId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_EXPERIMENT_ID:
+ if (value == null) {
+ unsetAiravataExperimentId();
+ } else {
+ setAiravataExperimentId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_EXPERIMENT_ID:
+ return getAiravataExperimentId();
+
+ }
+ 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_EXPERIMENT_ID:
+ return isSetAiravataExperimentId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof validateExperiment_args)
+ return this.equals((validateExperiment_args)that);
+ return false;
+ }
+
+ public boolean equals(validateExperiment_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataExperimentId = true && this.isSetAiravataExperimentId();
+ boolean that_present_airavataExperimentId = true && that.isSetAiravataExperimentId();
+ if (this_present_airavataExperimentId || that_present_airavataExperimentId) {
+ if (!(this_present_airavataExperimentId && that_present_airavataExperimentId))
+ return false;
+ if (!this.airavataExperimentId.equals(that.airavataExperimentId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(validateExperiment_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataExperimentId()).compareTo(other.isSetAiravataExperimentId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataExperimentId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataExperimentId, other.airavataExperimentId);
+ 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("validateExperiment_args(");
+ boolean first = true;
+
+ sb.append("airavataExperimentId:");
+ if (this.airavataExperimentId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataExperimentId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ 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
+ }
+
+ 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 validateExperiment_argsStandardSchemeFactory implements SchemeFactory {
+ public validateExperiment_argsStandardScheme getScheme() {
+ return new validateExperiment_argsStandardScheme();
+ }
+ }
+
+ private static class validateExperiment_argsStandardScheme extends StandardScheme<validateExperiment_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AIRAVATA_EXPERIMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.airavataExperimentId = iprot.readString();
+ struct.setAiravataExperimentIdIsSet(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, validateExperiment_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.airavataExperimentId != null) {
+ oprot.writeFieldBegin(AIRAVATA_EXPERIMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.airavataExperimentId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class validateExperiment_argsTupleSchemeFactory implements SchemeFactory {
+ public validateExperiment_argsTupleScheme getScheme() {
+ return new validateExperiment_argsTupleScheme();
+ }
+ }
+
+ private static class validateExperiment_argsTupleScheme extends TupleScheme<validateExperiment_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.airavataExperimentId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataExperimentId = iprot.readString();
+ struct.setAiravataExperimentIdIsSet(true);
+ }
+ }
+
+ }
+
+ public static class validateExperiment_result implements org.apache.thrift.TBase<validateExperiment_result, validateExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateExperiment_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateExperiment_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField ENF_FIELD_DESC = new org.apache.thrift.protocol.TField("enf", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", 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 validateExperiment_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new validateExperiment_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.model.error.InvalidRequestException ire; // required
+ public org.apache.airavata.model.error.ExperimentNotFoundException enf; // required
+ public org.apache.airavata.model.error.AiravataClientException ace; // required
+ public org.apache.airavata.model.error.AiravataSystemException ase; // 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 {
+ SUCCESS((short)0, "success"),
+ IRE((short)1, "ire"),
+ ENF((short)2, "enf"),
+ ACE((short)3, "ace"),
+ ASE((short)4, "ase");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // IRE
+ return IRE;
+ case 2: // ENF
+ return ENF;
+ case 3: // ACE
+ return ACE;
+ case 4: // ASE
+ return ASE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.ENF, new org.apache.thrift.meta_data.FieldMetaData("enf", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ 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(validateExperiment_result.class, metaDataMap);
+ }
+
+ public validateExperiment_result() {
+ }
+
+ public validateExperiment_result(
+ boolean success,
+ org.apache.airavata.model.error.InvalidRequestException ire,
+ org.apache.airavata.model.error.ExperimentNotFoundException enf,
+ org.apache.airavata.model.error.AiravataClientException ace,
+ org.apache.airavata.model.error.AiravataSystemException ase)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.ire = ire;
+ this.enf = enf;
+ this.ace = ace;
+ this.ase = ase;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public validateExperiment_result(validateExperiment_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetIre()) {
+ this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+ }
+ if (other.isSetEnf()) {
+ this.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(other.enf);
+ }
+ if (other.isSetAce()) {
+ this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+ }
+ if (other.isSetAse()) {
+ this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+ }
+ }
+
+ public validateExperiment_result deepCopy() {
+ return new validateExperiment_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.ire = null;
+ this.enf = null;
+ this.ace = null;
+ this.ase = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public validateExperiment_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public org.apache.airavata.model.error.InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public validateExperiment_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.ExperimentNotFoundException getEnf() {
+ return this.enf;
+ }
+
+ public validateExperiment_result setEnf(org.apache.airavata.model.error.ExperimentNotFoundException enf) {
+ this.enf = enf;
+ return this;
+ }
+
+ public void unsetEnf() {
+ this.enf = null;
+ }
+
+ /** Returns true if field enf is set (has been assigned a value) and false otherwise */
+ public boolean isSetEnf() {
+ return this.enf != null;
+ }
+
+ public void setEnfIsSet(boolean value) {
+ if (!value) {
+ this.enf = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataClientException getAce() {
+ return this.ace;
+ }
+
+ public validateExperiment_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ this.ace = ace;
+ return this;
+ }
+
+ public void unsetAce() {
+ this.ace = null;
+ }
+
+ /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+ public boolean isSetAce() {
+ return this.ace != null;
+ }
+
+ public void setAceIsSet(boolean value) {
+ if (!value) {
+ this.ace = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataSystemException getAse() {
+ return this.ase;
+ }
+
+ public validateExperiment_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ this.ase = ase;
+ return this;
+ }
+
+ public void unsetAse() {
+ this.ase = null;
+ }
+
+ /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+ public boolean isSetAse() {
+ return this.ase != null;
+ }
+
+ public void setAseIsSet(boolean value) {
+ if (!value) {
+ this.ase = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+ }
+ break;
+
+ case ENF:
+ if (value == null) {
+ unsetEnf();
+ } else {
+ setEnf((org.apache.airavata.model.error.ExperimentNotFoundException)value);
+ }
+ break;
+
+ case ACE:
+ if (value == null) {
+ unsetAce();
+ } else {
+ setAce((org.apache.airavata.model.error.AiravataClientException)value);
+ }
+ break;
+
+ case ASE:
+ if (value == null) {
+ unsetAse();
+ } else {
+ setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case IRE:
+ return getIre();
+
+ case ENF:
+ return getEnf();
+
+ case ACE:
+ return getAce();
+
+ case ASE:
+ return getAse();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IRE:
+ return isSetIre();
+ case ENF:
+ return isSetEnf();
+ case ACE:
+ return isSetAce();
+ case ASE:
+ return isSetAse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof validateExperiment_result)
+ return this.equals((validateExperiment_result)that);
+ return false;
+ }
+
+ public boolean equals(validateExperiment_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ boolean this_present_enf = true && this.isSetEnf();
+ boolean that_present_enf = true && that.isSetEnf();
+ if (this_present_enf || that_present_enf) {
+ if (!(this_present_enf && that_present_enf))
+ return false;
+ if (!this.enf.equals(that.enf))
+ return false;
+ }
+
+ boolean this_present_ace = true && this.isSetAce();
+ boolean that_present_ace = true && that.isSetAce();
+ if (this_present_ace || that_present_ace) {
+ if (!(this_present_ace && that_present_ace))
+ return false;
+ if (!this.ace.equals(that.ace))
+ return false;
+ }
+
+ boolean this_present_ase = true && this.isSetAse();
+ boolean that_present_ase = true && that.isSetAse();
+ if (this_present_ase || that_present_ase) {
+ if (!(this_present_ase && that_present_ase))
+ return false;
+ if (!this.ase.equals(that.ase))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(validateExperiment_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEnf()).compareTo(other.isSetEnf());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEnf()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enf, other.enf);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAce()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+ 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("validateExperiment_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("enf:");
+ if (this.enf == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.enf);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ace:");
+ if (this.ace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ase:");
+ if (this.ase == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ase);
+ }
+ 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 validateExperiment_resultStandardSchemeFactory implements SchemeFactory {
+ public validateExperiment_resultStandardScheme getScheme() {
+ return new validateExperiment_resultStandardScheme();
+ }
+ }
+
+ private static class validateExperiment_resultStandardScheme extends StandardScheme<validateExperiment_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ENF
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException();
+ struct.enf.read(iprot);
+ struct.setEnfIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ACE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ASE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(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, validateExperiment_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.enf != null) {
+ oprot.writeFieldBegin(ENF_FIELD_DESC);
+ struct.enf.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ace != null) {
+ oprot.writeFieldBegin(ACE_FIELD_DESC);
+ struct.ace.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ase != null) {
+ oprot.writeFieldBegin(ASE_FIELD_DESC);
+ struct.ase.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class validateExperiment_resultTupleSchemeFactory implements SchemeFactory {
+ public validateExperiment_resultTupleScheme getScheme() {
+ return new validateExperiment_resultTupleScheme();
+ }
+ }
+
+ private static class validateExperiment_resultTupleScheme extends TupleScheme<validateExperiment_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEnf()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAce()) {
+ optionals.set(3);
+ }
+ if (struct.isSetAse()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetEnf()) {
+ struct.enf.write(oprot);
+ }
+ if (struct.isSetAce()) {
+ struct.ace.write(oprot);
+ }
+ if (struct.isSetAse()) {
+ struct.ase.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException();
+ struct.enf.read(iprot);
+ struct.setEnfIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class launchExperiment_args implements org.apache.thrift.TBase<launchExperiment_args, launchExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_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 org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", 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 launchExperiment_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new launchExperiment_argsTupleSchemeFactory());
+ }
+
+ public String airavataExperimentId; // required
+ public String airavataCredStoreToken; // 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 {
+ AIRAVATA_EXPERIMENT_ID((short)1, "airavataExperimentId"),
+ AIRAVATA_CRED_STORE_TOKEN((short)2, "airavataCredStoreToken");
+
+ 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_EXPERIMENT_ID
+ return AIRAVATA_EXPERIMENT_ID;
+ case 2: // AIRAVATA_CRED_STORE_TOKEN
+ return AIRAVATA_CRED_STORE_TOKEN;
+ 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.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)));
+ tmpMap.put(_Fields.AIRAVATA_CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("airavataCredStoreToken", 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(launchExperiment_args.class, metaDataMap);
}
- public validateExperiment_args() {
+ public launchExperiment_args() {
}
- public validateExperiment_args(
- String airavataExperimentId)
+ public launchExperiment_args(
+ String airavataExperimentId,
+ String airavataCredStoreToken)
{
this();
this.airavataExperimentId = airavataExperimentId;
+ this.airavataCredStoreToken = airavataCredStoreToken;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public validateExperiment_args(validateExperiment_args other) {
+ public launchExperiment_args(launchExperiment_args other) {
if (other.isSetAiravataExperimentId()) {
this.airavataExperimentId = other.airavataExperimentId;
}
+ if (other.isSetAiravataCredStoreToken()) {
+ this.airavataCredStoreToken = other.airavataCredStoreToken;
+ }
}
- public validateExperiment_args deepCopy() {
- return new validateExperiment_args(this);
+ public launchExperiment_args deepCopy() {
+ return new launchExperiment_args(this);
}
@Override
public void clear() {
this.airavataExperimentId = null;
+ this.airavataCredStoreToken = null;
}
public String getAiravataExperimentId() {
return this.airavataExperimentId;
}
- public validateExperiment_args setAiravataExperimentId(String airavataExperimentId) {
+ public launchExperiment_args setAiravataExperimentId(String airavataExperimentId) {
this.airavataExperimentId = airavataExperimentId;
return this;
}
@@ -36820,6 +38113,30 @@ import org.slf4j.LoggerFactory;
}
}
+ public String getAiravataCredStoreToken() {
+ return this.airavataCredStoreToken;
+ }
+
+ public launchExperiment_args setAiravataCredStoreToken(String airavataCredStoreToken) {
+ this.airavataCredStoreToken = airavataCredStoreToken;
+ return this;
+ }
+
+ public void unsetAiravataCredStoreToken() {
+ this.airavataCredStoreToken = null;
+ }
+
+ /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataCredStoreToken() {
+ return this.airavataCredStoreToken != null;
+ }
+
+ public void setAiravataCredStoreTokenIsSet(boolean value) {
+ if (!value) {
+ this.airavataCredStoreToken = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case AIRAVATA_EXPERIMENT_ID:
@@ -36830,6 +38147,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case AIRAVATA_CRED_STORE_TOKEN:
+ if (value == null) {
+ unsetAiravataCredStoreToken();
+ } else {
+ setAiravataCredStoreToken((String)value);
+ }
+ break;
+
}
}
@@ -36838,6 +38163,9 @@ import org.slf4j.LoggerFactory;
case AIRAVATA_EXPERIMENT_ID:
return getAiravataExperimentId();
+ case AIRAVATA_CRED_STORE_TOKEN:
+ return getAiravataCredStoreToken();
+
}
throw new IllegalStateException();
}
@@ -36851,6 +38179,8 @@ import org.slf4j.LoggerFactory;
switch (field) {
case AIRAVATA_EXPERIMENT_ID:
return isSetAiravataExperimentId();
+ case AIRAVATA_CRED_STORE_TOKEN:
+ return isSetAiravataCredStoreToken();
}
throw new IllegalStateException();
}
@@ -36859,12 +38189,12 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof validateExperiment_args)
- return this.equals((validateExperiment_args)that);
+ if (that instanceof launchExperiment_args)
+ return this.equals((launchExperiment_args)that);
return false;
}
- public boolean equals(validateExperiment_args that) {
+ public boolean equals(launchExperiment_args that) {
if (that == null)
return false;
@@ -36877,6 +38207,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken();
+ boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken();
+ if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) {
+ if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken))
+ return false;
+ if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken))
+ return false;
+ }
+
return true;
}
@@ -36886,7 +38225,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(validateExperiment_args other) {
+ public int compareTo(launchExperiment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -36903,6 +38242,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataCredStoreToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -36920,7 +38269,7 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("validateExperiment_args(");
+ StringBuilder sb = new StringBuilder("launchExperiment_args(");
boolean first = true;
sb.append("airavataExperimentId:");
@@ -36930,6 +38279,14 @@ import org.slf4j.LoggerFactory;
sb.append(this.airavataExperimentId);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("airavataCredStoreToken:");
+ if (this.airavataCredStoreToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.airavataCredStoreToken);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -36939,6 +38296,9 @@ import org.slf4j.LoggerFactory;
if (airavataExperimentId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataExperimentId' was not present! Struct: " + toString());
}
+ if (airavataCredStoreToken == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -36958,15 +38318,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class validateExperiment_argsStandardSchemeFactory implements SchemeFactory {
- public validateExperiment_argsStandardScheme getScheme() {
- return new validateExperiment_argsStandardScheme();
+ private static class launchExperiment_argsStandardSchemeFactory implements SchemeFactory {
+ public launchExperiment_argsStandardScheme getScheme() {
+ return new launchExperiment_argsStandardScheme();
}
}
- private static class validateExperiment_argsStandardScheme extends StandardScheme<validateExperiment_args> {
+ private static class launchExperiment_argsStandardScheme extends StandardScheme<launchExperiment_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, launchExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -36984,6 +38344,14 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 2: // AIRAVATA_CRED_STORE_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.airavataCredStoreToken = iprot.readString();
+ struct.setAiravataCredStoreTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -36995,7 +38363,7 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, launchExperiment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -37004,64 +38372,72 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.airavataExperimentId);
oprot.writeFieldEnd();
}
+ if (struct.airavataCredStoreToken != null) {
+ oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.airavataCredStoreToken);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class validateExperiment_argsTupleSchemeFactory implements SchemeFactory {
- public validateExperiment_argsTupleScheme getScheme() {
- return new validateExperiment_argsTupleScheme();
+ private static class launchExperiment_argsTupleSchemeFactory implements SchemeFactory {
+ public launchExperiment_argsTupleScheme getScheme() {
+ return new launchExperiment_argsTupleScheme();
}
}
- private static class validateExperiment_argsTupleScheme extends TupleScheme<validateExperiment_args> {
+ private static class launchExperiment_argsTupleScheme extends T
<TRUNCATED>