Class ProjectEventServiceImpl

    • Constructor Detail

      • ProjectEventServiceImpl

        @Autowired
        public ProjectEventServiceImpl​(ProjectEventRepository repository,
                                       javax.validation.Validator validator)
    • Method Detail

      • getEventsForProject

        @PreAuthorize("hasAnyRole(\'ROLE_ADMIN\') or hasPermission(#project, \'canReadProject\')")
        public org.springframework.data.domain.Page<ProjectEvent> getEventsForProject​(Project project,
                                                                                      org.springframework.data.domain.Pageable pageable)
        Get the events for a given project
        Specified by:
        getEventsForProject in interface ProjectEventService
        Parameters:
        project - The project to get events for
        pageable - The page description
        Returns:
        A List of ProjectEvents
      • getEventsForUser

        @PreAuthorize("hasRole(\'ROLE_ADMIN\') or principal.username == #user.username")
        public org.springframework.data.domain.Page<ProjectEvent> getEventsForUser​(User user,
                                                                                   org.springframework.data.domain.Pageable pageable)
        Get the events on all projects for a given user
        Specified by:
        getEventsForUser in interface ProjectEventService
        Parameters:
        user - The User to get events for
        pageable - The page description.
        Returns:
        A List of ProjectEvents
      • getAllProjectsEvents

        @PreAuthorize("hasRole(\'ROLE_ADMIN\')")
        public org.springframework.data.domain.Page<ProjectEvent> getAllProjectsEvents​(org.springframework.data.domain.Pageable pageable)
        Get a list of events for all projects
        Specified by:
        getAllProjectsEvents in interface ProjectEventService
        Parameters:
        pageable - The page description.
        Returns:
        List of ProjectEvent
      • getEventsForUserAfterDate

        @PreAuthorize("hasRole(\'ROLE_ADMIN\')")
        public java.util.List<ProjectEvent> getEventsForUserAfterDate​(User user,
                                                                      java.util.Date beginning)
        Get a list of events for a User which occurred after the given date.
        Specified by:
        getEventsForUserAfterDate in interface ProjectEventService
        Parameters:
        user - User to get events for
        beginning - Get events after this date
        Returns:
        List of ProjectEvent