| Chunk |
|---|
| Conflicting content |
|---|
this.topicService = topicService;
}
<<<<<<< HEAD
@RequestMapping(method = RequestMethod.GET, value = "/branch/{branchId}/topic/{topicId}/deletePost")
public ModelAndView confirm(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId,
@PathVariable("branchId") long branchId){
=======
/**
* Redirect user to confirmation page.
* @param topicId - topic id, this in topic which contains post which shoulb be deleted
* @param postId - post id to delete
* @return - return ModelAndView with to parameter topicId and postId
*/
@RequestMapping(method = RequestMethod.GET, value = "/deletePost")
public ModelAndView confirm(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId){
>>>>>>> b84b7c4e5bd7601e05247584421e6f189f961374
ModelAndView mav = new ModelAndView("deletePost");
mav.addObject("topicId", topicId);
mav.addObject("postId", postId); |
| Solution content |
|---|
this.topicService = topicService;
}
/**
* Redirect user to confirmation page.
* @param topicId - topic id, this in topic which contains post which shoulb be deleted
* @param postId - post id to delete
* @return - return ModelAndView with to parameter topicId and postId
*/
@RequestMapping(method = RequestMethod.GET, value = "/branch/{branchId}/topic/{topicId}/deletePost")
public ModelAndView confirm(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId,
@PathVariable("branchId") long branchId){
ModelAndView mav = new ModelAndView("deletePost");
mav.addObject("topicId", topicId);
mav.addObject("postId", postId); |
| File |
|---|
| DeletePostController.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
return mav;
}
<<<<<<< HEAD
@RequestMapping(method = RequestMethod.DELETE, value = "/branch/{branchId}/topic/{topicId}/deletePost")
public ModelAndView delete(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId,
@PathVariable("branchId") long branchId){
=======
/**
* Handle delete action. User confirm post deletion.
* @param topicId - topic id, this in topic which contains post which shoulb be deleted
* also used for redirection back to topic.
* @param postId - post
* @return - redirect to /topics/topicId.
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/deletePost")
public ModelAndView delete(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId){
>>>>>>> b84b7c4e5bd7601e05247584421e6f189f961374
logger.debug("User confirm post removing postId = " + postId);
topicService.deletePost(topicId, postId);
return new ModelAndView("redirect:/branch/"+ branchId + "/topic/" + topicId + ".html"); |
| Solution content |
|---|
return mav;
}
/**
* Handle delete action. User confirm post deletion.
* @param topicId - topic id, this in topic which contains post which shoulb be deleted
* also used for redirection back to topic.
* @param postId - post
* @return - redirect to /topics/topicId.
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/branch/{branchId}/topic/{topicId}/deletePost")
public ModelAndView delete(@RequestParam("topicId") Long topicId, @RequestParam("postId") Long postId,
@PathVariable("branchId") long branchId){
logger.debug("User confirm post removing postId = " + postId);
topicService.deletePost(topicId, postId);
return new ModelAndView("redirect:/branch/"+ branchId + "/topic/" + topicId + ".html"); |
| File |
|---|
| DeletePostController.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
package org.jtalks.jcommune.web.controller; import org.jtalks.jcommune.model.entity.Topic; <<<<<<< HEAD import org.jtalks.jcommune.model.entity.TopicBranch; ======= >>>>>>> b84b7c4e5bd7601e05247584421e6f189f961374 import org.jtalks.jcommune.service.TopicService; import org.springframework.web.servlet.ModelAndView; import org.testng.annotations.BeforeMethod; |
| Solution content |
|---|
package org.jtalks.jcommune.web.controller; import org.jtalks.jcommune.model.entity.Topic; import org.jtalks.jcommune.model.entity.TopicBranch; import org.jtalks.jcommune.service.TopicService; import org.springframework.web.servlet.ModelAndView; import org.testng.annotations.BeforeMethod; |
| File |
|---|
| TopicRenderControllerTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |