Пример #1
0
 @RequestMapping(
     value = "/ideastatus/upvote",
     method = RequestMethod.POST,
     produces = {"application/json"})
 public @ResponseBody Status upVote(@RequestBody Idea idea) {
   return ideaService.upVote(idea);
 }
Пример #2
0
 @RequestMapping(
     value = "/update",
     method = RequestMethod.POST,
     produces = {"application/json"},
     consumes = {"text/xml", "application/json"})
 public boolean updateIdea(@RequestBody Idea idea) {
   boolean updateStatus = ideaService.updateIdea(idea);
   return updateStatus;
 }
Пример #3
0
 @RequestMapping(
     value = "/idea",
     method = RequestMethod.POST,
     headers = "content-type=application/x-www-form-urlencoded;charset=UTF-8",
     produces = {"application/json"},
     consumes = {"text/xml", "application/json"})
 public ModelAndView submitIdea(@ModelAttribute Idea idea, HttpServletRequest request) {
   String hostName = request.getHeader("Host");
   String ideaNumber = ideaService.doSubmit(idea, hostName);
   return new ModelAndView("redirect:/ideaDetail?idea=" + ideaNumber);
 }
Пример #4
0
 @RequestMapping(value = "/idea/{ideaNumber}/comment", method = RequestMethod.POST)
 public @ResponseBody boolean ideaComment(
     @PathVariable("ideaNumber") String ideaNumber, @RequestBody Comment comment) {
   return ideaService.comment(ideaNumber, comment);
 }
Пример #5
0
 @RequestMapping(value = "/insightcount", method = RequestMethod.GET)
 public @ResponseBody CountInsight getCount() {
   return ideaService.getCount();
 }
Пример #6
0
 @RequestMapping(value = "idea/{ideaNumber}/email/{emailId}", method = RequestMethod.GET)
 public @ResponseBody int collabarateIdea(
     @PathVariable("emailId") String email, @PathVariable("ideaNumber") String ideaNumber) {
   return ideaService.collabarateIdea(email, ideaNumber);
 }
Пример #7
0
 @RequestMapping(value = "/ideastatus/downvote", method = RequestMethod.POST)
 public @ResponseBody Status downVote(@RequestBody Idea idea) {
   return ideaService.downVote(idea);
 }
Пример #8
0
 @RequestMapping(value = "/idea/{ideaNumber}", method = RequestMethod.GET)
 public @ResponseBody Idea getIdeaDetail(@PathVariable("ideaNumber") String ideaNumber) {
   return ideaService.getIdeaDetail(ideaNumber);
 }
Пример #9
0
 @RequestMapping(value = "/ideas/exportExcel", method = RequestMethod.GET)
 public @ResponseBody List<Idea> exportToExcel() {
   return ideaService.exportExcel();
 }
Пример #10
0
 @RequestMapping(value = "/ideas/trend", method = RequestMethod.GET)
 public @ResponseBody List<Idea> getListofTrendingIdeas() {
   return ideaService.getListOfTrendingIdeas();
 }
Пример #11
0
 @RequestMapping(value = "/ideas", method = RequestMethod.GET)
 public @ResponseBody List<Idea> getListofIdeasOrFeatures(
     @RequestParam(value = "iof", required = false) String ideaOrFeature) {
   return ideaService.getListOfIdeas(ideaOrFeature);
 }