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/08/08 18:14:23 UTC
[6/7] airavata git commit: adding registry server module
http://git-wip-us.apache.org/repos/asf/airavata/blob/2d9fd253/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
new file mode 100644
index 0000000..7e2eb29
--- /dev/null
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
@@ -0,0 +1,1677 @@
+/*
+ *
+ * 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.registry.api.service.handler;
+
+import org.apache.airavata.model.WorkflowModel;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
+import org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference;
+import org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
+import org.apache.airavata.model.data.movement.DMType;
+import org.apache.airavata.model.data.movement.*;
+import org.apache.airavata.model.data.replica.DataProductModel;
+import org.apache.airavata.model.data.replica.DataReplicaLocationModel;
+import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.error.AiravataSystemException;
+import org.apache.airavata.model.error.ExperimentNotFoundException;
+import org.apache.airavata.model.error.InvalidRequestException;
+import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.model.job.JobModel;
+import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
+import org.apache.airavata.model.status.ExperimentStatus;
+import org.apache.airavata.model.status.JobStatus;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Notification;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.registry.api.RegistryService;
+import org.apache.airavata.registry.api.exception.RegistryServiceException;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class RegistryServerHandler implements RegistryService.Iface {
+ private final static Logger logger = LoggerFactory.getLogger(RegistryServerHandler.class);
+
+ /**
+ * Fetch Apache Registry API version
+ */
+ @Override
+ public String getAPIVersion() throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Verify if User Exists within Airavata.
+ *
+ * @param gatewayId
+ * @param userName
+ * @return true/false
+ */
+ @Override
+ public boolean isUserExists(String gatewayId, String userName) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Get all users in the gateway
+ *
+ * @param gatewayId The gateway data model.
+ * @return users
+ * list of usernames of the users in the gateway
+ */
+ @Override
+ public List<String> getAllUsersInGateway(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Gateway details by providing gatewayId
+ *
+ * @param gatewayId The gateway Id of the Gateway.
+ * @return gateway
+ * Gateway obejct.
+ */
+ @Override
+ public Gateway getGateway(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete a Gateway
+ *
+ * @param gatewayId The gateway Id of the Gateway to be deleted.
+ * @return boolean
+ * Boolean identifier for the success or failure of the deletion operation.
+ */
+ @Override
+ public boolean deleteGateway(String gatewayId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Get All the Gateways Connected to Airavata.
+ */
+ @Override
+ public List<Gateway> getAllGateways() throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Check for the Existance of a Gateway within Airavata
+ *
+ * @param gatewayId Provide the gatewayId of the gateway you want to check the existancy
+ * @return gatewayId
+ * return the gatewayId of the existing gateway.
+ */
+ @Override
+ public boolean isGatewayExist(String gatewayId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteNotification(String gatewayId, String notificationId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ @Override
+ public Notification getNotification(String gatewayId, String notificationId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Notification> getAllNotifications(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get a Project by ID
+ * This method is to obtain a project by providing a projectId.
+ *
+ * @param projectId projectId of the project you require.
+ * @return project
+ * project data model will be returned.
+ */
+ @Override
+ public Project getProject(String projectId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete a Project
+ * This method is used to delete an existing Project.
+ *
+ * @param projectId projectId of the project you want to delete.
+ * @return boolean
+ * Boolean identifier for the success or failure of the deletion operation.
+ * <p>
+ * NOTE: This method is not used within gateways connected with Airavata.
+ */
+ @Override
+ public boolean deleteProject(String projectId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Get All User Projects
+ * Get all Project for the user with pagination. Results will be ordered based on creation time DESC.
+ *
+ * @param gatewayId The identifier for the requested gateway.
+ * @param userName The identifier of the user.
+ * @param limit The amount results to be fetched.
+ * @param offset The starting point of the results to be fetched.
+ */
+ @Override
+ public List<Project> getUserProjects(String gatewayId, String userName, int limit, int offset) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Experiment Statistics
+ * Get Experiment Statisitics for a given gateway for a specific time period. This feature is available only for admins of a particular gateway. Gateway admin access is managed by the user roles.
+ *
+ * @param gatewayId Unique identifier of the gateway making the request to fetch statistics.
+ * @param fromTime Starting date time.
+ * @param toTime Ending data time.
+ */
+ @Override
+ public ExperimentStatistics getExperimentStatistics(String gatewayId, long fromTime, long toTime) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get All Experiments of the Project
+ * Get Experiments within project with pagination. Results will be sorted based on creation time DESC.
+ *
+ * @param projectId Uniqie identifier of the project.
+ * @param limit Amount of results to be fetched.
+ * @param offset The starting point of the results to be fetched.
+ */
+ @Override
+ public List<ExperimentModel> getExperimentsInProject(String projectId, int limit, int offset) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get All Experiments of the User
+ * Get experiments by user with pagination. Results will be sorted based on creation time DESC.
+ *
+ * @param gatewayId Identifier of the requesting gateway.
+ * @param userName Username of the requested end user.
+ * @param limit Amount of results to be fetched.
+ * @param offset The starting point of the results to be fetched.
+ */
+ @Override
+ public List<ExperimentModel> getUserExperiments(String gatewayId, String userName, int limit, int offset) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete an Experiment
+ * If the experiment is not already launched experiment can be deleted.
+ *
+ * @param experimentId@return boolean
+ * Identifier for the success or failure of the deletion operation.
+ */
+ @Override
+ public boolean deleteExperiment(String experimentId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * *
+ * * Get Experiment
+ * * 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 airavataExperimentId
+ */
+ @Override
+ public ExperimentModel getExperiment(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Complete Experiment Details
+ * Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
+ * tasks -> jobs information.
+ *
+ * @param airavataExperimentId The identifier for the requested experiment. This is returned during the create experiment step.
+ * @return ExperimentModel
+ * This method will return the previously stored experiment metadata including application input parameters, computational resource scheduling
+ * information, special input output handling and additional quality of service parameters.
+ * @throws InvalidRequestException For any incorrect forming of the request itself.
+ * @throws ExperimentNotFoundException If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ * @throws 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 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 ExperimentModel getDetailedExperimentTree(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Experiment Status
+ * <p>
+ * Obtain the status of an experiment by providing the Experiment Id
+ *
+ * @param airavataExperimentId Experiment ID of the experimnet you require the status.
+ * @return ExperimentStatus
+ * ExperimentStatus model with the current status will be returned.
+ */
+ @Override
+ public ExperimentStatus getExperimentStatus(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Experiment Outputs
+ * This method to be used when need to obtain final outputs of a certain Experiment
+ *
+ * @param airavataExperimentId Experiment ID of the experimnet you need the outputs.
+ * @return list
+ * List of experiment outputs will be returned. They will be returned as a list of OutputDataObjectType for the experiment.
+ */
+ @Override
+ public List<OutputDataObjectType> getExperimentOutputs(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Intermediate Experiment Outputs
+ * This method to be used when need to obtain intermediate outputs of a certain Experiment
+ *
+ * @param airavataExperimentId Experiment ID of the experimnet you need intermediate outputs.
+ * @return list
+ * List of intermediate experiment outputs will be returned. They will be returned as a list of OutputDataObjectType for the experiment.
+ */
+ @Override
+ public List<OutputDataObjectType> getIntermediateOutputs(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Job Statuses for an Experiment
+ * This method to be used when need to get the job status of an Experiment. An experiment may have one or many jobs; there for one or many job statuses may turnup
+ *
+ * @param airavataExperimentId@return JobStatus
+ * Job status (string) for all all the existing jobs for the experiment will be returned in the form of a map
+ */
+ @Override
+ public Map<String, JobStatus> getJobStatuses(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Get Job Details for all the jobs within an Experiment.
+ * This method to be used when need to get the job details for one or many jobs of an Experiment.
+ *
+ * @param airavataExperimentId@return list of JobDetails
+ * Job details.
+ */
+ @Override
+ public List<JobModel> getJobDetails(String airavataExperimentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch a Application Module.
+ *
+ * @param appModuleId The unique identifier of the application module required
+ * @return applicationModule
+ * Returns an Application Module Object.
+ */
+ @Override
+ public ApplicationModule getApplicationModule(String appModuleId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all Application Module Descriptions.
+ *
+ * @param gatewayId ID of the gateway which need to list all available application deployment documentation.
+ * @return list
+ * Returns the list of all Application Module Objects.
+ */
+ @Override
+ public List<ApplicationModule> getAllAppModules(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete an Application Module.
+ *
+ * @param appModuleId The identifier of the Application Module to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteApplicationModule(String appModuleId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch a Application Deployment.
+ *
+ * @param appDeploymentId The identifier for the requested application module
+ * @return applicationDeployment
+ * Returns a application Deployment Object.
+ */
+ @Override
+ public ApplicationDeploymentDescription getApplicationDeployment(String appDeploymentId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete an Application Deployment.
+ *
+ * @param appDeploymentId The unique identifier of application deployment to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteApplicationDeployment(String appDeploymentId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch all Application Deployment Descriptions.
+ *
+ * @param gatewayId ID of the gateway which need to list all available application deployment documentation.
+ * @param gatewayId
+ * @return list<applicationDeployment.
+ * Returns the list of all application Deployment Objects.
+ */
+ @Override
+ public List<ApplicationDeploymentDescription> getAllApplicationDeployments(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch a list of Deployed Compute Hosts.
+ *
+ * @param appModuleId The identifier for the requested application module
+ * @return list<string>
+ * Returns a list of Deployed Resources.
+ */
+ @Override
+ public List<String> getAppModuleDeployedResources(String appModuleId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch an Application Interface.
+ *
+ * @param appInterfaceId The identifier for the requested application interface.
+ * @return applicationInterface
+ * Returns an application Interface Object.
+ */
+ @Override
+ public ApplicationInterfaceDescription getApplicationInterface(String appInterfaceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete an Application Interface.
+ *
+ * @param appInterfaceId The identifier for the requested application interface to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteApplicationInterface(String appInterfaceId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch name and ID of Application Interface documents.
+ *
+ * @param gatewayId
+ * @return map<applicationId, applicationInterfaceNames>
+ * Returns a list of application interfaces with corresponsing ID's
+ */
+ @Override
+ public Map<String, String> getAllApplicationInterfaceNames(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all Application Interface documents.
+ *
+ * @param gatewayId
+ * @return map<applicationId, applicationInterfaceNames>
+ * Returns a list of application interfaces documents (Application Interface ID, name, description, Inputs and Outputs objects).
+ */
+ @Override
+ public List<ApplicationInterfaceDescription> getAllApplicationInterfaces(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch the list of Application Inputs.
+ *
+ * @param appInterfaceId The identifier of the application interface which need inputs to be fetched.
+ * @return list<application_interface_model.InputDataObjectType>
+ * Returns a list of application inputs.
+ */
+ @Override
+ public List<InputDataObjectType> getApplicationInputs(String appInterfaceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch list of Application Outputs.
+ *
+ * @param appInterfaceId The identifier of the application interface which need outputs to be fetched.
+ * @return list<application_interface_model.OutputDataObjectType>
+ * Returns a list of application outputs.
+ */
+ @Override
+ public List<OutputDataObjectType> getApplicationOutputs(String appInterfaceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch a list of all deployed Compute Hosts for a given application interfaces.
+ *
+ * @param appInterfaceId The identifier for the requested application interface.
+ * @return map<computeResourceId, computeResourceName>
+ * A map of registered compute resource id's and their corresponding hostnames.
+ * Deployments of each modules listed within the interfaces will be listed.
+ */
+ @Override
+ public Map<String, String> getAvailableAppInterfaceComputeResources(String appInterfaceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch the given Compute Resource.
+ *
+ * @param computeResourceId The identifier for the requested compute resource
+ * @return computeResourceDescription
+ * Compute Resource Object created from the datamodel..
+ */
+ @Override
+ public ComputeResourceDescription getComputeResource(String computeResourceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all registered Compute Resources.
+ *
+ * @return A map of registered compute resource id's and thier corresponding hostnames.
+ * Compute Resource Object created from the datamodel..
+ */
+ @Override
+ public Map<String, String> getAllComputeResourceNames() throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete a Compute Resource.
+ *
+ * @param computeResourceId The identifier for the requested compute resource to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteComputeResource(String computeResourceId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch the given Storage Resource.
+ *
+ * @param storageResourceId The identifier for the requested storage resource
+ * @return storageResourceDescription
+ * Storage Resource Object created from the datamodel..
+ */
+ @Override
+ public StorageResourceDescription getStorageResource(String storageResourceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all registered Storage Resources.
+ *
+ * @return A map of registered compute resource id's and thier corresponding hostnames.
+ * Compute Resource Object created from the datamodel..
+ */
+ @Override
+ public Map<String, String> getAllStorageResourceNames() throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete a Storage Resource.
+ *
+ * @param storageResourceId The identifier of the requested compute resource to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteStorageResource(String storageResourceId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * This method returns localJobSubmission object
+ *
+ * @param jobSubmissionId@return LOCALSubmission instance
+ */
+ @Override
+ public LOCALSubmission getLocalJobSubmission(String jobSubmissionId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * This method returns SSHJobSubmission object
+ *
+ * @param jobSubmissionId@return SSHJobSubmission instance
+ */
+ @Override
+ public SSHJobSubmission getSSHJobSubmission(String jobSubmissionId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * *
+ * * This method returns UnicoreJobSubmission object
+ * *
+ * * @param jobSubmissionInterfaceId
+ * * The identifier of the JobSubmission Interface to be retrieved.
+ * * @return UnicoreJobSubmission instance
+ * *
+ * *
+ *
+ * @param jobSubmissionId
+ */
+ @Override
+ public UnicoreJobSubmission getUnicoreJobSubmission(String jobSubmissionId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * *
+ * * This method returns cloudJobSubmission object
+ * * @param jobSubmissionInterfaceI
+ * * The identifier of the JobSubmission Interface to be retrieved.
+ * * @return CloudJobSubmission instance
+ * *
+ *
+ * @param jobSubmissionId
+ */
+ @Override
+ public CloudJobSubmission getCloudJobSubmission(String jobSubmissionId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * This method returns local datamovement object.
+ *
+ * @param dataMovementId The identifier of the datamovement Interface to be retrieved.
+ * @return LOCALDataMovement instance
+ */
+ @Override
+ public LOCALDataMovement getLocalDataMovement(String dataMovementId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * This method returns SCP datamovement object
+ *
+ * @param dataMovementId The identifier of the datamovement Interface to be retrieved.
+ * @return SCPDataMovement instance
+ */
+ @Override
+ public SCPDataMovement getSCPDataMovement(String dataMovementId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * This method returns UNICORE datamovement object
+ *
+ * @param dataMovementId The identifier of the datamovement Interface to be retrieved.
+ * @return UnicoreDataMovement instance
+ */
+ @Override
+ public UnicoreDataMovement getUnicoreDataMovement(String dataMovementId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * This method returns GridFTP datamovement object
+ *
+ * @param dataMovementId The identifier of the datamovement Interface to be retrieved.
+ * @return GridFTPDataMovement instance
+ */
+ @Override
+ public GridFTPDataMovement getGridFTPDataMovement(String dataMovementId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Change the priority of a given job submisison interface
+ *
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be changed
+ * @param newPriorityOrder
+ * @return status
+ * Returns a success/failure of the change.
+ */
+ @Override
+ public boolean changeJobSubmissionPriority(String jobSubmissionInterfaceId, int newPriorityOrder) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Change the priority of a given data movement interface
+ *
+ * @param dataMovementInterfaceId The identifier of the DataMovement Interface to be changed
+ * @param newPriorityOrder
+ * @return status
+ * Returns a success/failure of the change.
+ */
+ @Override
+ public boolean changeDataMovementPriority(String dataMovementInterfaceId, int newPriorityOrder) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Change the priorities of a given set of job submission interfaces
+ *
+ * @param jobSubmissionPriorityMap A Map of identifiers of the JobSubmission Interfaces and thier associated priorities to be set.
+ * @return status
+ * Returns a success/failure of the changes.
+ */
+ @Override
+ public boolean changeJobSubmissionPriorities(Map<String, Integer> jobSubmissionPriorityMap) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Change the priorities of a given set of data movement interfaces
+ *
+ * @param dataMovementPriorityMap A Map of identifiers of the DataMovement Interfaces and thier associated priorities to be set.
+ * @return status
+ * Returns a success/failure of the changes.
+ */
+ @Override
+ public boolean changeDataMovementPriorities(Map<String, Integer> dataMovementPriorityMap) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Delete a given job submisison interface
+ *
+ * @param computeResourceId
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be changed
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ @Override
+ public ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public boolean deleteResourceJobManager(String resourceJobManagerId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Delete a Compute Resource Queue
+ *
+ * @param computeResourceId The identifier of the compute resource which has the queue to be deleted
+ * @param queueName Name of the queue need to be deleted. Name is the uniqueue identifier for the queue within a compute resource
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteBatchQueue(String computeResourceId, String queueName) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch the given Gateway Resource Profile.
+ *
+ * @param gatewayID The identifier for the requested gateway resource.
+ * @return gatewayResourceProfile
+ * Gateway Resource Profile Object.
+ */
+ @Override
+ public GatewayResourceProfile getGatewayResourceProfile(String gatewayID) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete the given Gateway Resource Profile.
+ *
+ * @param gatewayID The identifier for the requested gateway resource to be deleted.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteGatewayResourceProfile(String gatewayID) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Fetch a Compute Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be requested
+ * @param computeResourceId Preferences related to a particular compute resource
+ * @return computeResourcePreference
+ * Returns the ComputeResourcePreference object.
+ */
+ @Override
+ public ComputeResourcePreference getGatewayComputeResourcePreference(String gatewayID, String computeResourceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch a Storage Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayID The identifier of the gateway profile to request to fetch the particular storage resource preference.
+ * @param storageResourceId Identifier of the Stprage Preference required to be fetched.
+ * @return StoragePreference
+ * Returns the StoragePreference object.
+ */
+ @Override
+ public StoragePreference getGatewayStoragePreference(String gatewayID, String storageResourceId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all Compute Resource Preferences of a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be requested
+ * @return computeResourcePreference
+ * Returns the ComputeResourcePreference object.
+ */
+ @Override
+ public List<ComputeResourcePreference> getAllGatewayComputeResourcePreferences(String gatewayID) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all Storage Resource Preferences of a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be requested
+ * @return StoragePreference
+ * Returns the StoragePreference object.
+ */
+ @Override
+ public List<StoragePreference> getAllGatewayStoragePreferences(String gatewayID) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Fetch all Gateway Profiles registered
+ *
+ * @return GatewayResourceProfile
+ * Returns all the GatewayResourcePrifle list object.
+ */
+ @Override
+ public List<GatewayResourceProfile> getAllGatewayResourceProfiles() throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete the Compute Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be deleted.
+ * @param computeResourceId Preferences related to a particular compute resource
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteGatewayComputeResourcePreference(String gatewayID, String computeResourceId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Delete the Storage Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayID The identifier of the gateway profile to be deleted.
+ * @param storageId ID of the storage preference you want to delete.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteGatewayStoragePreference(String gatewayID, String storageId) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Delete the Storage Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayId@return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public List<String> getAllWorkflows(String gatewayId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * API Methods Related for Work-Flow Submission Features.
+ *
+ * @param workflowTemplateId
+ */
+ @Override
+ public WorkflowModel getWorkflow(String workflowTemplateId) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public void deleteWorkflow(String workflowTemplateId) throws RegistryServiceException, TException {
+
+ }
+
+ @Override
+ public String getWorkflowTemplateId(String workflowName) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public boolean isWorkflowExistWithName(String workflowName) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ @Override
+ public DataProductModel getDataProduct(String dataProductUri) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public DataProductModel getParentDataProduct(String productUri) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public List<DataProductModel> getChildDataProducts(String productUri) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public String registerReplicaLocation(DataReplicaLocationModel replicaLocationModel) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * API Methods related to replica catalog
+ *
+ * @param dataProductModel
+ */
+ @Override
+ public String registerDataProduct(DataProductModel dataProductModel) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public void updateWorkflow(String workflowTemplateId, WorkflowModel workflow) throws RegistryServiceException, TException {
+
+ }
+
+ @Override
+ public String registerWorkflow(String gatewayId, WorkflowModel workflow) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a Storage Resource Preference of a registered gateway profile.
+ *
+ * @param gatewayID The identifier of the gateway profile to be updated.
+ * @param storageId The Storage resource identifier of the one that you want to update
+ * @param storagePreference The storagePreference object to be updated to the resource profile.
+ * @return status
+ * Returns a success/failure of the updation.
+ */
+ @Override
+ public boolean updateGatewayStoragePreference(String gatewayID, String storageId, StoragePreference storagePreference) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Update a Compute Resource Preference to a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be updated.
+ * @param computeResourceId Preferences related to a particular compute resource
+ * @param computeResourcePreference The ComputeResourcePreference object to be updated to the resource profile.
+ * @return status
+ * Returns a success/failure of the updation.
+ */
+ @Override
+ public boolean updateGatewayComputeResourcePreference(String gatewayID, String computeResourceId, ComputeResourcePreference computeResourcePreference) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a Storage Resource Preference to a registered gateway profile.
+ *
+ * @param gatewayID The identifier of the gateway profile to be added.
+ * @param storageResourceId Preferences related to a particular compute resource
+ * @param storagePreference
+ * @return status
+ * Returns a success/failure of the addition. If a profile already exists, this operation will fail.
+ * Instead an update should be used.
+ */
+ @Override
+ public boolean addGatewayStoragePreference(String gatewayID, String storageResourceId, StoragePreference storagePreference) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a Compute Resource Preference to a registered gateway profile.
+ *
+ * @param gatewayID The identifier for the gateway profile to be added.
+ * @param computeResourceId Preferences related to a particular compute resource
+ * @param computeResourcePreference The ComputeResourcePreference object to be added to the resource profile.
+ * @return status
+ * Returns a success/failure of the addition. If a profile already exists, this operation will fail.
+ * Instead an update should be used.
+ */
+ @Override
+ public boolean addGatewayComputeResourcePreference(String gatewayID, String computeResourceId, ComputeResourcePreference computeResourcePreference) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Update a Gateway Resource Profile.
+ *
+ * @param gatewayID The identifier for the requested gateway resource to be updated.
+ * @param gatewayResourceProfile Gateway Resource Profile Object.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateGatewayResourceProfile(String gatewayID, GatewayResourceProfile gatewayResourceProfile) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Gateway Resource Profile.
+ *
+ * @param gatewayResourceProfile Gateway Resource Profile Object.
+ * The GatewayID should be obtained from Airavata gateway registration and passed to register a corresponding
+ * resource profile.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public String registerGatewayResourceProfile(GatewayResourceProfile gatewayResourceProfile) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public boolean updateResourceJobManager(String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ @Override
+ public String registerResourceJobManager(ResourceJobManager resourceJobManager) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Delete a given data movement interface
+ *
+ * @param productUri
+ * @param dataMovementInterfaceId The identifier of the DataMovement Interface to be changed
+ * @param dataMoveType
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean deleteDataMovementInterface(String productUri, String dataMovementInterfaceId, DMType dataMoveType) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Update the given GridFTP data movement details to a compute resource
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param dataMovementInterfaceId The identifier of the data movement Interface to be updated.
+ * @param gridFTPDataMovement The GridFTPDataMovement object to be updated.
+ * @return boolean
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateGridFTPDataMovementDetails(String dataMovementInterfaceId, GridFTPDataMovement gridFTPDataMovement) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a GridFTP data movement details to a compute resource
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param productUri The identifier of the compute resource to which dataMovement protocol to be added
+ * @param dataMoveType
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param gridFTPDataMovement The GridFTPDataMovement object to be added to the resource.
+ * @return status
+ * Returns the unique data movement id.
+ */
+ @Override
+ public String addGridFTPDataMovementDetails(String productUri, DMType dataMoveType, int priorityOrder, GridFTPDataMovement gridFTPDataMovement) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a selected UNICORE data movement details
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param dataMovementInterfaceId The identifier of the data movement Interface to be updated.
+ * @param unicoreDataMovement
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateUnicoreDataMovementDetails(String dataMovementInterfaceId, UnicoreDataMovement unicoreDataMovement) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a UNICORE data movement details to a compute resource
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param productUri The identifier of the compute resource to which data movement protocol to be added
+ * @param dataMoveType
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param unicoreDataMovement
+ * @return status
+ * Returns the unique data movement id.
+ */
+ @Override
+ public String addUnicoreDataMovementDetails(String productUri, DMType dataMoveType, int priorityOrder, UnicoreDataMovement unicoreDataMovement) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update the given scp data movement details
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param dataMovementInterfaceId The identifier of the data movement Interface to be updated.
+ * @param scpDataMovement The SCPDataMovement object to be updated.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateSCPDataMovementDetails(String dataMovementInterfaceId, SCPDataMovement scpDataMovement) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a SCP data movement details to a compute resource
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param productUri The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param dataMoveType
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param scpDataMovement The SCPDataMovement object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addSCPDataMovementDetails(String productUri, DMType dataMoveType, int priorityOrder, SCPDataMovement scpDataMovement) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update the given Local data movement details
+ *
+ * @param dataMovementInterfaceId The identifier of the data movement Interface to be updated.
+ * @param localDataMovement The LOCALDataMovement object to be updated.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateLocalDataMovementDetails(String dataMovementInterfaceId, LOCALDataMovement localDataMovement) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a Local data movement details to a compute resource
+ * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
+ *
+ * @param productUri The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param dataMoveType
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param localDataMovement The LOCALDataMovement object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addLocalDataMovementDetails(String productUri, DMType dataMoveType, int priorityOrder, LOCALDataMovement localDataMovement) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update the UNIOCRE Job Submission details
+ *
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.
+ * @param unicoreJobSubmission
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateUnicoreJobSubmissionDetails(String jobSubmissionInterfaceId, UnicoreJobSubmission unicoreJobSubmission) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Update the cloud Job Submission details
+ *
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.
+ * @param sshJobSubmission
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateCloudJobSubmissionDetails(String jobSubmissionInterfaceId, CloudJobSubmission sshJobSubmission) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Update the given SSH Job Submission details
+ *
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.
+ * @param sshJobSubmission The SSHJobSubmission object to be updated.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateSSHJobSubmissionDetails(String jobSubmissionInterfaceId, SSHJobSubmission sshJobSubmission) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * *
+ * * Add a Cloud Job Submission details to a compute resource
+ * * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+ * *
+ * * @param computeResourceId
+ * * The identifier of the compute resource to which JobSubmission protocol to be added
+ * *
+ * * @param priorityOrder
+ * * Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * *
+ * * @param sshJobSubmission
+ * * The SSHJobSubmission object to be added to the resource.
+ * *
+ * * @return status
+ * * Returns the unique job submission id.
+ * *
+ * *
+ *
+ * @param computeResourceId
+ * @param priorityOrder
+ * @param cloudSubmission
+ */
+ @Override
+ public String addCloudJobSubmissionDetails(String computeResourceId, int priorityOrder, CloudJobSubmission cloudSubmission) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Add a UNICORE Job Submission details to a compute resource
+ * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+ *
+ * @param computeResourceId The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param unicoreJobSubmission The UnicoreJobSubmission object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addUNICOREJobSubmissionDetails(String computeResourceId, int priorityOrder, UnicoreJobSubmission unicoreJobSubmission) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Add a SSH_FORK Job Submission details to a compute resource
+ * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+ *
+ * @param computeResourceId The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param sshJobSubmission The SSHJobSubmission object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addSSHForkJobSubmissionDetails(String computeResourceId, int priorityOrder, SSHJobSubmission sshJobSubmission) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Add a SSH Job Submission details to a compute resource
+ * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+ *
+ * @param computeResourceId The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param sshJobSubmission The SSHJobSubmission object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addSSHJobSubmissionDetails(String computeResourceId, int priorityOrder, SSHJobSubmission sshJobSubmission) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update the given Local Job Submission details
+ *
+ * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.
+ * @param localSubmission The LOCALSubmission object to be updated.
+ * @return status
+ * Returns a success/failure of the deletion.
+ */
+ @Override
+ public boolean updateLocalSubmissionDetails(String jobSubmissionInterfaceId, LOCALSubmission localSubmission) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Add a Local Job Submission details to a compute resource
+ * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+ *
+ * @param computeResourceId The identifier of the compute resource to which JobSubmission protocol to be added
+ * @param priorityOrder Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+ * @param localSubmission The LOCALSubmission object to be added to the resource.
+ * @return status
+ * Returns the unique job submission id.
+ */
+ @Override
+ public String addLocalSubmissionDetails(String computeResourceId, int priorityOrder, LOCALSubmission localSubmission) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a Storage Resource.
+ *
+ * @param storageResourceId The identifier for the requested compute resource to be updated.
+ * @param storageResourceDescription Storage Resource Object created from the datamodel.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateStorageResource(String storageResourceId, StorageResourceDescription storageResourceDescription) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Storage Resource.
+ *
+ * @param storageResourceDescription Storge Resource Object created from the datamodel.
+ * @return storageResourceId
+ * Returns a server-side generated airavata storage resource globally unique identifier.
+ */
+ @Override
+ public String registerStorageResource(StorageResourceDescription storageResourceDescription) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a Compute Resource.
+ *
+ * @param computeResourceId The identifier for the requested compute resource to be updated.
+ * @param computeResourceDescription Compute Resource Object created from the datamodel.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateComputeResource(String computeResourceId, ComputeResourceDescription computeResourceDescription) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Compute Resource.
+ *
+ * @param computeResourceDescription Compute Resource Object created from the datamodel.
+ * @return computeResourceId
+ * Returns a server-side generated airavata compute resource globally unique identifier.
+ */
+ @Override
+ public String registerComputeResource(ComputeResourceDescription computeResourceDescription) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a Application Interface.
+ *
+ * @param appInterfaceId The identifier of the requested application deployment to be updated.
+ * @param applicationInterface
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateApplicationInterface(String appInterfaceId, ApplicationInterfaceDescription applicationInterface) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Application Interface.
+ *
+ * @param gatewayId
+ * @param applicationInterface Application Module Object created from the datamodel.
+ * @return appInterfaceId
+ * Returns a server-side generated airavata application interface globally unique identifier.
+ */
+ @Override
+ public String registerApplicationInterface(String gatewayId, ApplicationInterfaceDescription applicationInterface) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update an Application Deployment.
+ *
+ * @param appDeploymentId The identifier of the requested application deployment to be updated.
+ * @param applicationDeployment
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateApplicationDeployment(String appDeploymentId, ApplicationDeploymentDescription applicationDeployment) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register an Application Deployment.
+ *
+ * @param gatewayId ID of the gateway which is registering the new Application Deployment.
+ * @param applicationDeployment Application Module Object created from the datamodel.
+ * @return appDeploymentId
+ * Returns a server-side generated airavata appDeployment globally unique identifier.
+ */
+ @Override
+ public String registerApplicationDeployment(String gatewayId, ApplicationDeploymentDescription applicationDeployment) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update a Application Module.
+ *
+ * @param appModuleId The identifier for the requested application module to be updated.
+ * @param applicationModule Application Module Object created from the datamodel.
+ * @return status
+ * Returns a success/failure of the update.
+ */
+ @Override
+ public boolean updateApplicationModule(String appModuleId, ApplicationModule applicationModule) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Application Module.
+ *
+ * @param gatewayId
+ * @param applicationModule Application Module Object created from the datamodel.
+ * @return appModuleId
+ * Returns the server-side generated airavata appModule globally unique identifier.
+ * @gatewayId ID of the gateway which is registering the new Application Module.
+ */
+ @Override
+ public String registerApplicationModule(String gatewayId, ApplicationModule applicationModule) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public void updateResourceScheduleing(String airavataExperimentId, ComputationalResourceSchedulingModel resourceScheduling) throws RegistryServiceException, TException {
+
+ }
+
+ @Override
+ public void updateExperimentConfiguration(String airavataExperimentId, UserConfigurationDataModel userConfiguration) throws RegistryServiceException, TException {
+
+ }
+
+ /**
+ * Update a Previously Created Experiment
+ * Configure the 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 InvalidRequestException For any incorrect forming of the request itself.
+ * @throws ExperimentNotFoundException If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+ * @throws 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 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, ExperimentModel experiment) throws RegistryServiceException, TException {
+
+ }
+
+ /**
+ * *
+ * * Create New Experiment
+ * * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
+ * * but inferred from the sshKeyAuthentication 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 gatewayId
+ * * The unique ID of the gateway where the experiment is been created.
+ * *
+ * * @param ExperimentModel
+ * * The create experiment will require the basic experiment metadata like the name and description, intended user,
+ * * the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
+ * * the ExperimentMetadata is a required field.
+ * *
+ * * @return
+ * * The server-side generated.airavata.registry.core.experiment.globally unique identifier.
+ * *
+ * * @throws org.apache.airavata.model.error.InvalidRequestException
+ * * For any incorrect forming of the request itself.
+ * *
+ * * @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 gatewayId
+ * @param experiment
+ */
+ @Override
+ public String createExperiment(String gatewayId, ExperimentModel experiment) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Search Experiments.
+ * Search Experiments by using multiple filter criteria with pagination. Results will be sorted based on creation time DESC.
+ *
+ * @param gatewayId Identifier of the requested gateway.
+ * @param userName Username of the user requesting the search function.
+ * @param filters Map of multiple filter criteria. Currenlt search filters includes Experiment Name, Description, Application, etc....
+ * @param limit Amount of results to be fetched.
+ * @param offset The starting point of the results to be fetched.
+ * @return ExperimentSummaryModel
+ * List of experiments for the given search filter. Here only the Experiment summary will be returned.
+ */
+ @Override
+ public List<ExperimentSummaryModel> searchExperiments(String gatewayId, String userName, Map<ExperimentSearchFields, String> filters, int limit, int offset) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Search User Projects
+ * Search and get all Projects for user by project description or/and project name with pagination.
+ * Results will be ordered based on creation time DESC.
+ *
+ * @param gatewayId The unique identifier of the gateway making the request.
+ * @param userName The identifier of the user.
+ * @param filters Map of multiple filter criteria. Currenlt search filters includes Project Name and Project Description
+ * @param limit The amount results to be fetched.
+ * @param offset The starting point of the results to be fetched.
+ */
+ @Override
+ public List<Project> searchProjects(String gatewayId, String userName, Map<ProjectSearchFields, String> filters, int limit, int offset) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update an Existing Project
+ *
+ * @param projectId The projectId of the project needed an update.
+ * @param updatedProject
+ * @return void
+ * Currently this does not return any value.
+ */
+ @Override
+ public void updateProject(String projectId, Project updatedProject) throws RegistryServiceException, TException {
+
+ }
+
+ /**
+ * Creates a Project with basic metadata.
+ * A Project is a container of experiments.
+ *
+ * @param gatewayId The identifier for the requested gateway.
+ * @param project
+ */
+ @Override
+ public String createProject(String gatewayId, Project project) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ @Override
+ public boolean updateNotification(Notification notification) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * * API methods to retrieve notifications
+ * *
+ *
+ * @param notification
+ */
+ @Override
+ public String createNotification(Notification notification) throws RegistryServiceException, TException {
+ return null;
+ }
+
+ /**
+ * Update previously registered Gateway metadata.
+ *
+ * @param gatewayId The gateway Id of the Gateway which require an update.
+ * @param updatedGateway
+ * @return gateway
+ * Modified gateway obejct.
+ * @throws AiravataClientException
+ */
+ @Override
+ public boolean updateGateway(String gatewayId, Gateway updatedGateway) throws RegistryServiceException, TException {
+ return false;
+ }
+
+ /**
+ * Register a Gateway with Airavata.
+ *
+ * @param gateway The gateway data model.
+ * @return gatewayId
+ * Th unique identifier of the newly registered gateway.
+ */
+ @Override
+ public String addGateway(Gateway gateway) throws RegistryServiceException, TException {
+ return null;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/2d9fd253/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/AppCatalogInitUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/AppCatalogInitUtil.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/AppCatalogInitUtil.java
new file mode 100644
index 0000000..715ccbd
--- /dev/null
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/AppCatalogInitUtil.java
@@ -0,0 +1,168 @@
+/*
+*
+* 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.registry.api.service.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.core.app.catalog.resources.GatewayProfileResource;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+public class AppCatalogInitUtil {
+ public static final String COMPUTE_RESOURCE = "GATEWAY_PROFILE";
+ private static final Logger logger = LoggerFactory.getLogger(AppCatalogInitUtil.class);
+ public static final String APPCATALOG_JDBC_DRIVER = "appcatalog.jdbc.driver";
+ public static final String APPCATALOG_JDBC_URL = "appcatalog.jdbc.url";
+ public static final String APPCATALOG_JDBC_USER = "appcatalog.jdbc.user";
+ public static final String APPCATALOG_JDBC_PASSWORD = "appcatalog.jdbc.password";
+ public static final String START_DERBY_ENABLE = "start.derby.server.mode";
+ public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+ private static NetworkServerControl server;
+ private static JdbcStorage db;
+ private static String jdbcURl;
+ private static String jdbcDriver;
+ private static String jdbcUser;
+ private static String jdbcPassword;
+
+
+ public static void initializeDB() {
+// System.setProperty("appcatalog.initialize.state", "0");
+ try{
+ jdbcDriver = ServerSettings.getSetting(APPCATALOG_JDBC_DRIVER);
+ jdbcURl = ServerSettings.getSetting(APPCATALOG_JDBC_URL);
+ jdbcUser = ServerSettings.getSetting(APPCATALOG_JDBC_USER);
+ jdbcPassword = ServerSettings.getSetting(APPCATALOG_JDBC_PASSWORD);
+ jdbcURl = jdbcURl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+ } catch (ApplicationSettingsException e) {
+ logger.error("Unable to read airavata server properties", e.getMessage());
+ }
+
+ if (getDBType(jdbcURl).equals("derby") && isDerbyStartEnabled()) {
+ startDerbyInServerMode();
+ }
+ db = new JdbcStorage(10, 50, jdbcURl, jdbcDriver, true);
+
+ Connection conn = null;
+ try {
+ conn = db.connect();
+ if (!DatabaseCreator.isDatabaseStructureCreated(COMPUTE_RESOURCE, conn)) {
+ DatabaseCreator.createRegistryDatabase("database_scripts/appcatalog", conn);
+ logger.info("New Database created for App Catalog !!!");
+ } else {
+ logger.info("Database already created for App Catalog !!!");
+ }
+ GatewayProfileResource gatewayProfileResource = new GatewayProfileResource();
+ if (!gatewayProfileResource.isExists(ServerSettings.getDefaultUserGateway())){
+ gatewayProfileResource.setGatewayID(ServerSettings.getDefaultUserGateway());
+ gatewayProfileResource.setCreatedTime(AiravataUtils.getCurrentTimestamp());
+ gatewayProfileResource.save();
+ }
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RuntimeException("Database failure", e);
+ } finally {
+ db.closeConnection(conn);
+ try {
+ if(conn != null){
+ if (!conn.getAutoCommit()) {
+ conn.commit();
+ }
+ conn.close();
+ }
+ } catch (SQLException e) {
+ logger.error("Error while closing database connection...", e.getMessage(), e);
+ }
+ }
+// System.setProperty("appcatalog.initialize.state", "1");
+ }
+
+ public static String getDBType(String jdbcUrl){
+ try{
+ String cleanURI = jdbcUrl.substring(5);
+ URI uri = URI.create(cleanURI);
+ return uri.getScheme();
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ return null;
+ }
+ }
+
+ public static boolean isDerbyStartEnabled(){
+ try {
+ String s = ServerSettings.getSetting(START_DERBY_ENABLE);
+ if("true".equals(s)){
+ return true;
+ }
+ } catch (ApplicationSettingsException e) {
+ logger.error("Unable to read airavata server properties", e.getMessage(), e);
+ return false;
+ }
+ return false;
+ }
+
+ public static void startDerbyInServerMode() {
+ try {
+ System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+ server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+ getPort(jdbcURl),
+ jdbcUser, jdbcPassword);
+ java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+ server.start(consoleWriter);
+ } catch (IOException e) {
+ logger.error("Unable to start Apache derby in the server mode! Check whether " +
+ "specified port is available");
+ } catch (Exception e) {
+ logger.error("Unable to start Apache derby in the server mode! Check whether " +
+ "specified port is available");
+ }
+ }
+
+ public static void stopDerbyInServerMode() {
+ System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "false");
+ if (server!=null){
+ try {
+ server.shutdown();
+ } catch (Exception e) {
+ logger.error("Error when stopping the derby server : "+e.getLocalizedMessage());
+ }
+ }
+ }
+
+ public static int getPort(String jdbcURL){
+ try{
+ String cleanURI = jdbcURL.substring(5);
+ URI uri = URI.create(cleanURI);
+ return uri.getPort();
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ return -1;
+ }
+ }
+}