Interface AnnouncementService

All Known Implementing Classes:
AnnouncementServiceImpl

public interface AnnouncementService
  • 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 challenge
      offset - Offset
      limit - Limit
      periodType - periodType
      earnerType - 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.ObjectNotFoundException
      Creates a new announcement
      Parameters:
      announcement - Announcement object to create
      templateParams - Activity Template params
      username - User name accessing announcement
      system - check if announcement created by system
      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
    • updateAnnouncement

      Announcement updateAnnouncement(Announcement announcement) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Update announcement
      Parameters:
      announcement - Announcement object to Update
      Returns:
      a Announcement Object
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the announcement identified by its technical identifier is not found
    • getAnnouncementById

      Announcement getAnnouncementById(Long announcementId)
      Retrieves a announcement identified by its technical identifier.
      Parameters:
      announcementId - technical identifier of a challenge
      Returns:
      A Announcement object
    • getAnnouncementsByEarnerId

      List<Announcement> getAnnouncementsByEarnerId(String earnerId)
      Retrieves all announcements by earnerId.
      Parameters:
      earnerId - : the userId used in projection
      Returns:
      A <Announcement> object
    • 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 Long number 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 identifier
      earnerType - the earner identity type
      Returns:
      A Long number of announcements
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the challenge identified by its technical identifier is not found