Package org.apache.airavata.registry.api

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


    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

    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

    @Path(ResourcePathConstants.ProjectResourcePathConstants.ADD_PROJECT)
    @Produces(MediaType.TEXT_PLAIN)
    public Response addWorkspaceProject(@FormParam("projectName") String projectName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            WorkspaceProject workspaceProject = new WorkspaceProject(projectName, airavataRegistry);
            airavataRegistry.addWorkspaceProject(workspaceProject);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Workspace project added successfully...");
            return builder.build();
        } catch (WorkspaceProjectAlreadyExistsException e) {
View Full Code Here

    @Path(ResourcePathConstants.ProjectResourcePathConstants.UPDATE_PROJECT)
    @Produces(MediaType.TEXT_PLAIN)
    public Response updateWorkspaceProject(@FormParam("projectName") String projectName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            WorkspaceProject workspaceProject = new WorkspaceProject(projectName, airavataRegistry);
            airavataRegistry.updateWorkspaceProject(workspaceProject);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Workspace project updated successfully...");
            return builder.build();
        } catch (WorkspaceProjectDoesNotExistsException e) {
View Full Code Here

    @Path(ResourcePathConstants.ProjectResourcePathConstants.GET_PROJECT)
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response getWorkspaceProject(@QueryParam("projectName") String projectName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            WorkspaceProject workspaceProject = airavataRegistry.getWorkspaceProject(projectName);
            if (workspaceProject != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(workspaceProject);
                return builder.build();
            } else {
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.