Beispiel #1
0
 @RequestMapping(
     value = {"/", "/dashboard", "/application", "/feedback"},
     method = RequestMethod.GET)
 public String indexHtml() {
   logger.debug("session = {}", session.getCurrentUser().getName());
   return "Index";
 }
Beispiel #2
0
  @RequestMapping(value = "", method = RequestMethod.POST)
  @Interceptors({ProjectMemberRequired.class})
  @ResponseBody
  @Caching(evict = {@CacheEvict(value = GET_STORIES_CACHE, key = "#projectId + '*'")})
  public StoryDTO newStory(
      @PathVariable("companyId") int companyId,
      @PathVariable("projectId") int projectId,
      @Valid @RequestBody StoryForm storyForm) {
    storyForm.setProjectId(projectId);
    storyForm.setCompanyId(companyId);
    storyForm.setCreatorId(sessionService.getCurrentUser().getId());
    storyForm.setCreatorName(sessionService.getCurrentUser().getName());
    Story story = storyService.create(storyForm);

    StoryDTO storyDTO = StoryTransform.storyToStoryDTO(story);
    fillStoryDTO(storyDTO);
    return storyDTO;
  }