Class PollServiceImpl

java.lang.Object
io.meeds.poll.service.PollServiceImpl
All Implemented Interfaces:
io.meeds.poll.service.PollService

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PollServiceImpl

      public PollServiceImpl()
  • Method Details

    • 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