Example #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);
 }
Example #2
0
 @DELETE
 @Produces(value = MediaType.APPLICATION_JSON)
 @Path(value = "/{userName}")
 public Profile removeProfile(@PathParam(value = "userName") String userName) {
   return profileService.removeProfile(userName);
 }
Example #3
0
 @POST
 @Produces(value = MediaType.APPLICATION_JSON)
 @Consumes(value = MediaType.APPLICATION_JSON)
 public Profile addProfile(Profile profile) {
   return profileService.addProfile(profile);
 }
Example #4
0
 @GET
 @Produces(value = MediaType.APPLICATION_JSON)
 public List<Profile> getProfiles() {
   return profileService.getAllProfiles();
 }