Interface AnnouncementService
- All Known Implementing Classes:
AnnouncementServiceImpl
public interface AnnouncementService
-
Method Summary
Modifier and TypeMethodDescriptioncountAllAnnouncementsByChallenge(long challengeId) Retrieves number of all Announcements by challenge identifier.countAnnouncementsByChallengeAndEarnerType(long challengeId, IdentityType earnerType) Retrieves number of all Announcements by challenge identifier.createAnnouncement(Announcement announcement, Map<String, String> templateParams, String username, boolean system) Creates a new announcementfindAllAnnouncementByChallenge(long challengeId, int offset, int limit, PeriodType periodType, IdentityType earnerType) Retrieves all Announcements by challengeId.getAnnouncementById(Long announcementId) Retrieves a announcement identified by its technical identifier.updateAnnouncement(Announcement announcement) Update announcement
-
Method Details
-
findAllAnnouncementByChallenge
List<Announcement> findAllAnnouncementByChallenge(long challengeId, int offset, int limit, PeriodType periodType, IdentityType earnerType) throws IllegalAccessException Retrieves all Announcements by challengeId.- Parameters:
challengeId- technical identifier of a challengeoffset- Offsetlimit- LimitperiodType- periodTypeearnerType- earnerType- Returns:
- A
<Announcement>object - Throws:
IllegalAccessException- when user is not authorized to access announcement
-
createAnnouncement
Announcement createAnnouncement(Announcement announcement, Map<String, String> templateParams, String username, boolean system) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundExceptionCreates a new announcement- Parameters:
announcement-Announcementobject to createtemplateParams- Activity Template paramsusername- 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
Retrieves a announcement identified by its technical identifier.- Parameters:
announcementId- technical identifier of a challenge- Returns:
- A
Announcementobject
-
countAllAnnouncementsByChallenge
Long countAllAnnouncementsByChallenge(long challengeId) throws org.exoplatform.commons.exception.ObjectNotFoundException Retrieves number of all Announcements by challenge identifier.- Parameters:
challengeId- Challenge technical identifier- Returns:
- A
Longnumber of announcements - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the challenge identified by its technical identifier is not found
-
countAnnouncementsByChallengeAndEarnerType
Long countAnnouncementsByChallengeAndEarnerType(long challengeId, IdentityType earnerType) throws org.exoplatform.commons.exception.ObjectNotFoundException Retrieves number of all Announcements by challenge identifier.- Parameters:
challengeId- Challenge technical identifierearnerType- the earner identity type- Returns:
- A
Longnumber of announcements - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the challenge identified by its technical identifier is not found
-