Code example for ModelAndView

Methods: addAllObjectsaddObjectsetViewsetViewName

0
            uploadDirectory = new File(musicFolders.get(0).getPath(), "Incoming").getPath(); 
        } 
 
        Player player = playerService.getPlayer(request, response); 
        ModelAndView result = super.handleRequestInternal(request, response); 
        result.addObject("model", map); 
        map.put("user", securityService.getCurrentUser(request)); 
        map.put("uploadDirectory", uploadDirectory); 
        map.put("genres", mediaFileService.getGenres()); 
        map.put("currentYear", Calendar.getInstance().get(Calendar.YEAR)); 
        map.put("musicFolders", settingsService.getAllMusicFolders()); 
        map.put("clientSidePlaylist", player.isExternalWithPlaylist() || player.isWeb()); 
        map.put("brand", settingsService.getBrand()); 
        return result; 
    } 
 
    public void setSettingsService(SettingsService settingsService) { 
        this.settingsService = settingsService; 
    } 
 
    public void setSecurityService(SecurityService securityService) { 
        this.securityService = securityService; 
    } 
 
    public void setPlayerService(PlayerService playerService) { 
        this.playerService = playerService; 
    } 
 
    public void setMediaFileService(MediaFileService mediaFileService) { 
        this.mediaFileService = mediaFileService; 
    } 
}