airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject git commit: Regenarating the server implementation against new data models
Date Wed, 19 Feb 2014 18:30:16 GMT
Repository: airavata
Updated Branches:
  refs/heads/master fe40a1d3d -> a6200bbc1


Regenarating the server implementation against new data models


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a6200bbc
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a6200bbc
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a6200bbc

Branch: refs/heads/master
Commit: a6200bbc1f0f60ba49d2bfdc5898488945979cf0
Parents: fe40a1d
Author: Suresh Marru <smarru@apache.org>
Authored: Wed Feb 19 13:30:11 2014 -0500
Committer: Suresh Marru <smarru@apache.org>
Committed: Wed Feb 19 13:30:11 2014 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   | 280 +++++++++++++++++++
 1 file changed, 280 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a6200bbc/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
new file mode 100644
index 0000000..f0e7081
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -0,0 +1,280 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.api.server.handler;
+
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.api.error.AiravataClientException;
+import org.apache.airavata.api.error.AiravataSystemException;
+import org.apache.airavata.api.error.ExperimentNotFoundException;
+import org.apache.airavata.api.error.InvalidRequestException;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.thrift.TException;
+
+public class AiravataServerHandler implements Airavata.Iface {
+
+    /**
+     * Query Airavata to fetch the API version
+     */
+    @Override
+    public String GetAPIVersion() throws TException {
+        return null;
+    }
+
+    /**
+     * Create an experiment for the specified user belonging to the gateway. The gateway
identity is not explicitly passed
+     * but inferred from the authentication header. This experiment is just a persistent
place holder. The client
+     * has to subsequently configure and launch the created experiment. No action is taken
on Airavata Server except
+     * registering the experiment in a persistent store.
+     *
+     * @param experiment@return The server-side generated airavata experiment globally unique
identifier.
+     * @throws org.apache.airavata.api.error.InvalidRequestException For any incorrect forming
of the request itself.
+     * @throws org.apache.airavata.api.error.AiravataClientException The following list of
exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                               <p/>
+     *                                                               UNKNOWN_GATEWAY_ID -
If a Gateway is not registered with Airavata as a one time administrative
+     *                                                               step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                               gateway registration
steps and retry this request.
+     *                                                               <p/>
+     *                                                               AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                               For now this is a place
holder.
+     *                                                               <p/>
+     *                                                               INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                               is implemented, the
authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                               rather an Airavata Administrator
will be notified to take corrective action.
+     */
+    @Override
+    public String createExperiment(Experiment experiment) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    /**
+     * Fetch previously created experiment metadata.
+     *
+     * @param airavataExperimentId The identifier for the requested experiment. This is returned
during the create experiment step.
+     * @return experimentMetada
+     * This method will return the previously stored experiment metadata.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public Experiment getBasicExperiment(String airavataExperimentId) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
+        return null;
+    }
+
+    /**
+     * Configure a previously created experiment with required inputs, scheduling and other
quality of service
+     * parameters. This method only updates the experiment object within the registry. The
experiment has to be launched
+     * to make it actionable by the server.
+     *
+     * @param airavataExperimentId The identifier for the requested experiment. This is returned
during the create experiment step.
+     * @param experiment
+     * @return This method call does not have a return value.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public void updateExperiment(String airavataExperimentId, Experiment experiment) throws
InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException,
TException {
+
+    }
+
+    /**
+     * Fetch the previously configured experiment configuration information.
+     *
+     * @param airavataExperimentId The identifier for the requested experiment. This is returned
during the create experiment step.
+     * @return This method returns the previously configured experiment configuration data.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public ExperimentStatus getExperimentStatus(String airavataExperimentId) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
+        return null;
+    }
+
+    /**
+     * Launch a previously created and configured experiment. Airavata Server will then start
processing the request and appropriate
+     * notifications and intermediate and output data will be subsequently available for
this experiment.
+     *
+     * @param airavataExperimentId   The identifier for the requested experiment. This is
returned during the create experiment step.
+     * @param airavataCredStoreToken :
+     *                               A requirement to execute experiments within Airavata
is to first register the targeted remote computational account
+     *                               credentials with Airavata Credential Store. The administrative
API (related to credential store) will return a
+     *                               generated token associated with the registered credentials.
The client has to security posses this token id and is
+     *                               required to pass it to Airavata Server for all execution
requests.
+     *                               Note: At this point only the credential store token
is required so the string is directly passed here. In future if
+     *                               if more security credentials are enables, then the structure
ExecutionSecurityParameters should be used.
+     *                               Note: This parameter is not persisted within Airavata
Registry for security reasons.
+     * @return This method call does not have a return value.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public void launchExperiment(String airavataExperimentId, String airavataCredStoreToken)
throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException,
TException {
+
+    }
+
+    /**
+     * Configure and Launch a previously created experiment with required inputs, scheduling,
security and other quality of service
+     * parameters. This method also launches the experiment after it is configured. If you
would like to configure only
+     * and launch at a later time or partially configure then ConfigureExperiment should
be used.
+     *
+     * @param airavataExperimentId   The identifier for the requested experiment. This is
returned during the create experiment step.
+     * @param experiment
+     * @param airavataCredStoreToken :
+     *                               A requirement to execute experiments within Airavata
is to first register the targeted remote computational account
+     *                               credentials with Airavata Credential Store. The administrative
API (related to credential store) will return a
+     *                               generated token associated with the registered credentials.
The client has to security posses this token id and is
+     *                               required to pass it to Airavata Server for all execution
requests.
+     *                               Note: At this point only the credential store token
is required so the string is directly passed here. In future if
+     *                               if more security credentials are enables, then the structure
ExecutionSecurityParameters should be used.
+     * @return The server-side generated experiment GUID.
+     * @throws org.apache.airavata.api.error.InvalidRequestException For any incorrect forming
of the request itself.
+     * @throws org.apache.airavata.api.error.AiravataClientException The following list of
exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                               <p/>
+     *                                                               UNKNOWN_GATEWAY_ID -
If a Gateway is not registered with Airavata as a one time administrative
+     *                                                               step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                               gateway registration
steps and retry this request.
+     *                                                               <p/>
+     *                                                               AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                               For now this is a place
holder.
+     *                                                               <p/>
+     *                                                               INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                               is implemented, the
authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                               rather an Airavata Administrator
will be notified to take corrective action.
+     */
+    @Override
+    public String updateAndLaunchExperiment(String airavataExperimentId, Experiment experiment,
String airavataCredStoreToken) throws InvalidRequestException, ExperimentNotFoundException,
AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    /**
+     * Clone an specified experiment with a new name. A copy of the experiment configuration
is made and is persisted with new metadata.
+     * The client has to subsequently update this configuration if needed and launch the
cloned experiment.
+     *
+     * @param airavataExperimentIdToBeCloned This is the experiment identifier that is to
be cloned.
+     * @param updatedExperiment
+     * @return The server-side generated airavata experiment globally unique identifier for
the newly cloned experiment.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public String cloneExperiment(String airavataExperimentIdToBeCloned, Experiment updatedExperiment)
throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException,
TException {
+        return null;
+    }
+
+    /**
+     * Terminate a running experiment.
+     *
+     * @param airavataExperimentId The identifier for the requested experiment. This is returned
during the create experiment step.
+     * @return This method call does not have a return value.
+     * @throws org.apache.airavata.api.error.InvalidRequestException     For any incorrect
forming of the request itself.
+     * @throws org.apache.airavata.api.error.ExperimentNotFoundException If the specified
experiment is not previously created, then an Experiment Not Found Exception is thrown.
+     * @throws org.apache.airavata.api.error.AiravataClientException     The following list
of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *                                                                   <p/>
+     *                                                                   UNKNOWN_GATEWAY_ID
- If a Gateway is not registered with Airavata as a one time administrative
+     *                                                                   step, then Airavata
Registry will not have a provenance area setup. The client has to follow
+     *                                                                   gateway registration
steps and retry this request.
+     *                                                                   <p/>
+     *                                                                   AUTHENTICATION_FAILURE
- How Authentication will be implemented is yet to be determined.
+     *                                                                   For now this is
a place holder.
+     *                                                                   <p/>
+     *                                                                   INVALID_AUTHORIZATION
- This will throw an authorization exception. When a more robust security hand-shake
+     *                                                                   is implemented,
the authorization will be more substantial.
+     * @throws org.apache.airavata.api.error.AiravataSystemException     This exception will
be thrown for any Airavata Server side issues and if the problem cannot be corrected by the
client
+     *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
+     */
+    @Override
+    public void terminateExperiment(String airavataExperimentId) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
+
+    }
+
+    @Override
+    public String createProject(String projectName, String userName) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
+        return null;
+    }
+}


Mime
View raw message