org.chorem.pollen.business.services
Interface ServicePoll

All Known Implementing Classes:
ServicePollImpl

public interface ServicePoll

Interface du service de gestion des sondages.

Version:
$Id: ServicePoll.java 2933 2010-03-12 14:31:05Z fdesbois $
Author:
enema

Method Summary
 boolean addVoteToPoll(String pollId, String voteId)
          Ajout d'un vote à un sondage
 String createPoll(PollDTO poll)
          Création d'un sondage
 boolean deletePoll(String pollId)
          Suppression du sondage
 List<PollDTO> findInvitedPolls(String userId)
          Récupération des sondages auxquels un utilisateur est invité.
 List<PollDTO> findParticipatedPolls(String userId)
          Récupération des sondages auxquels un utilisateur a participé.
 PollDTO findPollById(String pollId)
          Récupération d'un sondage à partir de son identifiant ToPIA
 PollDTO findPollByPollId(String pollId)
          Récupération d'un sondage à partir de son identifiant.
 List<PollDTO> findPollsByName(String pollName)
          Récupération d'un sondage par son nom
 List<PollDTO> findPollsByUser(String userId)
          Récupération des sondages d'un utilisateur
 List<PollDTO> findRunningPolls(boolean withEndDate)
          Récupération des sondages en cours.
 PollAccountDTO getRestrictedAccount(String accountUId, PollDTO poll)
          Return the pollAccount corresponding to the accountUId for the restricted poll.
 List<PollDTO> selectPolls(Map<String,Object> properties)
          Récupération des sondages
 boolean updatePoll(PollDTO poll)
          Mise à jour du sondage
 

Method Detail

createPoll

String createPoll(PollDTO poll)
Création d'un sondage

Parameters:
poll - le sondage
Returns:
identifiant du sondage créé

updatePoll

boolean updatePoll(PollDTO poll)
Mise à jour du sondage

Parameters:
poll - le sondage
Returns:
true si le sondage a été mise à jour

deletePoll

boolean deletePoll(String pollId)
Suppression du sondage

Parameters:
pollId - le sondage
Returns:
true si le sondage a été supprimé

findPollById

PollDTO findPollById(String pollId)
Récupération d'un sondage à partir de son identifiant ToPIA

Parameters:
pollId - identifiant topia du sondage
Returns:
le sondage

findPollByPollId

PollDTO findPollByPollId(String pollId)
Récupération d'un sondage à partir de son identifiant.

Parameters:
pollId - identifiant du sondage
Returns:
le sondage

findPollsByName

List<PollDTO> findPollsByName(String pollName)
Récupération d'un sondage par son nom

Parameters:
pollName - nom du sondage
Returns:
liste de sondages

findPollsByUser

List<PollDTO> findPollsByUser(String userId)
Récupération des sondages d'un utilisateur

Parameters:
userId - Le créateur du sondage
Returns:
liste de sondages

findParticipatedPolls

List<PollDTO> findParticipatedPolls(String userId)
Récupération des sondages auxquels un utilisateur a participé.

Parameters:
userId - L'identifiant de l'utilisateur
Returns:
liste de sondages

findInvitedPolls

List<PollDTO> findInvitedPolls(String userId)
Récupération des sondages auxquels un utilisateur est invité.

Parameters:
userId - L'identifiant de l'utilisateur
Returns:
liste de sondages

findRunningPolls

List<PollDTO> findRunningPolls(boolean withEndDate)
Récupération des sondages en cours.

Parameters:
withEndDate - sélectionner uniquement les sondages ayant une date de fin
Returns:
liste de sondages

selectPolls

List<PollDTO> selectPolls(Map<String,Object> properties)
Récupération des sondages

Parameters:
properties - filtre
Returns:
liste de sondages

addVoteToPoll

boolean addVoteToPoll(String pollId,
                      String voteId)
Ajout d'un vote à un sondage

Parameters:
pollId - identifiant topia du sondage
voteId - l'identiiant topiaId du vote
Returns:
true si le vote a été ajouté

getRestrictedAccount

PollAccountDTO getRestrictedAccount(String accountUId,
                                    PollDTO poll)
Return the pollAccount corresponding to the accountUId for the restricted poll. TODO : need JUnit test, must be done for 1.3

Parameters:
accountUId - to check the restriction constraint
poll - reference
Returns:
the pollAccount found from poll or null if there is no pollAccount in poll restriction for the accountUId in argument


Copyright © 2009-2010 CodeLutin. All Rights Reserved.