You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/05/16 20:05:33 UTC
[1/2] adding validation fail exception
Repository: airavata
Updated Branches:
refs/heads/master 38f12a05e -> f9f173cd4
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.cpp
index 96e3c9a..483aa12 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.cpp
@@ -2948,14 +2948,6 @@ uint32_t Airavata_launchExperiment_result::read(::apache::thrift::protocol::TPro
}
switch (fid)
{
- case 0:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += this->success.read(iprot);
- this->__isset.success = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->ire.read(iprot);
@@ -2988,6 +2980,14 @@ uint32_t Airavata_launchExperiment_result::read(::apache::thrift::protocol::TPro
xfer += iprot->skip(ftype);
}
break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->lve.read(iprot);
+ this->__isset.lve = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -3006,11 +3006,7 @@ uint32_t Airavata_launchExperiment_result::write(::apache::thrift::protocol::TPr
xfer += oprot->writeStructBegin("Airavata_launchExperiment_result");
- if (this->__isset.success) {
- xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
- xfer += this->success.write(oprot);
- xfer += oprot->writeFieldEnd();
- } else if (this->__isset.ire) {
+ if (this->__isset.ire) {
xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->ire.write(oprot);
xfer += oprot->writeFieldEnd();
@@ -3026,6 +3022,10 @@ uint32_t Airavata_launchExperiment_result::write(::apache::thrift::protocol::TPr
xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 4);
xfer += this->ase.write(oprot);
xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.lve) {
+ xfer += oprot->writeFieldBegin("lve", ::apache::thrift::protocol::T_STRUCT, 5);
+ xfer += this->lve.write(oprot);
+ xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -3052,14 +3052,6 @@ uint32_t Airavata_launchExperiment_presult::read(::apache::thrift::protocol::TPr
}
switch (fid)
{
- case 0:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += (*(this->success)).read(iprot);
- this->__isset.success = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->ire.read(iprot);
@@ -3092,6 +3084,14 @@ uint32_t Airavata_launchExperiment_presult::read(::apache::thrift::protocol::TPr
xfer += iprot->skip(ftype);
}
break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->lve.read(iprot);
+ this->__isset.lve = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -5065,10 +5065,10 @@ bool AiravataClient::recv_validateExperiment()
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "validateExperiment failed: unknown result");
}
-void AiravataClient::launchExperiment( ::ValidationResults& _return, const std::string& airavataExperimentId, const std::string& airavataCredStoreToken)
+void AiravataClient::launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken)
{
send_launchExperiment(airavataExperimentId, airavataCredStoreToken);
- recv_launchExperiment(_return);
+ recv_launchExperiment();
}
void AiravataClient::send_launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken)
@@ -5086,7 +5086,7 @@ void AiravataClient::send_launchExperiment(const std::string& airavataExperiment
oprot_->getTransport()->flush();
}
-void AiravataClient::recv_launchExperiment( ::ValidationResults& _return)
+void AiravataClient::recv_launchExperiment()
{
int32_t rseqid = 0;
@@ -5112,15 +5112,10 @@ void AiravataClient::recv_launchExperiment( ::ValidationResults& _return)
iprot_->getTransport()->readEnd();
}
Airavata_launchExperiment_presult result;
- result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.success) {
- // _return pointer has now been filled
- return;
- }
if (result.__isset.ire) {
throw result.ire;
}
@@ -5133,7 +5128,10 @@ void AiravataClient::recv_launchExperiment( ::ValidationResults& _return)
if (result.__isset.ase) {
throw result.ase;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "launchExperiment failed: unknown result");
+ if (result.__isset.lve) {
+ throw result.lve;
+ }
+ return;
}
void AiravataClient::getExperimentStatus( ::ExperimentStatus& _return, const std::string& airavataExperimentId)
@@ -6297,8 +6295,7 @@ void AiravataProcessor::process_launchExperiment(int32_t seqid, ::apache::thrift
Airavata_launchExperiment_result result;
try {
- iface_->launchExperiment(result.success, args.airavataExperimentId, args.airavataCredStoreToken);
- result.__isset.success = true;
+ iface_->launchExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
} catch ( ::airavata::api::error::InvalidRequestException &ire) {
result.ire = ire;
result.__isset.ire = true;
@@ -6311,6 +6308,9 @@ void AiravataProcessor::process_launchExperiment(int32_t seqid, ::apache::thrift
} catch ( ::airavata::api::error::AiravataSystemException &ase) {
result.ase = ase;
result.__isset.ase = true;
+ } catch ( ::airavata::api::error::LaunchValidationException &lve) {
+ result.lve = lve;
+ result.__isset.lve = true;
} catch (const std::exception& e) {
if (this->eventHandler_.get() != NULL) {
this->eventHandler_->handlerError(ctx, "Airavata.launchExperiment");
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.h
index b4f23d5..54d9d6c 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata.h
@@ -28,7 +28,7 @@ class AiravataIf {
virtual void updateExperimentConfiguration(const std::string& airavataExperimentId, const ::UserConfigurationData& userConfiguration) = 0;
virtual void updateResourceScheduleing(const std::string& airavataExperimentId, const ::ComputationalResourceScheduling& resourceScheduling) = 0;
virtual bool validateExperiment(const std::string& airavataExperimentId) = 0;
- virtual void launchExperiment( ::ValidationResults& _return, const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) = 0;
+ virtual void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) = 0;
virtual void getExperimentStatus( ::ExperimentStatus& _return, const std::string& airavataExperimentId) = 0;
virtual void getExperimentOutputs(std::vector< ::DataObjectType> & _return, const std::string& airavataExperimentId) = 0;
virtual void getJobStatuses(std::map<std::string, ::JobStatus> & _return, const std::string& airavataExperimentId) = 0;
@@ -103,7 +103,7 @@ class AiravataNull : virtual public AiravataIf {
bool _return = false;
return _return;
}
- void launchExperiment( ::ValidationResults& /* _return */, const std::string& /* airavataExperimentId */, const std::string& /* airavataCredStoreToken */) {
+ void launchExperiment(const std::string& /* airavataExperimentId */, const std::string& /* airavataCredStoreToken */) {
return;
}
void getExperimentStatus( ::ExperimentStatus& /* _return */, const std::string& /* airavataExperimentId */) {
@@ -1789,12 +1789,12 @@ class Airavata_launchExperiment_pargs {
};
typedef struct _Airavata_launchExperiment_result__isset {
- _Airavata_launchExperiment_result__isset() : success(false), ire(false), enf(false), ace(false), ase(false) {}
- bool success;
+ _Airavata_launchExperiment_result__isset() : ire(false), enf(false), ace(false), ase(false), lve(false) {}
bool ire;
bool enf;
bool ace;
bool ase;
+ bool lve;
} _Airavata_launchExperiment_result__isset;
class Airavata_launchExperiment_result {
@@ -1805,18 +1805,14 @@ class Airavata_launchExperiment_result {
virtual ~Airavata_launchExperiment_result() throw() {}
- ::ValidationResults success;
::airavata::api::error::InvalidRequestException ire;
::airavata::api::error::ExperimentNotFoundException enf;
::airavata::api::error::AiravataClientException ace;
::airavata::api::error::AiravataSystemException ase;
+ ::airavata::api::error::LaunchValidationException lve;
_Airavata_launchExperiment_result__isset __isset;
- void __set_success(const ::ValidationResults& val) {
- success = val;
- }
-
void __set_ire(const ::airavata::api::error::InvalidRequestException& val) {
ire = val;
}
@@ -1833,10 +1829,12 @@ class Airavata_launchExperiment_result {
ase = val;
}
+ void __set_lve(const ::airavata::api::error::LaunchValidationException& val) {
+ lve = val;
+ }
+
bool operator == (const Airavata_launchExperiment_result & rhs) const
{
- if (!(success == rhs.success))
- return false;
if (!(ire == rhs.ire))
return false;
if (!(enf == rhs.enf))
@@ -1845,6 +1843,8 @@ class Airavata_launchExperiment_result {
return false;
if (!(ase == rhs.ase))
return false;
+ if (!(lve == rhs.lve))
+ return false;
return true;
}
bool operator != (const Airavata_launchExperiment_result &rhs) const {
@@ -1859,12 +1859,12 @@ class Airavata_launchExperiment_result {
};
typedef struct _Airavata_launchExperiment_presult__isset {
- _Airavata_launchExperiment_presult__isset() : success(false), ire(false), enf(false), ace(false), ase(false) {}
- bool success;
+ _Airavata_launchExperiment_presult__isset() : ire(false), enf(false), ace(false), ase(false), lve(false) {}
bool ire;
bool enf;
bool ace;
bool ase;
+ bool lve;
} _Airavata_launchExperiment_presult__isset;
class Airavata_launchExperiment_presult {
@@ -1873,11 +1873,11 @@ class Airavata_launchExperiment_presult {
virtual ~Airavata_launchExperiment_presult() throw() {}
- ::ValidationResults* success;
::airavata::api::error::InvalidRequestException ire;
::airavata::api::error::ExperimentNotFoundException enf;
::airavata::api::error::AiravataClientException ace;
::airavata::api::error::AiravataSystemException ase;
+ ::airavata::api::error::LaunchValidationException lve;
_Airavata_launchExperiment_presult__isset __isset;
@@ -2585,9 +2585,9 @@ class AiravataClient : virtual public AiravataIf {
bool validateExperiment(const std::string& airavataExperimentId);
void send_validateExperiment(const std::string& airavataExperimentId);
bool recv_validateExperiment();
- void launchExperiment( ::ValidationResults& _return, const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
+ void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
void send_launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
- void recv_launchExperiment( ::ValidationResults& _return);
+ void recv_launchExperiment();
void getExperimentStatus( ::ExperimentStatus& _return, const std::string& airavataExperimentId);
void send_getExperimentStatus(const std::string& airavataExperimentId);
void recv_getExperimentStatus( ::ExperimentStatus& _return);
@@ -2812,14 +2812,13 @@ class AiravataMultiface : virtual public AiravataIf {
return ifaces_[i]->validateExperiment(airavataExperimentId);
}
- void launchExperiment( ::ValidationResults& _return, const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) {
+ void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) {
size_t sz = ifaces_.size();
size_t i = 0;
for (; i < (sz - 1); ++i) {
- ifaces_[i]->launchExperiment(_return, airavataExperimentId, airavataCredStoreToken);
+ ifaces_[i]->launchExperiment(airavataExperimentId, airavataCredStoreToken);
}
- ifaces_[i]->launchExperiment(_return, airavataExperimentId, airavataCredStoreToken);
- return;
+ ifaces_[i]->launchExperiment(airavataExperimentId, airavataCredStoreToken);
}
void getExperimentStatus( ::ExperimentStatus& _return, const std::string& airavataExperimentId) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata_server.skeleton.cpp
index d413309..30e57c0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/Airavata_server.skeleton.cpp
@@ -87,7 +87,7 @@ class AiravataHandler : virtual public AiravataIf {
printf("validateExperiment\n");
}
- void launchExperiment( ::ValidationResults& _return, const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) {
+ void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken) {
// Your implementation goes here
printf("launchExperiment\n");
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.cpp
index 8021a96..087f2b5 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.cpp
@@ -414,6 +414,264 @@ void swap(AiravataClientException &a, AiravataClientException &b) {
swap(a.__isset, b.__isset);
}
+const char* ValidatorResult::ascii_fingerprint = "EB04A806CFFC9025AEE48CFFDC378A86";
+const uint8_t ValidatorResult::binary_fingerprint[16] = {0xEB,0x04,0xA8,0x06,0xCF,0xFC,0x90,0x25,0xAE,0xE4,0x8C,0xFF,0xDC,0x37,0x8A,0x86};
+
+uint32_t ValidatorResult::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_result = 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_BOOL) {
+ xfer += iprot->readBool(this->result);
+ isset_result = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->errorDetails);
+ this->__isset.errorDetails = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_result)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t ValidatorResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ValidatorResult");
+
+ xfer += oprot->writeFieldBegin("result", ::apache::thrift::protocol::T_BOOL, 1);
+ xfer += oprot->writeBool(this->result);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.errorDetails) {
+ xfer += oprot->writeFieldBegin("errorDetails", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->errorDetails);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(ValidatorResult &a, ValidatorResult &b) {
+ using ::std::swap;
+ swap(a.result, b.result);
+ swap(a.errorDetails, b.errorDetails);
+ swap(a.__isset, b.__isset);
+}
+
+const char* ValidationResults::ascii_fingerprint = "E73BC8630EE405DA5FB801ED852143D2";
+const uint8_t ValidationResults::binary_fingerprint[16] = {0xE7,0x3B,0xC8,0x63,0x0E,0xE4,0x05,0xDA,0x5F,0xB8,0x01,0xED,0x85,0x21,0x43,0xD2};
+
+uint32_t ValidationResults::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_validationState = false;
+ bool isset_validationResultList = 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_BOOL) {
+ xfer += iprot->readBool(this->validationState);
+ isset_validationState = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->validationResultList.clear();
+ uint32_t _size1;
+ ::apache::thrift::protocol::TType _etype4;
+ xfer += iprot->readListBegin(_etype4, _size1);
+ this->validationResultList.resize(_size1);
+ uint32_t _i5;
+ for (_i5 = 0; _i5 < _size1; ++_i5)
+ {
+ xfer += this->validationResultList[_i5].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_validationResultList = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_validationState)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_validationResultList)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t ValidationResults::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ValidationResults");
+
+ xfer += oprot->writeFieldBegin("validationState", ::apache::thrift::protocol::T_BOOL, 1);
+ xfer += oprot->writeBool(this->validationState);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("validationResultList", ::apache::thrift::protocol::T_LIST, 2);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->validationResultList.size()));
+ std::vector<ValidatorResult> ::const_iterator _iter6;
+ for (_iter6 = this->validationResultList.begin(); _iter6 != this->validationResultList.end(); ++_iter6)
+ {
+ xfer += (*_iter6).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(ValidationResults &a, ValidationResults &b) {
+ using ::std::swap;
+ swap(a.validationState, b.validationState);
+ swap(a.validationResultList, b.validationResultList);
+}
+
+const char* LaunchValidationException::ascii_fingerprint = "99E9D28CC9613B8567277FD2B86021FA";
+const uint8_t LaunchValidationException::binary_fingerprint[16] = {0x99,0xE9,0xD2,0x8C,0xC9,0x61,0x3B,0x85,0x67,0x27,0x7F,0xD2,0xB8,0x60,0x21,0xFA};
+
+uint32_t LaunchValidationException::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_validationResult = 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_STRUCT) {
+ xfer += this->validationResult.read(iprot);
+ isset_validationResult = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->errorMessage);
+ this->__isset.errorMessage = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_validationResult)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t LaunchValidationException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("LaunchValidationException");
+
+ xfer += oprot->writeFieldBegin("validationResult", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->validationResult.write(oprot);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.errorMessage) {
+ xfer += oprot->writeFieldBegin("errorMessage", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->errorMessage);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(LaunchValidationException &a, LaunchValidationException &b) {
+ using ::std::swap;
+ swap(a.validationResult, b.validationResult);
+ swap(a.errorMessage, b.errorMessage);
+ swap(a.__isset, b.__isset);
+}
+
const char* AiravataSystemException::ascii_fingerprint = "24652790C81ECE22B629CB60A19F1E93";
const uint8_t AiravataSystemException::binary_fingerprint[16] = {0x24,0x65,0x27,0x90,0xC8,0x1E,0xCE,0x22,0xB6,0x29,0xCB,0x60,0xA1,0x9F,0x1E,0x93};
@@ -440,9 +698,9 @@ uint32_t AiravataSystemException::read(::apache::thrift::protocol::TProtocol* ip
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast1;
- xfer += iprot->readI32(ecast1);
- this->airavataErrorType = (AiravataErrorType::type)ecast1;
+ int32_t ecast7;
+ xfer += iprot->readI32(ecast7);
+ this->airavataErrorType = (AiravataErrorType::type)ecast7;
isset_airavataErrorType = true;
} else {
xfer += iprot->skip(ftype);
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.h
index 6406404..2223517 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavataErrors_types.h
@@ -13,6 +13,7 @@
#include <thrift/transport/TTransport.h>
#include <thrift/cxxfunctional.h>
+#include "experimentModel_types.h"
namespace airavata { namespace api { namespace error {
@@ -263,6 +264,156 @@ class AiravataClientException : public ::apache::thrift::TException {
void swap(AiravataClientException &a, AiravataClientException &b);
+typedef struct _ValidatorResult__isset {
+ _ValidatorResult__isset() : errorDetails(false) {}
+ bool errorDetails;
+} _ValidatorResult__isset;
+
+class ValidatorResult {
+ public:
+
+ static const char* ascii_fingerprint; // = "EB04A806CFFC9025AEE48CFFDC378A86";
+ static const uint8_t binary_fingerprint[16]; // = {0xEB,0x04,0xA8,0x06,0xCF,0xFC,0x90,0x25,0xAE,0xE4,0x8C,0xFF,0xDC,0x37,0x8A,0x86};
+
+ ValidatorResult() : result(0), errorDetails() {
+ }
+
+ virtual ~ValidatorResult() throw() {}
+
+ bool result;
+ std::string errorDetails;
+
+ _ValidatorResult__isset __isset;
+
+ void __set_result(const bool val) {
+ result = val;
+ }
+
+ void __set_errorDetails(const std::string& val) {
+ errorDetails = val;
+ __isset.errorDetails = true;
+ }
+
+ bool operator == (const ValidatorResult & rhs) const
+ {
+ if (!(result == rhs.result))
+ return false;
+ if (__isset.errorDetails != rhs.__isset.errorDetails)
+ return false;
+ else if (__isset.errorDetails && !(errorDetails == rhs.errorDetails))
+ return false;
+ return true;
+ }
+ bool operator != (const ValidatorResult &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ValidatorResult & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(ValidatorResult &a, ValidatorResult &b);
+
+
+class ValidationResults {
+ public:
+
+ static const char* ascii_fingerprint; // = "E73BC8630EE405DA5FB801ED852143D2";
+ static const uint8_t binary_fingerprint[16]; // = {0xE7,0x3B,0xC8,0x63,0x0E,0xE4,0x05,0xDA,0x5F,0xB8,0x01,0xED,0x85,0x21,0x43,0xD2};
+
+ ValidationResults() : validationState(0) {
+ }
+
+ virtual ~ValidationResults() throw() {}
+
+ bool validationState;
+ std::vector<ValidatorResult> validationResultList;
+
+ void __set_validationState(const bool val) {
+ validationState = val;
+ }
+
+ void __set_validationResultList(const std::vector<ValidatorResult> & val) {
+ validationResultList = val;
+ }
+
+ bool operator == (const ValidationResults & rhs) const
+ {
+ if (!(validationState == rhs.validationState))
+ return false;
+ if (!(validationResultList == rhs.validationResultList))
+ return false;
+ return true;
+ }
+ bool operator != (const ValidationResults &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ValidationResults & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(ValidationResults &a, ValidationResults &b);
+
+typedef struct _LaunchValidationException__isset {
+ _LaunchValidationException__isset() : errorMessage(false) {}
+ bool errorMessage;
+} _LaunchValidationException__isset;
+
+class LaunchValidationException : public ::apache::thrift::TException {
+ public:
+
+ static const char* ascii_fingerprint; // = "99E9D28CC9613B8567277FD2B86021FA";
+ static const uint8_t binary_fingerprint[16]; // = {0x99,0xE9,0xD2,0x8C,0xC9,0x61,0x3B,0x85,0x67,0x27,0x7F,0xD2,0xB8,0x60,0x21,0xFA};
+
+ LaunchValidationException() : errorMessage() {
+ }
+
+ virtual ~LaunchValidationException() throw() {}
+
+ ValidationResults validationResult;
+ std::string errorMessage;
+
+ _LaunchValidationException__isset __isset;
+
+ void __set_validationResult(const ValidationResults& val) {
+ validationResult = val;
+ }
+
+ void __set_errorMessage(const std::string& val) {
+ errorMessage = val;
+ __isset.errorMessage = true;
+ }
+
+ bool operator == (const LaunchValidationException & rhs) const
+ {
+ if (!(validationResult == rhs.validationResult))
+ return false;
+ if (__isset.errorMessage != rhs.__isset.errorMessage)
+ return false;
+ else if (__isset.errorMessage && !(errorMessage == rhs.errorMessage))
+ return false;
+ return true;
+ }
+ bool operator != (const LaunchValidationException &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const LaunchValidationException & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(LaunchValidationException &a, LaunchValidationException &b);
+
typedef struct _AiravataSystemException__isset {
_AiravataSystemException__isset() : message(false) {}
bool message;
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/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 09b4679..8600d83 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
@@ -804,7 +804,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
public function launchExperiment($airavataExperimentId, $airavataCredStoreToken)
{
$this->send_launchExperiment($airavataExperimentId, $airavataCredStoreToken);
- return $this->recv_launchExperiment();
+ $this->recv_launchExperiment();
}
public function send_launchExperiment($airavataExperimentId, $airavataCredStoreToken)
@@ -847,9 +847,6 @@ class AiravataClient implements \Airavata\API\AiravataIf {
$result->read($this->input_);
$this->input_->readMessageEnd();
}
- if ($result->success !== null) {
- return $result->success;
- }
if ($result->ire !== null) {
throw $result->ire;
}
@@ -862,7 +859,10 @@ class AiravataClient implements \Airavata\API\AiravataIf {
if ($result->ase !== null) {
throw $result->ase;
}
- throw new \Exception("launchExperiment failed: unknown result");
+ if ($result->lve !== null) {
+ throw $result->lve;
+ }
+ return;
}
public function getExperimentStatus($airavataExperimentId)
@@ -3929,20 +3929,15 @@ class Airavata_launchExperiment_args {
class Airavata_launchExperiment_result {
static $_TSPEC;
- public $success = null;
public $ire = null;
public $enf = null;
public $ace = null;
public $ase = null;
+ public $lve = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\Workspace\Experiment\ValidationResults',
- ),
1 => array(
'var' => 'ire',
'type' => TType::STRUCT,
@@ -3963,12 +3958,14 @@ class Airavata_launchExperiment_result {
'type' => TType::STRUCT,
'class' => '\Airavata\API\Error\AiravataSystemException',
),
+ 5 => array(
+ 'var' => 'lve',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\LaunchValidationException',
+ ),
);
}
if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
if (isset($vals['ire'])) {
$this->ire = $vals['ire'];
}
@@ -3981,6 +3978,9 @@ class Airavata_launchExperiment_result {
if (isset($vals['ase'])) {
$this->ase = $vals['ase'];
}
+ if (isset($vals['lve'])) {
+ $this->lve = $vals['lve'];
+ }
}
}
@@ -4003,14 +4003,6 @@ class Airavata_launchExperiment_result {
}
switch ($fid)
{
- case 0:
- if ($ftype == TType::STRUCT) {
- $this->success = new \Airavata\Model\Workspace\Experiment\ValidationResults();
- $xfer += $this->success->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
case 1:
if ($ftype == TType::STRUCT) {
$this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -4043,6 +4035,14 @@ class Airavata_launchExperiment_result {
$xfer += $input->skip($ftype);
}
break;
+ case 5:
+ if ($ftype == TType::STRUCT) {
+ $this->lve = new \Airavata\API\Error\LaunchValidationException();
+ $xfer += $this->lve->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -4056,14 +4056,6 @@ class Airavata_launchExperiment_result {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Airavata_launchExperiment_result');
- if ($this->success !== null) {
- if (!is_object($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
- $xfer += $this->success->write($output);
- $xfer += $output->writeFieldEnd();
- }
if ($this->ire !== null) {
$xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
$xfer += $this->ire->write($output);
@@ -4084,6 +4076,11 @@ class Airavata_launchExperiment_result {
$xfer += $this->ase->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->lve !== null) {
+ $xfer += $output->writeFieldBegin('lve', TType::STRUCT, 5);
+ $xfer += $this->lve->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
index d63e940..896c6b3 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
@@ -468,6 +468,315 @@ class AiravataClientException extends TException {
}
+class ValidatorResult {
+ static $_TSPEC;
+
+ public $result = null;
+ public $errorDetails = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'result',
+ 'type' => TType::BOOL,
+ ),
+ 2 => array(
+ 'var' => 'errorDetails',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['result'])) {
+ $this->result = $vals['result'];
+ }
+ if (isset($vals['errorDetails'])) {
+ $this->errorDetails = $vals['errorDetails'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ValidatorResult';
+ }
+
+ 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::BOOL) {
+ $xfer += $input->readBool($this->result);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->errorDetails);
+ } 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('ValidatorResult');
+ if ($this->result !== null) {
+ $xfer += $output->writeFieldBegin('result', TType::BOOL, 1);
+ $xfer += $output->writeBool($this->result);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errorDetails !== null) {
+ $xfer += $output->writeFieldBegin('errorDetails', TType::STRING, 2);
+ $xfer += $output->writeString($this->errorDetails);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ValidationResults {
+ static $_TSPEC;
+
+ public $validationState = null;
+ public $validationResultList = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'validationState',
+ 'type' => TType::BOOL,
+ ),
+ 2 => array(
+ 'var' => 'validationResultList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ValidatorResult',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['validationState'])) {
+ $this->validationState = $vals['validationState'];
+ }
+ if (isset($vals['validationResultList'])) {
+ $this->validationResultList = $vals['validationResultList'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ValidationResults';
+ }
+
+ 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::BOOL) {
+ $xfer += $input->readBool($this->validationState);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::LST) {
+ $this->validationResultList = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\API\Error\ValidatorResult();
+ $xfer += $elem5->read($input);
+ $this->validationResultList []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } 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('ValidationResults');
+ if ($this->validationState !== null) {
+ $xfer += $output->writeFieldBegin('validationState', TType::BOOL, 1);
+ $xfer += $output->writeBool($this->validationState);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->validationResultList !== null) {
+ if (!is_array($this->validationResultList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('validationResultList', TType::LST, 2);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->validationResultList));
+ {
+ foreach ($this->validationResultList as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class LaunchValidationException extends TException {
+ static $_TSPEC;
+
+ public $validationResult = null;
+ public $errorMessage = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'validationResult',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ValidationResults',
+ ),
+ 2 => array(
+ 'var' => 'errorMessage',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['validationResult'])) {
+ $this->validationResult = $vals['validationResult'];
+ }
+ if (isset($vals['errorMessage'])) {
+ $this->errorMessage = $vals['errorMessage'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'LaunchValidationException';
+ }
+
+ 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::STRUCT) {
+ $this->validationResult = new \Airavata\API\Error\ValidationResults();
+ $xfer += $this->validationResult->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->errorMessage);
+ } 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('LaunchValidationException');
+ if ($this->validationResult !== null) {
+ if (!is_object($this->validationResult)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('validationResult', TType::STRUCT, 1);
+ $xfer += $this->validationResult->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errorMessage !== null) {
+ $xfer += $output->writeFieldBegin('errorMessage', TType::STRING, 2);
+ $xfer += $output->writeString($this->errorMessage);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class AiravataSystemException extends TException {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
deleted file mode 100644
index b5e96b6..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
+++ /dev/null
@@ -1,543 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.workspace.experiment;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>, java.io.Serializable, Cloneable, Comparable<ValidationResults> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
-
- private static final org.apache.thrift.protocol.TField VALIDATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("validationState", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final org.apache.thrift.protocol.TField VALIDATION_RESULT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validationResultList", org.apache.thrift.protocol.TType.LIST, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ValidationResultsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ValidationResultsTupleSchemeFactory());
- }
-
- private boolean validationState; // required
- private List<ValidatorResult> validationResultList; // 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 {
- VALIDATION_STATE((short)1, "validationState"),
- VALIDATION_RESULT_LIST((short)2, "validationResultList");
-
- 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: // VALIDATION_STATE
- return VALIDATION_STATE;
- case 2: // VALIDATION_RESULT_LIST
- return VALIDATION_RESULT_LIST;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __VALIDATIONSTATE_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALIDATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("validationState", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.VALIDATION_RESULT_LIST, new org.apache.thrift.meta_data.FieldMetaData("validationResultList", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ValidatorResult.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidationResults.class, metaDataMap);
- }
-
- public ValidationResults() {
- }
-
- public ValidationResults(
- boolean validationState,
- List<ValidatorResult> validationResultList)
- {
- this();
- this.validationState = validationState;
- setValidationStateIsSet(true);
- this.validationResultList = validationResultList;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ValidationResults(ValidationResults other) {
- __isset_bitfield = other.__isset_bitfield;
- this.validationState = other.validationState;
- if (other.isSetValidationResultList()) {
- List<ValidatorResult> __this__validationResultList = new ArrayList<ValidatorResult>(other.validationResultList.size());
- for (ValidatorResult other_element : other.validationResultList) {
- __this__validationResultList.add(new ValidatorResult(other_element));
- }
- this.validationResultList = __this__validationResultList;
- }
- }
-
- public ValidationResults deepCopy() {
- return new ValidationResults(this);
- }
-
- @Override
- public void clear() {
- setValidationStateIsSet(false);
- this.validationState = false;
- this.validationResultList = null;
- }
-
- public boolean isValidationState() {
- return this.validationState;
- }
-
- public void setValidationState(boolean validationState) {
- this.validationState = validationState;
- setValidationStateIsSet(true);
- }
-
- public void unsetValidationState() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
- }
-
- /** Returns true if field validationState is set (has been assigned a value) and false otherwise */
- public boolean isSetValidationState() {
- return EncodingUtils.testBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
- }
-
- public void setValidationStateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID, value);
- }
-
- public int getValidationResultListSize() {
- return (this.validationResultList == null) ? 0 : this.validationResultList.size();
- }
-
- public java.util.Iterator<ValidatorResult> getValidationResultListIterator() {
- return (this.validationResultList == null) ? null : this.validationResultList.iterator();
- }
-
- public void addToValidationResultList(ValidatorResult elem) {
- if (this.validationResultList == null) {
- this.validationResultList = new ArrayList<ValidatorResult>();
- }
- this.validationResultList.add(elem);
- }
-
- public List<ValidatorResult> getValidationResultList() {
- return this.validationResultList;
- }
-
- public void setValidationResultList(List<ValidatorResult> validationResultList) {
- this.validationResultList = validationResultList;
- }
-
- public void unsetValidationResultList() {
- this.validationResultList = null;
- }
-
- /** Returns true if field validationResultList is set (has been assigned a value) and false otherwise */
- public boolean isSetValidationResultList() {
- return this.validationResultList != null;
- }
-
- public void setValidationResultListIsSet(boolean value) {
- if (!value) {
- this.validationResultList = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALIDATION_STATE:
- if (value == null) {
- unsetValidationState();
- } else {
- setValidationState((Boolean)value);
- }
- break;
-
- case VALIDATION_RESULT_LIST:
- if (value == null) {
- unsetValidationResultList();
- } else {
- setValidationResultList((List<ValidatorResult>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALIDATION_STATE:
- return Boolean.valueOf(isValidationState());
-
- case VALIDATION_RESULT_LIST:
- return getValidationResultList();
-
- }
- 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 VALIDATION_STATE:
- return isSetValidationState();
- case VALIDATION_RESULT_LIST:
- return isSetValidationResultList();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ValidationResults)
- return this.equals((ValidationResults)that);
- return false;
- }
-
- public boolean equals(ValidationResults that) {
- if (that == null)
- return false;
-
- boolean this_present_validationState = true;
- boolean that_present_validationState = true;
- if (this_present_validationState || that_present_validationState) {
- if (!(this_present_validationState && that_present_validationState))
- return false;
- if (this.validationState != that.validationState)
- return false;
- }
-
- boolean this_present_validationResultList = true && this.isSetValidationResultList();
- boolean that_present_validationResultList = true && that.isSetValidationResultList();
- if (this_present_validationResultList || that_present_validationResultList) {
- if (!(this_present_validationResultList && that_present_validationResultList))
- return false;
- if (!this.validationResultList.equals(that.validationResultList))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ValidationResults other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetValidationState()).compareTo(other.isSetValidationState());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValidationState()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationState, other.validationState);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetValidationResultList()).compareTo(other.isSetValidationResultList());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValidationResultList()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationResultList, other.validationResultList);
- 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("ValidationResults(");
- boolean first = true;
-
- sb.append("validationState:");
- sb.append(this.validationState);
- first = false;
- if (!first) sb.append(", ");
- sb.append("validationResultList:");
- if (this.validationResultList == null) {
- sb.append("null");
- } else {
- sb.append(this.validationResultList);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetValidationState()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationState' is unset! Struct:" + toString());
- }
-
- if (!isSetValidationResultList()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationResultList' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ValidationResultsStandardSchemeFactory implements SchemeFactory {
- public ValidationResultsStandardScheme getScheme() {
- return new ValidationResultsStandardScheme();
- }
- }
-
- private static class ValidationResultsStandardScheme extends StandardScheme<ValidationResults> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ValidationResults struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALIDATION_STATE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.validationState = iprot.readBool();
- struct.setValidationStateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VALIDATION_RESULT_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
- struct.validationResultList = new ArrayList<ValidatorResult>(_list88.size);
- for (int _i89 = 0; _i89 < _list88.size; ++_i89)
- {
- ValidatorResult _elem90;
- _elem90 = new ValidatorResult();
- _elem90.read(iprot);
- struct.validationResultList.add(_elem90);
- }
- iprot.readListEnd();
- }
- struct.setValidationResultListIsSet(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();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ValidationResults struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(VALIDATION_STATE_FIELD_DESC);
- oprot.writeBool(struct.validationState);
- oprot.writeFieldEnd();
- if (struct.validationResultList != null) {
- oprot.writeFieldBegin(VALIDATION_RESULT_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.validationResultList.size()));
- for (ValidatorResult _iter91 : struct.validationResultList)
- {
- _iter91.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ValidationResultsTupleSchemeFactory implements SchemeFactory {
- public ValidationResultsTupleScheme getScheme() {
- return new ValidationResultsTupleScheme();
- }
- }
-
- private static class ValidationResultsTupleScheme extends TupleScheme<ValidationResults> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeBool(struct.validationState);
- {
- oprot.writeI32(struct.validationResultList.size());
- for (ValidatorResult _iter92 : struct.validationResultList)
- {
- _iter92.write(oprot);
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.validationState = iprot.readBool();
- struct.setValidationStateIsSet(true);
- {
- org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.validationResultList = new ArrayList<ValidatorResult>(_list93.size);
- for (int _i94 = 0; _i94 < _list93.size; ++_i94)
- {
- ValidatorResult _elem95;
- _elem95 = new ValidatorResult();
- _elem95.read(iprot);
- struct.validationResultList.add(_elem95);
- }
- }
- struct.setValidationResultListIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
deleted file mode 100644
index 8736761..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
+++ /dev/null
@@ -1,505 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.workspace.experiment;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This data structure can be used to store the validation results
- * captured during validation step and during the launchExperiment
- * operation it can be easilly checked to see the errors occured
- * during the experiment launch operation
- *
- */
-@SuppressWarnings("all") public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>, java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
-
- private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final org.apache.thrift.protocol.TField ERROR_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("errorDetails", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ValidatorResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ValidatorResultTupleSchemeFactory());
- }
-
- private boolean result; // required
- private String errorDetails; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- RESULT((short)1, "result"),
- ERROR_DETAILS((short)2, "errorDetails");
-
- 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: // RESULT
- return RESULT;
- case 2: // ERROR_DETAILS
- return ERROR_DETAILS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __RESULT_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.ERROR_DETAILS};
- 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.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.ERROR_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("errorDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidatorResult.class, metaDataMap);
- }
-
- public ValidatorResult() {
- }
-
- public ValidatorResult(
- boolean result)
- {
- this();
- this.result = result;
- setResultIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ValidatorResult(ValidatorResult other) {
- __isset_bitfield = other.__isset_bitfield;
- this.result = other.result;
- if (other.isSetErrorDetails()) {
- this.errorDetails = other.errorDetails;
- }
- }
-
- public ValidatorResult deepCopy() {
- return new ValidatorResult(this);
- }
-
- @Override
- public void clear() {
- setResultIsSet(false);
- this.result = false;
- this.errorDetails = null;
- }
-
- public boolean isResult() {
- return this.result;
- }
-
- public void setResult(boolean result) {
- this.result = result;
- setResultIsSet(true);
- }
-
- public void unsetResult() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
- }
-
- /** Returns true if field result is set (has been assigned a value) and false otherwise */
- public boolean isSetResult() {
- return EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
- }
-
- public void setResultIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value);
- }
-
- public String getErrorDetails() {
- return this.errorDetails;
- }
-
- public void setErrorDetails(String errorDetails) {
- this.errorDetails = errorDetails;
- }
-
- public void unsetErrorDetails() {
- this.errorDetails = null;
- }
-
- /** Returns true if field errorDetails is set (has been assigned a value) and false otherwise */
- public boolean isSetErrorDetails() {
- return this.errorDetails != null;
- }
-
- public void setErrorDetailsIsSet(boolean value) {
- if (!value) {
- this.errorDetails = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case RESULT:
- if (value == null) {
- unsetResult();
- } else {
- setResult((Boolean)value);
- }
- break;
-
- case ERROR_DETAILS:
- if (value == null) {
- unsetErrorDetails();
- } else {
- setErrorDetails((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case RESULT:
- return Boolean.valueOf(isResult());
-
- case ERROR_DETAILS:
- return getErrorDetails();
-
- }
- 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 RESULT:
- return isSetResult();
- case ERROR_DETAILS:
- return isSetErrorDetails();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ValidatorResult)
- return this.equals((ValidatorResult)that);
- return false;
- }
-
- public boolean equals(ValidatorResult that) {
- if (that == null)
- return false;
-
- boolean this_present_result = true;
- boolean that_present_result = true;
- if (this_present_result || that_present_result) {
- if (!(this_present_result && that_present_result))
- return false;
- if (this.result != that.result)
- return false;
- }
-
- boolean this_present_errorDetails = true && this.isSetErrorDetails();
- boolean that_present_errorDetails = true && that.isSetErrorDetails();
- if (this_present_errorDetails || that_present_errorDetails) {
- if (!(this_present_errorDetails && that_present_errorDetails))
- return false;
- if (!this.errorDetails.equals(that.errorDetails))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ValidatorResult other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResult()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetErrorDetails()).compareTo(other.isSetErrorDetails());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetErrorDetails()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorDetails, other.errorDetails);
- 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("ValidatorResult(");
- boolean first = true;
-
- sb.append("result:");
- sb.append(this.result);
- first = false;
- if (isSetErrorDetails()) {
- if (!first) sb.append(", ");
- sb.append("errorDetails:");
- if (this.errorDetails == null) {
- sb.append("null");
- } else {
- sb.append(this.errorDetails);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetResult()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'result' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ValidatorResultStandardSchemeFactory implements SchemeFactory {
- public ValidatorResultStandardScheme getScheme() {
- return new ValidatorResultStandardScheme();
- }
- }
-
- private static class ValidatorResultStandardScheme extends StandardScheme<ValidatorResult> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ValidatorResult struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // RESULT
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.result = iprot.readBool();
- struct.setResultIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ERROR_DETAILS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.errorDetails = iprot.readString();
- struct.setErrorDetailsIsSet(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();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ValidatorResult struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(RESULT_FIELD_DESC);
- oprot.writeBool(struct.result);
- oprot.writeFieldEnd();
- if (struct.errorDetails != null) {
- if (struct.isSetErrorDetails()) {
- oprot.writeFieldBegin(ERROR_DETAILS_FIELD_DESC);
- oprot.writeString(struct.errorDetails);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ValidatorResultTupleSchemeFactory implements SchemeFactory {
- public ValidatorResultTupleScheme getScheme() {
- return new ValidatorResultTupleScheme();
- }
- }
-
- private static class ValidatorResultTupleScheme extends TupleScheme<ValidatorResult> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeBool(struct.result);
- BitSet optionals = new BitSet();
- if (struct.isSetErrorDetails()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetErrorDetails()) {
- oprot.writeString(struct.errorDetails);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.result = iprot.readBool();
- struct.setResultIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.errorDetails = iprot.readString();
- struct.setErrorDetailsIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/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 8035391..68c37d0 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -304,12 +304,13 @@ service Airavata {
* rather an Airavata Administrator will be notified to take corrective action.
*
*/
- experimentModel.ValidationResults launchExperiment(1: required string airavataExperimentId
- 2: required string airavataCredStoreToken)
+ void launchExperiment(1: required string airavataExperimentId
+ 2: required string airavataCredStoreToken)
throws (1: airavataErrors.InvalidRequestException ire,
2: airavataErrors.ExperimentNotFoundException enf,
3: airavataErrors.AiravataClientException ace,
- 4: airavataErrors.AiravataSystemException ase)
+ 4: airavataErrors.AiravataSystemException ase,
+ 5: airavataErrors.LaunchValidationException lve)
experimentModel.ExperimentStatus getExperimentStatus(1: required string airavataExperimentId)
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataErrors.thrift b/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
index cfb554b..cd7022c 100644
--- a/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataErrors.thrift
@@ -24,6 +24,8 @@
* built in funcationality to raise TApplicationException for all internal server errors.
*/
+include "experimentModel.thrift"
+
namespace java org.apache.airavata.api.error
namespace php Airavata.API.Error
namespace cpp airavata.api.error
@@ -133,6 +135,20 @@ exception AiravataClientException {
2: optional string parameter
}
+struct ValidatorResult {
+ 1: required bool result,
+ 2: optional string errorDetails
+}
+
+struct ValidationResults {
+ 1: required bool validationState,
+ 2: required list<ValidatorResult> validationResultList
+}
+
+exception LaunchValidationException {
+ 1: required ValidationResults validationResult;
+ 2: optional string errorMessage;
+}
/**
* This exception is thrown by Airavata Services when a call fails as a result of
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 315fd85..de43f17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -486,6 +486,7 @@
<module>modules/workflow-model</module>
<module>modules/commons</module>
<module>modules/registry</module>
+ <!--<module>modules/app-catalog</module>-->
<module>modules/airavata-client</module>
<module>modules/credential-store</module>
<module>modules/orchestrator</module>
[2/2] git commit: adding validation fail exception
Posted by ch...@apache.org.
adding validation fail exception
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f9f173cd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f9f173cd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f9f173cd
Branch: refs/heads/master
Commit: f9f173cd4435075e85d9aeeb8eb8ed2cc4dfa55a
Parents: 38f12a0
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri May 16 14:05:26 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri May 16 14:05:26 2014 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 3 +-
.../java/org/apache/airavata/api/Airavata.java | 261 ++++-----
.../api/error/LaunchValidationException.java | 508 +++++++++++++++++
.../airavata/api/error/ValidationResults.java | 546 +++++++++++++++++++
.../airavata/api/error/ValidatorResult.java | 502 +++++++++++++++++
.../src/main/resources/lib/Airavata.cpp | 64 +--
.../src/main/resources/lib/Airavata.h | 39 +-
.../resources/lib/Airavata_server.skeleton.cpp | 2 +-
.../main/resources/lib/airavataErrors_types.cpp | 264 ++++++++-
.../main/resources/lib/airavataErrors_types.h | 151 +++++
.../resources/lib/Airavata/API/Airavata.php | 57 +-
.../resources/lib/Airavata/API/Error/Types.php | 309 +++++++++++
.../workspace/experiment/ValidationResults.java | 543 ------------------
.../workspace/experiment/ValidatorResult.java | 505 -----------------
.../airavataAPI.thrift | 7 +-
.../airavataErrors.thrift | 16 +
pom.xml | 1 +
17 files changed, 2510 insertions(+), 1268 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/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 9513fb2..1beedea 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
@@ -509,7 +509,7 @@ public class AiravataServerHandler implements Airavata.Iface {
* rather an Airavata Administrator will be notified to take corrective action.
*/
@Override
- public ValidationResults launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException {
+ public void launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, LaunchValidationException, TException {
final OrchestratorService.Client orchestratorClient = getOrchestratorClient();
final String expID = airavataExperimentId;
(new Thread(){
@@ -525,7 +525,6 @@ public class AiravataServerHandler implements Airavata.Iface {
}
}
}).start();
- return null;
}
private OrchestratorService.Client getOrchestratorClient() {
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/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 cfae95e..bbc4b56 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
@@ -288,7 +288,7 @@ import org.slf4j.LoggerFactory;
* @param airavataExperimentId
* @param airavataCredStoreToken
*/
- public org.apache.airavata.model.workspace.experiment.ValidationResults launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
+ public void launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.airavata.api.error.LaunchValidationException, org.apache.thrift.TException;
public org.apache.airavata.model.workspace.experiment.ExperimentStatus getExperimentStatus(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException;
@@ -829,10 +829,10 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateExperiment failed: unknown result");
}
- public org.apache.airavata.model.workspace.experiment.ValidationResults launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ public void launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.airavata.api.error.LaunchValidationException, org.apache.thrift.TException
{
send_launchExperiment(airavataExperimentId, airavataCredStoreToken);
- return recv_launchExperiment();
+ recv_launchExperiment();
}
public void send_launchExperiment(String airavataExperimentId, String airavataCredStoreToken) throws org.apache.thrift.TException
@@ -843,13 +843,10 @@ import org.slf4j.LoggerFactory;
sendBase("launchExperiment", args);
}
- public org.apache.airavata.model.workspace.experiment.ValidationResults recv_launchExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
+ public void recv_launchExperiment() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.airavata.api.error.LaunchValidationException, org.apache.thrift.TException
{
launchExperiment_result result = new launchExperiment_result();
receiveBase(result, "launchExperiment");
- if (result.isSetSuccess()) {
- return result.success;
- }
if (result.ire != null) {
throw result.ire;
}
@@ -862,7 +859,10 @@ import org.slf4j.LoggerFactory;
if (result.ase != null) {
throw result.ase;
}
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "launchExperiment failed: unknown result");
+ if (result.lve != null) {
+ throw result.lve;
+ }
+ return;
}
public org.apache.airavata.model.workspace.experiment.ExperimentStatus getExperimentStatus(String airavataExperimentId) throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException
@@ -1479,13 +1479,13 @@ import org.slf4j.LoggerFactory;
prot.writeMessageEnd();
}
- public org.apache.airavata.model.workspace.experiment.ValidationResults getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.thrift.TException {
+ public void getResult() throws org.apache.airavata.api.error.InvalidRequestException, org.apache.airavata.api.error.ExperimentNotFoundException, org.apache.airavata.api.error.AiravataClientException, org.apache.airavata.api.error.AiravataSystemException, org.apache.airavata.api.error.LaunchValidationException, 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_launchExperiment();
+ (new Client(prot)).recv_launchExperiment();
}
}
@@ -2050,7 +2050,7 @@ import org.slf4j.LoggerFactory;
public launchExperiment_result getResult(I iface, launchExperiment_args args) throws org.apache.thrift.TException {
launchExperiment_result result = new launchExperiment_result();
try {
- result.success = iface.launchExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
+ iface.launchExperiment(args.airavataExperimentId, args.airavataCredStoreToken);
} catch (org.apache.airavata.api.error.InvalidRequestException ire) {
result.ire = ire;
} catch (org.apache.airavata.api.error.ExperimentNotFoundException enf) {
@@ -2059,6 +2059,8 @@ import org.slf4j.LoggerFactory;
result.ace = ace;
} catch (org.apache.airavata.api.error.AiravataSystemException ase) {
result.ase = ase;
+ } catch (org.apache.airavata.api.error.LaunchValidationException lve) {
+ result.lve = lve;
}
return result;
}
@@ -3064,7 +3066,7 @@ import org.slf4j.LoggerFactory;
}
}
- public static class launchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchExperiment_args, org.apache.airavata.model.workspace.experiment.ValidationResults> {
+ public static class launchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchExperiment_args, Void> {
public launchExperiment() {
super("launchExperiment");
}
@@ -3073,12 +3075,11 @@ import org.slf4j.LoggerFactory;
return new launchExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ValidationResults> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ValidationResults>() {
- public void onComplete(org.apache.airavata.model.workspace.experiment.ValidationResults o) {
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
launchExperiment_result result = new launchExperiment_result();
- result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -3111,6 +3112,11 @@ import org.slf4j.LoggerFactory;
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.api.error.LaunchValidationException) {
+ result.lve = (org.apache.airavata.api.error.LaunchValidationException) e;
+ result.setLveIsSet(true);
+ msg = result;
+ }
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
@@ -3131,7 +3137,7 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, launchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.experiment.ValidationResults> resultHandler) throws TException {
+ public void start(I iface, launchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.launchExperiment(args.airavataExperimentId, args.airavataCredStoreToken,resultHandler);
}
}
@@ -16353,11 +16359,11 @@ import org.slf4j.LoggerFactory;
public static class launchExperiment_result implements org.apache.thrift.TBase<launchExperiment_result, launchExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ENF_FIELD_DESC = new org.apache.thrift.protocol.TField("enf", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField LVE_FIELD_DESC = new org.apache.thrift.protocol.TField("lve", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -16365,19 +16371,19 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new launchExperiment_resultTupleSchemeFactory());
}
- public org.apache.airavata.model.workspace.experiment.ValidationResults success; // required
public org.apache.airavata.api.error.InvalidRequestException ire; // required
public org.apache.airavata.api.error.ExperimentNotFoundException enf; // required
public org.apache.airavata.api.error.AiravataClientException ace; // required
public org.apache.airavata.api.error.AiravataSystemException ase; // required
+ public org.apache.airavata.api.error.LaunchValidationException lve; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
IRE((short)1, "ire"),
ENF((short)2, "enf"),
ACE((short)3, "ace"),
- ASE((short)4, "ase");
+ ASE((short)4, "ase"),
+ LVE((short)5, "lve");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -16392,8 +16398,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: // ENF
@@ -16402,6 +16406,8 @@ import org.slf4j.LoggerFactory;
return ACE;
case 4: // ASE
return ASE;
+ case 5: // LVE
+ return LVE;
default:
return null;
}
@@ -16445,8 +16451,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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.experiment.ValidationResults.class)));
tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.ENF, new org.apache.thrift.meta_data.FieldMetaData("enf", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -16455,6 +16459,8 @@ import org.slf4j.LoggerFactory;
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)));
+ tmpMap.put(_Fields.LVE, new org.apache.thrift.meta_data.FieldMetaData("lve", 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(launchExperiment_result.class, metaDataMap);
}
@@ -16463,27 +16469,24 @@ import org.slf4j.LoggerFactory;
}
public launchExperiment_result(
- org.apache.airavata.model.workspace.experiment.ValidationResults success,
org.apache.airavata.api.error.InvalidRequestException ire,
org.apache.airavata.api.error.ExperimentNotFoundException enf,
org.apache.airavata.api.error.AiravataClientException ace,
- org.apache.airavata.api.error.AiravataSystemException ase)
+ org.apache.airavata.api.error.AiravataSystemException ase,
+ org.apache.airavata.api.error.LaunchValidationException lve)
{
this();
- this.success = success;
this.ire = ire;
this.enf = enf;
this.ace = ace;
this.ase = ase;
+ this.lve = lve;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public launchExperiment_result(launchExperiment_result other) {
- if (other.isSetSuccess()) {
- this.success = new org.apache.airavata.model.workspace.experiment.ValidationResults(other.success);
- }
if (other.isSetIre()) {
this.ire = new org.apache.airavata.api.error.InvalidRequestException(other.ire);
}
@@ -16496,6 +16499,9 @@ import org.slf4j.LoggerFactory;
if (other.isSetAse()) {
this.ase = new org.apache.airavata.api.error.AiravataSystemException(other.ase);
}
+ if (other.isSetLve()) {
+ this.lve = new org.apache.airavata.api.error.LaunchValidationException(other.lve);
+ }
}
public launchExperiment_result deepCopy() {
@@ -16504,35 +16510,11 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
- this.success = null;
this.ire = null;
this.enf = null;
this.ace = null;
this.ase = null;
- }
-
- public org.apache.airavata.model.workspace.experiment.ValidationResults getSuccess() {
- return this.success;
- }
-
- public launchExperiment_result setSuccess(org.apache.airavata.model.workspace.experiment.ValidationResults 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;
- }
+ this.lve = null;
}
public org.apache.airavata.api.error.InvalidRequestException getIre() {
@@ -16631,16 +16613,32 @@ import org.slf4j.LoggerFactory;
}
}
+ public org.apache.airavata.api.error.LaunchValidationException getLve() {
+ return this.lve;
+ }
+
+ public launchExperiment_result setLve(org.apache.airavata.api.error.LaunchValidationException lve) {
+ this.lve = lve;
+ return this;
+ }
+
+ public void unsetLve() {
+ this.lve = null;
+ }
+
+ /** Returns true if field lve is set (has been assigned a value) and false otherwise */
+ public boolean isSetLve() {
+ return this.lve != null;
+ }
+
+ public void setLveIsSet(boolean value) {
+ if (!value) {
+ this.lve = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((org.apache.airavata.model.workspace.experiment.ValidationResults)value);
- }
- break;
-
case IRE:
if (value == null) {
unsetIre();
@@ -16673,14 +16671,19 @@ import org.slf4j.LoggerFactory;
}
break;
+ case LVE:
+ if (value == null) {
+ unsetLve();
+ } else {
+ setLve((org.apache.airavata.api.error.LaunchValidationException)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return getSuccess();
-
case IRE:
return getIre();
@@ -16693,6 +16696,9 @@ import org.slf4j.LoggerFactory;
case ASE:
return getAse();
+ case LVE:
+ return getLve();
+
}
throw new IllegalStateException();
}
@@ -16704,8 +16710,6 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case SUCCESS:
- return isSetSuccess();
case IRE:
return isSetIre();
case ENF:
@@ -16714,6 +16718,8 @@ import org.slf4j.LoggerFactory;
return isSetAce();
case ASE:
return isSetAse();
+ case LVE:
+ return isSetLve();
}
throw new IllegalStateException();
}
@@ -16731,15 +16737,6 @@ import org.slf4j.LoggerFactory;
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) {
@@ -16776,6 +16773,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_lve = true && this.isSetLve();
+ boolean that_present_lve = true && that.isSetLve();
+ if (this_present_lve || that_present_lve) {
+ if (!(this_present_lve && that_present_lve))
+ return false;
+ if (!this.lve.equals(that.lve))
+ return false;
+ }
+
return true;
}
@@ -16792,16 +16798,6 @@ import org.slf4j.LoggerFactory;
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;
@@ -16842,6 +16838,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetLve()).compareTo(other.isSetLve());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLve()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lve, other.lve);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -16862,14 +16868,6 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("launchExperiment_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");
@@ -16901,6 +16899,14 @@ import org.slf4j.LoggerFactory;
sb.append(this.ase);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("lve:");
+ if (this.lve == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lve);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -16908,9 +16914,6 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (success != null) {
- success.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -16947,15 +16950,6 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new org.apache.airavata.model.workspace.experiment.ValidationResults();
- struct.success.read(iprot);
- 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.api.error.InvalidRequestException();
@@ -16992,6 +16986,15 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 5: // LVE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.lve = new org.apache.airavata.api.error.LaunchValidationException();
+ struct.lve.read(iprot);
+ struct.setLveIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -17007,11 +17010,6 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
if (struct.ire != null) {
oprot.writeFieldBegin(IRE_FIELD_DESC);
struct.ire.write(oprot);
@@ -17032,6 +17030,11 @@ import org.slf4j.LoggerFactory;
struct.ase.write(oprot);
oprot.writeFieldEnd();
}
+ if (struct.lve != null) {
+ oprot.writeFieldBegin(LVE_FIELD_DESC);
+ struct.lve.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -17050,25 +17053,22 @@ import org.slf4j.LoggerFactory;
public void write(org.apache.thrift.protocol.TProtocol prot, launchExperiment_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
+ if (struct.isSetIre()) {
optionals.set(0);
}
- if (struct.isSetIre()) {
+ if (struct.isSetEnf()) {
optionals.set(1);
}
- if (struct.isSetEnf()) {
+ if (struct.isSetAce()) {
optionals.set(2);
}
- if (struct.isSetAce()) {
+ if (struct.isSetAse()) {
optionals.set(3);
}
- if (struct.isSetAse()) {
+ if (struct.isSetLve()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
if (struct.isSetIre()) {
struct.ire.write(oprot);
}
@@ -17081,6 +17081,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetAse()) {
struct.ase.write(oprot);
}
+ if (struct.isSetLve()) {
+ struct.lve.write(oprot);
+ }
}
@Override
@@ -17088,30 +17091,30 @@ import org.slf4j.LoggerFactory;
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
- struct.success = new org.apache.airavata.model.workspace.experiment.ValidationResults();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
struct.ire = new org.apache.airavata.api.error.InvalidRequestException();
struct.ire.read(iprot);
struct.setIreIsSet(true);
}
- if (incoming.get(2)) {
+ if (incoming.get(1)) {
struct.enf = new org.apache.airavata.api.error.ExperimentNotFoundException();
struct.enf.read(iprot);
struct.setEnfIsSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(2)) {
struct.ace = new org.apache.airavata.api.error.AiravataClientException();
struct.ace.read(iprot);
struct.setAceIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(3)) {
struct.ase = new org.apache.airavata.api.error.AiravataSystemException();
struct.ase.read(iprot);
struct.setAseIsSet(true);
}
+ if (incoming.get(4)) {
+ struct.lve = new org.apache.airavata.api.error.LaunchValidationException();
+ struct.lve.read(iprot);
+ struct.setLveIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/LaunchValidationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/LaunchValidationException.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/LaunchValidationException.java
new file mode 100644
index 0000000..bf38c54
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/LaunchValidationException.java
@@ -0,0 +1,508 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class LaunchValidationException extends TException implements org.apache.thrift.TBase<LaunchValidationException, LaunchValidationException._Fields>, java.io.Serializable, Cloneable, Comparable<LaunchValidationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LaunchValidationException");
+
+ private static final org.apache.thrift.protocol.TField VALIDATION_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("validationResult", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorMessage", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LaunchValidationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LaunchValidationExceptionTupleSchemeFactory());
+ }
+
+ public ValidationResults validationResult; // required
+ public String errorMessage; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ VALIDATION_RESULT((short)1, "validationResult"),
+ ERROR_MESSAGE((short)2, "errorMessage");
+
+ 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: // VALIDATION_RESULT
+ return VALIDATION_RESULT;
+ case 2: // ERROR_MESSAGE
+ return ERROR_MESSAGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private _Fields optionals[] = {_Fields.ERROR_MESSAGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.VALIDATION_RESULT, new org.apache.thrift.meta_data.FieldMetaData("validationResult", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ValidationResults.class)));
+ tmpMap.put(_Fields.ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errorMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LaunchValidationException.class, metaDataMap);
+ }
+
+ public LaunchValidationException() {
+ }
+
+ public LaunchValidationException(
+ ValidationResults validationResult)
+ {
+ this();
+ this.validationResult = validationResult;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LaunchValidationException(LaunchValidationException other) {
+ if (other.isSetValidationResult()) {
+ this.validationResult = new ValidationResults(other.validationResult);
+ }
+ if (other.isSetErrorMessage()) {
+ this.errorMessage = other.errorMessage;
+ }
+ }
+
+ public LaunchValidationException deepCopy() {
+ return new LaunchValidationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.validationResult = null;
+ this.errorMessage = null;
+ }
+
+ public ValidationResults getValidationResult() {
+ return this.validationResult;
+ }
+
+ public LaunchValidationException setValidationResult(ValidationResults validationResult) {
+ this.validationResult = validationResult;
+ return this;
+ }
+
+ public void unsetValidationResult() {
+ this.validationResult = null;
+ }
+
+ /** Returns true if field validationResult is set (has been assigned a value) and false otherwise */
+ public boolean isSetValidationResult() {
+ return this.validationResult != null;
+ }
+
+ public void setValidationResultIsSet(boolean value) {
+ if (!value) {
+ this.validationResult = null;
+ }
+ }
+
+ public String getErrorMessage() {
+ return this.errorMessage;
+ }
+
+ public LaunchValidationException setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ return this;
+ }
+
+ public void unsetErrorMessage() {
+ this.errorMessage = null;
+ }
+
+ /** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorMessage() {
+ return this.errorMessage != null;
+ }
+
+ public void setErrorMessageIsSet(boolean value) {
+ if (!value) {
+ this.errorMessage = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VALIDATION_RESULT:
+ if (value == null) {
+ unsetValidationResult();
+ } else {
+ setValidationResult((ValidationResults)value);
+ }
+ break;
+
+ case ERROR_MESSAGE:
+ if (value == null) {
+ unsetErrorMessage();
+ } else {
+ setErrorMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VALIDATION_RESULT:
+ return getValidationResult();
+
+ case ERROR_MESSAGE:
+ return getErrorMessage();
+
+ }
+ 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 VALIDATION_RESULT:
+ return isSetValidationResult();
+ case ERROR_MESSAGE:
+ return isSetErrorMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LaunchValidationException)
+ return this.equals((LaunchValidationException)that);
+ return false;
+ }
+
+ public boolean equals(LaunchValidationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_validationResult = true && this.isSetValidationResult();
+ boolean that_present_validationResult = true && that.isSetValidationResult();
+ if (this_present_validationResult || that_present_validationResult) {
+ if (!(this_present_validationResult && that_present_validationResult))
+ return false;
+ if (!this.validationResult.equals(that.validationResult))
+ return false;
+ }
+
+ boolean this_present_errorMessage = true && this.isSetErrorMessage();
+ boolean that_present_errorMessage = true && that.isSetErrorMessage();
+ if (this_present_errorMessage || that_present_errorMessage) {
+ if (!(this_present_errorMessage && that_present_errorMessage))
+ return false;
+ if (!this.errorMessage.equals(that.errorMessage))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LaunchValidationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetValidationResult()).compareTo(other.isSetValidationResult());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValidationResult()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationResult, other.validationResult);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage);
+ 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("LaunchValidationException(");
+ boolean first = true;
+
+ sb.append("validationResult:");
+ if (this.validationResult == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.validationResult);
+ }
+ first = false;
+ if (isSetErrorMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("errorMessage:");
+ if (this.errorMessage == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorMessage);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (validationResult == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationResult' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (validationResult != null) {
+ validationResult.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class LaunchValidationExceptionStandardSchemeFactory implements SchemeFactory {
+ public LaunchValidationExceptionStandardScheme getScheme() {
+ return new LaunchValidationExceptionStandardScheme();
+ }
+ }
+
+ private static class LaunchValidationExceptionStandardScheme extends StandardScheme<LaunchValidationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LaunchValidationException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // VALIDATION_RESULT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.validationResult = new ValidationResults();
+ struct.validationResult.read(iprot);
+ struct.setValidationResultIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ERROR_MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.errorMessage = iprot.readString();
+ struct.setErrorMessageIsSet(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, LaunchValidationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.validationResult != null) {
+ oprot.writeFieldBegin(VALIDATION_RESULT_FIELD_DESC);
+ struct.validationResult.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.errorMessage != null) {
+ if (struct.isSetErrorMessage()) {
+ oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.errorMessage);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LaunchValidationExceptionTupleSchemeFactory implements SchemeFactory {
+ public LaunchValidationExceptionTupleScheme getScheme() {
+ return new LaunchValidationExceptionTupleScheme();
+ }
+ }
+
+ private static class LaunchValidationExceptionTupleScheme extends TupleScheme<LaunchValidationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LaunchValidationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.validationResult.write(oprot);
+ BitSet optionals = new BitSet();
+ if (struct.isSetErrorMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetErrorMessage()) {
+ oprot.writeString(struct.errorMessage);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LaunchValidationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.validationResult = new ValidationResults();
+ struct.validationResult.read(iprot);
+ struct.setValidationResultIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.errorMessage = iprot.readString();
+ struct.setErrorMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidationResults.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidationResults.java
new file mode 100644
index 0000000..e5e7c1c
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidationResults.java
@@ -0,0 +1,546 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>, java.io.Serializable, Cloneable, Comparable<ValidationResults> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
+
+ private static final org.apache.thrift.protocol.TField VALIDATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("validationState", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField VALIDATION_RESULT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validationResultList", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ValidationResultsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ValidationResultsTupleSchemeFactory());
+ }
+
+ public boolean validationState; // required
+ public List<ValidatorResult> validationResultList; // 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 {
+ VALIDATION_STATE((short)1, "validationState"),
+ VALIDATION_RESULT_LIST((short)2, "validationResultList");
+
+ 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: // VALIDATION_STATE
+ return VALIDATION_STATE;
+ case 2: // VALIDATION_RESULT_LIST
+ return VALIDATION_RESULT_LIST;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __VALIDATIONSTATE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.VALIDATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("validationState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.VALIDATION_RESULT_LIST, new org.apache.thrift.meta_data.FieldMetaData("validationResultList", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ValidatorResult.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidationResults.class, metaDataMap);
+ }
+
+ public ValidationResults() {
+ }
+
+ public ValidationResults(
+ boolean validationState,
+ List<ValidatorResult> validationResultList)
+ {
+ this();
+ this.validationState = validationState;
+ setValidationStateIsSet(true);
+ this.validationResultList = validationResultList;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ValidationResults(ValidationResults other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.validationState = other.validationState;
+ if (other.isSetValidationResultList()) {
+ List<ValidatorResult> __this__validationResultList = new ArrayList<ValidatorResult>(other.validationResultList.size());
+ for (ValidatorResult other_element : other.validationResultList) {
+ __this__validationResultList.add(new ValidatorResult(other_element));
+ }
+ this.validationResultList = __this__validationResultList;
+ }
+ }
+
+ public ValidationResults deepCopy() {
+ return new ValidationResults(this);
+ }
+
+ @Override
+ public void clear() {
+ setValidationStateIsSet(false);
+ this.validationState = false;
+ this.validationResultList = null;
+ }
+
+ public boolean isValidationState() {
+ return this.validationState;
+ }
+
+ public ValidationResults setValidationState(boolean validationState) {
+ this.validationState = validationState;
+ setValidationStateIsSet(true);
+ return this;
+ }
+
+ public void unsetValidationState() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+ }
+
+ /** Returns true if field validationState is set (has been assigned a value) and false otherwise */
+ public boolean isSetValidationState() {
+ return EncodingUtils.testBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+ }
+
+ public void setValidationStateIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID, value);
+ }
+
+ public int getValidationResultListSize() {
+ return (this.validationResultList == null) ? 0 : this.validationResultList.size();
+ }
+
+ public java.util.Iterator<ValidatorResult> getValidationResultListIterator() {
+ return (this.validationResultList == null) ? null : this.validationResultList.iterator();
+ }
+
+ public void addToValidationResultList(ValidatorResult elem) {
+ if (this.validationResultList == null) {
+ this.validationResultList = new ArrayList<ValidatorResult>();
+ }
+ this.validationResultList.add(elem);
+ }
+
+ public List<ValidatorResult> getValidationResultList() {
+ return this.validationResultList;
+ }
+
+ public ValidationResults setValidationResultList(List<ValidatorResult> validationResultList) {
+ this.validationResultList = validationResultList;
+ return this;
+ }
+
+ public void unsetValidationResultList() {
+ this.validationResultList = null;
+ }
+
+ /** Returns true if field validationResultList is set (has been assigned a value) and false otherwise */
+ public boolean isSetValidationResultList() {
+ return this.validationResultList != null;
+ }
+
+ public void setValidationResultListIsSet(boolean value) {
+ if (!value) {
+ this.validationResultList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VALIDATION_STATE:
+ if (value == null) {
+ unsetValidationState();
+ } else {
+ setValidationState((Boolean)value);
+ }
+ break;
+
+ case VALIDATION_RESULT_LIST:
+ if (value == null) {
+ unsetValidationResultList();
+ } else {
+ setValidationResultList((List<ValidatorResult>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VALIDATION_STATE:
+ return Boolean.valueOf(isValidationState());
+
+ case VALIDATION_RESULT_LIST:
+ return getValidationResultList();
+
+ }
+ 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 VALIDATION_STATE:
+ return isSetValidationState();
+ case VALIDATION_RESULT_LIST:
+ return isSetValidationResultList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ValidationResults)
+ return this.equals((ValidationResults)that);
+ return false;
+ }
+
+ public boolean equals(ValidationResults that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_validationState = true;
+ boolean that_present_validationState = true;
+ if (this_present_validationState || that_present_validationState) {
+ if (!(this_present_validationState && that_present_validationState))
+ return false;
+ if (this.validationState != that.validationState)
+ return false;
+ }
+
+ boolean this_present_validationResultList = true && this.isSetValidationResultList();
+ boolean that_present_validationResultList = true && that.isSetValidationResultList();
+ if (this_present_validationResultList || that_present_validationResultList) {
+ if (!(this_present_validationResultList && that_present_validationResultList))
+ return false;
+ if (!this.validationResultList.equals(that.validationResultList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ValidationResults other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetValidationState()).compareTo(other.isSetValidationState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValidationState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationState, other.validationState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValidationResultList()).compareTo(other.isSetValidationResultList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValidationResultList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationResultList, other.validationResultList);
+ 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("ValidationResults(");
+ boolean first = true;
+
+ sb.append("validationState:");
+ sb.append(this.validationState);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("validationResultList:");
+ if (this.validationResultList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.validationResultList);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // alas, we cannot check 'validationState' because it's a primitive and you chose the non-beans generator.
+ if (validationResultList == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationResultList' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ValidationResultsStandardSchemeFactory implements SchemeFactory {
+ public ValidationResultsStandardScheme getScheme() {
+ return new ValidationResultsStandardScheme();
+ }
+ }
+
+ private static class ValidationResultsStandardScheme extends StandardScheme<ValidationResults> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ValidationResults struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // VALIDATION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.validationState = iprot.readBool();
+ struct.setValidationStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VALIDATION_RESULT_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.validationResultList = new ArrayList<ValidatorResult>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ ValidatorResult _elem2;
+ _elem2 = new ValidatorResult();
+ _elem2.read(iprot);
+ struct.validationResultList.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setValidationResultListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!struct.isSetValidationState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationState' was not found in serialized data! Struct: " + toString());
+ }
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ValidationResults struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(VALIDATION_STATE_FIELD_DESC);
+ oprot.writeBool(struct.validationState);
+ oprot.writeFieldEnd();
+ if (struct.validationResultList != null) {
+ oprot.writeFieldBegin(VALIDATION_RESULT_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.validationResultList.size()));
+ for (ValidatorResult _iter3 : struct.validationResultList)
+ {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ValidationResultsTupleSchemeFactory implements SchemeFactory {
+ public ValidationResultsTupleScheme getScheme() {
+ return new ValidationResultsTupleScheme();
+ }
+ }
+
+ private static class ValidationResultsTupleScheme extends TupleScheme<ValidationResults> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.validationState);
+ {
+ oprot.writeI32(struct.validationResultList.size());
+ for (ValidatorResult _iter4 : struct.validationResultList)
+ {
+ _iter4.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.validationState = iprot.readBool();
+ struct.setValidationStateIsSet(true);
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.validationResultList = new ArrayList<ValidatorResult>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ ValidatorResult _elem7;
+ _elem7 = new ValidatorResult();
+ _elem7.read(iprot);
+ struct.validationResultList.add(_elem7);
+ }
+ }
+ struct.setValidationResultListIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f9f173cd/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidatorResult.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidatorResult.java
new file mode 100644
index 0000000..beac5eb
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/error/ValidatorResult.java
@@ -0,0 +1,502 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.api.error;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>, java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
+
+ private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField ERROR_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("errorDetails", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ValidatorResultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ValidatorResultTupleSchemeFactory());
+ }
+
+ public boolean result; // required
+ public String errorDetails; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RESULT((short)1, "result"),
+ ERROR_DETAILS((short)2, "errorDetails");
+
+ 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: // RESULT
+ return RESULT;
+ case 2: // ERROR_DETAILS
+ return ERROR_DETAILS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RESULT_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.ERROR_DETAILS};
+ 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.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.ERROR_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("errorDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidatorResult.class, metaDataMap);
+ }
+
+ public ValidatorResult() {
+ }
+
+ public ValidatorResult(
+ boolean result)
+ {
+ this();
+ this.result = result;
+ setResultIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ValidatorResult(ValidatorResult other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.result = other.result;
+ if (other.isSetErrorDetails()) {
+ this.errorDetails = other.errorDetails;
+ }
+ }
+
+ public ValidatorResult deepCopy() {
+ return new ValidatorResult(this);
+ }
+
+ @Override
+ public void clear() {
+ setResultIsSet(false);
+ this.result = false;
+ this.errorDetails = null;
+ }
+
+ public boolean isResult() {
+ return this.result;
+ }
+
+ public ValidatorResult setResult(boolean result) {
+ this.result = result;
+ setResultIsSet(true);
+ return this;
+ }
+
+ public void unsetResult() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
+ }
+
+ /** Returns true if field result is set (has been assigned a value) and false otherwise */
+ public boolean isSetResult() {
+ return EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
+ }
+
+ public void setResultIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value);
+ }
+
+ public String getErrorDetails() {
+ return this.errorDetails;
+ }
+
+ public ValidatorResult setErrorDetails(String errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ public void unsetErrorDetails() {
+ this.errorDetails = null;
+ }
+
+ /** Returns true if field errorDetails is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorDetails() {
+ return this.errorDetails != null;
+ }
+
+ public void setErrorDetailsIsSet(boolean value) {
+ if (!value) {
+ this.errorDetails = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RESULT:
+ if (value == null) {
+ unsetResult();
+ } else {
+ setResult((Boolean)value);
+ }
+ break;
+
+ case ERROR_DETAILS:
+ if (value == null) {
+ unsetErrorDetails();
+ } else {
+ setErrorDetails((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RESULT:
+ return Boolean.valueOf(isResult());
+
+ case ERROR_DETAILS:
+ return getErrorDetails();
+
+ }
+ 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 RESULT:
+ return isSetResult();
+ case ERROR_DETAILS:
+ return isSetErrorDetails();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ValidatorResult)
+ return this.equals((ValidatorResult)that);
+ return false;
+ }
+
+ public boolean equals(ValidatorResult that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_result = true;
+ boolean that_present_result = true;
+ if (this_present_result || that_present_result) {
+ if (!(this_present_result && that_present_result))
+ return false;
+ if (this.result != that.result)
+ return false;
+ }
+
+ boolean this_present_errorDetails = true && this.isSetErrorDetails();
+ boolean that_present_errorDetails = true && that.isSetErrorDetails();
+ if (this_present_errorDetails || that_present_errorDetails) {
+ if (!(this_present_errorDetails && that_present_errorDetails))
+ return false;
+ if (!this.errorDetails.equals(that.errorDetails))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ValidatorResult other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResult()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrorDetails()).compareTo(other.isSetErrorDetails());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorDetails()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorDetails, other.errorDetails);
+ 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("ValidatorResult(");
+ boolean first = true;
+
+ sb.append("result:");
+ sb.append(this.result);
+ first = false;
+ if (isSetErrorDetails()) {
+ if (!first) sb.append(", ");
+ sb.append("errorDetails:");
+ if (this.errorDetails == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorDetails);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // alas, we cannot check 'result' because it's a primitive and you chose the non-beans generator.
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ValidatorResultStandardSchemeFactory implements SchemeFactory {
+ public ValidatorResultStandardScheme getScheme() {
+ return new ValidatorResultStandardScheme();
+ }
+ }
+
+ private static class ValidatorResultStandardScheme extends StandardScheme<ValidatorResult> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ValidatorResult struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RESULT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.result = iprot.readBool();
+ struct.setResultIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ERROR_DETAILS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.errorDetails = iprot.readString();
+ struct.setErrorDetailsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!struct.isSetResult()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'result' was not found in serialized data! Struct: " + toString());
+ }
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ValidatorResult struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(RESULT_FIELD_DESC);
+ oprot.writeBool(struct.result);
+ oprot.writeFieldEnd();
+ if (struct.errorDetails != null) {
+ if (struct.isSetErrorDetails()) {
+ oprot.writeFieldBegin(ERROR_DETAILS_FIELD_DESC);
+ oprot.writeString(struct.errorDetails);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ValidatorResultTupleSchemeFactory implements SchemeFactory {
+ public ValidatorResultTupleScheme getScheme() {
+ return new ValidatorResultTupleScheme();
+ }
+ }
+
+ private static class ValidatorResultTupleScheme extends TupleScheme<ValidatorResult> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.result);
+ BitSet optionals = new BitSet();
+ if (struct.isSetErrorDetails()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetErrorDetails()) {
+ oprot.writeString(struct.errorDetails);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.result = iprot.readBool();
+ struct.setResultIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.errorDetails = iprot.readString();
+ struct.setErrorDetailsIsSet(true);
+ }
+ }
+ }
+
+}
+