org.chorem.pollen.business.services
Class ServicePollImpl

java.lang.Object
  extended by org.chorem.pollen.business.services.ServicePollImpl
All Implemented Interfaces:
ServicePoll

public class ServicePollImpl
extends java.lang.Object
implements ServicePoll

Implémentation du service de gestion des sondages.

Version:
$Id: ServicePollImpl.java 2753 2009-08-25 16:33:21Z nrannou $
Author:
Erwan Nema, rannou

Constructor Summary
ServicePollImpl()
           
 
Method Summary
 boolean addVoteToPoll(java.lang.String pollId, java.lang.String voteId)
          Ajout d'un vote à un sondage
 java.lang.String createPoll(PollDTO pollDTO)
          Création d'un sondage
 boolean deletePoll(java.lang.String pollId)
          Suppression du sondage
 java.util.List<PollDTO> findInvitedPolls(java.lang.String userId)
          Récupération des sondages auxquels un utilisateur est invité.
 java.util.List<PollDTO> findParticipatedPolls(java.lang.String userId)
          Récupération des sondages auxquels un utilisateur a participé.
 PollDTO findPollById(java.lang.String pollId)
          Récupération d'un sondage à partir de son identifiant ToPIA
 PollDTO findPollByPollId(java.lang.String pollId)
          Récupération d'un sondage à partir de son identifiant.
 java.util.List<PollDTO> findPollsByName(java.lang.String pollName)
          Récupération d'un sondage par son nom
 java.util.List<PollDTO> findPollsByUser(java.lang.String userId)
          Récupération des sondages d'un utilisateur
 java.util.List<PollDTO> findRunningPolls(boolean withEndDate)
          Récupération des sondages en cours.
 java.util.List<PollDTO> selectPolls(java.util.Map<java.lang.String,java.lang.Object> properties)
          Récupération des sondages
 boolean updatePoll(PollDTO pollDTO)
          Mise à jour du sondage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServicePollImpl

public ServicePollImpl()
Method Detail

createPoll

public java.lang.String createPoll(PollDTO pollDTO)
Description copied from interface: ServicePoll
Création d'un sondage

Specified by:
createPoll in interface ServicePoll
Parameters:
pollDTO - le sondage
Returns:
identifiant du sondage créé

updatePoll

public boolean updatePoll(PollDTO pollDTO)
Description copied from interface: ServicePoll
Mise à jour du sondage

Specified by:
updatePoll in interface ServicePoll
Parameters:
pollDTO - le sondage
Returns:
true si le sondage a été mise à jour

deletePoll

public boolean deletePoll(java.lang.String pollId)
Description copied from interface: ServicePoll
Suppression du sondage

Specified by:
deletePoll in interface ServicePoll
Parameters:
pollId - le sondage
Returns:
true si le sondage a été supprimé

findPollById

public PollDTO findPollById(java.lang.String pollId)
Description copied from interface: ServicePoll
Récupération d'un sondage à partir de son identifiant ToPIA

Specified by:
findPollById in interface ServicePoll
Parameters:
pollId - identifiant topia du sondage
Returns:
le sondage

findPollByPollId

public PollDTO findPollByPollId(java.lang.String pollId)
Description copied from interface: ServicePoll
Récupération d'un sondage à partir de son identifiant.

Specified by:
findPollByPollId in interface ServicePoll
Parameters:
pollId - identifiant du sondage
Returns:
le sondage

findPollsByName

public java.util.List<PollDTO> findPollsByName(java.lang.String pollName)
Description copied from interface: ServicePoll
Récupération d'un sondage par son nom

Specified by:
findPollsByName in interface ServicePoll
Parameters:
pollName - nom du sondage
Returns:
liste de sondages

findPollsByUser

public java.util.List<PollDTO> findPollsByUser(java.lang.String userId)
Description copied from interface: ServicePoll
Récupération des sondages d'un utilisateur

Specified by:
findPollsByUser in interface ServicePoll
Parameters:
userId - Le créateur du sondage
Returns:
liste de sondages

findParticipatedPolls

public java.util.List<PollDTO> findParticipatedPolls(java.lang.String userId)
Description copied from interface: ServicePoll
Récupération des sondages auxquels un utilisateur a participé.

Specified by:
findParticipatedPolls in interface ServicePoll
Parameters:
userId - L'identifiant de l'utilisateur
Returns:
liste de sondages

findInvitedPolls

public java.util.List<PollDTO> findInvitedPolls(java.lang.String userId)
Description copied from interface: ServicePoll
Récupération des sondages auxquels un utilisateur est invité.

Specified by:
findInvitedPolls in interface ServicePoll
Parameters:
userId - L'identifiant de l'utilisateur
Returns:
liste de sondages

findRunningPolls

public java.util.List<PollDTO> findRunningPolls(boolean withEndDate)
Description copied from interface: ServicePoll
Récupération des sondages en cours.

Specified by:
findRunningPolls in interface ServicePoll
Parameters:
withEndDate - sélectionner uniquement les sondages ayant une date de fin
Returns:
liste de sondages

selectPolls

public java.util.List<PollDTO> selectPolls(java.util.Map<java.lang.String,java.lang.Object> properties)
Description copied from interface: ServicePoll
Récupération des sondages

Specified by:
selectPolls in interface ServicePoll
Parameters:
properties - filtre
Returns:
liste de sondages

addVoteToPoll

public boolean addVoteToPoll(java.lang.String pollId,
                             java.lang.String voteId)
Description copied from interface: ServicePoll
Ajout d'un vote à un sondage

Specified by:
addVoteToPoll in interface ServicePoll
Parameters:
pollId - identifiant topia du sondage
voteId - l'identiiant topiaId du vote
Returns:
true si le vote a été ajouté


Copyright © 2009 CodeLutin. All Rights Reserved.