Interface AnnouncementService

    • 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 - Offset
        limit - Limit
        Returns:
        A object
        Throws:
        IllegalAccessException - when user is not authorized to access announcement
        org.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 - Announcement object to create
        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)
                                  throws org.exoplatform.commons.exception.ObjectNotFoundException
        Retrieves a announcement identified by its technical identifier.
        Parameters:
        announcementId - technical identifier of a challenge
        Returns:
        A Announcement object
        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 Long number of announcements
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException - when the challenge identified by its technical identifier is not found