예제 #1
0
 @PUT
 @Produces(value = MediaType.APPLICATION_JSON)
 @Consumes(value = MediaType.APPLICATION_JSON)
 @Path(value = "/{userName}")
 public Profile updateProfile(Profile profile, @PathParam(value = "usesrName") String userName) {
   return profileService.updateProfile(profile);
 }
예제 #2
0
 @DELETE
 @Produces(value = MediaType.APPLICATION_JSON)
 @Path(value = "/{userName}")
 public Profile removeProfile(@PathParam(value = "userName") String userName) {
   return profileService.removeProfile(userName);
 }
예제 #3
0
 @POST
 @Produces(value = MediaType.APPLICATION_JSON)
 @Consumes(value = MediaType.APPLICATION_JSON)
 public Profile addProfile(Profile profile) {
   return profileService.addProfile(profile);
 }
예제 #4
0
 @GET
 @Produces(value = MediaType.APPLICATION_JSON)
 public List<Profile> getProfiles() {
   return profileService.getAllProfiles();
 }