Esempio n. 1
0
 /**
  * Get a note by id
  *
  * @param user - User login
  * @param id - Id of note
  * @return an instance of java.lang.String
  */
 @Path("/{id}")
 @GET
 @Produces("application/xml")
 public Response getNote(@PathParam("user") String user, @PathParam("id") int id) {
   Response r = null;
   if (userAuth.Auth(hh, user)) {
     r = Response.ok(ndb.getNoteById(user, id)).build();
   } else {
     r = unAuthorized();
   }
   return r;
 }