Package ch.bsgroup.scrumit.pojo

Examples of ch.bsgroup.scrumit.pojo.SerializableProject


  public @ResponseBody List<SerializableProject> getAllProjects() {
    Set<Project> projects = this.projectService.getAllProjects();
    List<SerializableProject> serializedProjects = new ArrayList<SerializableProject>();
    for (Iterator<Project> iterator = projects.iterator(); iterator.hasNext();) {
      Project p = iterator.next();
      SerializableProject sp = new SerializableProject(p.getId(), p.getName());
      serializedProjects.add(sp);
    }
    return serializedProjects;
  }
View Full Code Here


  public @ResponseBody SerializableProject getProjectById(@PathVariable int projectid) {
    Project p = this.projectService.findProjectById(projectid);
    if (p == null) {
      throw new ResourceNotFoundException(projectid);
    }
    return new SerializableProject(p.getId(), p.getName(), p.getDescription(), p.getCreationDate());
  }
View Full Code Here

    if (!failures.isEmpty()) {
      response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
      return validationMessages(failures);
    } else {
      this.projectService.updateProject(project);
      SerializableProject sp = new SerializableProject(project.getId(), project.getName(),
          project.getDescription(), project.getCreationDate());
      return Collections.singletonMap("project", sp);
    }
  }
View Full Code Here

TOP

Related Classes of ch.bsgroup.scrumit.pojo.SerializableProject

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.