org.exoplatform.poll.service
Interface PollService

All Known Implementing Classes:
PollServiceImpl

public interface PollService

Main Facade for all Poll operations.


Method Summary
 void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Adds a plugin which initalizes the default data at first runtime.
 void addListenerPlugin(PollEventListener listener)
          Adds a listener plugin.
 String getActivityIdForOwner(String ownerPath)
          Gets information of a poll activity that is used for processing the activity streams.
 List<Poll> getPagePoll()
          Gets a list of polls.
 Poll getPoll(String pollId)
          Gets a poll by its Id.
 PollSummary getPollSummary(List<String> groupOfUser)
          Gets summary of a poll.
 boolean hasPermissionInForum(String pollPath, List<String> allInfoOfUser)
          Checks if a user has permission on a poll or not.
 void removeListenerPlugin(PollEventListener listener)
          Removes a listener plugin.
 Poll removePoll(String pollId)
          Removes a poll.
 void saveActivityIdForOwner(String ownerPath, String activityId)
          Saves information of a poll activity that is used for processing the activity streams.
 void savePoll(Poll poll, boolean isNew, boolean isVote)
          Saves a poll.
 void setClosedPoll(Poll poll)
          Sets a poll to "closed".
 

Method Detail

addInitialDefaultDataPlugin

void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
                                 throws Exception
Adds a plugin which initalizes the default data at first runtime.

Parameters:
plugin - The plugin to be added.
Throws:
Exception - the exception

getPoll

Poll getPoll(String pollId)
             throws Exception
Gets a poll by its Id.

Parameters:
pollId - Id of the poll.
Returns:
The poll.
Throws:
Exception - the exception

savePoll

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

Parameters:
poll - The poll to be saved.
isNew - If "true", the new poll is added. If "false", the poll is updated.
isVote - If "true", the poll can be voted. If "false", the poll is updated.
Throws:
Exception - the exception

removePoll

Poll removePoll(String pollId)
Removes a poll.

Parameters:
pollId - Id of the poll which is removed.
Returns:
The poll

setClosedPoll

void setClosedPoll(Poll poll)
Sets a poll to "closed".

Parameters:
poll - The poll which is set to "closed".

getPagePoll

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

Returns:
Polls.
Throws:
Exception - the exception

hasPermissionInForum

boolean hasPermissionInForum(String pollPath,
                             List<String> allInfoOfUser)
                             throws Exception
Checks if a user has permission on a poll or not.

Parameters:
pollPath - Path to the poll.
allInfoOfUser - Information about user, group and membership of the user.
Returns:
The returned value is "true" if the checked user has permission on the poll.
Throws:
Exception - the exception

getPollSummary

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

Parameters:
groupOfUser - All groups of the current user.
Returns:
The poll summary.
Throws:
Exception - the exception

saveActivityIdForOwner

void saveActivityIdForOwner(String ownerPath,
                            String activityId)
Saves information of a poll activity that is used for processing the activity streams.

Parameters:
ownerPath - Path to the poll activity.
activityId - Id of the poll activity.
Since:
4.0

getActivityIdForOwner

String getActivityIdForOwner(String ownerPath)
Gets information of a poll activity that is used for processing the activity streams.

Parameters:
ownerPath - Path to the poll activity.
Returns:
Id of the poll activity.
Since:
4.0

addListenerPlugin

void addListenerPlugin(PollEventListener listener)
                       throws Exception
Adds a listener plugin.

Parameters:
listener - The listener plugin to be added.
Throws:
Exception

removeListenerPlugin

void removeListenerPlugin(PollEventListener listener)
                          throws Exception
Removes a listener plugin.

Parameters:
listener - The listener plugin to be removed.
Throws:
Exception


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.