示例#1
0
  @RequestMapping(
      value = "/distro/{distroName}",
      method = RequestMethod.GET,
      produces = "application/json")
  @ResponseBody
  public DistroRead getDistroByName(@PathVariable("distroName") String distroName) {
    DistroRead distro = distroManager.getDistroByName(distroName);

    if (distro == null) {
      throw BddException.NOT_FOUND("distro", distroName);
    }

    return distro;
  }
示例#2
0
 @RequestMapping(value = "/distros", method = RequestMethod.GET, produces = "application/json")
 @ResponseBody
 public List<DistroRead> getDistros() {
   return distroManager.getDistros();
 }