org.activemath.webapp.survey
Class SurveyManager

java.lang.Object
  extended by org.activemath.webapp.survey.SurveyManager

public class SurveyManager
extends Object


Field Summary
protected static Logger log
           
 
Constructor Summary
SurveyManager()
           
 
Method Summary
 org.jdom.Document generateDOM(File fileToAppend)
           
 Set<String> generateNames(org.jdom.Document doc)
           
 List<SurveyData> generateSurveyData(org.jdom.Document doc, Set<String> names)
           
static List<String> getAvailableSurveys()
           
 File getLogfile(String name)
           
 File getLogfile(String name, boolean create)
           
 void setSurveyName(String surveyName)
           
 String xmlEscape(String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
Constructor Detail

SurveyManager

public SurveyManager()
Method Detail

setSurveyName

public void setSurveyName(String surveyName)

xmlEscape

public String xmlEscape(String input)

generateDOM

public org.jdom.Document generateDOM(File fileToAppend)
                              throws Exception
Throws:
Exception

getLogfile

public File getLogfile(String name,
                       boolean create)
                throws IOException
Parameters:
name - - name of survey
create - - create file if it doesn't exist?
Returns:
Throws:
IOException - - if (!create) and file doesn't exist

getLogfile

public File getLogfile(String name)
                throws IOException
Throws:
IOException

generateNames

public Set<String> generateNames(org.jdom.Document doc)

getAvailableSurveys

public static List<String> getAvailableSurveys()
Returns:
An unordered list of strings representing names of available surveys

generateSurveyData

public List<SurveyData> generateSurveyData(org.jdom.Document doc,
                                           Set<String> names)
                                    throws Exception
Throws:
Exception