org.chorem.pollen.ui.utils
Class CSVAccountUtil

java.lang.Object
  extended by org.chorem.pollen.ui.utils.CSVAccountUtil

public class CSVAccountUtil
extends Object

Classe permettant de gérer l'import de listes de votants au format CSV.

Version:
$Id: CSVAccountUtil.java 2896 2010-03-05 09:55:30Z fdesbois $
Author:
rannou

Constructor Summary
CSVAccountUtil()
           
 
Method Summary
static List<PollAccountDTO> importList(Reader reader)
          CSV import from a reader.
static List<PollAccountDTO> importList(org.apache.tapestry5.upload.services.UploadedFile file)
          Import d'une liste de votants à partir d'un fichier CSV.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVAccountUtil

public CSVAccountUtil()
Method Detail

importList

public static List<PollAccountDTO> importList(Reader reader)
CSV import from a reader. The CSV file contains three columns corresponding to 'votingId', 'email' and 'weight'.No header column is needed, the separator is ','. Ex : "toto","toto@titi.fr","3"

Parameters:
reader - which contains the input stream
Returns:
the new PollAccountDTO list from results imported

importList

public static List<PollAccountDTO> importList(org.apache.tapestry5.upload.services.UploadedFile file)
Import d'une liste de votants à partir d'un fichier CSV.

Parameters:
file - le fichier CSV
Returns:
a PollAccountDTO list
See Also:
importList(java.io.Reader)


Copyright © 2009-2010 CodeLutin. All Rights Reserved.