Interface AnnouncementService
-
- All Superinterfaces:
CRUDService<java.lang.Long,Announcement>
- All Known Implementing Classes:
AnnouncementServiceImpl
public interface AnnouncementService extends CRUDService<java.lang.Long,Announcement>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<Announcement,java.lang.Long>
countReadsForAllAnnouncements()
Get a map where the keys areAnnouncement
s and the values areInteger
s representing the number ofUser
s who have read that announcement.java.lang.Long
countReadsForOneAnnouncement(Announcement announcement)
Get a count of the number ofUser
s who have readAnnouncement
java.util.List<Announcement>
getAllAnnouncements()
Get a list of all of theAnnouncement
s that currently existjava.util.List<Announcement>
getAnnouncementsCreatedByUser(User user)
Get a list ofAnnouncement
s created by specific adminUser
java.util.List<AnnouncementUserReadDetails>
getAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have been read and unread byUser
java.util.List<AnnouncementUserJoin>
getReadAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have been read byUser
java.util.List<AnnouncementUserJoin>
getReadUsersForAnnouncement(Announcement announcement)
Get all of theJoin
s describing users that have comfirmed they've read a particularAnnouncement
java.util.List<Announcement>
getUnreadAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have not been read byUser
java.util.List<User>
getUnreadUsersForAnnouncement(Announcement announcement)
Get a list of all of theUser
s that have not confirmed they've read theAnnouncement
AnnouncementUserJoin
markAnnouncementAsReadByUser(Announcement announcement, User user)
Mark anAnnouncement
object as read by aUser
void
markAnnouncementAsUnreadByUser(Announcement announcement, User user)
Mark anAnnouncement
as unread by aUser
-
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
-
-
-
-
Method Detail
-
markAnnouncementAsReadByUser
AnnouncementUserJoin markAnnouncementAsReadByUser(Announcement announcement, User user)
Mark anAnnouncement
object as read by aUser
- Parameters:
announcement
- The announcement to markuser
- the user who's read the announcement- Returns:
- An
AnnouncementUserJoin
object representing the relationship between the announcement and the user
-
markAnnouncementAsUnreadByUser
void markAnnouncementAsUnreadByUser(Announcement announcement, User user)
Mark anAnnouncement
as unread by aUser
- Parameters:
announcement
- the announcement to markuser
- the user to mark the announcement for
-
getReadUsersForAnnouncement
java.util.List<AnnouncementUserJoin> getReadUsersForAnnouncement(Announcement announcement)
Get all of theJoin
s describing users that have comfirmed they've read a particularAnnouncement
- Parameters:
announcement
- TheAnnouncement
for which we want to load users that have read it- Returns:
- List of
User
s that have read the announcement
-
getUnreadUsersForAnnouncement
java.util.List<User> getUnreadUsersForAnnouncement(Announcement announcement)
Get a list of all of theUser
s that have not confirmed they've read theAnnouncement
- Parameters:
announcement
- The- Returns:
- List of
User
s that haven't confirmed they've read the announcement
-
getAnnouncementsForUser
java.util.List<AnnouncementUserReadDetails> getAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have been read and unread byUser
- Parameters:
user
-User
for whom we want to get unread announcements- Returns:
- list of
AnnouncementUserReadDetails
objects representing announcements read and unread by a user
-
getReadAnnouncementsForUser
java.util.List<AnnouncementUserJoin> getReadAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have been read byUser
-
getUnreadAnnouncementsForUser
java.util.List<Announcement> getUnreadAnnouncementsForUser(User user)
Get a list ofAnnouncement
s that have not been read byUser
- Parameters:
user
-User
for whom we want to get unread announcements- Returns:
- List of
Announcement
s that have not been read by the user
-
getAllAnnouncements
java.util.List<Announcement> getAllAnnouncements()
Get a list of all of theAnnouncement
s that currently exist- Returns:
- List of
Announcement
s
-
getAnnouncementsCreatedByUser
java.util.List<Announcement> getAnnouncementsCreatedByUser(User user)
Get a list ofAnnouncement
s created by specific adminUser
-
countReadsForOneAnnouncement
java.lang.Long countReadsForOneAnnouncement(Announcement announcement)
Get a count of the number ofUser
s who have readAnnouncement
- Parameters:
announcement
-Announcement
for which we want the number of users who have read it- Returns:
- number of users who have read
Announcement
-
countReadsForAllAnnouncements
java.util.Map<Announcement,java.lang.Long> countReadsForAllAnnouncements()
Get a map where the keys areAnnouncement
s and the values areInteger
s representing the number ofUser
s who have read that announcement.- Returns:
- A Map of announcements and counts of users who have read that announcement
-
-