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

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


    public void addExperiment(String projectName, AiravataExperiment experiment) throws RegistryException {
      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


    }

    public void removeExperiment(String experimentId) throws ExperimentDoesNotExistsException {
      WorkerResource worker = jpa.getWorker();
      if (!worker.isExperimentExists(experimentId)){
          throw new ExperimentDoesNotExistsException(experimentId);
      }
      worker.removeExperiment(experimentId);
    }
View Full Code Here

  @Override
  public boolean updateExperimentExecutionUser(String experimentId,
      String user) throws RegistryException {
    if (!isExperimentExists(experimentId, true)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    data.setUserName(user);
    data.save();
View Full Code Here

  @Override
  public String getExperimentExecutionUser(String experimentId)
      throws RegistryException {
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    return experiment.getData().getUserName();
  }
View Full Code Here

    @Override
  public String getExperimentName(String experimentId)
      throws RegistryException {
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
        ExperimentDataRetriever experimentDataRetriever = new ExperimentDataRetriever();
        return experimentDataRetriever.getExperimentName(experimentId);
  }
View Full Code Here

  @Override
  public void updateExperimentName(String experimentId,
      String experimentName) throws RegistryException {
    if (!isExperimentExists(experimentId, true)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    data.setExpName(experimentName);
    data.save();
View Full Code Here

  @Override
  public String getExperimentMetadata(String experimentId)
      throws RegistryException {
    if (!isExperimentExists(experimentId, true)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    if (data.isExperimentMetadataPresent()){
      return data.getExperimentMetadata().getMetadata();
View Full Code Here

  @Override
  public boolean updateExperimentMetadata(String experimentId, String metadata)
      throws RegistryException {
    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

  @Override
  public List<WorkflowInstance> getExperimentWorkflowInstances(
      String experimentId) throws RegistryException {
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    List<WorkflowInstance> result=new ArrayList<WorkflowInstance>();
    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

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.