Package io.meeds.gamification.service
Interface AnnouncementService
- All Known Implementing Classes:
AnnouncementServiceImpl
public interface AnnouncementService
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanAnnounce(RuleDTO rule, String username) createAnnouncement(Announcement announcement, Map<String, String> templateParams, String username) Creates a new announcementdeleteAnnouncement(long announcementId, String username) Deletes announcementgetAnnouncementById(long announcementId) Retrieves a announcement identified by its technical identifier.updateAnnouncementComment(long announcementId, String comment) Update announcement
-
Method Details
-
createAnnouncement
Announcement createAnnouncement(Announcement announcement, Map<String, String> templateParams, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundExceptionCreates a new announcement- Parameters:
announcement-Announcementobject to createtemplateParams- Activity Template paramsusername- User name accessing announcement- 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
-
canAnnounce
- Parameters:
rule-RuleDTOusername- User name willing to announce a realization- Returns:
- true if can announce it else returns false
-
updateAnnouncementComment
Announcement updateAnnouncementComment(long announcementId, String comment) throws org.exoplatform.commons.exception.ObjectNotFoundException Update announcement- Parameters:
announcementId-Announcementid which references theRealizationDTOidcomment- new user comment- Returns:
- a
AnnouncementObject - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the announcement identified by its technical identifier is not found
-
deleteAnnouncement
Announcement deleteAnnouncement(long announcementId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Deletes announcement- Parameters:
announcementId- technical identifier of announcementusername- Username who want to delete announcement- Returns:
- a
AnnouncementObject - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the announcement identified by its technical identifier is not foundIllegalAccessException- when user is not allowed to delete the announce
-
getAnnouncementById
Retrieves a announcement identified by its technical identifier.- Parameters:
announcementId- technical identifier of aRealizationDTO- Returns:
- A
Announcementobject
-