Beispiel #1
0
  @GET
  @Path("/{id : [a-zA-Z0-9\\-_]+}")
  public ImageBean getImageById(@PathParam("id") String id) throws Exception {
    if (StringUtils.isEmpty(id)) {
      throw new TeletaanInternalException(
          Response.Status.BAD_REQUEST, "Require image id for the request.");
    }

    return imageDAO.getById(id);
  }