Class ProjectSubscriptionsAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectSubscriptionsAjaxController
-
@RestController @RequestMapping("/ajax/subscriptions") public class ProjectSubscriptionsAjaxController extends java.lang.Object
Controller for handling AJAX requests forProjectSubscription
-
-
Constructor Summary
Constructors Constructor Description ProjectSubscriptionsAjaxController(UIProjectSubscriptionService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<TableResponse<UserProjectDetailsModel>>
getProjectSubscriptionsForUser(java.lang.Long userId, TableRequest request)
Get the projects associated with a userorg.springframework.http.ResponseEntity<AjaxResponse>
updateProjectSubscription(java.lang.Long id, boolean subscribe, java.util.Locale locale)
Update aProjectSubscription
-
-
-
Constructor Detail
-
ProjectSubscriptionsAjaxController
@Autowired public ProjectSubscriptionsAjaxController(UIProjectSubscriptionService service)
-
-
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)
Update aProjectSubscription
- Parameters:
id
- the identifier of theProjectSubscription
to updatesubscribe
- whether to subscribe or unsubscribe the user to/from the projectlocale
-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 forrequest
- - details about the current page of the table requested- Returns:
- a
TableResponse
containing the list of project subscriptions associated with a users.
-
-