Interface AnnouncementService
-
- All Known Implementing Classes:
AnnouncementServiceImpl
public interface AnnouncementService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LongcountAllAnnouncementsByChallenge(long challengeId)Retrieves number of all Announcements by challengeId.AnnouncementcreateAnnouncement(Announcement announcement, String username, boolean system)Creates a new announcementList<Announcement>findAllAnnouncementByChallenge(long challengeId, int offset, int limit)Retrieves all Announcements by challengeId.AnnouncementgetAnnouncementById(Long announcementId)Retrieves a announcement identified by its technical identifier.AnnouncementupdateAnnouncement(Announcement announcement)Update announcement
-
-
-
Method Detail
-
findAllAnnouncementByChallenge
List<Announcement> findAllAnnouncementByChallenge(long challengeId, int offset, int limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
Retrieves all Announcements by challengeId.- Parameters:
offset- Offsetlimit- Limit- Returns:
- A
object - Throws:
IllegalAccessException- when user is not authorized to access announcementorg.exoplatform.commons.exception.ObjectNotFoundException- when the challenge identified by its technical identifier is not found
-
createAnnouncement
Announcement createAnnouncement(Announcement announcement, String username, boolean system) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
Creates a new announcement- Parameters:
announcement-Announcementobject to createusername- User name accessing announcementsystem- check if announcement created by system- Returns:
- created
Announcementwith generated technical identifier - Throws:
IllegalAccessException- when user is not authorized to create a announcement for the designated owner defined in objectorg.exoplatform.commons.exception.ObjectNotFoundException
-
updateAnnouncement
Announcement updateAnnouncement(Announcement announcement) throws org.exoplatform.commons.exception.ObjectNotFoundException
Update announcement- Parameters:
announcement-Announcementobject to Update- Returns:
- a
AnnouncementObject - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the announcement identified by its technical identifier is not found
-
getAnnouncementById
Announcement getAnnouncementById(Long announcementId) throws org.exoplatform.commons.exception.ObjectNotFoundException
Retrieves a announcement identified by its technical identifier.- Parameters:
announcementId- technical identifier of a challenge- Returns:
- A
Announcementobject - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the announcement identified by its technical identifier is not found
-
countAllAnnouncementsByChallenge
Long countAllAnnouncementsByChallenge(long challengeId) throws org.exoplatform.commons.exception.ObjectNotFoundException
Retrieves number of all Announcements by challengeId.- Returns:
- A
Longnumber of announcements - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the challenge identified by its technical identifier is not found
-
-