Package org.apache.airavata.persistance.registry.jpa.resources

Examples of org.apache.airavata.persistance.registry.jpa.resources.ProjectResource


        } else {
            WorkerResource worker = jpa.getWorker();
            if (isWorkspaceProjectExists(project.getProjectName())){
                throw new WorkspaceProjectAlreadyExistsException(createProjName(project.getProjectName()));
            }
            ProjectResource projectResource = worker.createProject(createProjName(project.getProjectName()));
            projectResource.save();
        }
    }
View Full Code Here


        }else {
            WorkerResource worker = jpa.getWorker();
            if (!isWorkspaceProjectExists(project.getProjectName())){
                throw new WorkspaceProjectDoesNotExistsException(createProjName(project.getProjectName()));
            }
            ProjectResource projectResource = worker.getProject(createProjName(project.getProjectName()));
            projectResource.save();
        }
    }
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 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);
            if (experiment.getSubmittedDate()!=null) {
                experimentResource.setSubmittedDate(new Timestamp(experiment.getSubmittedDate().getTime()));
            }
            experimentResource.save();
        }
View Full Code Here

    public List<AiravataExperiment> getExperiments(String projectName)throws RegistryException {
        if (projectsRegistry != null){
            return projectsRegistry.getExperiments(projectName);
        }
        ProjectResource project = jpa.getWorker().getProject(createProjName(projectName));
      List<ExperimentResource> experiments = project.getExperiments();
      List<AiravataExperiment> result=new ArrayList<AiravataExperiment>();
      for (ExperimentResource resource : experiments) {
      AiravataExperiment e = createAiravataExperimentObj(resource);
      result.add(e);
    }
View Full Code Here

        } else {
            WorkerResource worker = jpa.getWorker();
            if (isWorkspaceProjectExists(project.getProjectName())){
                throw new WorkspaceProjectAlreadyExistsException(createProjName(project.getProjectName()));
            }
            ProjectResource projectResource = worker.createProject(createProjName(project.getProjectName()));
            projectResource.save();
        }
    }
View Full Code Here

        }else {
            WorkerResource worker = jpa.getWorker();
            if (!isWorkspaceProjectExists(project.getProjectName())){
                throw new WorkspaceProjectDoesNotExistsException(createProjName(project.getProjectName()));
            }
            ProjectResource projectResource = worker.getProject(createProjName(project.getProjectName()));
            projectResource.save();
        }
    }
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 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);
            if (experiment.getSubmittedDate()!=null) {
                experimentResource.setSubmittedDate(new Timestamp(experiment.getSubmittedDate().getTime()));
            }
            experimentResource.save();
        }
View Full Code Here

    public List<AiravataExperiment> getExperiments(String projectName)throws RegistryException {
        if (projectsRegistry != null){
            return projectsRegistry.getExperiments(projectName);
        }
        ProjectResource project = jpa.getWorker().getProject(createProjName(projectName));
      List<ExperimentResource> experiments = project.getExperiments();
      List<AiravataExperiment> result=new ArrayList<AiravataExperiment>();
      for (ExperimentResource resource : experiments) {
      AiravataExperiment e = createAiravataExperimentObj(resource);
      result.add(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.resources.ProjectResource

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.