@RequestMapping(value = "/student", method = RequestMethod.POST)
 @Timed
 @StudentRoleRequired
 public ResponseEntity<PortfolioDto> insertStudentPortfolio(
     @UserId Long userId, @AuthenticationPrincipal AppUser appUser) {
   return response(
       portfolioService.insert(userId, appUser.getCommonName(), PortfolioRole.STUDENT));
 }
 @RequestMapping(value = "/teacher", method = RequestMethod.POST)
 @Timed
 @TeacherRoleRequired
 public ResponseEntity<PortfolioDto> insertTeacherPortfolio(
     @UserId Long userId, @AuthenticationPrincipal AppUser appUser) {
   return response(
       portfolioService.insert(userId, appUser.getCommonName(), PortfolioRole.TEACHER));
 }
 @RequestMapping(value = "/{portfolioRole}/{path:.*}", method = RequestMethod.GET)
 public ResponseEntity<PortfolioDto> findByPath(
     @PathVariable("portfolioRole") String portfolioRole, @PathVariable("path") String path) {
   PortfolioDto portfolioDto =
       portfolioService.findByPath(
           path,
           PortfolioRole.fromValue(portfolioRole),
           PortfolioConverter.ComponentFetchStrategy.ALL);
   return response(portfolioDto);
 }
 @RequestMapping(value = "/{portfolioId}", method = RequestMethod.PUT)
 public ResponseEntity<PortfolioDto> update(
     @PathVariable("portfolioId") Long portfolioId,
     @Valid @RequestBody PortfolioDto portfolioDto) {
   return response(portfolioService.update(portfolioId, portfolioDto));
 }
 @RequestMapping(value = "/{portfolioRole}", method = RequestMethod.GET)
 @Timed
 public ResponseEntity<PortfolioDto> get(
     @PathVariable("portfolioRole") String portfolioRole, @UserId Long userId) {
   return response(portfolioService.get(userId, PortfolioRole.fromValue(portfolioRole)));
 }