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 2015/03/10 18:30:34 UTC
[1/3] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Repository: airavata
Updated Branches:
refs/heads/master 7ef880044 -> 56efa8e5e
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 121db80..5a6df09 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
@@ -3049,6 +3049,251 @@ uint32_t Airavata_getProject_presult::read(::apache::thrift::protocol::TProtocol
return xfer;
}
+uint32_t Airavata_deleteProject_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_projectId = 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->projectId);
+ isset_projectId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_projectId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_args");
+
+ xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->projectId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_pargs");
+
+ xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->projectId)));
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_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;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->pnfe.read(iprot);
+ this->__isset.pnfe = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_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();
+ } else if (this->__isset.pnfe) {
+ xfer += oprot->writeFieldBegin("pnfe", ::apache::thrift::protocol::T_STRUCT, 4);
+ xfer += this->pnfe.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_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;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->pnfe.read(iprot);
+ this->__isset.pnfe = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t Airavata_getAllUserProjects_args::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -29080,6 +29325,76 @@ void AiravataClient::recv_getProject( ::apache::airavata::model::workspace::Proj
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getProject failed: unknown result");
}
+bool AiravataClient::deleteProject(const std::string& projectId)
+{
+ send_deleteProject(projectId);
+ return recv_deleteProject();
+}
+
+void AiravataClient::send_deleteProject(const std::string& projectId)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("deleteProject", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ Airavata_deleteProject_pargs args;
+ args.projectId = &projectId;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
+}
+
+bool AiravataClient::recv_deleteProject()
+{
+
+ 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("deleteProject") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ bool _return;
+ Airavata_deleteProject_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;
+ }
+ if (result.__isset.pnfe) {
+ throw result.pnfe;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteProject failed: unknown result");
+}
+
void AiravataClient::getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName)
{
send_getAllUserProjects(gatewayId, userName);
@@ -36812,6 +37127,72 @@ void AiravataProcessor::process_getProject(int32_t seqid, ::apache::thrift::prot
}
}
+void AiravataProcessor::process_deleteProject(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.deleteProject", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Airavata.deleteProject");
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->preRead(ctx, "Airavata.deleteProject");
+ }
+
+ Airavata_deleteProject_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->postRead(ctx, "Airavata.deleteProject", bytes);
+ }
+
+ Airavata_deleteProject_result result;
+ try {
+ result.success = iface_->deleteProject(args.projectId);
+ 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 ( ::apache::airavata::api::error::ProjectNotFoundException &pnfe) {
+ result.pnfe = pnfe;
+ result.__isset.pnfe = true;
+ } catch (const std::exception& e) {
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->handlerError(ctx, "Airavata.deleteProject");
+ }
+
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("deleteProject", ::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.deleteProject");
+ }
+
+ oprot->writeMessageBegin("deleteProject", ::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.deleteProject", bytes);
+ }
+}
+
void AiravataProcessor::process_getAllUserProjects(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/56efa8e5/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 4604bf8..78a7e9c 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
@@ -45,6 +45,7 @@ class AiravataIf {
virtual void createProject(std::string& _return, const std::string& gatewayId, const ::apache::airavata::model::workspace::Project& project) = 0;
virtual void updateProject(const std::string& projectId, const ::apache::airavata::model::workspace::Project& updatedProject) = 0;
virtual void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId) = 0;
+ virtual bool deleteProject(const std::string& projectId) = 0;
virtual void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) = 0;
virtual void searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName, const std::string& projectName) = 0;
virtual void searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName, const std::string& description) = 0;
@@ -217,6 +218,10 @@ class AiravataNull : virtual public AiravataIf {
void getProject( ::apache::airavata::model::workspace::Project& /* _return */, const std::string& /* projectId */) {
return;
}
+ bool deleteProject(const std::string& /* projectId */) {
+ bool _return = false;
+ return _return;
+ }
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & /* _return */, const std::string& /* gatewayId */, const std::string& /* userName */) {
return;
}
@@ -2290,6 +2295,148 @@ class Airavata_getProject_presult {
};
+class Airavata_deleteProject_args {
+ public:
+
+ Airavata_deleteProject_args() : projectId() {
+ }
+
+ virtual ~Airavata_deleteProject_args() throw() {}
+
+ std::string projectId;
+
+ void __set_projectId(const std::string& val) {
+ projectId = val;
+ }
+
+ bool operator == (const Airavata_deleteProject_args & rhs) const
+ {
+ if (!(projectId == rhs.projectId))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteProject_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteProject_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteProject_pargs {
+ public:
+
+
+ virtual ~Airavata_deleteProject_pargs() throw() {}
+
+ const std::string* projectId;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteProject_result__isset {
+ _Airavata_deleteProject_result__isset() : success(false), ire(false), ace(false), ase(false), pnfe(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+ bool pnfe;
+} _Airavata_deleteProject_result__isset;
+
+class Airavata_deleteProject_result {
+ public:
+
+ Airavata_deleteProject_result() : success(0) {
+ }
+
+ virtual ~Airavata_deleteProject_result() throw() {}
+
+ bool success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+ ::apache::airavata::api::error::ProjectNotFoundException pnfe;
+
+ _Airavata_deleteProject_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;
+ }
+
+ void __set_pnfe(const ::apache::airavata::api::error::ProjectNotFoundException& val) {
+ pnfe = val;
+ }
+
+ bool operator == (const Airavata_deleteProject_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;
+ if (!(pnfe == rhs.pnfe))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteProject_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteProject_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteProject_presult__isset {
+ _Airavata_deleteProject_presult__isset() : success(false), ire(false), ace(false), ase(false), pnfe(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+ bool pnfe;
+} _Airavata_deleteProject_presult__isset;
+
+class Airavata_deleteProject_presult {
+ public:
+
+
+ virtual ~Airavata_deleteProject_presult() throw() {}
+
+ bool* success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+ ::apache::airavata::api::error::ProjectNotFoundException pnfe;
+
+ _Airavata_deleteProject_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
class Airavata_getAllUserProjects_args {
public:
@@ -16351,6 +16498,9 @@ class AiravataClient : virtual public AiravataIf {
void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId);
void send_getProject(const std::string& projectId);
void recv_getProject( ::apache::airavata::model::workspace::Project& _return);
+ bool deleteProject(const std::string& projectId);
+ void send_deleteProject(const std::string& projectId);
+ bool recv_deleteProject();
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName);
void send_getAllUserProjects(const std::string& gatewayId, const std::string& userName);
void recv_getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return);
@@ -16685,6 +16835,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
void process_createProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_updateProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_deleteProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getAllUserProjects(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_searchProjectsByProjectName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_searchProjectsByProjectDesc(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -16803,6 +16954,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
processMap_["createProject"] = &AiravataProcessor::process_createProject;
processMap_["updateProject"] = &AiravataProcessor::process_updateProject;
processMap_["getProject"] = &AiravataProcessor::process_getProject;
+ processMap_["deleteProject"] = &AiravataProcessor::process_deleteProject;
processMap_["getAllUserProjects"] = &AiravataProcessor::process_getAllUserProjects;
processMap_["searchProjectsByProjectName"] = &AiravataProcessor::process_searchProjectsByProjectName;
processMap_["searchProjectsByProjectDesc"] = &AiravataProcessor::process_searchProjectsByProjectDesc;
@@ -17059,6 +17211,15 @@ class AiravataMultiface : virtual public AiravataIf {
return;
}
+ bool deleteProject(const std::string& projectId) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->deleteProject(projectId);
+ }
+ return ifaces_[i]->deleteProject(projectId);
+ }
+
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) {
size_t sz = ifaces_.size();
size_t i = 0;
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 482119d..96b9e0f 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
@@ -104,6 +104,11 @@ class AiravataHandler : virtual public AiravataIf {
printf("getProject\n");
}
+ bool deleteProject(const std::string& projectId) {
+ // Your implementation goes here
+ printf("deleteProject\n");
+ }
+
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) {
// Your implementation goes here
printf("getAllUserProjects\n");
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 85bf7e6..0865706 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
@@ -30,6 +30,7 @@ interface AiravataIf {
public function createProject($gatewayId, \Airavata\Model\Workspace\Project $project);
public function updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject);
public function getProject($projectId);
+ public function deleteProject($projectId);
public function getAllUserProjects($gatewayId, $userName);
public function searchProjectsByProjectName($gatewayId, $userName, $projectName);
public function searchProjectsByProjectDesc($gatewayId, $userName, $description);
@@ -927,6 +928,69 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("getProject failed: unknown result");
}
+ public function deleteProject($projectId)
+ {
+ $this->send_deleteProject($projectId);
+ return $this->recv_deleteProject();
+ }
+
+ public function send_deleteProject($projectId)
+ {
+ $args = new \Airavata\API\Airavata_deleteProject_args();
+ $args->projectId = $projectId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'deleteProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('deleteProject', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_deleteProject()
+ {
+ $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_deleteProject_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_deleteProject_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;
+ }
+ if ($result->pnfe !== null) {
+ throw $result->pnfe;
+ }
+ throw new \Exception("deleteProject failed: unknown result");
+ }
+
public function getAllUserProjects($gatewayId, $userName)
{
$this->send_getAllUserProjects($gatewayId, $userName);
@@ -9983,6 +10047,238 @@ class Airavata_getProject_result {
}
+class Airavata_deleteProject_args {
+ static $_TSPEC;
+
+ public $projectId = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'projectId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['projectId'])) {
+ $this->projectId = $vals['projectId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteProject_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->projectId);
+ } 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_deleteProject_args');
+ if ($this->projectId !== null) {
+ $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
+ $xfer += $output->writeString($this->projectId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_deleteProject_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ire = null;
+ public $ace = null;
+ public $ase = null;
+ public $pnfe = 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',
+ ),
+ 4 => array(
+ 'var' => 'pnfe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ProjectNotFoundException',
+ ),
+ );
+ }
+ 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'];
+ }
+ if (isset($vals['pnfe'])) {
+ $this->pnfe = $vals['pnfe'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteProject_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;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+ $xfer += $this->pnfe->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_deleteProject_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();
+ }
+ if ($this->pnfe !== null) {
+ $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
+ $xfer += $this->pnfe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_getAllUserProjects_args {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 3d58197..6110f53 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -61,7 +61,7 @@ public class CreateLaunchExperiment {
private static String echoAppId = "Echo_8506337e-ab7a-46b6-9b71-4a461b6c5e35";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
- private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
+ private static String amberAppId = "Amber_aa083c86-4680-4002-b3ef-fad93c181926";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
@@ -85,15 +85,36 @@ public class CreateLaunchExperiment {
public static void main(String[] args) throws Exception {
airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
System.out.println("API version is " + airavataClient.getAPIVersion());
+ getAvailableAppInterfaceComputeResources("Echo_4fb76cb3-6bf6-409e-aa17-7cc7ee6e41af");
// createGateway();
// getGateway("testGatewayId");
-// registerApplications(); // run this only the first time
- createAndLaunchExp();
+// registerApplications(); // run this only the first time
+// createAndLaunchExp();
}
private static String fsdResourceId;
+ public static void getAvailableAppInterfaceComputeResources(String appInterfaceId) {
+ try {
+ Map<String, String> availableAppInterfaceComputeResources = airavataClient.getAvailableAppInterfaceComputeResources(appInterfaceId);
+ for (String key : availableAppInterfaceComputeResources.keySet()){
+ System.out.println("id : " + key);
+ System.out.println("name : " + availableAppInterfaceComputeResources.get(key));
+ }
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
public static void createGateway(){
try {
Gateway gateway = new Gateway();
@@ -154,14 +175,14 @@ public class CreateLaunchExperiment {
// final String expId = createExperimentForBR2Amber(airavataClient);
// final String expId = createExperimentWRFStampede(airavataClient);
// final String expId = createExperimentForStampedeAmber(airavataClient);
-// final String expId = createExperimentForTrestlesAmber(airavataClient);
+ final String expId = createExperimentForTrestlesAmber(airavataClient);
// final String expId = createExperimentGROMACSStampede(airavataClient);
// final String expId = createExperimentESPRESSOStampede(airavataClient);
// final String expId = createExperimentLAMMPSStampede(airavataClient);
// final String expId = createExperimentNWCHEMStampede(airavataClient);
// final String expId = createExperimentTRINITYStampede(airavataClient);
// final String expId = createExperimentAUTODOCKStampede(airavataClient); // this is not working , we need to register AutoDock app on stampede
- final String expId = createExperimentForLSF(airavataClient);
+// final String expId = createExperimentForLSF(airavataClient);
// final String expId = "Ultrascan_ln_eb029947-391a-4ccf-8ace-9bafebe07cc0";
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
new file mode 100644
index 0000000..762d031
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * AuthenticationMode
+ *
+ * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
+ * server properties.
+ * MYPROXY_ISSUED: rely on GSI method implementation already provided
+ * by Airavata security libs.
+ */
+@SuppressWarnings("all") public enum AuthenticationMode implements org.apache.thrift.TEnum {
+ SERVER_ISSUED(0),
+ MYPROXY_ISSUED(1);
+
+ private final int value;
+
+ private AuthenticationMode(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AuthenticationMode findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SERVER_ISSUED;
+ case 1:
+ return MYPROXY_ISSUED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 95a91e6..b12c3b8 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -176,6 +176,12 @@ service Airavata {
3: airavataErrors.AiravataSystemException ase,
4: airavataErrors.ProjectNotFoundException pnfe)
+ bool deleteProject (1: required string projectId)
+ throws (1: airavataErrors.InvalidRequestException ire,
+ 2: airavataErrors.AiravataClientException ace,
+ 3: airavataErrors.AiravataSystemException ase,
+ 4: airavataErrors.ProjectNotFoundException pnfe)
+
/**
* Get all Project by user
*
[2/3] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 f893bb6..ff7d330 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
@@ -128,6 +128,8 @@ import org.slf4j.LoggerFactory;
*/
public org.apache.airavata.model.workspace.Project getProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException;
+ public boolean deleteProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException;
+
/**
* * Get all Project by user
* *
@@ -1527,6 +1529,8 @@ import org.slf4j.LoggerFactory;
public void getProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void getAllUserProjects(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void searchProjectsByProjectName(String gatewayId, String userName, String projectName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -2171,6 +2175,41 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProject failed: unknown result");
}
+ public boolean deleteProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ send_deleteProject(projectId);
+ return recv_deleteProject();
+ }
+
+ public void send_deleteProject(String projectId) throws org.apache.thrift.TException
+ {
+ deleteProject_args args = new deleteProject_args();
+ args.setProjectId(projectId);
+ sendBase("deleteProject", args);
+ }
+
+ public boolean recv_deleteProject() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ deleteProject_result result = new deleteProject_result();
+ receiveBase(result, "deleteProject");
+ 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;
+ }
+ if (result.pnfe != null) {
+ throw result.pnfe;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteProject failed: unknown result");
+ }
+
public List<org.apache.airavata.model.workspace.Project> getAllUserProjects(String gatewayId, String userName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
{
send_getAllUserProjects(gatewayId, userName);
@@ -5945,6 +5984,38 @@ import org.slf4j.LoggerFactory;
}
}
+ public void deleteProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteProject_call method_call = new deleteProject_call(projectId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteProject_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String projectId;
+ public deleteProject_call(String projectId, 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.projectId = projectId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteProject", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteProject_args args = new deleteProject_args();
+ args.setProjectId(projectId);
+ 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.airavata.model.error.ProjectNotFoundException, 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_deleteProject();
+ }
+ }
+
public void getAllUserProjects(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllUserProjects_call method_call = new getAllUserProjects_call(gatewayId, userName, resultHandler, this, ___protocolFactory, ___transport);
@@ -9436,6 +9507,7 @@ import org.slf4j.LoggerFactory;
processMap.put("createProject", new createProject());
processMap.put("updateProject", new updateProject());
processMap.put("getProject", new getProject());
+ processMap.put("deleteProject", new deleteProject());
processMap.put("getAllUserProjects", new getAllUserProjects());
processMap.put("searchProjectsByProjectName", new searchProjectsByProjectName());
processMap.put("searchProjectsByProjectDesc", new searchProjectsByProjectDesc());
@@ -9911,6 +9983,37 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class deleteProject<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteProject_args> {
+ public deleteProject() {
+ super("deleteProject");
+ }
+
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteProject_result getResult(I iface, deleteProject_args args) throws org.apache.thrift.TException {
+ deleteProject_result result = new deleteProject_result();
+ try {
+ result.success = iface.deleteProject(args.projectId);
+ 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;
+ } catch (org.apache.airavata.model.error.ProjectNotFoundException pnfe) {
+ result.pnfe = pnfe;
+ }
+ return result;
+ }
+ }
+
public static class getAllUserProjects<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserProjects_args> {
public getAllUserProjects() {
super("getAllUserProjects");
@@ -12837,6 +12940,7 @@ import org.slf4j.LoggerFactory;
processMap.put("createProject", new createProject());
processMap.put("updateProject", new updateProject());
processMap.put("getProject", new getProject());
+ processMap.put("deleteProject", new deleteProject());
processMap.put("getAllUserProjects", new getAllUserProjects());
processMap.put("searchProjectsByProjectName", new searchProjectsByProjectName());
processMap.put("searchProjectsByProjectDesc", new searchProjectsByProjectDesc());
@@ -13823,6 +13927,79 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
+ public deleteProject() {
+ super("deleteProject");
+ }
+
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_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) {
+ deleteProject_result result = new deleteProject_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteProject_result result = new deleteProject_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 if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(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, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteProject(args.projectId,resultHandler);
+ }
+ }
+
public static class getAllUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
public getAllUserProjects() {
super("getAllUserProjects");
@@ -20792,33 +20969,993 @@ import org.slf4j.LoggerFactory;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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) {
+ 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, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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 ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ 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)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ }
+
+ public String success; // required
+ public org.apache.airavata.model.error.InvalidRequestException ire; // 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"),
+ ACE((short)2, "ace"),
+ ASE((short)3, "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: // ACE
+ return ACE;
+ case 3: // 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
+ 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.STRING)));
+ 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.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(getAPIVersion_result.class, metaDataMap);
+ }
+
+ public getAPIVersion_result() {
+ }
+
+ public getAPIVersion_result(
+ String success,
+ org.apache.airavata.model.error.InvalidRequestException ire,
+ org.apache.airavata.model.error.AiravataClientException ace,
+ org.apache.airavata.model.error.AiravataSystemException ase)
+ {
+ this();
+ this.success = success;
+ this.ire = ire;
+ this.ace = ace;
+ this.ase = ase;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_result(getAPIVersion_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetIre()) {
+ this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+ }
+ 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 getAPIVersion_result deepCopy() {
+ return new getAPIVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.ire = null;
+ this.ace = null;
+ this.ase = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public getAPIVersion_result setSuccess(String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public getAPIVersion_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.AiravataClientException getAce() {
+ return this.ace;
+ }
+
+ public getAPIVersion_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 getAPIVersion_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((String)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((org.apache.airavata.model.error.InvalidRequestException)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 getSuccess();
+
+ case IRE:
+ return getIre();
+
+ 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 ACE:
+ return isSetAce();
+ case ASE:
+ return isSetAse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_result)
+ return this.equals((getAPIVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(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_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(getAPIVersion_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(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("getAPIVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ 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("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 {
+ 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 getAPIVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultStandardScheme getScheme() {
+ return new getAPIVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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.STRING) {
+ struct.success = iprot.readString();
+ 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: // 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 3: // 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, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.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 getAPIVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultTupleScheme getScheme() {
+ return new getAPIVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_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.isSetAce()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAse()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.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, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ 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.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class addGateway_args implements org.apache.thrift.TBase<addGateway_args, addGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_args");
+
+ private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new addGateway_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addGateway_argsTupleSchemeFactory());
+ }
+
+ public org.apache.airavata.model.workspace.Gateway gateway; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GATEWAY((short)1, "gateway");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // GATEWAY
+ return GATEWAY;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_args.class, metaDataMap);
}
- public getAPIVersion_args() {
+ public addGateway_args() {
+ }
+
+ public addGateway_args(
+ org.apache.airavata.model.workspace.Gateway gateway)
+ {
+ this();
+ this.gateway = gateway;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public getAPIVersion_args(getAPIVersion_args other) {
+ public addGateway_args(addGateway_args other) {
+ if (other.isSetGateway()) {
+ this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
+ }
}
- public getAPIVersion_args deepCopy() {
- return new getAPIVersion_args(this);
+ public addGateway_args deepCopy() {
+ return new addGateway_args(this);
}
@Override
public void clear() {
+ this.gateway = null;
+ }
+
+ public org.apache.airavata.model.workspace.Gateway getGateway() {
+ return this.gateway;
+ }
+
+ public addGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
+ this.gateway = gateway;
+ return this;
+ }
+
+ public void unsetGateway() {
+ this.gateway = null;
+ }
+
+ /** Returns true if field gateway is set (has been assigned a value) and false otherwise */
+ public boolean isSetGateway() {
+ return this.gateway != null;
+ }
+
+ public void setGatewayIsSet(boolean value) {
+ if (!value) {
+ this.gateway = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case GATEWAY:
+ if (value == null) {
+ unsetGateway();
+ } else {
+ setGateway((org.apache.airavata.model.workspace.Gateway)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case GATEWAY:
+ return getGateway();
+
}
throw new IllegalStateException();
}
@@ -20830,6 +21967,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case GATEWAY:
+ return isSetGateway();
}
throw new IllegalStateException();
}
@@ -20838,15 +21977,24 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getAPIVersion_args)
- return this.equals((getAPIVersion_args)that);
+ if (that instanceof addGateway_args)
+ return this.equals((addGateway_args)that);
return false;
}
- public boolean equals(getAPIVersion_args that) {
+ public boolean equals(addGateway_args that) {
if (that == null)
return false;
+ boolean this_present_gateway = true && this.isSetGateway();
+ boolean that_present_gateway = true && that.isSetGateway();
+ if (this_present_gateway || that_present_gateway) {
+ if (!(this_present_gateway && that_present_gateway))
+ return false;
+ if (!this.gateway.equals(that.gateway))
+ return false;
+ }
+
return true;
}
@@ -20856,13 +22004,23 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(getAPIVersion_args other) {
+ public int compareTo(addGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGateway()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gateway, other.gateway);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -20880,16 +22038,29 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ StringBuilder sb = new StringBuilder("addGateway_args(");
boolean first = true;
+ sb.append("gateway:");
+ if (this.gateway == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gateway);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (gateway == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
+ if (gateway != null) {
+ gateway.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -20908,15 +22079,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsStandardScheme getScheme() {
- return new getAPIVersion_argsStandardScheme();
+ private static class addGateway_argsStandardSchemeFactory implements SchemeFactory {
+ public addGateway_argsStandardScheme getScheme() {
+ return new addGateway_argsStandardScheme();
}
}
- private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+ private static class addGateway_argsStandardScheme extends StandardScheme<addGateway_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -20926,6 +22097,15 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
+ case 1: // GATEWAY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.gateway.read(iprot);
+ struct.setGatewayIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -20937,39 +22117,48 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.gateway != null) {
+ oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
+ struct.gateway.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsTupleScheme getScheme() {
- return new getAPIVersion_argsTupleScheme();
+ private static class addGateway_argsTupleSchemeFactory implements SchemeFactory {
+ public addGateway_argsTupleScheme getScheme() {
+ return new addGateway_argsTupleScheme();
}
}
- private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+ private static class addGateway_argsTupleScheme extends TupleScheme<addGateway_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.gateway.write(oprot);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.gateway.read(iprot);
+ struct.setGatewayIsSet(true);
}
}
}
- public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+ public static class addGateway_result implements org.apache.thrift.TBase<addGateway_result, addGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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);
@@ -20978,8 +22167,8 @@ import org.slf4j.LoggerFactory;
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new addGateway_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addGateway_resultTupleSchemeFactory());
}
public String success; // required
@@ -21067,13 +22256,13 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_result.class, metaDataMap);
}
- public getAPIVersion_result() {
+ public addGateway_result() {
}
- public getAPIVersion_result(
+ public addGateway_result(
String success,
org.apache.airavata.model.error.InvalidRequestException ire,
org.apache.airavata.model.error.AiravataClientException ace,
@@ -21089,7 +22278,7 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public getAPIVersion_result(getAPIVersion_result other) {
+ public addGateway_result(addGateway_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
@@ -21104,8 +22293,8 @@ import org.slf4j.LoggerFactory;
}
}
- public getAPIVersion_result deepCopy() {
- return new getAPIVersion_result(this);
+ public addGateway_result deepCopy() {
+ return new addGateway_result(this);
}
@Override
@@ -21120,7 +22309,7 @@ import org.slf4j.LoggerFactory;
return this.success;
}
- public getAPIVersion_result setSuccess(String success) {
+ public addGateway_result setSuccess(String success) {
this.success = success;
return this;
}
@@ -21144,7 +22333,7 @@ import org.slf4j.LoggerFactory;
return this.ire;
}
- public getAPIVersion_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ public addGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -21168,7 +22357,7 @@ import org.slf4j.LoggerFactory;
return this.ace;
}
- public getAPIVersion_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ public addGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
this.ace = ace;
return this;
}
@@ -21192,7 +22381,7 @@ import org.slf4j.LoggerFactory;
return this.ase;
}
- public getAPIVersion_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ public addGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
this.ase = ase;
return this;
}
@@ -21290,12 +22479,12 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getAPIVersion_result)
- return this.equals((getAPIVersion_result)that);
+ if (that instanceof addGateway_result)
+ return this.equals((addGateway_result)that);
return false;
}
- public boolean equals(getAPIVersion_result that) {
+ public boolean equals(addGateway_result that) {
if (that == null)
return false;
@@ -21344,7 +22533,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(getAPIVersion_result other) {
+ public int compareTo(addGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -21408,7 +22597,7 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getAPIVersion_result(");
+ StringBuilder sb = new StringBuilder("addGateway_result(");
boolean first = true;
sb.append("success:");
@@ -21467,15 +22656,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class getAPIVersion_resultStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_resultStandardScheme getScheme() {
- return new getAPIVersion_resultStandardScheme();
+ private static class addGateway_resultStandardSchemeFactory implements SchemeFactory {
+ public addGateway_resultStandardScheme getScheme() {
+ return new addGateway_resultStandardScheme();
}
}
- private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> {
+ private static class addGateway_resultStandardScheme extends StandardScheme<addGateway_result> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -21531,7 +22720,7 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -21561,16 +22750,16 @@ import org.slf4j.LoggerFactory;
}
- private static class getAPIVersion_resultTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_resultTupleScheme getScheme() {
- return new getAPIVersion_resultTupleScheme();
+ private static class addGateway_resultTupleSchemeFactory implements SchemeFactory {
+ public addGateway_resultTupleScheme getScheme() {
+ return new addGateway_resultTupleScheme();
}
}
- private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> {
+ private static class addGateway_resultTupleScheme extends TupleScheme<addGateway_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
@@ -21601,7 +22790,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
@@ -21628,22 +22817,25 @@ import org.slf4j.LoggerFactory;
}
- public static class addGateway_args implements org.apache.thrift.TBase<addGateway_args, addGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_args");
+ public static class updateGateway_args implements org.apache.thrift.TBase<updateGateway_args, updateGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateGateway_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGateway_args");
- private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField UPDATED_GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedGateway", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new addGateway_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addGateway_argsTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new updateGateway_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGateway_argsTupleSchemeFactory());
}
- public org.apache.airavata.model.workspace.Gateway gateway; // required
+ public String gatewayId; // required
+ public org.apache.airavata.model.workspace.Gateway updatedGateway; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY((short)1, "gateway");
+ GATEWAY_ID((short)1, "gatewayId"),
+ UPDATED_GATEWAY((short)2, "updatedGateway");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -21658,8 +22850,10 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // GATEWAY
- return GATEWAY;
+ case 1: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 2: // UPDATED_GATEWAY
+ return UPDATED_GATEWAY;
default:
return null;
}
@@ -21703,71 +22897,111 @@ import org.slf4j.LoggerFactory;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UPDATED_GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("updatedGateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGateway_args.class, metaDataMap);
}
- public addGateway_args() {
+ public updateGateway_args() {
}
- public addGateway_args(
- org.apache.airavata.model.workspace.Gateway gateway)
+ public updateGateway_args(
+ String gatewayId,
+ org.apache.airavata.model.workspace.Gateway updatedGateway)
{
this();
- this.gateway = gateway;
+ this.gatewayId = gatewayId;
+ this.updatedGateway = updatedGateway;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public addGateway_args(addGateway_args other) {
- if (other.isSetGateway()) {
- this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
+ public updateGateway_args(updateGateway_args other) {
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetUpdatedGateway()) {
+ this.updatedGateway = new org.apache.airavata.model.workspace.Gateway(other.updatedGateway);
}
}
- public addGateway_args deepCopy() {
- return new addGateway_args(this);
+ public updateGateway_args deepCopy() {
+ return new updateGateway_args(this);
}
@Override
public void clear() {
- this.gateway = null;
+ this.gatewayId = null;
+ this.updatedGateway = null;
}
- public org.apache.airavata.model.workspace.Gateway getGateway() {
- return this.gateway;
+ public String getGatewayId() {
+ return this.gatewayId;
}
- public addGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
- this.gateway = gateway;
+ public updateGateway_args setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
return this;
}
- public void unsetGateway() {
- this.gateway = null;
+ public void unsetGatewayId() {
+ this.gatewayId = null;
}
- /** Returns true if field gateway is set (has been assigned a value) and false otherwise */
- public boolean isSetGateway() {
- return this.gateway != null;
+ /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGatewayId() {
+ return this.gatewayId != null;
}
- public void setGatewayIsSet(boolean value) {
+ public void setGatewayIdIsSet(boolean value) {
if (!value) {
- this.gateway = null;
+ this.gatewayId = null;
+ }
+ }
+
+ public org.apache.airavata.model.workspace.Gateway getUpdatedGateway() {
+ return this.updatedGateway;
+ }
+
+ public updateGateway_args setUpdatedGateway(org.apache.airavata.model.workspace.Gateway updatedGateway) {
+ this.updatedGateway = updatedGateway;
+ return this;
+ }
+
+ public void unsetUpdatedGateway() {
+ this.updatedGateway = null;
+ }
+
+ /** Returns true if field updatedGateway is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedGateway() {
+ return this.updatedGateway != null;
+ }
+
+ public void setUpdatedGatewayIsSet(boolean value) {
+ if (!value) {
+ this.updatedGateway = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case GATEWAY:
+ case GATEWAY_ID:
if (value == null) {
- unsetGateway();
+ unsetGatewayId();
} else {
- setGateway((org.apache.airavata.model.workspace.Gateway)value);
+ setGatewayId((String)value);
+ }
+ break;
+
+ case UPDATED_GATEWAY:
+ if (value == null) {
+ unsetUpdatedGateway();
+ } else {
+ setUpdatedGateway((org.apache.airavata.model.workspace.Gateway)value);
}
break;
@@ -21776,8 +23010,11 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case GATEWAY:
- return getGateway();
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case UPDATED_GATEWAY:
+ return getUpdatedGateway();
}
throw new IllegalStateException();
@@ -21790,8 +23027,10 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case GATEWAY:
- return isSetGateway();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case UPDATED_GATEWAY:
+ return isSetUpdatedGateway();
}
throw new IllegalStateException();
}
@@ -21800,21 +23039,30 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof addGateway_args)
- return this.equals((addGateway_args)that);
+ if (that instanceof updateGateway_args)
+ return this.equals((updateGateway_args)that);
return false;
}
- public boolean equals(addGateway_args that) {
+ public boolean equals(updateGateway_args that) {
if (that == null)
return false;
- boolean this_present_gateway = true && this.isSetGateway();
- boolean that_present_gateway = true && that.isSetGateway();
- if (this_present_gateway || that_present_gateway) {
- if (!(this_present_gateway && that_present_gateway))
+ boolean this_present_gatewayId = true && this.isSetGatewayId();
+ boolean that_present_gatewayId = true && that.isSetGatewayId();
+ if (this_present_gatewayId || that_present_gatewayId) {
+ if (!(this_present_gatewayId && that_present_gatewayId))
return false;
- if (!this.gateway.equals(that.gateway))
+ if (!this.gatewayId.equals(that.gatewayId))
+ return false;
+ }
+
+ boolean this_present_updatedGateway = true && this.isSetUpdatedGateway();
+ boolean that_present_updatedGateway = true && that.isSetUpdatedGateway();
+ if (this_present_updatedGateway || that_present_updatedGateway) {
+ if (!(this_present_updatedGateway && that_present_updatedGateway))
+ return false;
+ if (!this.updatedGateway.equals(that.updatedGateway))
return false;
}
@@ -21827,19 +23075,29 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(addGateway_args other) {
+ public int compareTo(updateGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
+ lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetGateway()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gateway, other.gateway);
+ if (isSetGatewayId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedGateway()).compareTo(other.isSetUpdatedGateway());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedGateway()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedGateway, other.updatedGateway);
if (lastComparison != 0) {
return lastComparison;
}
@@ -21861,14 +23119,22 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("addGateway_args(");
+ StringBuilder sb = new StringBuilder("updateGateway_args(");
boolean first = true;
- sb.append("gateway:");
- if (this.gateway == null) {
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
sb.append("null");
} else {
- sb.append(this.gateway);
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updatedGateway:");
+ if (this.updatedGateway == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.updatedGateway);
}
first = false;
sb.append(")");
@@ -21877,12 +23143,15 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (gateway == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
+ if (gatewayId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+ }
+ if (updatedGateway == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'updatedGateway' was not present! Struct: " + toString());
}
// check for sub-struct validity
- if (gateway != null) {
- gateway.validate();
+ if (updatedGateway != null) {
+ updatedGateway.validate();
}
}
@@ -21902,15 +23171,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class addGateway_argsStandardSchemeFactory implements SchemeFactory {
- public addGateway_argsStandardScheme getScheme() {
- return new addGateway_argsStandardScheme();
+ private static class updateGateway_argsStandardSchemeFactory implements SchemeFactory {
+ public updateGateway_argsStandardScheme getScheme() {
+ return new updateGateway_argsStandardScheme();
}
}
- private static class addGateway_argsStandardScheme extends StandardScheme<addGateway_args> {
+ private static class updateGateway_argsStandardScheme extends StandardScheme<updateGateway_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -21920,11 +23189,19 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 1: // GATEWAY
+ case 1: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // UPDATED_GATEWAY
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.gateway = new org.apache.airavata.model.workspace.Gateway();
- struct.gateway.read(iprot);
- struct.setGatewayIsSet(true);
+ struct.updatedGateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.updatedGateway.read(iprot);
+ struct.setUpdatedGatewayIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -21940,13 +23217,18 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updateGateway_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.gateway != null) {
- oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
- struct.gateway.write(oprot);
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.updatedGateway != null) {
+ oprot.writeFieldBegin(UPDATED_GATEWAY_FIELD_DESC);
+ struct.updatedGateway.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -21955,53 +23237,53 @@ import org.slf4j.LoggerFactory;
}
- private static class addGateway_argsTupleSchemeFactory implements SchemeFactory {
- public addGateway_argsTupleScheme getScheme() {
- return new addGateway_argsTupleScheme();
+ private static class updateGateway_argsTupleSchemeFactory implements SchemeFactory {
+ public updateGateway_argsTupleScheme getScheme() {
+ return new updateGateway_argsTupleScheme();
}
}
- private static class addGateway_argsTupleScheme extends TupleScheme<addGateway_args> {
+ private static class updateGateway_argsTupleScheme extends TupleScheme<updateGateway_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- struct.gateway.write(oprot);
+ oprot.writeString(struct.gatewayId);
+ struct.updatedGateway.write(oprot);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.gateway = new org.apache.airavata.model.workspace.Gateway();
- struct.gateway.read(iprot);
- struct.setGatewayIsSet(true);
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.updatedGateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.updatedGateway.read(iprot);
+ struct.setUpdatedGatewayIsSet(true);
}
}
}
- public static class addGateway_result implements org.apache.thrift.TBase<addGateway_result, addGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_result");
+ public static class updateGateway_result implements org.apache.thrift.TBase<updateGateway_result, updateGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateGateway_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGateway_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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 ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
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)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new addGateway_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addGateway_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new updateGateway_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGateway_resultTupleSchemeFactory());
}
- public String success; // required
public org.apache.airavata.model.error.InvalidRequestException ire; // 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"),
ACE((short)2, "ace"),
ASE((short)3, "ase");
@@ -22019,8 +23301,6 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
case 1: // IRE
return IRE;
case 2: // ACE
@@ -22070,8 +23350,6 @@ import org.slf4j.LoggerFactory;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.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.STRING)));
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.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -22079,20 +23357,18 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGateway_result.class, metaDataMap);
}
- public addGateway_result() {
+ public updateGateway_result() {
}
- public addGateway_result(
- String success,
+ public updateGateway_result(
org.apache.airavata.model.error.InvalidRequestException ire,
org.apache.airavata.model.error.AiravataClientException ace,
org.apache.airavata.model.error.AiravataSystemException ase)
{
this();
- this.success = success;
this.ire = ire;
this.ace = ace;
this.ase = ase;
@@ -22101,10 +23377,7 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public addGateway_result(addGateway_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
+ public updateGateway_result(updateGateway_result other) {
if (other.isSetIre()) {
this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
}
@@ -22116,47 +23389,22 @@ import org.slf4j.LoggerFactory;
}
}
- public addGateway_result deepCopy() {
- return new addGateway_result(this);
+ public updateGateway_result deepCopy() {
+ return new updateGateway_result(this);
}
@Override
public void clear() {
- this.success = null;
this.ire = null;
this.ace = null;
this.ase = null;
}
- public String getSuccess() {
- return this.success;
- }
-
- public addGateway_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
public org.apache.airavata.model.error.InvalidRequestException getIre() {
return this.ire;
}
- public addGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ public updateGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -22180,7 +23428,7 @@ import org.slf4j.LoggerFactory;
return this.ace;
}
- public addGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ public updateGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
this.ace = ace;
return this;
}
@@ -22204,7 +23452,7 @@ import org.slf4j.LoggerFactory;
return this.ase;
}
- public addGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ public updateGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
this.ase = ase;
return this;
}
@@ -22226,14 +23474,6 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
case IRE:
if (value == null) {
unsetIre();
@@ -22263,9 +23503,6 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return getSuccess();
-
case IRE:
return getIre();
@@ -22286,8 +23523,6 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case SUCCESS:
- return isSetSuccess();
case IRE:
return isSetIre();
case ACE:
@@ -22302,24 +23537,15 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof addGateway_result)
- return this.equals((addGateway_result)that);
+ if (that instanceof updateGateway_result)
+ return this.equals((updateGateway_result)that);
return false;
}
- public boolean equals(addGateway_result that) {
+ public boolean equals(updateGateway_result that) {
if (that == null)
retu
<TRUNCATED>
[3/3] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Posted by ch...@apache.org.
fixing compilation isssue, bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226, AIRAVATA-1626
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/56efa8e5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/56efa8e5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/56efa8e5
Branch: refs/heads/master
Commit: 56efa8e5e7b1bdbc69a8238968ca305c2d8f5ad0
Parents: 7ef8800
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Mar 10 13:30:28 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Mar 10 13:30:28 2015 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 30 +-
.../java/org/apache/airavata/api/Airavata.java | 5264 +++++++++++-------
.../main/resources/lib/airavata/Airavata.cpp | 381 ++
.../src/main/resources/lib/airavata/Airavata.h | 161 +
.../lib/airavata/Airavata_server.skeleton.cpp | 5 +
.../resources/lib/Airavata/API/Airavata.php | 296 +
.../client/samples/CreateLaunchExperiment.java | 31 +-
.../computeresource/AuthenticationMode.java | 70 +
.../airavataAPI.thrift | 6 +
9 files changed, 4246 insertions(+), 1998 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 c111a07..f250f37 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
@@ -337,9 +337,9 @@ public class AiravataServerHandler implements Airavata.Iface {
}
return (Project)registry.get(RegistryModelType.PROJECT, projectId);
} catch (RegistryException e) {
- logger.error("Error while updating the project", e);
+ logger.error("Error while retrieving the project", e);
ProjectNotFoundException exception = new ProjectNotFoundException();
- exception.setMessage("Error while updating the project. More info : " + e.getMessage());
+ exception.setMessage("Error while retrieving the project. More info : " + e.getMessage());
throw exception;
}
}
@@ -1868,8 +1868,10 @@ public class AiravataServerHandler implements Airavata.Iface {
List<ApplicationDeploymentDescription> applicationDeployments =
applicationDeployment.getApplicationDeployements(filters);
for (ApplicationDeploymentDescription deploymentDescription : applicationDeployments) {
- availableComputeResources.put(deploymentDescription.getComputeHostId(),
- allComputeResources.get(deploymentDescription.getComputeHostId()));
+ if (allComputeResources.get(deploymentDescription.getComputeHostId()) != null){
+ availableComputeResources.put(deploymentDescription.getComputeHostId(),
+ allComputeResources.get(deploymentDescription.getComputeHostId()));
+ }
}
}
}
@@ -3096,4 +3098,24 @@ public class AiravataServerHandler implements Airavata.Iface {
return workflowCatalog;
}
+ @Override
+ public boolean deleteProject(String projectId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, ProjectNotFoundException, TException {
+ try {
+ registry = RegistryFactory.getDefaultRegistry();
+ if (!registry.isExist(RegistryModelType.PROJECT, projectId)){
+ logger.error("Project does not exist in the system. Please provide a valid project ID...");
+ ProjectNotFoundException exception = new ProjectNotFoundException();
+ exception.setMessage("Project does not exist in the system. Please provide a valid project ID...");
+ throw exception;
+ }
+ registry.remove(RegistryModelType.PROJECT, projectId);
+ return true;
+ } catch (RegistryException e) {
+ logger.error("Error while removing the project", e);
+ ProjectNotFoundException exception = new ProjectNotFoundException();
+ exception.setMessage("Error while removing the project. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
}