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

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


    }

    public void updateWorkspaceProject(WorkspaceProject project) throws RegistryException {
      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


    }

    public void deleteWorkspaceProject(String projectName) throws RegistryException {
      WorkerResource worker = jpa.getWorker();
    if (!isWorkspaceProjectExists(projectName)){
          throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
        }
    worker.removeProject(createProjName(projectName));
    }
View Full Code Here

    }

    public WorkspaceProject getWorkspaceProject(String projectName) throws RegistryException {
      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 boolean isExperimentExists(String experimentId, boolean createIfNotPresent)throws RegistryException {
    if (jpa.getWorker().isExperimentExists(experimentId)){
      return true;
    }else if (createIfNotPresent){
      if (!isWorkspaceProjectExists(DEFAULT_PROJECT_NAME, true)){
        throw new WorkspaceProjectDoesNotExistsException(createProjName(DEFAULT_PROJECT_NAME));
      }
      AiravataExperiment experiment = new AiravataExperiment();
      experiment.setExperimentId(experimentId);
      experiment.setSubmittedDate(Calendar.getInstance().getTime());
      experiment.setGateway(getGateway());
View Full Code Here

        if (projectsRegistry != null){
            projectsRegistry.updateWorkspaceProject(project);
        }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

        if (projectsRegistry != null){
            projectsRegistry.deleteWorkspaceProject(projectName);
        }else {
            WorkerResource worker = jpa.getWorker();
            if (!isWorkspaceProjectExists(projectName)){
                throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
            }
            worker.removeProject(createProjName(projectName));
        }
    }
View Full Code Here

        if (projectsRegistry != null){
            return projectsRegistry.getWorkspaceProject(projectName);
        }
      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

        }
        if (jpa.getWorker().isExperimentExists(experimentId)){
      return true;
    }else if (createIfNotPresent){
      if (!isWorkspaceProjectExists(DEFAULT_PROJECT_NAME, true)){
        throw new WorkspaceProjectDoesNotExistsException(createProjName(DEFAULT_PROJECT_NAME));
      }
      AiravataExperiment experiment = new AiravataExperiment();
      experiment.setExperimentId(experimentId);
      experiment.setSubmittedDate(Calendar.getInstance().getTime());
      experiment.setGateway(getGateway());
View Full Code Here

        if (projectsRegistry != null){
            projectsRegistry.updateWorkspaceProject(project);
        }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

        if (projectsRegistry != null){
            projectsRegistry.deleteWorkspaceProject(projectName);
        }else {
            WorkerResource worker = jpa.getWorker();
            if (!isWorkspaceProjectExists(projectName)){
                throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
            }
            worker.removeProject(createProjName(projectName));
        }
    }
View Full Code Here

TOP

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

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.