org.exoplatform.poll.service.impl
Class PollServiceImpl

java.lang.Object
  extended by org.exoplatform.poll.service.impl.PollServiceImpl
All Implemented Interfaces:
PollService, org.picocontainer.Startable

public class PollServiceImpl
extends Object
implements org.picocontainer.Startable, PollService


Constructor Summary
PollServiceImpl(org.exoplatform.container.xml.InitParams params, org.exoplatform.forum.common.jcr.KSDataLocation locator, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
           
 
Method Summary
 void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Adds the plugin.
 List<Poll> getPagePoll()
          Gets list polls.
 Poll getPoll(String pollId)
          Gets the poll.
 PollSummary getPollSummary(List<String> groupOfUser)
          Gets the poll summary.
 boolean hasPermissionInForum(String pollPath, List<String> allInfoOfUser)
          check has permission of user viewer the poll in the forum.
 Poll removePoll(String pollId)
          Removes the poll.
 void savePoll(Poll poll, boolean isNew, boolean isVote)
          Save poll.
 void setClosedPoll(Poll poll)
          Sets the closed poll.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollServiceImpl

public PollServiceImpl(org.exoplatform.container.xml.InitParams params,
                       org.exoplatform.forum.common.jcr.KSDataLocation locator,
                       org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
                throws Exception
Throws:
Exception
Method Detail

addInitialDefaultDataPlugin

public void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
                                 throws Exception
Description copied from interface: PollService
Adds the plugin.

Specified by:
addInitialDefaultDataPlugin in interface PollService
Parameters:
plugin - the plugin
Throws:
Exception - the exception

start

public void start()
Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable

getPoll

public Poll getPoll(String pollId)
             throws Exception
Description copied from interface: PollService
Gets the poll.

Specified by:
getPoll in interface PollService
Returns:
the poll
Throws:
Exception - the exception

removePoll

public Poll removePoll(String pollId)
Description copied from interface: PollService
Removes the poll.

Specified by:
removePoll in interface PollService
Returns:
the poll

savePoll

public void savePoll(Poll poll,
                     boolean isNew,
                     boolean isVote)
              throws Exception
Description copied from interface: PollService
Save poll.

Specified by:
savePoll in interface PollService
Parameters:
poll - the poll
isNew - is the new
isVote - is the vote
Throws:
Exception - the exception

setClosedPoll

public void setClosedPoll(Poll poll)
Description copied from interface: PollService
Sets the closed poll.

Specified by:
setClosedPoll in interface PollService

getPagePoll

public List<Poll> getPagePoll()
                       throws Exception
Description copied from interface: PollService
Gets list polls.

Specified by:
getPagePoll in interface PollService
Returns:
the list of polls
Throws:
Exception - the exception

hasPermissionInForum

public boolean hasPermissionInForum(String pollPath,
                                    List<String> allInfoOfUser)
                             throws Exception
Description copied from interface: PollService
check has permission of user viewer the poll in the forum.

Specified by:
hasPermissionInForum in interface PollService
Parameters:
pollPath - the path of the poll.
allInfoOfUser - user, group and membership of the user.
Returns:
boolean
Throws:
Exception - the exception

getPollSummary

public PollSummary getPollSummary(List<String> groupOfUser)
                           throws Exception
Description copied from interface: PollService
Gets the poll summary.

Specified by:
getPollSummary in interface PollService
Parameters:
groupOfUser - group
Returns:
the poll summary
Throws:
Exception - the exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.