org.exoplatform.poll.service
Interface PollService

All Known Implementing Classes:
PollServiceImpl

public interface PollService

Main Facade for all BBCode related operations

Version:
$Revision$
Author:
Patrice Lamarque

Method Summary
 void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Adds the plugin.
 void addListenerPlugin(PollEventListener listener)
           
 String getActivityIdForOwner(String ownerPath)
          Get value of exo:activityId property in specified node via path.
 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.
 void removeListenerPlugin(PollEventListener listener)
           
 Poll removePoll(String pollId)
          Removes the poll.
 void saveActivityIdForOwner(String ownerPath, String activityId)
          Defines Mixin type exo:activityInfo for node that means to add exo:activityId property into Node what is owner created activity via patch
 void savePoll(Poll poll, boolean isNew, boolean isVote)
          Save poll.
 void setClosedPoll(Poll poll)
          Sets the closed poll.
 

Method Detail

addInitialDefaultDataPlugin

void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
                                 throws Exception
Adds the plugin.

Parameters:
plugin - the plugin
Throws:
Exception - the exception

getPoll

Poll getPoll(String pollId)
             throws Exception
Gets the poll.

Parameters:
pollId -
Returns:
the poll
Throws:
Exception - the exception

savePoll

void savePoll(Poll poll,
              boolean isNew,
              boolean isVote)
              throws Exception
Save poll.

Parameters:
poll - the poll
isNew - is the new
isVote - is the vote
Throws:
Exception - the exception

removePoll

Poll removePoll(String pollId)
Removes the poll.

Parameters:
pollId -
Returns:
the poll

setClosedPoll

void setClosedPoll(Poll poll)
Sets the closed poll.

Parameters:
poll -

getPagePoll

List<Poll> getPagePoll()
                       throws Exception
Gets list polls.

Returns:
the list of polls
Throws:
Exception - the exception

hasPermissionInForum

boolean hasPermissionInForum(String pollPath,
                             List<String> allInfoOfUser)
                             throws Exception
check has permission of user viewer the poll in the forum.

Parameters:
allInfoOfUser - user, group and membership of the user.
pollPath - the path of the poll.
Returns:
boolean
Throws:
Exception - the exception

getPollSummary

PollSummary getPollSummary(List<String> groupOfUser)
                           throws Exception
Gets the poll summary.

Parameters:
groupOfUser - group
Returns:
the poll summary
Throws:
Exception - the exception

saveActivityIdForOwner

void saveActivityIdForOwner(String ownerPath,
                            String activityId)
Defines Mixin type exo:activityInfo for node that means to add exo:activityId property into Node what is owner created activity via patch

Parameters:
ownerPath - - the Path's Node what is owner created activity
activityId - - the Id's activity created.
Since:
4.0

getActivityIdForOwner

String getActivityIdForOwner(String ownerPath)
Get value of exo:activityId property in specified node via path. If property is not existing then return null.

Parameters:
ownerPath - - the Path's Node what is owner created activity
Returns:
String - the Id's activity created.
Since:
4.0

addListenerPlugin

void addListenerPlugin(PollEventListener listener)
                       throws Exception
Throws:
Exception

removeListenerPlugin

void removeListenerPlugin(PollEventListener listener)
                          throws Exception
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.