Class ProjectSubscriptionsAjaxController


  • @RestController
    @RequestMapping("/ajax/subscriptions")
    public class ProjectSubscriptionsAjaxController
    extends java.lang.Object
    Controller for handling AJAX requests for ProjectSubscription
    • Constructor Detail

    • Method Detail

      • updateProjectSubscription

        @RequestMapping(value="/{id}/update",
                        method=POST)
        public org.springframework.http.ResponseEntity<AjaxResponse> updateProjectSubscription​(@PathVariable
                                                                                               java.lang.Long id,
                                                                                               @RequestParam
                                                                                               boolean subscribe,
                                                                                               java.util.Locale locale)
        Parameters:
        id - the identifier of the ProjectSubscription to update
        subscribe - whether to subscribe or unsubscribe the user to/from the project
        locale - Locale of the current user
        Returns:
        text to display to the user about the result of updating a project subscription
      • getProjectSubscriptionsForUser

        @RequestMapping("/{userId}/user/list")
        public org.springframework.http.ResponseEntity<TableResponse<UserProjectDetailsModel>> getProjectSubscriptionsForUser​(@PathVariable("userId")
                                                                                                                              java.lang.Long userId,
                                                                                                                              @RequestBody
                                                                                                                              TableRequest request)
        Get the projects associated with a user
        Parameters:
        userId - - the id for the user to show project subscriptions for
        request - - details about the current page of the table requested
        Returns:
        a TableResponse containing the list of project subscriptions associated with a users.