コード例 #1
0
ファイル: AllRoles.java プロジェクト: larsplaul/studyp
 @PUT
 @Produces("application/json")
 @Path("/edit")
 public String editUser(String userToEdit)
     throws PreexistingEntityException, NonexistentEntityException {
   String user = securityContext.getUserPrincipal().getName();
   return jsonAssembler.editUser(userToEdit, user);
 }
コード例 #2
0
ファイル: AllRoles.java プロジェクト: larsplaul/studyp
 @PUT
 @Produces("application/json")
 @Path("/changePassword")
 public String changePassword(String passwordInfo)
     throws PreexistingEntityException, NonexistentEntityException {
   String user = securityContext.getUserPrincipal().getName();
   return jsonAssembler.editPassword(passwordInfo, user);
 }
コード例 #3
0
ファイル: AllRoles.java プロジェクト: larsplaul/studyp
 @Path("myStudyPoints/{classId}")
 @GET
 @Produces("application/json")
 public Response studypointsForStudentClass(@PathParam("classId") String classId) {
   String user = securityContext.getUserPrincipal().getName();
   return Response.status(200)
       .header("Access-Control-Allow-Origin", "*")
       .entity(jsonAssembler.getStudyPointsForCurrentUser(classId, user))
       .build();
 }
コード例 #4
0
ファイル: AllRoles.java プロジェクト: larsplaul/studyp
 @GET
 @Produces("application/json")
 public String getClassesForCurrentUser() {
   String user = securityContext.getUserPrincipal().getName();
   return jsonAssembler.getUser(user);
 }