Class PollServiceImpl

  • All Implemented Interfaces:
    io.meeds.poll.service.PollService

    public class PollServiceImpl
    extends Object
    implements io.meeds.poll.service.PollService
    • Constructor Summary

      Constructors 
      Constructor Description
      PollServiceImpl​(PollStorage pollStorage, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.portal.config.UserACL userACL)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.meeds.poll.model.Poll createPoll​(io.meeds.poll.model.Poll poll, List<io.meeds.poll.model.PollOption> pollOptions, String spaceId, String message, org.exoplatform.services.security.Identity currentIdentity, List<org.exoplatform.social.core.activity.model.ActivityFile> files)
      boolean didVote​(org.exoplatform.services.security.Identity currentIdentity, Long pollId)  
      io.meeds.poll.model.Poll getPollById​(long pollId, org.exoplatform.services.security.Identity currentIdentity)  
      io.meeds.poll.model.PollOption getPollOptionById​(long pollOptionId, org.exoplatform.services.security.Identity currentIdentity)
      List<io.meeds.poll.model.PollOption> getPollOptionsByPollId​(long pollId, org.exoplatform.services.security.Identity currentIdentity)
      int getPollOptionsNumber​(long pollId, org.exoplatform.services.security.Identity currentIdentity)
      int getPollOptionTotalVotes​(long pollOptionId, String spaceId, org.exoplatform.services.security.Identity currentIdentity)
      int getPollTotalVotes​(long pollId, org.exoplatform.services.security.Identity currentIdentity)
      boolean isPollOptionVoted​(long pollOptionId, String spaceId, org.exoplatform.services.security.Identity currentIdentity)
      io.meeds.poll.model.PollVote vote​(String pollOptionId, String spaceId, org.exoplatform.services.security.Identity currentIdentity)
    • Constructor Detail

      • PollServiceImpl

        public PollServiceImpl​(PollStorage pollStorage,
                               org.exoplatform.social.core.space.spi.SpaceService spaceService,
                               org.exoplatform.social.core.manager.IdentityManager identityManager,
                               org.exoplatform.social.core.manager.ActivityManager activityManager,
                               org.exoplatform.portal.config.UserACL userACL)
    • Method Detail

      • createPoll

        public io.meeds.poll.model.Poll createPoll​(io.meeds.poll.model.Poll poll,
                                                   List<io.meeds.poll.model.PollOption> pollOptions,
                                                   String spaceId,
                                                   String message,
                                                   org.exoplatform.services.security.Identity currentIdentity,
                                                   List<org.exoplatform.social.core.activity.model.ActivityFile> files)
                                            throws IllegalAccessException
        Specified by:
        createPoll in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollById

        public io.meeds.poll.model.Poll getPollById​(long pollId,
                                                    org.exoplatform.services.security.Identity currentIdentity)
                                             throws IllegalAccessException
        Specified by:
        getPollById in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollOptionById

        public io.meeds.poll.model.PollOption getPollOptionById​(long pollOptionId,
                                                                org.exoplatform.services.security.Identity currentIdentity)
                                                         throws IllegalAccessException
        Specified by:
        getPollOptionById in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollOptionsByPollId

        public List<io.meeds.poll.model.PollOption> getPollOptionsByPollId​(long pollId,
                                                                           org.exoplatform.services.security.Identity currentIdentity)
                                                                    throws IllegalAccessException
        Specified by:
        getPollOptionsByPollId in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • vote

        public io.meeds.poll.model.PollVote vote​(String pollOptionId,
                                                 String spaceId,
                                                 org.exoplatform.services.security.Identity currentIdentity)
                                          throws IllegalAccessException
        Specified by:
        vote in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollOptionTotalVotes

        public int getPollOptionTotalVotes​(long pollOptionId,
                                           String spaceId,
                                           org.exoplatform.services.security.Identity currentIdentity)
                                    throws IllegalAccessException
        Specified by:
        getPollOptionTotalVotes in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • isPollOptionVoted

        public boolean isPollOptionVoted​(long pollOptionId,
                                         String spaceId,
                                         org.exoplatform.services.security.Identity currentIdentity)
                                  throws IllegalAccessException
        Specified by:
        isPollOptionVoted in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollOptionsNumber

        public int getPollOptionsNumber​(long pollId,
                                        org.exoplatform.services.security.Identity currentIdentity)
                                 throws IllegalAccessException
        Specified by:
        getPollOptionsNumber in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • getPollTotalVotes

        public int getPollTotalVotes​(long pollId,
                                     org.exoplatform.services.security.Identity currentIdentity)
                              throws IllegalAccessException
        Specified by:
        getPollTotalVotes in interface io.meeds.poll.service.PollService
        Throws:
        IllegalAccessException
      • didVote

        public boolean didVote​(org.exoplatform.services.security.Identity currentIdentity,
                               Long pollId)
        Specified by:
        didVote in interface io.meeds.poll.service.PollService