public class PollServiceImpl extends Object implements org.picocontainer.Startable, PollService
| Modifier and Type | Field and Description |
|---|---|
protected List<PollEventListener> |
listeners_ |
| Constructor and Description |
|---|
PollServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.forum.common.jcr.KSDataLocation locator,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator) |
| Modifier and Type | Method and Description |
|---|---|
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".
|
void |
start() |
void |
stop() |
protected List<PollEventListener> listeners_
public void addInitialDefaultDataPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
PollServiceaddInitialDefaultDataPlugin in interface PollServiceplugin - The plugin to be added.Exception - the exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic Poll getPoll(String pollId) throws Exception
PollServicegetPoll in interface PollServicepollId - Id of the poll.Exception - the exceptionpublic Poll removePoll(String pollId)
PollServiceremovePoll in interface PollServicepollId - Id of the poll which is removed.public void savePoll(Poll poll, boolean isNew, boolean isVote) throws Exception
PollServicesavePoll in interface PollServicepoll - 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.Exception - the exceptionpublic void addListenerPlugin(PollEventListener listener) throws Exception
PollServiceaddListenerPlugin in interface PollServicelistener - The listener plugin to be added.Exceptionpublic void removeListenerPlugin(PollEventListener listener) throws Exception
PollServiceremoveListenerPlugin in interface PollServicelistener - The listener plugin to be removed.Exceptionpublic void setClosedPoll(Poll poll)
PollServicesetClosedPoll in interface PollServicepoll - The poll which is set to "closed".public List<Poll> getPagePoll() throws Exception
PollServicegetPagePoll in interface PollServiceException - the exceptionpublic boolean hasPermissionInForum(String pollPath, List<String> allInfoOfUser) throws Exception
PollServicehasPermissionInForum in interface PollServicepollPath - Path to the poll.allInfoOfUser - Information about user, group and membership of the user.Exception - the exceptionpublic PollSummary getPollSummary(List<String> groupOfUser) throws Exception
PollServicegetPollSummary in interface PollServicegroupOfUser - All groups of the current user.Exception - the exceptionpublic void saveActivityIdForOwner(String ownerPath, String activityId)
PollServicesaveActivityIdForOwner in interface PollServiceownerPath - Path to the poll activity.activityId - Id of the poll activity.public String getActivityIdForOwner(String ownerPath)
PollServicegetActivityIdForOwner in interface PollServiceownerPath - Path to the poll activity.Copyright © 2003–2014 eXo Platform SAS. All rights reserved.