Exemplo n.º 1
0
 @RequestMapping(value = "/{storyId}", method = RequestMethod.DELETE)
 @Interceptors({ProjectMemberRequired.class})
 @ResponseStatus(HttpStatus.OK)
 @Caching(
     evict = {
       @CacheEvict(value = GET_STORIES_CACHE, key = "#projectId + '*'"),
       @CacheEvict(value = IterationApiController.ITERATION_CACHE_NAME, key = "#projectId + '*'"),
       @CacheEvict(value = IterationApiController.ITERATIONS_CACHE_NAME, key = "#projectId + '*'")
     })
 public void deleteStory(
     @PathVariable("storyId") int storyId, @PathVariable("projectId") int projectId) {
   if (storyService.getChildCountByParentId(storyId) != 0) {
     throw new BadRequestException();
   }
   storyService.delete(storyId);
 }