Class ProjectEventServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl<java.lang.Long,ProjectEvent>
-
- ca.corefacility.bioinformatics.irida.service.impl.ProjectEventServiceImpl
-
- All Implemented Interfaces:
CRUDService<java.lang.Long,ProjectEvent>
,ProjectEventService
@Service public class ProjectEventServiceImpl extends CRUDServiceImpl<java.lang.Long,ProjectEvent> implements ProjectEventService
Implementation ofProjectEventService
using aProjectEventRepository
-
-
Field Summary
-
Fields inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
CREATED_DATE_SORT_PROPERTY, validator, valueType
-
-
Constructor Summary
Constructors Constructor Description ProjectEventServiceImpl(ProjectEventRepository repository, javax.validation.Validator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<ProjectEvent>
getAllProjectsEvents(org.springframework.data.domain.Pageable pageable)
Get a list of events for all projectsorg.springframework.data.domain.Page<ProjectEvent>
getEventsForProject(Project project, org.springframework.data.domain.Pageable pageable)
Get the events for a given projectorg.springframework.data.domain.Page<ProjectEvent>
getEventsForUser(User user, org.springframework.data.domain.Pageable pageable)
Get the events on all projects for a given userjava.util.List<ProjectEvent>
getEventsForUserAfterDate(User user, java.util.Date beginning)
Get a list of events for aUser
which occurred after the given date.-
Methods inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
count, create, delete, exists, findAll, findRevisions, findRevisions, list, list, list, read, readMultiple, search, search, update, updateFields, updateMultiple
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.service.CRUDService
count, create, delete, exists, findAll, findRevisions, findRevisions, list, list, list, read, readMultiple, search, search, update, updateFields, updateMultiple
-
-
-
-
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 interfaceProjectEventService
- Parameters:
project
- The project to get events forpageable
- The page description- Returns:
- A List of
ProjectEvent
s
-
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 interfaceProjectEventService
- Parameters:
user
- TheUser
to get events forpageable
- The page description.- Returns:
- A List of
ProjectEvent
s
-
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 interfaceProjectEventService
- 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 aUser
which occurred after the given date.- Specified by:
getEventsForUserAfterDate
in interfaceProjectEventService
- Parameters:
user
-User
to get events forbeginning
- Get events after this date- Returns:
- List of
ProjectEvent
-
-