@@ -0,0 +1,1176 @@
+package org.openmhealth.dsu.controller;%0A%0A/**%0A * Created by changun on 12/17/14.%0A */%0A%0Aimport org.openmhealth.dsu.domain.DataPoint;%0Aimport org.openmhealth.dsu.domain.survey.Survey;%0Aimport org.openmhealth.dsu.repository.SurveyDefinitionRepository;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.ResponseBody;%0A%0Aimport javax.validation.Valid;%0Aimport java.util.List;%0A%0A/**%0A * A controller that manages user accounts.%0A *%0A * @author Emerson Farrugia%0A */%0A@Controller%0Apublic class SurveyController %7B%0A%0A    @Autowired%0A    SurveyDefinitionRepository repo;%0A%0A    @RequestMapping(value=%22/surveys%22, method= RequestMethod.POST)%0A    @ResponseBody%0A    public Survey post(@RequestBody @Valid Survey s) %7B%0A        return repo.save(s);%0A    %7D%0A%0A%0A    @RequestMapping(value=%22/surveys%22, method= RequestMethod.GET)%0A    @ResponseBody%0A    public Iterable%3CSurvey%3E get() %7B%0A        return repo.findAll();%0A    %7D%0A%7D%0A%0A

add SurveyController for posting and get all available survey