Package org.apache.airavata.registry.api

Examples of org.apache.airavata.registry.api.WorkspaceProject


            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkspaceProject workspaceProject = response.getEntity(WorkspaceProject.class);
        return workspaceProject;
    }
View Full Code Here


  public boolean isWorkspaceProjectExists(String projectName,
      boolean createIfNotExists) throws RegistryException {
    if (jpa.getWorker().isProjectExists(createProjName(projectName))){
      return true;
    }else if (createIfNotExists){
      addWorkspaceProject(new WorkspaceProject(projectName, this));
      return isWorkspaceProjectExists(projectName);
    }else{
      return false;
    }
  }
View Full Code Here

      WorkerResource worker = jpa.getWorker();
    if (!isWorkspaceProjectExists(projectName)){
          throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
        }
    ProjectResource projectResource = worker.getProject(createProjName(projectName));
    return new WorkspaceProject(getProjName(projectResource.getName()), this);
    }
View Full Code Here

    public List<WorkspaceProject> getWorkspaceProjects() throws RegistryException{
      WorkerResource worker = jpa.getWorker();
      List<WorkspaceProject> projects=new ArrayList<WorkspaceProject>();
      List<ProjectResource> projectResouces = worker.getProjects();
      for (ProjectResource resource : projectResouces) {
      projects.add(new WorkspaceProject(getProjName(resource.getName()), this));
    }
      return projects;
    }
View Full Code Here

    }
      return projects;
    }

    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);
View Full Code Here

    AiravataExperiment e = new AiravataExperiment();
    e.setExperimentId(resource.getExpID());
    e.setUser(new AiravataUser(resource.getWorker().getUser()));
    e.setSubmittedDate(new Date(resource.getSubmittedDate().getTime()));
    e.setGateway(new Gateway(resource.getGateway().getGatewayName()));
    e.setProject(new WorkspaceProject(getProjName(resource.getProject().getName()), this));
    return e;
  }
View Full Code Here

            return projectsRegistry.isWorkspaceProjectExists(projectName, createIfNotExists);
        }
    if (jpa.getWorker().isProjectExists(createProjName(projectName))){
      return true;
    }else if (createIfNotExists){
      addWorkspaceProject(new WorkspaceProject(projectName, this));
      return isWorkspaceProjectExists(projectName);
    }else{
      return false;
    }
  }
View Full Code Here

      WorkerResource worker = jpa.getWorker();
    if (!isWorkspaceProjectExists(projectName)){
          throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
        }
    ProjectResource projectResource = worker.getProject(createProjName(projectName));
    return new WorkspaceProject(getProjName(projectResource.getName()), this);
    }
View Full Code Here

        }
      WorkerResource worker = jpa.getWorker();
      List<WorkspaceProject> projects=new ArrayList<WorkspaceProject>();
      List<ProjectResource> projectResouces = worker.getProjects();
      for (ProjectResource resource : projectResouces) {
      projects.add(new WorkspaceProject(getProjName(resource.getName()), this));
    }
      return projects;
    }
View Full Code Here

    public void addExperiment(String projectName, AiravataExperiment experiment) throws RegistryException {
      if (projectsRegistry != null){
            projectsRegistry.addExperiment(projectName, experiment);
        }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);
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.WorkspaceProject

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.