Interface AnnouncementService

All Known Implementing Classes:
AnnouncementServiceImpl

public interface AnnouncementService
  • Method Details

    • createAnnouncement

      Announcement createAnnouncement(Announcement announcement, Map<String,String> templateParams, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Creates a new announcement
      Parameters:
      announcement - Announcement object to create
      templateParams - Activity Template params
      username - User name accessing announcement
      Returns:
      created Announcement with generated technical identifier
      Throws:
      IllegalAccessException - when user is not authorized to create a announcement for the designated owner defined in object
      org.exoplatform.commons.exception.ObjectNotFoundException
    • canAnnounce

      boolean canAnnounce(RuleDTO rule, long identityId)
      Parameters:
      rule - RuleDTO
      identityId - User identityId 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 - Announcement id which references the RealizationDTO id
      comment - new user comment
      Returns:
      a Announcement Object
      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 announcement
      username - Username who want to delete announcement
      Returns:
      a Announcement Object
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the announcement identified by its technical identifier is not found
      IllegalAccessException - when user is not allowed to delete the announce
    • getAnnouncementById

      Announcement getAnnouncementById(long announcementId)
      Retrieves a announcement identified by its technical identifier.
      Parameters:
      announcementId - technical identifier of a RealizationDTO
      Returns:
      A Announcement object