Class ActivitiesAjaxController


  • @Controller
    @RequestMapping("/ajax/activities")
    public class ActivitiesAjaxController
    extends java.lang.Object
    AJAX controller to handle actitivies
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<AjaxResponse> getAllRecentActivities​(int page, java.util.Locale locale)
      Get a specific page of recent activities for all projects
      org.springframework.http.ResponseEntity<AjaxResponse> getProjectActivities​(java.lang.Long projectId, int page, java.util.Locale locale)
      Get a specific page of activities for a project
      org.springframework.http.ResponseEntity<AjaxResponse> getRecentActivities​(int page, java.util.Locale locale, java.security.Principal principal)
      Get a specific page of recent activities for a user
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActivitiesAjaxController

        @Autowired
        public ActivitiesAjaxController​(UIActivitiesService service)
    • Method Detail

      • getProjectActivities

        @GetMapping("/project")
        public org.springframework.http.ResponseEntity<AjaxResponse> getProjectActivities​(@RequestParam
                                                                                          java.lang.Long projectId,
                                                                                          @RequestParam(defaultValue="0")
                                                                                          int page,
                                                                                          java.util.Locale locale)
        Get a specific page of activities for a project
        Parameters:
        projectId - Identifier for the current project
        page - Page requested
        locale - Current users locale
        Returns:
        List of activities and the total number of activities
      • getRecentActivities

        @GetMapping("/user")
        public org.springframework.http.ResponseEntity<AjaxResponse> getRecentActivities​(@RequestParam(defaultValue="0")
                                                                                         int page,
                                                                                         java.util.Locale locale,
                                                                                         java.security.Principal principal)
        Get a specific page of recent activities for a user
        Parameters:
        page - Page requested
        locale - Current users locale
        principal - The currently logged on user
        Returns:
        List of activities and the total number of activities
      • getAllRecentActivities

        @GetMapping("/all")
        @PreAuthorize("hasRole(\'ROLE_ADMIN\')")
        public org.springframework.http.ResponseEntity<AjaxResponse> getAllRecentActivities​(@RequestParam(defaultValue="0")
                                                                                            int page,
                                                                                            java.util.Locale locale)
        Get a specific page of recent activities for all projects
        Parameters:
        page - Page requested
        locale - Current users locale
        Returns:
        List of activities and the total number of activities