You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/11/10 20:08:41 UTC
[1/7] airavata git commit: AIRAVATA-2207 Add getExperimentByAdmin
method
Repository: airavata
Updated Branches:
refs/heads/develop 93431b19c -> 400e24d63
http://git-wip-us.apache.org/repos/asf/airavata/blob/0fda5a8f/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 0cea7e2..0b614c2 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
@@ -880,6 +880,67 @@ interface AiravataIf {
*/
public function getExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
/**
+ * *
+ * * Get Experiment by an admin user
+ * *
+ * * Used by an admin user to fetch previously created experiment metadata.
+ * *
+ * * @param airavataExperimentId
+ * * The unique identifier of the requested experiment. This ID is returned during the create experiment step.
+ * *
+ * * @return ExperimentModel
+ * * This method will return the previously stored experiment metadata.
+ * *
+ * * @throws org.apache.airavata.model.error.InvalidRequestException
+ * * For any incorrect forming of the request itself.
+ * *
+ * * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ * *
+ * * @throws org.apache.airavata.model.error.AiravataClientException
+ * * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ * *
+ * * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * * gateway registration steps and retry this request.
+ * *
+ * * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * * For now this is a place holder.
+ * *
+ * * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * * is implemented, the authorization will be more substantial.
+ * *
+ * * @throws org.apache.airavata.model.error.AiravataSystemException
+ * * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * * rather an Airavata Administrator will be notified to take corrective action.
+ * *
+ * *
+ *
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $airavataExperimentId
+ * @return \Airavata\Model\Experiment\ExperimentModel A structure holding the experiment metadata and its child models.
+ *
+ * userName:
+ * The user name of the targeted gateway end user on whose behalf the experiment is being created.
+ * the associated gateway identity can only be inferred from the security hand-shake so as to avoid
+ * authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
+ * Airavata, an authorization exception is thrown.
+ *
+ * experimentName:
+ * The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
+ * by the generated experiment id.
+ *
+ * experimentDescription:
+ * The verbose description of the experiment. This is an optional parameter.
+ *
+ * @throws \Airavata\API\Error\InvalidRequestException
+ * @throws \Airavata\API\Error\ExperimentNotFoundException
+ * @throws \Airavata\API\Error\AiravataClientException
+ * @throws \Airavata\API\Error\AiravataSystemException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
+ /**
*
* Get Complete Experiment Details
* Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
@@ -6375,6 +6436,73 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("getExperiment failed: unknown result");
}
+ public function getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
+ {
+ $this->send_getExperimentByAdmin($authzToken, $airavataExperimentId);
+ return $this->recv_getExperimentByAdmin();
+ }
+
+ public function send_getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
+ {
+ $args = new \Airavata\API\Airavata_getExperimentByAdmin_args();
+ $args->authzToken = $authzToken;
+ $args->airavataExperimentId = $airavataExperimentId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getExperimentByAdmin', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getExperimentByAdmin', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getExperimentByAdmin()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getExperimentByAdmin_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \Airavata\API\Airavata_getExperimentByAdmin_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ire !== null) {
+ throw $result->ire;
+ }
+ if ($result->enf !== null) {
+ throw $result->enf;
+ }
+ if ($result->ace !== null) {
+ throw $result->ace;
+ }
+ if ($result->ase !== null) {
+ throw $result->ase;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getExperimentByAdmin failed: unknown result");
+ }
+
public function getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
{
$this->send_getDetailedExperimentTree($authzToken, $airavataExperimentId);
@@ -26253,6 +26381,314 @@ class Airavata_getExperiment_result {
}
+class Airavata_getExperimentByAdmin_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $airavataExperimentId = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'authzToken',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Security\AuthzToken',
+ ),
+ 2 => array(
+ 'var' => 'airavataExperimentId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['airavataExperimentId'])) {
+ $this->airavataExperimentId = $vals['airavataExperimentId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_getExperimentByAdmin_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+ $xfer += $this->authzToken->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->airavataExperimentId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_getExperimentByAdmin_args');
+ if ($this->authzToken !== null) {
+ if (!is_object($this->authzToken)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+ $xfer += $this->authzToken->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->airavataExperimentId !== null) {
+ $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+ $xfer += $output->writeString($this->airavataExperimentId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_getExperimentByAdmin_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Experiment\ExperimentModel
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\API\Error\InvalidRequestException
+ */
+ public $ire = null;
+ /**
+ * @var \Airavata\API\Error\ExperimentNotFoundException
+ */
+ public $enf = null;
+ /**
+ * @var \Airavata\API\Error\AiravataClientException
+ */
+ public $ace = null;
+ /**
+ * @var \Airavata\API\Error\AiravataSystemException
+ */
+ public $ase = null;
+ /**
+ * @var \Airavata\API\Error\AuthorizationException
+ */
+ public $ae = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Experiment\ExperimentModel',
+ ),
+ 1 => array(
+ 'var' => 'ire',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\InvalidRequestException',
+ ),
+ 2 => array(
+ 'var' => 'enf',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+ ),
+ 3 => array(
+ 'var' => 'ace',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataClientException',
+ ),
+ 4 => array(
+ 'var' => 'ase',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataSystemException',
+ ),
+ 5 => array(
+ 'var' => 'ae',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AuthorizationException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ire'])) {
+ $this->ire = $vals['ire'];
+ }
+ if (isset($vals['enf'])) {
+ $this->enf = $vals['enf'];
+ }
+ if (isset($vals['ace'])) {
+ $this->ace = $vals['ace'];
+ }
+ if (isset($vals['ase'])) {
+ $this->ase = $vals['ase'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_getExperimentByAdmin_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new \Airavata\Model\Experiment\ExperimentModel();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ire = new \Airavata\API\Error\InvalidRequestException();
+ $xfer += $this->ire->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+ $xfer += $this->enf->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->ace = new \Airavata\API\Error\AiravataClientException();
+ $xfer += $this->ace->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->ase = new \Airavata\API\Error\AiravataSystemException();
+ $xfer += $this->ase->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRUCT) {
+ $this->ae = new \Airavata\API\Error\AuthorizationException();
+ $xfer += $this->ae->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_getExperimentByAdmin_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);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->enf !== null) {
+ $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+ $xfer += $this->enf->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ace !== null) {
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+ $xfer += $this->ace->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ase !== null) {
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+ $xfer += $this->ase->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_getDetailedExperimentTree_args {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0fda5a8f/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml b/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
index c5532e2..02319e3 100644
--- a/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
+++ b/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
@@ -68,6 +68,7 @@
/airavata/createExperiment|
/airavata/deleteExperiment|
/airavata/getExperiment|
+/airavata/getExperimentByAdmin|
/airavata/getDetailedExperimentTree|
/airavata/updateExperiment|
/airavata/updateExperimentConfiguration|
http://git-wip-us.apache.org/repos/asf/airavata/blob/0fda5a8f/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index c37bb7d..f64aeb4 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -818,6 +818,49 @@ service Airavata {
/**
*
+ * Get Experiment by an admin user
+ *
+ * Used by an admin user to fetch previously created experiment metadata.
+ *
+ * @param airavataExperimentId
+ * The unique identifier of the requested experiment. This ID is returned during the create experiment step.
+ *
+ * @return ExperimentModel
+ * This method will return the previously stored experiment metadata.
+ *
+ * @throws org.apache.airavata.model.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.model.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.model.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ **/
+ experiment_model.ExperimentModel getExperimentByAdmin(1: required security_model.AuthzToken authzToken,
+ 2: required string airavataExperimentId)
+ throws (1: airavata_errors.InvalidRequestException ire,
+ 2: airavata_errors.ExperimentNotFoundException enf,
+ 3: airavata_errors.AiravataClientException ace,
+ 4: airavata_errors.AiravataSystemException ase,
+ 5: airavata_errors.AuthorizationException ae)
+ /**
+ *
* Get Complete Experiment Details
* Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
* tasks -> jobs information.
[7/7] airavata git commit: Merge branch
'AIRAVATA-2207-admins-cant-see-exp-summary' of
https://github.com/machristie/airavata into develop
Posted by sc...@apache.org.
Merge branch 'AIRAVATA-2207-admins-cant-see-exp-summary' of https://github.com/machristie/airavata into develop
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/400e24d6
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/400e24d6
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/400e24d6
Branch: refs/heads/develop
Commit: 400e24d6331251dea15fa9516d7facb0303a79ff
Parents: 93431b1 5f3b778
Author: scnakandala <su...@gmail.com>
Authored: Thu Nov 10 15:08:27 2016 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Thu Nov 10 15:08:27 2016 -0500
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 177 +-
.../java/org/apache/airavata/api/Airavata.java | 7160 +++++++++++++-----
.../resources/lib/Airavata/API/Airavata.php | 1501 +++-
.../resources/airavata-default-xacml-policy.xml | 2 +
.../airavata-apis/airavata_api.thrift | 97 +
5 files changed, 6775 insertions(+), 2162 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/400e24d6/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
[2/7] airavata git commit: AIRAVATA-2207 Add getExperimentByAdmin
method
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0fda5a8f/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 4441999..bf248b7 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
@@ -736,6 +736,48 @@ public class Airavata {
public org.apache.airavata.model.experiment.ExperimentModel getExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
/**
+ * *
+ * * Get Experiment by an admin user
+ * *
+ * * Used by an admin user to fetch previously created experiment metadata.
+ * *
+ * * @param airavataExperimentId
+ * * The unique identifier of the requested experiment. This ID is returned during the create experiment step.
+ * *
+ * * @return ExperimentModel
+ * * This method will return the previously stored experiment metadata.
+ * *
+ * * @throws org.apache.airavata.model.error.InvalidRequestException
+ * * For any incorrect forming of the request itself.
+ * *
+ * * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ * *
+ * * @throws org.apache.airavata.model.error.AiravataClientException
+ * * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ * *
+ * * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * * gateway registration steps and retry this request.
+ * *
+ * * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * * For now this is a place holder.
+ * *
+ * * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * * is implemented, the authorization will be more substantial.
+ * *
+ * * @throws org.apache.airavata.model.error.AiravataSystemException
+ * * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * * rather an Airavata Administrator will be notified to take corrective action.
+ * *
+ * *
+ *
+ * @param authzToken
+ * @param airavataExperimentId
+ */
+ public org.apache.airavata.model.experiment.ExperimentModel getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+
+ /**
*
* Get Complete Experiment Details
* Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
@@ -3004,6 +3046,8 @@ public class Airavata {
public void getExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void getDetailedExperimentTree(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void updateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.airavata.model.experiment.ExperimentModel experiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -4636,6 +4680,45 @@ public class Airavata {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperiment failed: unknown result");
}
+ public org.apache.airavata.model.experiment.ExperimentModel getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ {
+ send_getExperimentByAdmin(authzToken, airavataExperimentId);
+ return recv_getExperimentByAdmin();
+ }
+
+ public void send_getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId) throws org.apache.thrift.TException
+ {
+ getExperimentByAdmin_args args = new getExperimentByAdmin_args();
+ args.setAuthzToken(authzToken);
+ args.setAiravataExperimentId(airavataExperimentId);
+ sendBase("getExperimentByAdmin", args);
+ }
+
+ public org.apache.airavata.model.experiment.ExperimentModel recv_getExperimentByAdmin() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ {
+ getExperimentByAdmin_result result = new getExperimentByAdmin_result();
+ receiveBase(result, "getExperimentByAdmin");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ if (result.ae != null) {
+ throw result.ae;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExperimentByAdmin failed: unknown result");
+ }
+
public org.apache.airavata.model.experiment.ExperimentModel getDetailedExperimentTree(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getDetailedExperimentTree(authzToken, airavataExperimentId);
@@ -10863,6 +10946,41 @@ public class Airavata {
}
}
+ public void getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getExperimentByAdmin_call method_call = new getExperimentByAdmin_call(authzToken, airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getExperimentByAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.security.AuthzToken authzToken;
+ private String airavataExperimentId;
+ public getExperimentByAdmin_call(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.authzToken = authzToken;
+ this.airavataExperimentId = airavataExperimentId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExperimentByAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getExperimentByAdmin_args args = new getExperimentByAdmin_args();
+ args.setAuthzToken(authzToken);
+ args.setAiravataExperimentId(airavataExperimentId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.model.experiment.ExperimentModel getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, 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_getExperimentByAdmin();
+ }
+ }
+
public void getDetailedExperimentTree(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getDetailedExperimentTree_call method_call = new getDetailedExperimentTree_call(authzToken, airavataExperimentId, resultHandler, this, ___protocolFactory, ___transport);
@@ -15795,6 +15913,7 @@ public class Airavata {
processMap.put("createExperiment", new createExperiment());
processMap.put("deleteExperiment", new deleteExperiment());
processMap.put("getExperiment", new getExperiment());
+ processMap.put("getExperimentByAdmin", new getExperimentByAdmin());
processMap.put("getDetailedExperimentTree", new getDetailedExperimentTree());
processMap.put("updateExperiment", new updateExperiment());
processMap.put("updateExperimentConfiguration", new updateExperimentConfiguration());
@@ -17039,6 +17158,38 @@ public class Airavata {
}
}
+ public static class getExperimentByAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExperimentByAdmin_args> {
+ public getExperimentByAdmin() {
+ super("getExperimentByAdmin");
+ }
+
+ public getExperimentByAdmin_args getEmptyArgsInstance() {
+ return new getExperimentByAdmin_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getExperimentByAdmin_result getResult(I iface, getExperimentByAdmin_args args) throws org.apache.thrift.TException {
+ getExperimentByAdmin_result result = new getExperimentByAdmin_result();
+ try {
+ result.success = iface.getExperimentByAdmin(args.authzToken, args.airavataExperimentId);
+ } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.model.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+ result.ase = ase;
+ } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+ result.ae = ae;
+ }
+ return result;
+ }
+ }
+
public static class getDetailedExperimentTree<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDetailedExperimentTree_args> {
public getDetailedExperimentTree() {
super("getDetailedExperimentTree");
@@ -21081,6 +21232,7 @@ public class Airavata {
processMap.put("createExperiment", new createExperiment());
processMap.put("deleteExperiment", new deleteExperiment());
processMap.put("getExperiment", new getExperiment());
+ processMap.put("getExperimentByAdmin", new getExperimentByAdmin());
processMap.put("getDetailedExperimentTree", new getDetailedExperimentTree());
processMap.put("updateExperiment", new updateExperiment());
processMap.put("updateExperimentConfiguration", new updateExperimentConfiguration());
@@ -23863,20 +24015,20 @@ public class Airavata {
}
}
- public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
- public getDetailedExperimentTree() {
- super("getDetailedExperimentTree");
+ public static class getExperimentByAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentByAdmin_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getExperimentByAdmin() {
+ super("getExperimentByAdmin");
}
- public getDetailedExperimentTree_args getEmptyArgsInstance() {
- return new getDetailedExperimentTree_args();
+ public getExperimentByAdmin_args getEmptyArgsInstance() {
+ return new getExperimentByAdmin_args();
}
public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ getExperimentByAdmin_result result = new getExperimentByAdmin_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -23889,7 +24041,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ getExperimentByAdmin_result result = new getExperimentByAdmin_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -23935,25 +24087,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
- iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, getExperimentByAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getExperimentByAdmin(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
- public updateExperiment() {
- super("updateExperiment");
+ public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getDetailedExperimentTree() {
+ super("getDetailedExperimentTree");
}
- public updateExperiment_args getEmptyArgsInstance() {
- return new updateExperiment_args();
+ public getDetailedExperimentTree_args getEmptyArgsInstance() {
+ return new getDetailedExperimentTree_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateExperiment_result result = new updateExperiment_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23965,7 +24118,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperiment_result result = new updateExperiment_result();
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -24011,25 +24164,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
+ public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
- public updateExperimentConfiguration() {
- super("updateExperimentConfiguration");
+ public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
+ public updateExperiment() {
+ super("updateExperiment");
}
- public updateExperimentConfiguration_args getEmptyArgsInstance() {
- return new updateExperimentConfiguration_args();
+ public updateExperiment_args getEmptyArgsInstance() {
+ return new updateExperiment_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ updateExperiment_result result = new updateExperiment_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -24041,8 +24194,28 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
- if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateExperiment_result result = new updateExperiment_result();
+ if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -24067,25 +24240,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
+ public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
}
}
- public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
- public updateResourceScheduleing() {
- super("updateResourceScheduleing");
+ public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
+ public updateExperimentConfiguration() {
+ super("updateExperimentConfiguration");
}
- public updateResourceScheduleing_args getEmptyArgsInstance() {
- return new updateResourceScheduleing_args();
+ public updateExperimentConfiguration_args getEmptyArgsInstance() {
+ return new updateExperimentConfiguration_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -24097,7 +24270,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -24123,27 +24296,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
+ public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
}
}
- public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
- public validateExperiment() {
- super("validateExperiment");
+ public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
+ public updateResourceScheduleing() {
+ super("updateResourceScheduleing");
}
- public validateExperiment_args getEmptyArgsInstance() {
- return new validateExperiment_args();
+ public updateResourceScheduleing_args getEmptyArgsInstance() {
+ return new updateResourceScheduleing_args();
}
- public AsyncMethodCallback<Boolean> 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<Boolean>() {
- public void onComplete(Boolean o) {
- validateExperiment_result result = new validateExperiment_result();
- result.success = o;
- result.setSuccessIsSet(true);
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -24155,28 +24326,86 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- validateExperiment_result result = new validateExperiment_result();
- if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
- result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
- result.setIreIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
- result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
- result.setAceIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
- result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
- result.setAseIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+ result.setAeIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
+ }
+ }
+
+ public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
+ public validateExperiment() {
+ super("validateExperiment");
+ }
+
+ public validateExperiment_args getEmptyArgsInstance() {
+ return new validateExperiment_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ validateExperiment_result result = new validateExperiment_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ validateExperiment_result result = new validateExperiment_result();
+ if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -33448,42 +33677,1216 @@ public class Airavata {
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ public getAPIVersion_args(
+ org.apache.airavata.model.security.AuthzToken authzToken)
+ {
+ this();
+ this.authzToken = authzToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ if (other.isSetAuthzToken()) {
+ this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+ }
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.authzToken = null;
+ }
+
+ public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+ return this.authzToken;
+ }
+
+ public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+ this.authzToken = authzToken;
+ return this;
+ }
+
+ public void unsetAuthzToken() {
+ this.authzToken = null;
+ }
+
+ /** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthzToken() {
+ return this.authzToken != null;
+ }
+
+ public void setAuthzTokenIsSet(boolean value) {
+ if (!value) {
+ this.authzToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AUTHZ_TOKEN:
+ if (value == null) {
+ unsetAuthzToken();
+ } else {
+ setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AUTHZ_TOKEN:
+ return getAuthzToken();
+
+ }
+ 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 AUTHZ_TOKEN:
+ return isSetAuthzToken();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_authzToken = true && this.isSetAuthzToken();
+ boolean that_present_authzToken = true && that.isSetAuthzToken();
+ if (this_present_authzToken || that_present_authzToken) {
+ if (!(this_present_authzToken && that_present_authzToken))
+ return false;
+ if (!this.authzToken.equals(that.authzToken))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_authzToken = true && (isSetAuthzToken());
+ list.add(present_authzToken);
+ if (present_authzToken)
+ list.add(authzToken);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthzToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ boolean first = true;
+
+ sb.append("authzToken:");
+ if (this.authzToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authzToken);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (authzToken == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (authzToken != null) {
+ authzToken.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 getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AUTHZ_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+ struct.authzToken.read(iprot);
+ struct.setAuthzTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.authzToken != null) {
+ oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
+ struct.authzToken.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.authzToken.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+ struct.authzToken.read(iprot);
+ struct.setAuthzTokenIsSet(true);
+ }
+ }
+
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ }
+
+ public String success; // required
+ public org.apache.airavata.model.error.InvalidRequestException ire; // required
+ public org.apache.airavata.model.error.AiravataClientException ace; // required
+ public org.apache.airavata.model.error.AiravataSystemException ase; // required
+ public org.apache.airavata.model.error.AuthorizationException ae; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ IRE((short)1, "ire"),
+ ACE((short)2, "ace"),
+ ASE((short)3, "ase"),
+ AE((short)4, "ae");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // IRE
+ return IRE;
+ case 2: // ACE
+ return ACE;
+ case 3: // ASE
+ return ASE;
+ case 4: // AE
+ return AE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
+ }
+
+ public getAPIVersion_result() {
+ }
+
+ public getAPIVersion_result(
+ String success,
+ org.apache.airavata.model.error.InvalidRequestException ire,
+ org.apache.airavata.model.error.AiravataClientException ace,
+ org.apache.airavata.model.error.AiravataSystemException ase,
+ org.apache.airavata.model.error.AuthorizationException ae)
+ {
+ this();
+ this.success = success;
+ this.ire = ire;
+ this.ace = ace;
+ this.ase = ase;
+ this.ae = ae;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_result(getAPIVersion_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetIre()) {
+ this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+ }
+ if (other.isSetAce()) {
+ this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+ }
+ if (other.isSetAse()) {
+ this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+ }
+ if (other.isSetAe()) {
+ this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+ }
+ }
+
+ public getAPIVersion_result deepCopy() {
+ return new getAPIVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.ire = null;
+ this.ace = null;
+ this.ase = null;
+ this.ae = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public getAPIVersion_result setSuccess(String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public getAPIVersion_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataClientException getAce() {
+ return this.ace;
+ }
+
+ public getAPIVersion_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ this.ace = ace;
+ return this;
+ }
+
+ public void unsetAce() {
+ this.ace = null;
+ }
+
+ /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+ public boolean isSetAce() {
+ return this.ace != null;
+ }
+
+ public void setAceIsSet(boolean value) {
+ if (!value) {
+ this.ace = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataSystemException getAse() {
+ return this.ase;
+ }
+
+ public getAPIVersion_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ this.ase = ase;
+ return this;
+ }
+
+ public void unsetAse() {
+ this.ase = null;
+ }
+
+ /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+ public boolean isSetAse() {
+ return this.ase != null;
+ }
+
+ public void setAseIsSet(boolean value) {
+ if (!value) {
+ this.ase = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AuthorizationException getAe() {
+ return this.ae;
+ }
+
+ public getAPIVersion_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+ this.ae = ae;
+ return this;
+ }
+
+ public void unsetAe() {
+ this.ae = null;
+ }
+
+ /** Returns true if field ae is set (has been assigned a value) and false otherwise */
+ public boolean isSetAe() {
+ return this.ae != null;
+ }
+
+ public void setAeIsSet(boolean value) {
+ if (!value) {
+ this.ae = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+ }
+ break;
+
+ case ACE:
+ if (value == null) {
+ unsetAce();
+ } else {
+ setAce((org.apache.airavata.model.error.AiravataClientException)value);
+ }
+ break;
+
+ case ASE:
+ if (value == null) {
+ unsetAse();
+ } else {
+ setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+ }
+ break;
+
+ case AE:
+ if (value == null) {
+ unsetAe();
+ } else {
+ setAe((org.apache.airavata.model.error.AuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case IRE:
+ return getIre();
+
+ case ACE:
+ return getAce();
+
+ case ASE:
+ return getAse();
+
+ case AE:
+ return getAe();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IRE:
+ return isSetIre();
+ case ACE:
+ return isSetAce();
+ case ASE:
+ return isSetAse();
+ case AE:
+ return isSetAe();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_result)
+ return this.equals((getAPIVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ boolean this_present_ace = true && this.isSetAce();
+ boolean that_present_ace = true && that.isSetAce();
+ if (this_present_ace || that_present_ace) {
+ if (!(this_present_ace && that_present_ace))
+ return false;
+ if (!this.ace.equals(that.ace))
+ return false;
+ }
+
+ boolean this_present_ase = true && this.isSetAse();
+ boolean that_present_ase = true && that.isSetAse();
+ if (this_present_ase || that_present_ase) {
+ if (!(this_present_ase && that_present_ase))
+ return false;
+ if (!this.ase.equals(that.ase))
+ return false;
+ }
+
+ boolean this_present_ae = true && this.isSetAe();
+ boolean that_present_ae = true && that.isSetAe();
+ if (this_present_ae || that_present_ae) {
+ if (!(this_present_ae && that_present_ae))
+ return false;
+ if (!this.ae.equals(that.ae))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_ire = true && (isSetIre());
+ list.add(present_ire);
+ if (present_ire)
+ list.add(ire);
+
+ boolean present_ace = true && (isSetAce());
+ list.add(present_ace);
+ if (present_ace)
+ list.add(ace);
+
+ boolean present_ase = true && (isSetAse());
+ list.add(present_ase);
+ if (present_ase)
+ list.add(ase);
+
+ boolean present_ae = true && (isSetAe());
+ list.add(present_ae);
+ if (present_ae)
+ list.add(ae);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAce()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAe()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAPIVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ace:");
+ if (this.ace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ase:");
+ if (this.ase == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ase);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ae:");
+ if (this.ae == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ae);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getAPIVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultStandardScheme getScheme() {
+ return new getAPIVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ACE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ASE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // AE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+ struct.ae.read(iprot);
+ struct.setAeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ace != null) {
+ oprot.writeFieldBegin(ACE_FIELD_DESC);
+ struct.ace.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ase != null) {
+ oprot.writeFieldBegin(ASE_FIELD_DESC);
+ struct.ase.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ae != null) {
+ oprot.writeFieldBegin(AE_FIELD_DESC);
+ struct.ae.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultTupleScheme getScheme() {
+ return new getAPIVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAce()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAse()) {
+ optionals.set(3);
+ }
+ if (struct.isSetAe()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetAce()) {
+ struct.ace.write(oprot);
+ }
+ if (struct.isSetAse()) {
+ struct.ase.write(oprot);
+ }
+ if (struct.isSetAe()) {
+ struct.ae.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+ struct.ae.read(iprot);
+ struct.setAeIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class isUserExists_args implements org.apache.thrift.TBase<isUserExists_args, isUserExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<isUserExists_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserExists_args");
+
+ private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new isUserExists_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new isUserExists_argsTupleSchemeFactory());
+ }
+
+ public org.apache.airavata.model.security.AuthzToken authzToken; // required
+ public String gatewayId; // required
+ public String userName; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ AUTHZ_TOKEN((short)1, "authzToken"),
+ GATEWAY_ID((short)2, "gatewayId"),
+ USER_NAME((short)3, "userName");
+
+ 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: // AUTHZ_TOKEN
+ return AUTHZ_TOKEN;
+ case 2: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 3: // USER_NAME
+ return USER_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+ tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserExists_args.class, metaDataMap);
}
- public getAPIVersion_args() {
+ public isUserExists_args() {
}
- public getAPIVersion_args(
- org.apache.airavata.model.security.AuthzToken authzToken)
+ public isUserExists_args(
+ org.apache.airavata.model.security.AuthzToken authzToken,
+ String gatewayId,
+ String userName)
{
this();
this.authzToken = authzToken;
+ this.gatewayId = gatewayId;
+ this.userName = userName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public getAPIVersion_args(getAPIVersion_args other) {
+ public isUserExists_args(isUserExists_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
}
- public getAPIVersion_args deepCopy() {
- return new getAPIVersion_args(this);
+ public isUserExists_args deepCopy() {
+ return new isUserExists_args(this);
}
@Override
public void clear() {
this.authzToken = null;
+ this.gatewayId = null;
+ this.userName = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
- public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+ public isUserExists_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
@@ -33503,6 +34906,54 @@ public class Airavata {
}
}
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public isUserExists_args setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ return this;
+ }
+
+ public void unsetGatewayId() {
+ this.gatewayId = null;
+ }
+
+ /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGatewayId() {
+ return this.gatewayId != null;
+ }
+
+ public void setGatewayIdIsSet(boolean value) {
+ if (!value) {
+ this.gatewayId = null;
+ }
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public isUserExists_args setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case AUTHZ_TOKEN:
@@ -33513,6 +34964,22 @@ public class Airavata {
}
break;
+ case GATEWAY_ID:
+ if (value == null) {
+ unsetGatewayId();
+ } else {
+ setGatewayId((String)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
}
}
@@ -33521,6 +34988,12 @@ public class Airavata {
case AUTHZ_TOKEN:
return getAuthzToken();
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case USER_NAME:
+ return getUserName();
+
}
throw new IllegalStateException();
}
@@ -33534,6 +35007,10 @@ public class Airavata {
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case USER_NAME:
+ return isSetUserName();
}
throw new IllegalStateException();
}
@@ -33542,12 +35019,12 @@ public class Airavata {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getAPIVersion_args)
- return this.equals((getAPIVersion_args)that);
+ if (that instanceof isUserExists_args)
+ return this.equals((isUserExists_args)that);
return false;
}
- public boolean equals(getAPIVersion_args that) {
+ public boolean equals(isUserExists_args that) {
if (that == null)
return false;
@@ -33560,6 +35037,24 @@ public class Airavata {
return false;
}
+ boolean this_present_gatewayId = true && this.isSetGatewayId();
+ boolean that_present_gatewayId = true && that.isSetGatewayId();
+ if (this_present_gatewayId || that_present_gatewayId) {
+ if (!(this_present_gatewayId && that_present_gatewayId))
+ return false;
+ if (!this.gatewayId.equals(that.gatewayId))
+ return false;
+ }
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
return true;
}
@@ -33572,11 +35067,21 @@ public class Airavata {
if (present_authzToken)
list.add(authzToken);
+ boolean present_gatewayId = true && (isSetGatewayId());
+ list.add(present_gatewayId);
+ if (present_gatewayId)
+ list.add(gatewayId);
+
+ boolean present_userName = true && (isSetUserName());
+ list.add(present_userName);
+ if (present_userName)
+ list.add(userName);
+
return list.hashCode();
}
@Override
- public int compareTo(getAPIVersion_args other) {
+ public int compareTo(isUserExists_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -33593,6 +35098,26 @@ public class Airavata {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGatewayId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -33610,7 +35135,7 @@ public class Airavata {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ StringBuilder sb = new StringBuilder("isUserExists_args(");
boolean first = true;
sb.append("authzToken:");
@@ -33620,6 +35145,22 @@ public class Airavata {
sb.append(this.authzToken);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -33629,6 +35170,12 @@ public class Airavata {
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
+ if (gatewayId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+ }
+ if (userName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
@@ -33651,15 +35198,15 @@ public class Airavata {
}
}
- private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsStandardScheme getScheme() {
- return new getAPIVersion_argsStandardScheme();
+ private static class isUserExists_argsStandardSchemeFactory implements SchemeFactory {
+ public isUserExists_argsStandardScheme getScheme() {
+ return new isUserExists_argsStandardScheme();
}
}
- private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+ private static class isUserExists_argsStandardScheme extends StandardScheme<isUserExists_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, isUserExists_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -33678,6 +35225,22 @@ public class Airavata {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 2: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -33689,7 +35252,7 @@ public class Airavata {
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, isUserExists_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -33698,41 +35261,57 @@ public class Airavata {
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsTupleScheme getScheme() {
- return new getAPIVersion_argsTupleScheme();
+ private static class isUserExists_argsTupleSchemeFactory implements SchemeFactory {
+ public isUserExists_argsTupleScheme getScheme() {
+ return new isUserExists_argsTupleScheme();
}
}
- private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+ private static class isUserExists_argsTupleScheme extends TupleScheme<isUserExists_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, isUserExists_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.authzToken.write(oprot);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.userName);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, isUserExists_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
}
}
}
- public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+ public static class isUserExists_result implements org.apache.thrift.TBase<isUserExists_result, isUserExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<isUserExists_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserExists_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.a
<TRUNCATED>
[5/7] airavata git commit: AIRAVATA-2207 Add cloneExperimentByAdmin
API method
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f3b778e/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 bf248b7..1b5a878 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
@@ -1085,6 +1085,57 @@ public class Airavata {
/**
*
+ * Clone an Existing Experiment by an admin user
+ * Existing specified experiment is cloned and a new name is provided. A copy of the experiment configuration is made and is persisted with new metadata.
+ * The client has to subsequently update this configuration if needed and launch the cloned experiment.
+ *
+ * @param newExperimentName
+ * experiment name that should be used in the cloned experiment
+ *
+ * @param updatedExperiment
+ * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+ * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+ * should be shared public by default.
+ * @param newExperimentProjectId
+ * The project in which to create the cloned experiment. This is optional and if null the experiment will be created
+ * in the same project as the existing experiment.
+ *
+ * @return
+ * The server-side generated.airavata.registry.core.experiment.globally unique identifier (Experiment ID) for the newly cloned experiment.
+ *
+ * @throws org.apache.airavata.model.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.model.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.model.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param authzToken
+ * @param existingExperimentID
+ * @param newExperimentName
+ * @param newExperimentProjectId
+ */
+ public String cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException;
+
+ /**
+ *
* Terminate a running Experiment.
*
* @gatewayId
@@ -3072,6 +3123,8 @@ public class Airavata {
public void cloneExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void terminateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void registerApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -5160,6 +5213,50 @@ public class Airavata {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cloneExperiment failed: unknown result");
}
+ public String cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ send_cloneExperimentByAdmin(authzToken, existingExperimentID, newExperimentName, newExperimentProjectId);
+ return recv_cloneExperimentByAdmin();
+ }
+
+ public void send_cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId) throws org.apache.thrift.TException
+ {
+ cloneExperimentByAdmin_args args = new cloneExperimentByAdmin_args();
+ args.setAuthzToken(authzToken);
+ args.setExistingExperimentID(existingExperimentID);
+ args.setNewExperimentName(newExperimentName);
+ args.setNewExperimentProjectId(newExperimentProjectId);
+ sendBase("cloneExperimentByAdmin", args);
+ }
+
+ public String recv_cloneExperimentByAdmin() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ cloneExperimentByAdmin_result result = new cloneExperimentByAdmin_result();
+ receiveBase(result, "cloneExperimentByAdmin");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.enf != null) {
+ throw result.enf;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ if (result.ae != null) {
+ throw result.ae;
+ }
+ if (result.pnfe != null) {
+ throw result.pnfe;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cloneExperimentByAdmin failed: unknown result");
+ }
+
public void terminateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_terminateExperiment(authzToken, airavataExperimentId, gatewayId);
@@ -11419,6 +11516,47 @@ public class Airavata {
}
}
+ public void cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ cloneExperimentByAdmin_call method_call = new cloneExperimentByAdmin_call(authzToken, existingExperimentID, newExperimentName, newExperimentProjectId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class cloneExperimentByAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.security.AuthzToken authzToken;
+ private String existingExperimentID;
+ private String newExperimentName;
+ private String newExperimentProjectId;
+ public cloneExperimentByAdmin_call(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.authzToken = authzToken;
+ this.existingExperimentID = existingExperimentID;
+ this.newExperimentName = newExperimentName;
+ this.newExperimentProjectId = newExperimentProjectId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cloneExperimentByAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ cloneExperimentByAdmin_args args = new cloneExperimentByAdmin_args();
+ args.setAuthzToken(authzToken);
+ args.setExistingExperimentID(existingExperimentID);
+ args.setNewExperimentName(newExperimentName);
+ args.setNewExperimentProjectId(newExperimentProjectId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_cloneExperimentByAdmin();
+ }
+ }
+
public void terminateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
terminateExperiment_call method_call = new terminateExperiment_call(authzToken, airavataExperimentId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -15926,6 +16064,7 @@ public class Airavata {
processMap.put("getJobStatuses", new getJobStatuses());
processMap.put("getJobDetails", new getJobDetails());
processMap.put("cloneExperiment", new cloneExperiment());
+ processMap.put("cloneExperimentByAdmin", new cloneExperimentByAdmin());
processMap.put("terminateExperiment", new terminateExperiment());
processMap.put("registerApplicationModule", new registerApplicationModule());
processMap.put("getApplicationModule", new getApplicationModule());
@@ -17561,6 +17700,40 @@ public class Airavata {
}
}
+ public static class cloneExperimentByAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cloneExperimentByAdmin_args> {
+ public cloneExperimentByAdmin() {
+ super("cloneExperimentByAdmin");
+ }
+
+ public cloneExperimentByAdmin_args getEmptyArgsInstance() {
+ return new cloneExperimentByAdmin_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public cloneExperimentByAdmin_result getResult(I iface, cloneExperimentByAdmin_args args) throws org.apache.thrift.TException {
+ cloneExperimentByAdmin_result result = new cloneExperimentByAdmin_result();
+ try {
+ result.success = iface.cloneExperimentByAdmin(args.authzToken, args.existingExperimentID, args.newExperimentName, args.newExperimentProjectId);
+ } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.model.error.ExperimentNotFoundException enf) {
+ result.enf = enf;
+ } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+ result.ase = ase;
+ } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+ result.ae = ae;
+ } catch (org.apache.airavata.model.error.ProjectNotFoundException pnfe) {
+ result.pnfe = pnfe;
+ }
+ return result;
+ }
+ }
+
public static class terminateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateExperiment_args> {
public terminateExperiment() {
super("terminateExperiment");
@@ -21245,6 +21418,7 @@ public class Airavata {
processMap.put("getJobStatuses", new getJobStatuses());
processMap.put("getJobDetails", new getJobDetails());
processMap.put("cloneExperiment", new cloneExperiment());
+ processMap.put("cloneExperimentByAdmin", new cloneExperimentByAdmin());
processMap.put("terminateExperiment", new terminateExperiment());
processMap.put("registerApplicationModule", new registerApplicationModule());
processMap.put("getApplicationModule", new getApplicationModule());
@@ -24978,20 +25152,21 @@ public class Airavata {
}
}
- public static class terminateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, terminateExperiment_args, Void> {
- public terminateExperiment() {
- super("terminateExperiment");
+ public static class cloneExperimentByAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cloneExperimentByAdmin_args, String> {
+ public cloneExperimentByAdmin() {
+ super("cloneExperimentByAdmin");
}
- public terminateExperiment_args getEmptyArgsInstance() {
- return new terminateExperiment_args();
+ public cloneExperimentByAdmin_args getEmptyArgsInstance() {
+ return new cloneExperimentByAdmin_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- terminateExperiment_result result = new terminateExperiment_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ cloneExperimentByAdmin_result result = new cloneExperimentByAdmin_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25003,7 +25178,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- terminateExperiment_result result = new terminateExperiment_result();
+ cloneExperimentByAdmin_result result = new cloneExperimentByAdmin_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25029,76 +25204,9 @@ public class Airavata {
result.setAeIsSet(true);
msg = result;
}
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, terminateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.terminateExperiment(args.authzToken, args.airavataExperimentId, args.gatewayId,resultHandler);
- }
- }
-
- public static class registerApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationModule_args, String> {
- public registerApplicationModule() {
- super("registerApplicationModule");
- }
-
- public registerApplicationModule_args getEmptyArgsInstance() {
- return new registerApplicationModule_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- registerApplicationModule_result result = new registerApplicationModule_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- registerApplicationModule_result result = new registerApplicationModule_result();
- if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
- result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
- result.setIreIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
- result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
- result.setAceIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
- result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
- result.setAseIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
msg = result;
}
else
@@ -25121,26 +25229,25 @@ public class Airavata {
return false;
}
- public void start(I iface, registerApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.registerApplicationModule(args.authzToken, args.gatewayId, args.applicationModule,resultHandler);
+ public void start(I iface, cloneExperimentByAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.cloneExperimentByAdmin(args.authzToken, args.existingExperimentID, args.newExperimentName, args.newExperimentProjectId,resultHandler);
}
}
- public static class getApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationModule_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> {
- public getApplicationModule() {
- super("getApplicationModule");
+ public static class terminateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, terminateExperiment_args, Void> {
+ public terminateExperiment() {
+ super("terminateExperiment");
}
- public getApplicationModule_args getEmptyArgsInstance() {
- return new getApplicationModule_args();
+ public terminateExperiment_args getEmptyArgsInstance() {
+ return new terminateExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> 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.appcatalog.appdeployment.ApplicationModule>() {
- public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule o) {
- getApplicationModule_result result = new getApplicationModule_result();
- result.success = o;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ terminateExperiment_result result = new terminateExperiment_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25152,12 +25259,17 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getApplicationModule_result result = new getApplicationModule_result();
+ terminateExperiment_result result = new terminateExperiment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
result.setAceIsSet(true);
@@ -25193,27 +25305,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> resultHandler) throws TException {
- iface.getApplicationModule(args.authzToken, args.appModuleId,resultHandler);
+ public void start(I iface, terminateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.terminateExperiment(args.authzToken, args.airavataExperimentId, args.gatewayId,resultHandler);
}
}
- public static class updateApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationModule_args, Boolean> {
- public updateApplicationModule() {
- super("updateApplicationModule");
+ public static class registerApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationModule_args, String> {
+ public registerApplicationModule() {
+ super("registerApplicationModule");
}
- public updateApplicationModule_args getEmptyArgsInstance() {
- return new updateApplicationModule_args();
+ public registerApplicationModule_args getEmptyArgsInstance() {
+ return new registerApplicationModule_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateApplicationModule_result result = new updateApplicationModule_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ registerApplicationModule_result result = new registerApplicationModule_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25225,7 +25336,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateApplicationModule_result result = new updateApplicationModule_result();
+ registerApplicationModule_result result = new registerApplicationModule_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25266,25 +25377,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateApplicationModule(args.authzToken, args.appModuleId, args.applicationModule,resultHandler);
+ public void start(I iface, registerApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.registerApplicationModule(args.authzToken, args.gatewayId, args.applicationModule,resultHandler);
}
}
- public static class getAllAppModules<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllAppModules_args, List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> {
- public getAllAppModules() {
- super("getAllAppModules");
+ public static class getApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationModule_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> {
+ public getApplicationModule() {
+ super("getApplicationModule");
}
- public getAllAppModules_args getEmptyArgsInstance() {
- return new getAllAppModules_args();
+ public getApplicationModule_args getEmptyArgsInstance() {
+ return new getApplicationModule_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>>() {
- public void onComplete(List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> o) {
- getAllAppModules_result result = new getAllAppModules_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>() {
+ public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule o) {
+ getApplicationModule_result result = new getApplicationModule_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -25297,7 +25408,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllAppModules_result result = new getAllAppModules_result();
+ getApplicationModule_result result = new getApplicationModule_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25338,25 +25449,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllAppModules_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> resultHandler) throws TException {
- iface.getAllAppModules(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, getApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> resultHandler) throws TException {
+ iface.getApplicationModule(args.authzToken, args.appModuleId,resultHandler);
}
}
- public static class deleteApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationModule_args, Boolean> {
- public deleteApplicationModule() {
- super("deleteApplicationModule");
+ public static class updateApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationModule_args, Boolean> {
+ public updateApplicationModule() {
+ super("updateApplicationModule");
}
- public deleteApplicationModule_args getEmptyArgsInstance() {
- return new deleteApplicationModule_args();
+ public updateApplicationModule_args getEmptyArgsInstance() {
+ return new updateApplicationModule_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
- deleteApplicationModule_result result = new deleteApplicationModule_result();
+ updateApplicationModule_result result = new updateApplicationModule_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -25370,7 +25481,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteApplicationModule_result result = new deleteApplicationModule_result();
+ updateApplicationModule_result result = new updateApplicationModule_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25411,25 +25522,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteApplicationModule(args.authzToken, args.appModuleId,resultHandler);
+ public void start(I iface, updateApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateApplicationModule(args.authzToken, args.appModuleId, args.applicationModule,resultHandler);
}
}
- public static class registerApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationDeployment_args, String> {
- public registerApplicationDeployment() {
- super("registerApplicationDeployment");
+ public static class getAllAppModules<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllAppModules_args, List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> {
+ public getAllAppModules() {
+ super("getAllAppModules");
}
- public registerApplicationDeployment_args getEmptyArgsInstance() {
- return new registerApplicationDeployment_args();
+ public getAllAppModules_args getEmptyArgsInstance() {
+ return new getAllAppModules_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- registerApplicationDeployment_result result = new registerApplicationDeployment_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> o) {
+ getAllAppModules_result result = new getAllAppModules_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -25442,7 +25553,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- registerApplicationDeployment_result result = new registerApplicationDeployment_result();
+ getAllAppModules_result result = new getAllAppModules_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25483,26 +25594,27 @@ public class Airavata {
return false;
}
- public void start(I iface, registerApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.registerApplicationDeployment(args.authzToken, args.gatewayId, args.applicationDeployment,resultHandler);
+ public void start(I iface, getAllAppModules_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> resultHandler) throws TException {
+ iface.getAllAppModules(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class getApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationDeployment_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> {
- public getApplicationDeployment() {
- super("getApplicationDeployment");
+ public static class deleteApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationModule_args, Boolean> {
+ public deleteApplicationModule() {
+ super("deleteApplicationModule");
}
- public getApplicationDeployment_args getEmptyArgsInstance() {
- return new getApplicationDeployment_args();
+ public deleteApplicationModule_args getEmptyArgsInstance() {
+ return new deleteApplicationModule_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>() {
- public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription o) {
- getApplicationDeployment_result result = new getApplicationDeployment_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteApplicationModule_result result = new deleteApplicationModule_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25514,7 +25626,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getApplicationDeployment_result result = new getApplicationDeployment_result();
+ deleteApplicationModule_result result = new deleteApplicationModule_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25555,27 +25667,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> resultHandler) throws TException {
- iface.getApplicationDeployment(args.authzToken, args.appDeploymentId,resultHandler);
+ public void start(I iface, deleteApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteApplicationModule(args.authzToken, args.appModuleId,resultHandler);
}
}
- public static class updateApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationDeployment_args, Boolean> {
- public updateApplicationDeployment() {
- super("updateApplicationDeployment");
+ public static class registerApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationDeployment_args, String> {
+ public registerApplicationDeployment() {
+ super("registerApplicationDeployment");
}
- public updateApplicationDeployment_args getEmptyArgsInstance() {
- return new updateApplicationDeployment_args();
+ public registerApplicationDeployment_args getEmptyArgsInstance() {
+ return new registerApplicationDeployment_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateApplicationDeployment_result result = new updateApplicationDeployment_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ registerApplicationDeployment_result result = new registerApplicationDeployment_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25587,7 +25698,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateApplicationDeployment_result result = new updateApplicationDeployment_result();
+ registerApplicationDeployment_result result = new registerApplicationDeployment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25628,27 +25739,26 @@ public class Airavata {
return false;
}
- public void start(I iface, updateApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateApplicationDeployment(args.authzToken, args.appDeploymentId, args.applicationDeployment,resultHandler);
+ public void start(I iface, registerApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.registerApplicationDeployment(args.authzToken, args.gatewayId, args.applicationDeployment,resultHandler);
}
}
- public static class deleteApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationDeployment_args, Boolean> {
- public deleteApplicationDeployment() {
- super("deleteApplicationDeployment");
+ public static class getApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationDeployment_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> {
+ public getApplicationDeployment() {
+ super("getApplicationDeployment");
}
- public deleteApplicationDeployment_args getEmptyArgsInstance() {
- return new deleteApplicationDeployment_args();
+ public getApplicationDeployment_args getEmptyArgsInstance() {
+ return new getApplicationDeployment_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>() {
+ public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription o) {
+ getApplicationDeployment_result result = new getApplicationDeployment_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25660,7 +25770,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
+ getApplicationDeployment_result result = new getApplicationDeployment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25701,26 +25811,27 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteApplicationDeployment(args.authzToken, args.appDeploymentId,resultHandler);
+ public void start(I iface, getApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> resultHandler) throws TException {
+ iface.getApplicationDeployment(args.authzToken, args.appDeploymentId,resultHandler);
}
}
- public static class getAllApplicationDeployments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationDeployments_args, List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> {
- public getAllApplicationDeployments() {
- super("getAllApplicationDeployments");
+ public static class updateApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationDeployment_args, Boolean> {
+ public updateApplicationDeployment() {
+ super("updateApplicationDeployment");
}
- public getAllApplicationDeployments_args getEmptyArgsInstance() {
- return new getAllApplicationDeployments_args();
+ public updateApplicationDeployment_args getEmptyArgsInstance() {
+ return new updateApplicationDeployment_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>>() {
- public void onComplete(List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> o) {
- getAllApplicationDeployments_result result = new getAllApplicationDeployments_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateApplicationDeployment_result result = new updateApplicationDeployment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25732,7 +25843,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllApplicationDeployments_result result = new getAllApplicationDeployments_result();
+ updateApplicationDeployment_result result = new updateApplicationDeployment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25773,26 +25884,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllApplicationDeployments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> resultHandler) throws TException {
- iface.getAllApplicationDeployments(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, updateApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateApplicationDeployment(args.authzToken, args.appDeploymentId, args.applicationDeployment,resultHandler);
}
}
- public static class getAppModuleDeployedResources<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAppModuleDeployedResources_args, List<String>> {
- public getAppModuleDeployedResources() {
- super("getAppModuleDeployedResources");
+ public static class deleteApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationDeployment_args, Boolean> {
+ public deleteApplicationDeployment() {
+ super("deleteApplicationDeployment");
}
- public getAppModuleDeployedResources_args getEmptyArgsInstance() {
- return new getAppModuleDeployedResources_args();
+ public deleteApplicationDeployment_args getEmptyArgsInstance() {
+ return new deleteApplicationDeployment_args();
}
- public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<String>>() {
- public void onComplete(List<String> o) {
- getAppModuleDeployedResources_result result = new getAppModuleDeployedResources_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -25804,7 +25916,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAppModuleDeployedResources_result result = new getAppModuleDeployedResources_result();
+ deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25845,25 +25957,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getAppModuleDeployedResources_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
- iface.getAppModuleDeployedResources(args.authzToken, args.appModuleId,resultHandler);
+ public void start(I iface, deleteApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteApplicationDeployment(args.authzToken, args.appDeploymentId,resultHandler);
}
}
- public static class registerApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationInterface_args, String> {
- public registerApplicationInterface() {
- super("registerApplicationInterface");
+ public static class getAllApplicationDeployments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationDeployments_args, List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> {
+ public getAllApplicationDeployments() {
+ super("getAllApplicationDeployments");
}
- public registerApplicationInterface_args getEmptyArgsInstance() {
- return new registerApplicationInterface_args();
+ public getAllApplicationDeployments_args getEmptyArgsInstance() {
+ return new getAllApplicationDeployments_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- registerApplicationInterface_result result = new registerApplicationInterface_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> o) {
+ getAllApplicationDeployments_result result = new getAllApplicationDeployments_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -25876,7 +25988,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- registerApplicationInterface_result result = new registerApplicationInterface_result();
+ getAllApplicationDeployments_result result = new getAllApplicationDeployments_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25917,25 +26029,25 @@ public class Airavata {
return false;
}
- public void start(I iface, registerApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.registerApplicationInterface(args.authzToken, args.gatewayId, args.applicationInterface,resultHandler);
+ public void start(I iface, getAllApplicationDeployments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> resultHandler) throws TException {
+ iface.getAllApplicationDeployments(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class cloneApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cloneApplicationInterface_args, String> {
- public cloneApplicationInterface() {
- super("cloneApplicationInterface");
+ public static class getAppModuleDeployedResources<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAppModuleDeployedResources_args, List<String>> {
+ public getAppModuleDeployedResources() {
+ super("getAppModuleDeployedResources");
}
- public cloneApplicationInterface_args getEmptyArgsInstance() {
- return new cloneApplicationInterface_args();
+ public getAppModuleDeployedResources_args getEmptyArgsInstance() {
+ return new getAppModuleDeployedResources_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- cloneApplicationInterface_result result = new cloneApplicationInterface_result();
+ return new AsyncMethodCallback<List<String>>() {
+ public void onComplete(List<String> o) {
+ getAppModuleDeployedResources_result result = new getAppModuleDeployedResources_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -25948,7 +26060,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- cloneApplicationInterface_result result = new cloneApplicationInterface_result();
+ getAppModuleDeployedResources_result result = new getAppModuleDeployedResources_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -25989,25 +26101,25 @@ public class Airavata {
return false;
}
- public void start(I iface, cloneApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.cloneApplicationInterface(args.authzToken, args.existingAppInterfaceID, args.newApplicationName, args.gatewayId,resultHandler);
+ public void start(I iface, getAppModuleDeployedResources_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+ iface.getAppModuleDeployedResources(args.authzToken, args.appModuleId,resultHandler);
}
}
- public static class getApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationInterface_args, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> {
- public getApplicationInterface() {
- super("getApplicationInterface");
+ public static class registerApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationInterface_args, String> {
+ public registerApplicationInterface() {
+ super("registerApplicationInterface");
}
- public getApplicationInterface_args getEmptyArgsInstance() {
- return new getApplicationInterface_args();
+ public registerApplicationInterface_args getEmptyArgsInstance() {
+ return new registerApplicationInterface_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>() {
- public void onComplete(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription o) {
- getApplicationInterface_result result = new getApplicationInterface_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ registerApplicationInterface_result result = new registerApplicationInterface_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -26020,7 +26132,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getApplicationInterface_result result = new getApplicationInterface_result();
+ registerApplicationInterface_result result = new registerApplicationInterface_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26061,27 +26173,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> resultHandler) throws TException {
- iface.getApplicationInterface(args.authzToken, args.appInterfaceId,resultHandler);
+ public void start(I iface, registerApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.registerApplicationInterface(args.authzToken, args.gatewayId, args.applicationInterface,resultHandler);
}
}
- public static class updateApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationInterface_args, Boolean> {
- public updateApplicationInterface() {
- super("updateApplicationInterface");
+ public static class cloneApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cloneApplicationInterface_args, String> {
+ public cloneApplicationInterface() {
+ super("cloneApplicationInterface");
}
- public updateApplicationInterface_args getEmptyArgsInstance() {
- return new updateApplicationInterface_args();
+ public cloneApplicationInterface_args getEmptyArgsInstance() {
+ return new cloneApplicationInterface_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateApplicationInterface_result result = new updateApplicationInterface_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ cloneApplicationInterface_result result = new cloneApplicationInterface_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -26093,7 +26204,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateApplicationInterface_result result = new updateApplicationInterface_result();
+ cloneApplicationInterface_result result = new cloneApplicationInterface_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26134,27 +26245,26 @@ public class Airavata {
return false;
}
- public void start(I iface, updateApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateApplicationInterface(args.authzToken, args.appInterfaceId, args.applicationInterface,resultHandler);
+ public void start(I iface, cloneApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.cloneApplicationInterface(args.authzToken, args.existingAppInterfaceID, args.newApplicationName, args.gatewayId,resultHandler);
}
}
- public static class deleteApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationInterface_args, Boolean> {
- public deleteApplicationInterface() {
- super("deleteApplicationInterface");
+ public static class getApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationInterface_args, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> {
+ public getApplicationInterface() {
+ super("getApplicationInterface");
}
- public deleteApplicationInterface_args getEmptyArgsInstance() {
- return new deleteApplicationInterface_args();
+ public getApplicationInterface_args getEmptyArgsInstance() {
+ return new getApplicationInterface_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteApplicationInterface_result result = new deleteApplicationInterface_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>() {
+ public void onComplete(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription o) {
+ getApplicationInterface_result result = new getApplicationInterface_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -26166,7 +26276,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteApplicationInterface_result result = new deleteApplicationInterface_result();
+ getApplicationInterface_result result = new getApplicationInterface_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26207,26 +26317,27 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteApplicationInterface(args.authzToken, args.appInterfaceId,resultHandler);
+ public void start(I iface, getApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> resultHandler) throws TException {
+ iface.getApplicationInterface(args.authzToken, args.appInterfaceId,resultHandler);
}
}
- public static class getAllApplicationInterfaceNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationInterfaceNames_args, Map<String,String>> {
- public getAllApplicationInterfaceNames() {
- super("getAllApplicationInterfaceNames");
+ public static class updateApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationInterface_args, Boolean> {
+ public updateApplicationInterface() {
+ super("updateApplicationInterface");
}
- public getAllApplicationInterfaceNames_args getEmptyArgsInstance() {
- return new getAllApplicationInterfaceNames_args();
+ public updateApplicationInterface_args getEmptyArgsInstance() {
+ return new updateApplicationInterface_args();
}
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getAllApplicationInterfaceNames_result result = new getAllApplicationInterfaceNames_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateApplicationInterface_result result = new updateApplicationInterface_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -26238,7 +26349,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllApplicationInterfaceNames_result result = new getAllApplicationInterfaceNames_result();
+ updateApplicationInterface_result result = new updateApplicationInterface_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26279,26 +26390,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllApplicationInterfaceNames_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getAllApplicationInterfaceNames(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, updateApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateApplicationInterface(args.authzToken, args.appInterfaceId, args.applicationInterface,resultHandler);
}
}
- public static class getAllApplicationInterfaces<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationInterfaces_args, List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> {
- public getAllApplicationInterfaces() {
- super("getAllApplicationInterfaces");
+ public static class deleteApplicationInterface<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationInterface_args, Boolean> {
+ public deleteApplicationInterface() {
+ super("deleteApplicationInterface");
}
- public getAllApplicationInterfaces_args getEmptyArgsInstance() {
- return new getAllApplicationInterfaces_args();
+ public deleteApplicationInterface_args getEmptyArgsInstance() {
+ return new deleteApplicationInterface_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>>() {
- public void onComplete(List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> o) {
- getAllApplicationInterfaces_result result = new getAllApplicationInterfaces_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteApplicationInterface_result result = new deleteApplicationInterface_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -26310,7 +26422,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllApplicationInterfaces_result result = new getAllApplicationInterfaces_result();
+ deleteApplicationInterface_result result = new deleteApplicationInterface_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26351,25 +26463,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllApplicationInterfaces_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> resultHandler) throws TException {
- iface.getAllApplicationInterfaces(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, deleteApplicationInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteApplicationInterface(args.authzToken, args.appInterfaceId,resultHandler);
}
}
- public static class getApplicationInputs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationInputs_args, List<org.apache.airavata.model.application.io.InputDataObjectType>> {
- public getApplicationInputs() {
- super("getApplicationInputs");
+ public static class getAllApplicationInterfaceNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationInterfaceNames_args, Map<String,String>> {
+ public getAllApplicationInterfaceNames() {
+ super("getAllApplicationInterfaceNames");
}
- public getApplicationInputs_args getEmptyArgsInstance() {
- return new getApplicationInputs_args();
+ public getAllApplicationInterfaceNames_args getEmptyArgsInstance() {
+ return new getAllApplicationInterfaceNames_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>>() {
- public void onComplete(List<org.apache.airavata.model.application.io.InputDataObjectType> o) {
- getApplicationInputs_result result = new getApplicationInputs_result();
+ return new AsyncMethodCallback<Map<String,String>>() {
+ public void onComplete(Map<String,String> o) {
+ getAllApplicationInterfaceNames_result result = new getAllApplicationInterfaceNames_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -26382,7 +26494,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getApplicationInputs_result result = new getApplicationInputs_result();
+ getAllApplicationInterfaceNames_result result = new getAllApplicationInterfaceNames_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26423,25 +26535,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getApplicationInputs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>> resultHandler) throws TException {
- iface.getApplicationInputs(args.authzToken, args.appInterfaceId,resultHandler);
+ public void start(I iface, getAllApplicationInterfaceNames_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
+ iface.getAllApplicationInterfaceNames(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class getApplicationOutputs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationOutputs_args, List<org.apache.airavata.model.application.io.OutputDataObjectType>> {
- public getApplicationOutputs() {
- super("getApplicationOutputs");
+ public static class getAllApplicationInterfaces<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllApplicationInterfaces_args, List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> {
+ public getAllApplicationInterfaces() {
+ super("getAllApplicationInterfaces");
}
- public getApplicationOutputs_args getEmptyArgsInstance() {
- return new getApplicationOutputs_args();
+ public getAllApplicationInterfaces_args getEmptyArgsInstance() {
+ return new getAllApplicationInterfaces_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>>() {
- public void onComplete(List<org.apache.airavata.model.application.io.OutputDataObjectType> o) {
- getApplicationOutputs_result result = new getApplicationOutputs_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> o) {
+ getAllApplicationInterfaces_result result = new getAllApplicationInterfaces_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -26454,7 +26566,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getApplicationOutputs_result result = new getApplicationOutputs_result();
+ getAllApplicationInterfaces_result result = new getAllApplicationInterfaces_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26495,25 +26607,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getApplicationOutputs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>> resultHandler) throws TException {
- iface.getApplicationOutputs(args.authzToken, args.appInterfaceId,resultHandler);
+ public void start(I iface, getAllApplicationInterfaces_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> resultHandler) throws TException {
+ iface.getAllApplicationInterfaces(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class getAvailableAppInterfaceComputeResources<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAvailableAppInterfaceComputeResources_args, Map<String,String>> {
- public getAvailableAppInterfaceComputeResources() {
- super("getAvailableAppInterfaceComputeResources");
+ public static class getApplicationInputs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationInputs_args, List<org.apache.airavata.model.application.io.InputDataObjectType>> {
+ public getApplicationInputs() {
+ super("getApplicationInputs");
}
- public getAvailableAppInterfaceComputeResources_args getEmptyArgsInstance() {
- return new getAvailableAppInterfaceComputeResources_args();
+ public getApplicationInputs_args getEmptyArgsInstance() {
+ return new getApplicationInputs_args();
}
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getAvailableAppInterfaceComputeResources_result result = new getAvailableAppInterfaceComputeResources_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>>() {
+ public void onComplete(List<org.apache.airavata.model.application.io.InputDataObjectType> o) {
+ getApplicationInputs_result result = new getApplicationInputs_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -26526,7 +26638,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAvailableAppInterfaceComputeResources_result result = new getAvailableAppInterfaceComputeResources_result();
+ getApplicationInputs_result result = new getApplicationInputs_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26567,25 +26679,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getAvailableAppInterfaceComputeResources_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getAvailableAppInterfaceComputeResources(args.authzToken, args.appInterfaceId,resultHandler);
+ public void start(I iface, getApplicationInputs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.application.io.InputDataObjectType>> resultHandler) throws TException {
+ iface.getApplicationInputs(args.authzToken, args.appInterfaceId,resultHandler);
}
}
- public static class registerComputeResource<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerComputeResource_args, String> {
- public registerComputeResource() {
- super("registerComputeResource");
+ public static class getApplicationOutputs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationOutputs_args, List<org.apache.airavata.model.application.io.OutputDataObjectType>> {
+ public getApplicationOutputs() {
+ super("getApplicationOutputs");
}
- public registerComputeResource_args getEmptyArgsInstance() {
- return new registerComputeResource_args();
+ public getApplicationOutputs_args getEmptyArgsInstance() {
+ return new getApplicationOutputs_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- registerComputeResource_result result = new registerComputeResource_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>>() {
+ public void onComplete(List<org.apache.airavata.model.application.io.OutputDataObjectType> o) {
+ getApplicationOutputs_result result = new getApplicationOutputs_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -26598,7 +26710,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- registerComputeResource_result result = new registerComputeResource_result();
+ getApplicationOutputs_result result = new getApplicationOutputs_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -26639,25 +26751,25 @@ public class Airavata {
return false;
}
- public void start(I iface, registerComputeResource_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.registerComputeResource(args.authzToken, args.computeResourceDescription,resultHandler);
+ public void start(I iface, getApplicationOutputs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.application.io.OutputDataObjectType>> resultHandler) throws TException {
+ iface.getApplicationOutputs(args.authzToken, args.appInterfaceId,resultHandler);
}
}
- public static class getComputeResource<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getComputeResource_args, org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription> {
- public getComputeResource() {
-
<TRUNCATED>
[6/7] airavata git commit: AIRAVATA-2207 Add cloneExperimentByAdmin
API method
Posted by sc...@apache.org.
AIRAVATA-2207 Add cloneExperimentByAdmin API method
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5f3b778e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5f3b778e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5f3b778e
Branch: refs/heads/develop
Commit: 5f3b778ef55a9d59bc5cc4dab23dd496e89dd65c
Parents: 0fda5a8
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Nov 10 14:47:45 2016 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Nov 10 14:47:45 2016 -0500
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 154 +-
.../java/org/apache/airavata/api/Airavata.java | 6676 +++++++++++-------
.../resources/lib/Airavata/API/Airavata.php | 503 ++
.../resources/airavata-default-xacml-policy.xml | 1 +
.../airavata-apis/airavata_api.thrift | 54 +
5 files changed, 4954 insertions(+), 2434 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f3b778e/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 2f7a014..557c777 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
@@ -1557,7 +1557,7 @@ public class AiravataServerHandler implements Airavata.Iface {
* This is the experiment identifier that already exists in the system. Will use this experimentID to retrieve
* user configuration which is used with the clone experiment.
*
- * @param newExperiementName
+ * @param newExperimentName
* experiment name that should be used in the cloned experiment
*
* @return
@@ -1588,84 +1588,110 @@ public class AiravataServerHandler implements Airavata.Iface {
*
*
* @param existingExperimentID
- * @param newExperiementName
+ * @param newExperimentName
*/
@Override
@SecurityCheck
- public String cloneExperiment(AuthzToken authzToken, String existingExperimentID, String newExperiementName, String newExperimentProjectId)
+ public String cloneExperiment(AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId)
throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException,
AuthorizationException, ProjectNotFoundException, TException {
try {
- RegistryService.Client regClient = getRegistryServiceClient();
- ExperimentModel existingExperiment = regClient.getExperiment(existingExperimentID);
- if (existingExperiment == null){
- logger.error(existingExperimentID, "Error while cloning experiment {}, experiment doesn't exist.", existingExperimentID);
- throw new ExperimentNotFoundException("Requested experiment id " + existingExperimentID + " does not exist in the system..");
- }
- if (newExperimentProjectId != null) {
+ // getExperiment will apply sharing permissions
+ ExperimentModel existingExperiment = this.getExperiment(authzToken, existingExperimentID);
+ return cloneExperimentInternal(authzToken, existingExperimentID, newExperimentName, newExperimentProjectId, existingExperiment);
+ } catch (Exception e) {
+ logger.error(existingExperimentID, "Error while cloning the experiment with existing configuration...", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while cloning the experiment with existing configuration. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
- Project project = regClient.getProject(newExperimentProjectId);
- if (project == null){
- logger.error("Error while cloning experiment {}, project {} doesn't exist.", existingExperimentID, newExperimentProjectId);
- throw new ProjectNotFoundException("Requested project id " + newExperimentProjectId + " does not exist in the system..");
- }
- existingExperiment.setProjectId(project.getProjectID());
- }
+ @Override
+ @SecurityCheck
+ public String cloneExperimentByAdmin(AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId)
+ throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException,
+ AuthorizationException, ProjectNotFoundException, TException {
+ try {
+ // get existing experiment by bypassing normal sharing permissions for the admin user
+ ExperimentModel existingExperiment = this.getExperimentByAdmin(authzToken, existingExperimentID);
+ return cloneExperimentInternal(authzToken, existingExperimentID, newExperimentName, newExperimentProjectId, existingExperiment);
+ } catch (Exception e) {
+ logger.error(existingExperimentID, "Error while cloning the experiment with existing configuration...", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while cloning the experiment with existing configuration. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
- // make sure user has write access to the project
- String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
- String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
- if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
- existingExperiment.getProjectId(), gatewayId + ":WRITE")){
- logger.error("Error while cloning experiment {}, user doesn't have write access to project {}", existingExperimentID, existingExperiment.getProjectId());
- throw new AuthorizationException("User does not have permission to clone an experiment in this project");
- }
+ private String cloneExperimentInternal(AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, ExperimentModel existingExperiment)
+ throws ExperimentNotFoundException, ProjectNotFoundException, TException, AuthorizationException, ApplicationSettingsException {
- existingExperiment.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
- if (existingExperiment.getExecutionId() != null){
- List<OutputDataObjectType> applicationOutputs = regClient.getApplicationOutputs(existingExperiment.getExecutionId());
- existingExperiment.setExperimentOutputs(applicationOutputs);
- }
- if (validateString(newExperiementName)){
- existingExperiment.setExperimentName(newExperiementName);
- }
- if (existingExperiment.getErrors() != null ){
- existingExperiment.getErrors().clear();
- }
- if(existingExperiment.getUserConfigurationData() != null && existingExperiment.getUserConfigurationData()
- .getComputationalResourceScheduling() != null){
- String compResourceId = existingExperiment.getUserConfigurationData()
- .getComputationalResourceScheduling().getResourceHostId();
-
- ComputeResourceDescription computeResourceDescription = regClient.getComputeResource(compResourceId);
- if(!computeResourceDescription.isEnabled()){
- existingExperiment.getUserConfigurationData().setComputationalResourceScheduling(null);
- }
+ RegistryService.Client regClient = getRegistryServiceClient();
+ if (existingExperiment == null){
+ logger.error(existingExperimentID, "Error while cloning experiment {}, experiment doesn't exist.", existingExperimentID);
+ throw new ExperimentNotFoundException("Requested experiment id " + existingExperimentID + " does not exist in the system..");
+ }
+ if (newExperimentProjectId != null) {
+
+ // getProject will apply sharing permissions
+ Project project = this.getProject(authzToken, newExperimentProjectId);
+ if (project == null){
+ logger.error("Error while cloning experiment {}, project {} doesn't exist.", existingExperimentID, newExperimentProjectId);
+ throw new ProjectNotFoundException("Requested project id " + newExperimentProjectId + " does not exist in the system..");
}
- logger.debug("Airavata cloned experiment with experiment id : " + existingExperimentID);
- existingExperiment.setUserName(userId);
- String expId = regClient.createExperiment(gatewayId, existingExperiment);
+ existingExperiment.setProjectId(project.getProjectID());
+ }
- if(ServerSettings.isEnableSharing()){
- Entity entity = new Entity();
- entity.setEntityId(expId);
- entity.setDomainId(existingExperiment.getGatewayId());
- entity.setEntityTypeId(existingExperiment.getGatewayId()+":"+"EXPERIMENT");
- entity.setOwnerId(existingExperiment.getUserName() + "@" + existingExperiment.getGatewayId());
- entity.setName(existingExperiment.getExperimentName());
- entity.setDescription(existingExperiment.getDescription());
+ // make sure user has write access to the project
+ String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+ String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+ if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+ existingExperiment.getProjectId(), gatewayId + ":WRITE")){
+ logger.error("Error while cloning experiment {}, user doesn't have write access to project {}", existingExperimentID, existingExperiment.getProjectId());
+ throw new AuthorizationException("User does not have permission to clone an experiment in this project");
+ }
- sharingRegistryServerHandler.createEntity(entity);
+ existingExperiment.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
+ if (existingExperiment.getExecutionId() != null){
+ List<OutputDataObjectType> applicationOutputs = regClient.getApplicationOutputs(existingExperiment.getExecutionId());
+ existingExperiment.setExperimentOutputs(applicationOutputs);
+ }
+ if (validateString(newExperimentName)){
+ existingExperiment.setExperimentName(newExperimentName);
+ }
+ if (existingExperiment.getErrors() != null ){
+ existingExperiment.getErrors().clear();
+ }
+ if(existingExperiment.getUserConfigurationData() != null && existingExperiment.getUserConfigurationData()
+ .getComputationalResourceScheduling() != null){
+ String compResourceId = existingExperiment.getUserConfigurationData()
+ .getComputationalResourceScheduling().getResourceHostId();
+
+ ComputeResourceDescription computeResourceDescription = regClient.getComputeResource(compResourceId);
+ if(!computeResourceDescription.isEnabled()){
+ existingExperiment.getUserConfigurationData().setComputationalResourceScheduling(null);
}
+ }
+ logger.debug("Airavata cloned experiment with experiment id : " + existingExperimentID);
+ existingExperiment.setUserName(userId);
+ String expId = regClient.createExperiment(gatewayId, existingExperiment);
- return expId;
- } catch (Exception e) {
- logger.error(existingExperimentID, "Error while cloning the experiment with existing configuration...", e);
- AiravataSystemException exception = new AiravataSystemException();
- exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
- exception.setMessage("Error while cloning the experiment with existing configuration. More info : " + e.getMessage());
- throw exception;
+ if(ServerSettings.isEnableSharing()){
+ Entity entity = new Entity();
+ entity.setEntityId(expId);
+ entity.setDomainId(existingExperiment.getGatewayId());
+ entity.setEntityTypeId(existingExperiment.getGatewayId()+":"+"EXPERIMENT");
+ entity.setOwnerId(existingExperiment.getUserName() + "@" + existingExperiment.getGatewayId());
+ entity.setName(existingExperiment.getExperimentName());
+ entity.setDescription(existingExperiment.getDescription());
+
+ sharingRegistryServerHandler.createEntity(entity);
}
+
+ return expId;
}
/**
[4/7] airavata git commit: AIRAVATA-2207 Add cloneExperimentByAdmin
API method
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f3b778e/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 0b614c2..fe72dce 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
@@ -1332,6 +1332,63 @@ interface AiravataIf {
public function cloneExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
/**
*
+ * Clone an Existing Experiment by an admin user
+ * Existing specified experiment is cloned and a new name is provided. A copy of the experiment configuration is made and is persisted with new metadata.
+ * The client has to subsequently update this configuration if needed and launch the cloned experiment.
+ *
+ * @param newExperimentName
+ * experiment name that should be used in the cloned experiment
+ *
+ * @param updatedExperiment
+ * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+ * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+ * should be shared public by default.
+ * @param newExperimentProjectId
+ * The project in which to create the cloned experiment. This is optional and if null the experiment will be created
+ * in the same project as the existing experiment.
+ *
+ * @return
+ * The server-side generated.airavata.registry.core.experiment.globally unique identifier (Experiment ID) for the newly cloned experiment.
+ *
+ * @throws org.apache.airavata.model.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.model.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.model.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ *
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $existingExperimentID
+ * @param string $newExperimentName
+ * @param string $newExperimentProjectId
+ * @return string
+ * @throws \Airavata\API\Error\InvalidRequestException
+ * @throws \Airavata\API\Error\ExperimentNotFoundException
+ * @throws \Airavata\API\Error\AiravataClientException
+ * @throws \Airavata\API\Error\AiravataSystemException
+ * @throws \Airavata\API\Error\AuthorizationException
+ * @throws \Airavata\API\Error\ProjectNotFoundException
+ */
+ public function cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
+ /**
+ *
* Terminate a running Experiment.
*
* @gatewayId
@@ -7280,6 +7337,78 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("cloneExperiment failed: unknown result");
}
+ public function cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
+ {
+ $this->send_cloneExperimentByAdmin($authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
+ return $this->recv_cloneExperimentByAdmin();
+ }
+
+ public function send_cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
+ {
+ $args = new \Airavata\API\Airavata_cloneExperimentByAdmin_args();
+ $args->authzToken = $authzToken;
+ $args->existingExperimentID = $existingExperimentID;
+ $args->newExperimentName = $newExperimentName;
+ $args->newExperimentProjectId = $newExperimentProjectId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'cloneExperimentByAdmin', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('cloneExperimentByAdmin', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_cloneExperimentByAdmin()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_cloneExperimentByAdmin_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \Airavata\API\Airavata_cloneExperimentByAdmin_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ire !== null) {
+ throw $result->ire;
+ }
+ if ($result->enf !== null) {
+ throw $result->enf;
+ }
+ if ($result->ace !== null) {
+ throw $result->ace;
+ }
+ if ($result->ase !== null) {
+ throw $result->ase;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ if ($result->pnfe !== null) {
+ throw $result->pnfe;
+ }
+ throw new \Exception("cloneExperimentByAdmin failed: unknown result");
+ }
+
public function terminateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId)
{
$this->send_terminateExperiment($authzToken, $airavataExperimentId, $gatewayId);
@@ -30341,6 +30470,380 @@ class Airavata_cloneExperiment_result {
}
+class Airavata_cloneExperimentByAdmin_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $existingExperimentID = null;
+ /**
+ * @var string
+ */
+ public $newExperimentName = null;
+ /**
+ * @var string
+ */
+ public $newExperimentProjectId = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'authzToken',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Security\AuthzToken',
+ ),
+ 2 => array(
+ 'var' => 'existingExperimentID',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'newExperimentName',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'newExperimentProjectId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['existingExperimentID'])) {
+ $this->existingExperimentID = $vals['existingExperimentID'];
+ }
+ if (isset($vals['newExperimentName'])) {
+ $this->newExperimentName = $vals['newExperimentName'];
+ }
+ if (isset($vals['newExperimentProjectId'])) {
+ $this->newExperimentProjectId = $vals['newExperimentProjectId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_cloneExperimentByAdmin_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+ $xfer += $this->authzToken->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->existingExperimentID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->newExperimentName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->newExperimentProjectId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_cloneExperimentByAdmin_args');
+ if ($this->authzToken !== null) {
+ if (!is_object($this->authzToken)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+ $xfer += $this->authzToken->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->existingExperimentID !== null) {
+ $xfer += $output->writeFieldBegin('existingExperimentID', TType::STRING, 2);
+ $xfer += $output->writeString($this->existingExperimentID);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->newExperimentName !== null) {
+ $xfer += $output->writeFieldBegin('newExperimentName', TType::STRING, 3);
+ $xfer += $output->writeString($this->newExperimentName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->newExperimentProjectId !== null) {
+ $xfer += $output->writeFieldBegin('newExperimentProjectId', TType::STRING, 4);
+ $xfer += $output->writeString($this->newExperimentProjectId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_cloneExperimentByAdmin_result {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\API\Error\InvalidRequestException
+ */
+ public $ire = null;
+ /**
+ * @var \Airavata\API\Error\ExperimentNotFoundException
+ */
+ public $enf = null;
+ /**
+ * @var \Airavata\API\Error\AiravataClientException
+ */
+ public $ace = null;
+ /**
+ * @var \Airavata\API\Error\AiravataSystemException
+ */
+ public $ase = null;
+ /**
+ * @var \Airavata\API\Error\AuthorizationException
+ */
+ public $ae = null;
+ /**
+ * @var \Airavata\API\Error\ProjectNotFoundException
+ */
+ public $pnfe = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRING,
+ ),
+ 1 => array(
+ 'var' => 'ire',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\InvalidRequestException',
+ ),
+ 2 => array(
+ 'var' => 'enf',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+ ),
+ 3 => array(
+ 'var' => 'ace',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataClientException',
+ ),
+ 4 => array(
+ 'var' => 'ase',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataSystemException',
+ ),
+ 5 => array(
+ 'var' => 'ae',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AuthorizationException',
+ ),
+ 6 => array(
+ 'var' => 'pnfe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ProjectNotFoundException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ire'])) {
+ $this->ire = $vals['ire'];
+ }
+ if (isset($vals['enf'])) {
+ $this->enf = $vals['enf'];
+ }
+ if (isset($vals['ace'])) {
+ $this->ace = $vals['ace'];
+ }
+ if (isset($vals['ase'])) {
+ $this->ase = $vals['ase'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ if (isset($vals['pnfe'])) {
+ $this->pnfe = $vals['pnfe'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_cloneExperimentByAdmin_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ire = new \Airavata\API\Error\InvalidRequestException();
+ $xfer += $this->ire->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+ $xfer += $this->enf->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->ace = new \Airavata\API\Error\AiravataClientException();
+ $xfer += $this->ace->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->ase = new \Airavata\API\Error\AiravataSystemException();
+ $xfer += $this->ase->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRUCT) {
+ $this->ae = new \Airavata\API\Error\AuthorizationException();
+ $xfer += $this->ae->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRUCT) {
+ $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+ $xfer += $this->pnfe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_cloneExperimentByAdmin_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ire !== null) {
+ $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+ $xfer += $this->ire->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->enf !== null) {
+ $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+ $xfer += $this->enf->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ace !== null) {
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+ $xfer += $this->ace->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ase !== null) {
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+ $xfer += $this->ase->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->pnfe !== null) {
+ $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 6);
+ $xfer += $this->pnfe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_terminateExperiment_args {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f3b778e/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml b/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
index 02319e3..58730c9 100644
--- a/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
+++ b/modules/configuration/server/src/main/resources/airavata-default-xacml-policy.xml
@@ -81,6 +81,7 @@
/airavata/getJobStatuses|
/airavata/getJobDetails|
/airavata/cloneExperiment|
+/airavata/cloneExperimentByAdmin|
/airavata/terminateExperiment|
/airavata/getApplicationInterface|
/airavata/getAllApplicationInterfaceNames|
http://git-wip-us.apache.org/repos/asf/airavata/blob/5f3b778e/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index f64aeb4..9a07df0 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -1199,6 +1199,60 @@ service Airavata {
/**
*
+ * Clone an Existing Experiment by an admin user
+ * Existing specified experiment is cloned and a new name is provided. A copy of the experiment configuration is made and is persisted with new metadata.
+ * The client has to subsequently update this configuration if needed and launch the cloned experiment.
+ *
+ * @param newExperimentName
+ * experiment name that should be used in the cloned experiment
+ *
+ * @param updatedExperiment
+ * Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+ * the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+ * should be shared public by default.
+ * @param newExperimentProjectId
+ * The project in which to create the cloned experiment. This is optional and if null the experiment will be created
+ * in the same project as the existing experiment.
+ *
+ * @return
+ * The server-side generated.airavata.registry.core.experiment.globally unique identifier (Experiment ID) for the newly cloned experiment.
+ *
+ * @throws org.apache.airavata.model.error.InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+ * If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ *
+ * @throws org.apache.airavata.model.error.AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+ *
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ *
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ *
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ *
+ * @throws org.apache.airavata.model.error.AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Administrator will be notified to take corrective action.
+ *
+ */
+ string cloneExperimentByAdmin(1: required security_model.AuthzToken authzToken,
+ 2: string existingExperimentID,
+ 3: string newExperimentName,
+ 4: string newExperimentProjectId)
+ throws (1: airavata_errors.InvalidRequestException ire,
+ 2: airavata_errors.ExperimentNotFoundException enf,
+ 3: airavata_errors.AiravataClientException ace,
+ 4: airavata_errors.AiravataSystemException ase,
+ 5: airavata_errors.AuthorizationException ae,
+ 6: airavata_errors.ProjectNotFoundException pnfe)
+ /**
+ *
* Terminate a running Experiment.
*
* @gatewayId
[3/7] airavata git commit: AIRAVATA-2207 Add getExperimentByAdmin
method
Posted by sc...@apache.org.
AIRAVATA-2207 Add getExperimentByAdmin method
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0fda5a8f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0fda5a8f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0fda5a8f
Branch: refs/heads/develop
Commit: 0fda5a8fc0e113a8eb13685ba1d419c2c1a16934
Parents: 2e7fb05
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Nov 10 12:36:38 2016 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Nov 10 12:36:38 2016 -0500
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 23 +
.../java/org/apache/airavata/api/Airavata.java | 15034 +++++++++--------
.../resources/lib/Airavata/API/Airavata.php | 436 +
.../resources/airavata-default-xacml-policy.xml | 1 +
.../airavata-apis/airavata_api.thrift | 43 +
5 files changed, 8815 insertions(+), 6722 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0fda5a8f/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 0f56747..2f7a014 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
@@ -1200,6 +1200,29 @@ public class AiravataServerHandler implements Airavata.Iface {
}
}
+ @Override
+ @SecurityCheck
+ public ExperimentModel getExperimentByAdmin(AuthzToken authzToken, String airavataExperimentId)
+ throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+
+ ExperimentModel experimentModel = null;
+ try {
+ String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+ experimentModel = getRegistryServiceClient().getExperiment(airavataExperimentId);
+ if(gatewayId.equals(experimentModel.getGatewayId())){
+ return experimentModel;
+ } else {
+ throw new AuthorizationException("User does not have permission to access this resource");
+ }
+ } catch (ApplicationSettingsException e) {
+ logger.error("Error while getting the experiment", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while getting the experiment. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
/**
* Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
* tasks -> jobs information.