Package org.apache.airavata.registry.api.exception.worker

Examples of org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException


      throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateExperimentMetadata(experimentId, metadata);
        }else {
            if (!isExperimentExists(experimentId, true)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            ExperimentMetadataResource experimentMetadata;
            if (data.isExperimentMetadataPresent()){
View Full Code Here


      String experimentId) throws RegistryException {
        if (provenanceRegistry != null){
            return provenanceRegistry.getExperimentWorkflowInstances(experimentId);
        }
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    List<WorkflowExecution> result=new ArrayList<WorkflowExecution>();
    List<WorkflowDataResource> workflowInstances = data.getWorkflowInstances();
View Full Code Here

      return true;
    }else if (createIfNotPresent){
      //we are using the same id for the experiment id for backward compatibility
      //for up to airavata 0.5
      if (!isExperimentExists(instanceId, true)){
        throw new ExperimentDoesNotExistsException(instanceId);
      }
      addWorkflowInstance(instanceId, instanceId, null);
      return isWorkflowInstanceExists(instanceId);
    }else{
      return false;
View Full Code Here

      throws RegistryException {
        if (provenanceRegistry != null){
            return provenanceRegistry.getExperiment(experimentId);
        }
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
        return (new ExperimentDataRetriever()).getExperiment(experimentId);
  }
View Full Code Here

      String workflowInstanceId, String templateName) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.addWorkflowInstance(experimentId,workflowInstanceId, templateName);
        }else {
            if (!isExperimentExists(experimentId, true)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            if (isWorkflowInstanceExists(workflowInstanceId)){
                throw new WorkflowInstanceAlreadyExistsException(workflowInstanceId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
View Full Code Here

      throws RegistryException {
        if (provenanceRegistry != null){
            return provenanceRegistry.getExperimentMetaInformation(experimentId);
        }
        if (!isExperimentExists(experimentId)){
            throw new ExperimentDoesNotExistsException(experimentId);
        }
        ExperimentDataRetriever experimentDataRetriever = new ExperimentDataRetriever();
        return experimentDataRetriever.getExperimentMetaInformation(experimentId);
  }
View Full Code Here

  }

  private ExecutionErrorResource createNewExecutionErrorResource(
      String experimentId, ExecutionError errorSource, ExecutionErrors.Source type) throws RegistryException {
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExecutionErrorResource executionError = jpa.getWorker().getExperiment(experimentId).getData().createExecutionError();
    setupValues(errorSource, executionError);
    executionError.setSourceType(type.toString());
    return executionError;
View Full Code Here

      String workflowExecutionId, String nodeId) throws RegistryException {
    List<ApplicationJob> jobs=new ArrayList<ApplicationJob>();
    List<Resource> gFacJobs;
    if (workflowExecutionId==null){
      if (!isExperimentExists(experimentId)){
        throw new ExperimentDoesNotExistsException(experimentId);
      }
      gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getGFacJobs();
    }else if (nodeId==null){
      if (!isWorkflowInstanceExists(workflowExecutionId)){
        throw new WorkflowInstanceDoesNotExistsException(workflowExecutionId);
View Full Code Here

        }else {
            WorkspaceProject workspaceProject = getWorkspaceProject(projectName);
            ProjectResource project = jpa.getWorker().getProject(createProjName(workspaceProject.getProjectName()));
            String experimentId = experiment.getExperimentId();
            if (isExperimentExists(experimentId)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experimentResource = project.createExperiment(experimentId);
            if (experiment.getSubmittedDate()!=null) {
                experimentResource.setSubmittedDate(new Timestamp(experiment.getSubmittedDate().getTime()));
            }
View Full Code Here

        if (projectsRegistry != null){
            projectsRegistry.removeExperiment(experimentId);
        }else {
            WorkerResource worker = jpa.getWorker();
            if (!worker.isExperimentExists(experimentId)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            worker.removeExperiment(experimentId);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.