| Line 20... |
Line 20... |
| 20 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
20 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 21 |
import com.spice.profitmandi.dao.entity.dtr.Document;
|
21 |
import com.spice.profitmandi.dao.entity.dtr.Document;
|
| 22 |
import com.spice.profitmandi.dao.model.FofoForm;
|
22 |
import com.spice.profitmandi.dao.model.FofoForm;
|
| 23 |
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
|
23 |
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
|
| 24 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
24 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| - |
|
25 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| - |
|
26 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
| 25 |
|
27 |
|
| 26 |
@Controller
|
28 |
@Controller
|
| 27 |
public class RegisterController {
|
29 |
public class RegisterController {
|
| 28 |
|
30 |
|
| 29 |
private static final Logger LOGGER = LoggerFactory.getLogger(RegisterController.class);
|
31 |
private static final Logger LOGGER = LoggerFactory.getLogger(RegisterController.class);
|
| 30 |
private static final String DOCUMENT_STORE = "/hsps-docs/";
|
32 |
private static final String DOCUMENT_STORE = "/hsps-docs/";
|
| 31 |
|
33 |
|
| 32 |
@Autowired
|
34 |
@Autowired
|
| 33 |
DocumentRepository documentRepository;
|
35 |
DocumentRepository documentRepository;
|
| - |
|
36 |
|
| - |
|
37 |
@Autowired
|
| - |
|
38 |
CookiesProcessor cookiesProcessor;
|
| 34 |
|
39 |
|
| 35 |
@RequestMapping(value = "/register", method = RequestMethod.GET)
|
40 |
@RequestMapping(value = "/register", method = RequestMethod.GET)
|
| 36 |
public String registerIndex(HttpServletRequest request, @ModelAttribute("model") ModelMap model) throws Exception{
|
41 |
public String registerIndex(HttpServletRequest request, @ModelAttribute("model") ModelMap model) throws Exception{
|
| 37 |
return "fofo-form";
|
42 |
return "fofo-form";
|
| 38 |
}
|
43 |
}
|
| 39 |
|
44 |
|
| 40 |
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
45 |
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
| 41 |
public String registerIndex(HttpServletRequest request, @RequestBody FofoForm fofoForm ,Model model) throws Exception{
|
46 |
public String registerIndex(HttpServletRequest request, @RequestBody FofoForm fofoForm ,Model model) throws Throwable{
|
| - |
|
47 |
LoginDetails details = cookiesProcessor.getCookiesObject(request);
|
| - |
|
48 |
model.addAttribute("email", details.getEmailId());
|
| 42 |
Mongo.persistFofoRegInfo(fofoForm);
|
49 |
Mongo.persistFofoRegInfo(fofoForm);
|
| 43 |
return "";
|
50 |
return "";
|
| 44 |
}
|
51 |
}
|
| 45 |
|
52 |
|
| 46 |
public Integer moveDocument(String documentId){
|
53 |
public Integer moveDocument(String documentId){
|