Class UserServiceController


  • @Controller
    @RequestMapping("/users")
    public class UserServiceController
    extends AbstractController
    • Constructor Detail

      • UserServiceController

        public UserServiceController()
    • Method Detail

      • createUser

        @RequestMapping(value="/register",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> createUser​(javax.servlet.http.HttpServletRequest request,
                                               @RequestBody
                                               JsonRequest<User> user,
                                               javax.servlet.http.HttpServletResponse response)
                                        throws UserServiceException
        Parameters:
        request - HttpServletRequest
        user - User to be created on the Platform
        response - artifactService
        Returns:
        Returns Status Code and Message serialized as JSON
        Throws:
        UserServiceException - on failure to create user account
      • verifyUser

        @RequestMapping(value="/verifyUser",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> verifyUser​(javax.servlet.http.HttpServletRequest request,
                                               @RequestBody
                                               JsonRequest<User> userObj,
                                               javax.servlet.http.HttpServletResponse response)
      • resendVerifyToken

        @RequestMapping(value="/resendVerifyToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> resendVerifyToken​(javax.servlet.http.HttpServletRequest request,
                                                      @RequestBody
                                                      JsonRequest<User> userObj,
                                                      javax.servlet.http.HttpServletResponse response)
      • refreshApiToken

        @RequestMapping(value="/refreshApiToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> refreshApiToken​(javax.servlet.http.HttpServletRequest request,
                                                    @RequestBody
                                                    JsonRequest<User> userObj,
                                                    javax.servlet.http.HttpServletResponse response)
      • updateUser

        @RequestMapping(value="/updateUser",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> updateUser​(javax.servlet.http.HttpServletRequest request,
                                               @RequestBody
                                               JsonRequest<User> user,
                                               javax.servlet.http.HttpServletResponse response)
      • deleteToken

        @RequestMapping(value="/deleteToken",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> deleteToken​(javax.servlet.http.HttpServletRequest request,
                                                @RequestBody
                                                JsonRequest<User> user,
                                                javax.servlet.http.HttpServletResponse response)
      • forgetPassword

        @RequestMapping(value="/forgetPassword",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> forgetPassword​(javax.servlet.http.HttpServletRequest request,
                                                   @RequestBody
                                                   JsonRequest<User> user,
                                                   javax.servlet.http.HttpServletResponse response)
      • changeUserPassword

        @RequestMapping(value="/changePassword",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse changeUserPassword​(javax.servlet.http.HttpServletRequest request,
                                               @RequestBody
                                               PasswordDTO passwordDTO,
                                               javax.servlet.http.HttpServletResponse response)
      • getUserAccountDetails

        @RequestMapping(value="/userAccountDetails",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<User> getUserAccountDetails​(@RequestBody
                                                        JsonRequest<User> userDetails)
      • getAllUsers

        @RequestMapping(value="/userDetails",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<User>> getAllUsers​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
      • getUserRole

        @RequestMapping(value="/userRole/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<org.acumos.cds.domain.MLPRole>> getUserRole​(@PathVariable("userId")
                                                                             String userId,
                                                                             javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
      • updateUserImage

        @RequestMapping(value="/updateUserImage/{userId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse updateUserImage​(javax.servlet.http.HttpServletRequest request,
                                            @RequestParam("userImage")
                                            org.springframework.web.multipart.MultipartFile file,
                                            @PathVariable("userId")
                                            String userId,
                                            javax.servlet.http.HttpServletResponse response)
      • getUserImage

        @RequestMapping(value="/userProfileImage/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<byte[]> getUserImage​(@PathVariable("userId")
                                                 String userId)
      • userProfile

        @RequestMapping(value="/userProfile",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public org.acumos.cds.domain.MLPUser userProfile​(javax.servlet.http.HttpServletRequest request)
                                                  throws MalformedException
        Throws:
        MalformedException
      • getQandAurl

        @RequestMapping(value="/qAUrl",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getQandAurl​(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
      • getDocurl

        @RequestMapping(value="/docs",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getDocurl​(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
      • updateBulkUsers

        @RequestMapping(value="/user/updateUser",
                        method=PUT,
                        produces="application/json")
        @PreAuthorize("hasAuthority(T(org.acumos.portal.be.security.RoleAuthorityConstants).ADMIN)")
        @ResponseBody
        public JsonResponse<Object> updateBulkUsers​(javax.servlet.http.HttpServletRequest request,
                                                    @RequestBody
                                                    JsonRequest<User> user,
                                                    javax.servlet.http.HttpServletResponse response)
      • deleteBulkUsers

        @RequestMapping(value="/user/deleteUser",
                        method=POST,
                        produces="application/json")
        @PreAuthorize("hasAuthority(T(org.acumos.portal.be.security.RoleAuthorityConstants).ADMIN)")
        @ResponseBody
        public JsonResponse<Object> deleteBulkUsers​(javax.servlet.http.HttpServletRequest request,
                                                    @RequestBody
                                                    JsonRequest<User> user,
                                                    javax.servlet.http.HttpServletResponse response)
      • getAllActiveUsers

        @RequestMapping(value="/activeUserDetails/{active}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<User>> getAllActiveUsers​(javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response,
                                                          @PathVariable("active")
                                                          boolean activeFlag)
      • getImageSize

        @RequestMapping(value="/imagesize",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getImageSize​(javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
      • publishOwnRequestEnabled

        @RequestMapping(value="/publishOwnRequestsEnabled",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> publishOwnRequestEnabled​(javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
      • getKubernetesHelpDocUrl

        @RequestMapping(value="/k8s/docs/help",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getKubernetesHelpDocUrl​(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
      • getJupyterurl

        @RequestMapping(value="/jupyterUrl",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getJupyterurl​(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)