Controllers migration.

master
Rémi Cocula 8 years ago
parent adfde5dae0
commit 5b8e2b94c1
  1. 117
      libresonic-main/src/main/java/org/libresonic/player/controller/CoverArtController.java
  2. 98
      libresonic-main/src/main/java/org/libresonic/player/controller/MainController.java
  3. 7
      libresonic-main/src/main/java/org/libresonic/player/controller/MusicFolderSettingsController.java
  4. 34
      libresonic-main/src/main/java/org/libresonic/player/controller/SettingsController.java
  5. 52
      libresonic-main/src/main/resources/applicationContext-security.xml
  6. 23
      libresonic-main/src/main/resources/libresonic-servlet.xml

@ -19,62 +19,45 @@
*/ */
package org.libresonic.player.controller; package org.libresonic.player.controller;
import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Semaphore;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.mvc.LastModified;
import org.libresonic.player.Logger; import org.libresonic.player.Logger;
import org.libresonic.player.dao.AlbumDao; import org.libresonic.player.dao.AlbumDao;
import org.libresonic.player.dao.ArtistDao; import org.libresonic.player.dao.ArtistDao;
import org.libresonic.player.domain.Album; import org.libresonic.player.domain.*;
import org.libresonic.player.domain.Artist; import org.libresonic.player.service.*;
import org.libresonic.player.domain.CoverArtScheme;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.domain.PodcastChannel;
import org.libresonic.player.domain.Transcoding;
import org.libresonic.player.domain.VideoTranscodingSettings;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.PodcastService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.TranscodingService;
import org.libresonic.player.service.metadata.JaudiotaggerParser; import org.libresonic.player.service.metadata.JaudiotaggerParser;
import org.libresonic.player.util.StringUtil; import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.LastModified;
import javax.annotation.PostConstruct;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Semaphore;
/** /**
* Controller which produces cover art images. * Controller which produces cover art images.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class CoverArtController implements Controller, LastModified { @Controller
@RequestMapping("/coverArt")
public class CoverArtController implements LastModified {
public static final String ALBUM_COVERART_PREFIX = "al-"; public static final String ALBUM_COVERART_PREFIX = "al-";
public static final String ARTIST_COVERART_PREFIX = "ar-"; public static final String ARTIST_COVERART_PREFIX = "ar-";
@ -83,26 +66,34 @@ public class CoverArtController implements Controller, LastModified {
private static final Logger LOG = Logger.getLogger(CoverArtController.class); private static final Logger LOG = Logger.getLogger(CoverArtController.class);
@Autowired
private MediaFileService mediaFileService; private MediaFileService mediaFileService;
@Autowired
private TranscodingService transcodingService; private TranscodingService transcodingService;
@Autowired
private SettingsService settingsService; private SettingsService settingsService;
@Autowired
private PlaylistService playlistService; private PlaylistService playlistService;
@Autowired
private PodcastService podcastService; private PodcastService podcastService;
@Autowired
private ArtistDao artistDao; private ArtistDao artistDao;
@Autowired
private AlbumDao albumDao; private AlbumDao albumDao;
private Semaphore semaphore; private Semaphore semaphore;
@PostConstruct
public void init() { public void init() {
semaphore = new Semaphore(settingsService.getCoverArtConcurrency()); semaphore = new Semaphore(settingsService.getCoverArtConcurrency());
} }
public long getLastModified(HttpServletRequest request) { public long getLastModified(HttpServletRequest request) {
CoverArtRequest coverArtRequest = createCoverArtRequest(request); CoverArtRequest coverArtRequest = createCoverArtRequest(request);
long result = coverArtRequest.lastModified(); // LOG.info("getLastModified - " + coverArtRequest + ": " + new Date(result));
// LOG.info("getLastModified - " + coverArtRequest + ": " + new Date(result)); return coverArtRequest.lastModified();
return result;
} }
@RequestMapping(method = RequestMethod.GET)
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
CoverArtRequest coverArtRequest = createCoverArtRequest(request); CoverArtRequest coverArtRequest = createCoverArtRequest(request);
@ -341,33 +332,6 @@ public class CoverArtController implements Controller, LastModified {
return thumb; return thumb;
} }
public void setMediaFileService(MediaFileService mediaFileService) {
this.mediaFileService = mediaFileService;
}
public void setArtistDao(ArtistDao artistDao) {
this.artistDao = artistDao;
}
public void setAlbumDao(AlbumDao albumDao) {
this.albumDao = albumDao;
}
public void setTranscodingService(TranscodingService transcodingService) {
this.transcodingService = transcodingService;
}
public void setSettingsService(SettingsService settingsService) {
this.settingsService = settingsService;
}
public void setPlaylistService(PlaylistService playlistService) {
this.playlistService = playlistService;
}
public void setPodcastService(PodcastService podcastService) {
this.podcastService = podcastService;
}
private abstract class CoverArtRequest { private abstract class CoverArtRequest {
@ -551,7 +515,7 @@ public class CoverArtController implements Controller, LastModified {
albums.add(album); albums.add(album);
} }
} }
return new ArrayList<MediaFile>(albums); return new ArrayList<>(albums);
} }
} }
@ -559,7 +523,7 @@ public class CoverArtController implements Controller, LastModified {
private final PodcastChannel channel; private final PodcastChannel channel;
public PodcastCoverArtRequest(PodcastChannel channel) { PodcastCoverArtRequest(PodcastChannel channel) {
this.channel = channel; this.channel = channel;
} }
@ -633,7 +597,8 @@ public class CoverArtController implements Controller, LastModified {
@Override @Override
public BufferedImage createImage(int size) { public BufferedImage createImage(int size) {
int height = size; int height;
height = size;
int width = height * 16 / 9; int width = height * 16 / 9;
InputStream in = null; InputStream in = null;
try { try {
@ -687,7 +652,7 @@ public class CoverArtController implements Controller, LastModified {
private final int height; private final int height;
private final Color color; private final Color color;
public AutoCover(Graphics2D graphics, String key, String artist, String album, int width, int height) { AutoCover(Graphics2D graphics, String key, String artist, String album, int width, int height) {
this.graphics = graphics; this.graphics = graphics;
this.artist = artist; this.artist = artist;
this.album = album; this.album = album;

@ -19,54 +19,47 @@
*/ */
package org.libresonic.player.controller; package org.libresonic.player.controller;
import java.io.IOException; import org.libresonic.player.domain.*;
import java.util.ArrayList; import org.libresonic.player.service.*;
import java.util.Date; import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap; import org.springframework.stereotype.Controller;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.ServletRequestUtils; import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;
import org.springframework.web.servlet.view.RedirectView; import org.springframework.web.servlet.view.RedirectView;
import org.libresonic.player.domain.CoverArtScheme; import javax.servlet.http.HttpServletRequest;
import org.libresonic.player.domain.MediaFile; import javax.servlet.http.HttpServletResponse;
import org.libresonic.player.domain.MediaFileComparator; import java.io.IOException;
import org.libresonic.player.domain.MusicFolder; import java.util.*;
import org.libresonic.player.domain.Player; import java.util.stream.Collectors;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.AdService;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.RatingService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
/** /**
* Controller for the main page. * Controller for the main page.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class MainController extends AbstractController { @Controller
@RequestMapping("/main")
public class MainController {
@Autowired
private SecurityService securityService; private SecurityService securityService;
@Autowired
private PlayerService playerService; private PlayerService playerService;
@Autowired
private SettingsService settingsService; private SettingsService settingsService;
@Autowired
private RatingService ratingService; private RatingService ratingService;
@Autowired
private MediaFileService mediaFileService; private MediaFileService mediaFileService;
@Autowired
private AdService adService; private AdService adService;
@Override @RequestMapping(method = RequestMethod.GET)
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<>();
Player player = playerService.getPlayer(request, response); Player player = playerService.getPlayer(request, response);
List<MediaFile> mediaFiles = getMediaFiles(request); List<MediaFile> mediaFiles = getMediaFiles(request);
@ -91,8 +84,8 @@ public class MainController extends AbstractController {
} }
List<MediaFile> children = mediaFiles.size() == 1 ? mediaFileService.getChildrenOf(dir, true, true, true) : getMultiFolderChildren(mediaFiles); List<MediaFile> children = mediaFiles.size() == 1 ? mediaFileService.getChildrenOf(dir, true, true, true) : getMultiFolderChildren(mediaFiles);
List<MediaFile> files = new ArrayList<MediaFile>(); List<MediaFile> files = new ArrayList<>();
List<MediaFile> subDirs = new ArrayList<MediaFile>(); List<MediaFile> subDirs = new ArrayList<>();
for (MediaFile child : children) { for (MediaFile child : children) {
if (child.isFile()) { if (child.isFile()) {
files.add(child); files.add(child);
@ -159,9 +152,7 @@ public class MainController extends AbstractController {
view = "artistMain"; view = "artistMain";
} }
ModelAndView result = new ModelAndView(view); return new ModelAndView(view,"model",map);
result.addObject("model", map);
return result;
} }
private boolean isViewAsList(HttpServletRequest request, UserSettings userSettings) { private boolean isViewAsList(HttpServletRequest request, UserSettings userSettings) {
@ -188,7 +179,7 @@ public class MainController extends AbstractController {
} }
private List<MediaFile> getMediaFiles(HttpServletRequest request) { private List<MediaFile> getMediaFiles(HttpServletRequest request) {
List<MediaFile> mediaFiles = new ArrayList<MediaFile>(); List<MediaFile> mediaFiles = new ArrayList<>();
for (String path : ServletRequestUtils.getStringParameters(request, "path")) { for (String path : ServletRequestUtils.getStringParameters(request, "path")) {
MediaFile mediaFile = mediaFileService.getMediaFile(path); MediaFile mediaFile = mediaFileService.getMediaFile(path);
if (mediaFile != null) { if (mediaFile != null) {
@ -223,18 +214,18 @@ public class MainController extends AbstractController {
} }
private List<MediaFile> getMultiFolderChildren(List<MediaFile> mediaFiles) throws IOException { private List<MediaFile> getMultiFolderChildren(List<MediaFile> mediaFiles) throws IOException {
SortedSet<MediaFile> result = new TreeSet<MediaFile>(new MediaFileComparator(settingsService.isSortAlbumsByYear())); SortedSet<MediaFile> result = new TreeSet<>(new MediaFileComparator(settingsService.isSortAlbumsByYear()));
for (MediaFile mediaFile : mediaFiles) { for (MediaFile mediaFile : mediaFiles) {
if (mediaFile.isFile()) { if (mediaFile.isFile()) {
mediaFile = mediaFileService.getParentOf(mediaFile); mediaFile = mediaFileService.getParentOf(mediaFile);
} }
result.addAll(mediaFileService.getChildrenOf(mediaFile, true, true, true)); result.addAll(mediaFileService.getChildrenOf(mediaFile, true, true, true));
} }
return new ArrayList<MediaFile>(result); return new ArrayList<>(result);
} }
private List<MediaFile> getAncestors(MediaFile dir) throws IOException { private List<MediaFile> getAncestors(MediaFile dir) throws IOException {
LinkedList<MediaFile> result = new LinkedList<MediaFile>(); LinkedList<MediaFile> result = new LinkedList<>();
try { try {
MediaFile parent = mediaFileService.getParentOf(dir); MediaFile parent = mediaFileService.getParentOf(dir);
@ -249,41 +240,14 @@ public class MainController extends AbstractController {
} }
private List<MediaFile> getSieblingAlbums(MediaFile dir) { private List<MediaFile> getSieblingAlbums(MediaFile dir) {
List<MediaFile> result = new ArrayList<MediaFile>(); List<MediaFile> result = new ArrayList<>();
MediaFile parent = mediaFileService.getParentOf(dir); MediaFile parent = mediaFileService.getParentOf(dir);
if (!mediaFileService.isRoot(parent)) { if (!mediaFileService.isRoot(parent)) {
List<MediaFile> sieblings = mediaFileService.getChildrenOf(parent, false, true, true); List<MediaFile> sieblings = mediaFileService.getChildrenOf(parent, false, true, true);
for (MediaFile siebling : sieblings) { result.addAll(sieblings.stream().filter(siebling -> siebling.isAlbum() && !siebling.equals(dir)).collect(Collectors.toList()));
if (siebling.isAlbum() && !siebling.equals(dir)) {
result.add(siebling);
}
}
} }
return result; return result;
} }
public void setSecurityService(SecurityService securityService) {
this.securityService = securityService;
}
public void setPlayerService(PlayerService playerService) {
this.playerService = playerService;
}
public void setSettingsService(SettingsService settingsService) {
this.settingsService = settingsService;
}
public void setRatingService(RatingService ratingService) {
this.ratingService = ratingService;
}
public void setAdService(AdService adService) {
this.adService = adService;
}
public void setMediaFileService(MediaFileService mediaFileService) {
this.mediaFileService = mediaFileService;
}
} }

@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* Controller for the page used to administrate the set of music folders. * Controller for the page used to administrate the set of music folders.
@ -97,11 +98,7 @@ public class MusicFolderSettingsController {
} }
private List<MusicFolderSettingsCommand.MusicFolderInfo> wrap(List<MusicFolder> musicFolders) { private List<MusicFolderSettingsCommand.MusicFolderInfo> wrap(List<MusicFolder> musicFolders) {
ArrayList<MusicFolderSettingsCommand.MusicFolderInfo> result = new ArrayList<MusicFolderSettingsCommand.MusicFolderInfo>(); return musicFolders.stream().map(MusicFolderSettingsCommand.MusicFolderInfo::new).collect(Collectors.toCollection(ArrayList::new));
for (MusicFolder musicFolder : musicFolders) {
result.add(new MusicFolderSettingsCommand.MusicFolderInfo(musicFolder));
}
return result;
} }
@RequestMapping(method = RequestMethod.POST) @RequestMapping(method = RequestMethod.POST)

@ -19,35 +19,41 @@
*/ */
package org.libresonic.player.controller; package org.libresonic.player.controller;
import org.libresonic.player.domain.*; import org.libresonic.player.domain.User;
import org.libresonic.player.service.*; import org.libresonic.player.service.SecurityService;
import org.springframework.web.servlet.*; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.view.*; import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.mvc.*; import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.*; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;
import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
* Controller for the main settings page. * Controller for the main settings page.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SettingsController extends AbstractController { @Controller
@RequestMapping("/settings")
public class SettingsController {
@Autowired
private SecurityService securityService; private SecurityService securityService;
@RequestMapping(method = RequestMethod.GET)
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { protected ModelAndView handleRequestInternal(HttpServletRequest request) throws Exception {
User user = securityService.getCurrentUser(request); User user = securityService.getCurrentUser(request);
// Redirect to music folder settings if admin. // Redirect to music folder settings if admin.
String view = user.isAdminRole() ? "musicFolderSettings.view" : "personalSettings.view"; String view = user.isAdminRole() ? "musicFolderSettings" : "personalSettings";
return new ModelAndView(new RedirectView(view)); return new ModelAndView(new RedirectView(view));
} }
public void setSecurityService(SecurityService securityService) {
this.securityService = securityService;
}
} }

@ -29,35 +29,35 @@
<security:intercept-url pattern="/sonos/**" access="permitAll" /> <security:intercept-url pattern="/sonos/**" access="permitAll" />
<security:intercept-url pattern="/crossdomain.xml" access="permitAll" /> <security:intercept-url pattern="/crossdomain.xml" access="permitAll" />
<!-- ROLE_SETTINGS --> <!-- hasRole('ROLE_SETTINGS') -->
<security:intercept-url pattern="/personalSettings.view" access="ROLE_SETTINGS" /> <security:intercept-url pattern="/personalSettings.view" access="hasRole('ROLE_SETTINGS')" />
<security:intercept-url pattern="/passwordSettings.view" access="ROLE_SETTINGS" /> <security:intercept-url pattern="/passwordSettings.view" access="hasRole('ROLE_SETTINGS')" />
<security:intercept-url pattern="/playerSettings.view" access="ROLE_SETTINGS" /> <security:intercept-url pattern="/playerSettings.view" access="hasRole('ROLE_SETTINGS')" />
<security:intercept-url pattern="/shareSettings.view" access="ROLE_SETTINGS" /> <security:intercept-url pattern="/shareSettings.view" access="hasRole('ROLE_SETTINGS')" />
<!-- ROLE_ADMIN --> <!-- hasRole('ROLE_ADMIN') -->
<security:intercept-url pattern="/generalSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/generalSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/advancedSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/advancedSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/userSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/userSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/musicFolderSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/musicFolderSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/networkSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/networkSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/dlnaSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/dlnaSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/sonosSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/sonosSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/transcodingSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/transcodingSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/internetRadioSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/internetRadioSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/podcastSettings.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/podcastSettings.view" access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/db.view" access="ROLE_ADMIN" /> <security:intercept-url pattern="/db.view" access="hasRole('ROLE_ADMIN')" />
<!-- MISC --> <!-- MISC -->
<security:intercept-url pattern="/deletePlaylist.view" access="ROLE_PLAYLIST" /> <security:intercept-url pattern="/deletePlaylist.view" access="hasRole('ROLE_PLAYLIST')" />
<security:intercept-url pattern="/savePlaylist.view" access="ROLE_PLAYLIST" /> <security:intercept-url pattern="/savePlaylist.view" access="hasRole('ROLE_PLAYLIST')" />
<security:intercept-url pattern="/download.view" access="ROLE_DOWNLOAD" /> <security:intercept-url pattern="/download.view" access="hasRole('ROLE_DOWNLOAD')" />
<security:intercept-url pattern="/upload.view" access="ROLE_UPLOAD" /> <security:intercept-url pattern="/upload.view" access="hasRole('ROLE_UPLOAD')" />
<security:intercept-url pattern="/createShare.view" access="ROLE_SHARE" /> <security:intercept-url pattern="/createShare.view" access="hasRole('ROLE_SHARE')" />
<security:intercept-url pattern="/changeCoverArt.view" access="ROLE_COVERART" /> <security:intercept-url pattern="/changeCoverArt.view" access="hasRole('ROLE_COVERART')" />
<security:intercept-url pattern="/editTags.view" access="ROLE_COVERART" /> <security:intercept-url pattern="/editTags.view" access="hasRole('ROLE_COVERART')" />
<security:intercept-url pattern="/setMusicFileInfo.view" access="ROLE_COMMENT" /> <security:intercept-url pattern="/setMusicFileInfo.view" access="hasRole('ROLE_COMMENT')" />
<security:intercept-url pattern="/podcastReceiverAdmin.view" access="ROLE_PODCAST" /> <security:intercept-url pattern="/podcastReceiverAdmin.view" access="hasRole('ROLE_PODCAST')" />
<!-- ROLE_USER --> <!-- ROLE_USER -->
<security:intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> <security:intercept-url pattern="/**" access="hasRole('ROLE_USER')" />

@ -19,14 +19,6 @@
<property name="viewName" value="status"/> <property name="viewName" value="status"/>
<property name="statusService" ref="statusService"/> <property name="statusService" ref="statusService"/>
</bean> </bean>
<bean id="mainController" class="org.libresonic.player.controller.MainController">
<property name="securityService" ref="securityService"/>
<property name="playerService" ref="playerService"/>
<property name="settingsService" ref="settingsService"/>
<property name="ratingService" ref="ratingService"/>
<property name="mediaFileService" ref="mediaFileService"/>
<property name="adService" ref="adService"/>
</bean>
<bean id="playlistController" class="org.libresonic.player.controller.PlaylistController"> <bean id="playlistController" class="org.libresonic.player.controller.PlaylistController">
<property name="viewName" value="playlist"/> <property name="viewName" value="playlist"/>
<property name="securityService" ref="securityService"/> <property name="securityService" ref="securityService"/>
@ -137,9 +129,6 @@
<property name="mediaFileDao" ref="mediaFileDao"/> <property name="mediaFileDao" ref="mediaFileDao"/>
<property name="mediaFileService" ref="mediaFileService"/> <property name="mediaFileService" ref="mediaFileService"/>
</bean> </bean>
<bean id="settingsController" class="org.libresonic.player.controller.SettingsController">
<property name="securityService" ref="securityService"/>
</bean>
<bean id="dlnaSettingsController" class="org.libresonic.player.controller.DLNASettingsController"> <bean id="dlnaSettingsController" class="org.libresonic.player.controller.DLNASettingsController">
<property name="viewName" value="dlnaSettings"/> <property name="viewName" value="dlnaSettings"/>
<property name="upnpService" ref="upnpService"/> <property name="upnpService" ref="upnpService"/>
@ -177,15 +166,6 @@
<property name="mediaFileService" ref="mediaFileService"/> <property name="mediaFileService" ref="mediaFileService"/>
<property name="metaDataParserFactory" ref="metaDataParserFactory"/> <property name="metaDataParserFactory" ref="metaDataParserFactory"/>
</bean> </bean>
<bean id="coverArtController" class="org.libresonic.player.controller.CoverArtController" init-method="init">
<property name="mediaFileService" ref="mediaFileService"/>
<property name="transcodingService" ref="transcodingService"/>
<property name="settingsService" ref="settingsService"/>
<property name="playlistService" ref="playlistService"/>
<property name="podcastService" ref="podcastService"/>
<property name="artistDao" ref="artistDao"/>
<property name="albumDao" ref="albumDao"/>
</bean>
<bean id="avatarController" class="org.libresonic.player.controller.AvatarController"> <bean id="avatarController" class="org.libresonic.player.controller.AvatarController">
<property name="settingsService" ref="settingsService"/> <property name="settingsService" ref="settingsService"/>
</bean> </bean>
@ -294,7 +274,6 @@
<property name="alwaysUseFullPath" value="true"/> <property name="alwaysUseFullPath" value="true"/>
<property name="mappings"> <property name="mappings">
<props> <props>
<prop key="/main.view">mainController</prop>
<prop key="/playlist.view">playlistController</prop> <prop key="/playlist.view">playlistController</prop>
<prop key="/playlists.view">playlistsController</prop> <prop key="/playlists.view">playlistsController</prop>
<prop key="/help.view">helpController</prop> <prop key="/help.view">helpController</prop>
@ -315,7 +294,6 @@
<prop key="/index.view">multiController</prop> <prop key="/index.view">multiController</prop>
<prop key="/videoPlayer.view">videoPlayerController</prop> <prop key="/videoPlayer.view">videoPlayerController</prop>
<prop key="/starred.view">starredController</prop> <prop key="/starred.view">starredController</prop>
<prop key="/settings.view">settingsController</prop>
<prop key="/dlnaSettings.view">dlnaSettingsController</prop> <prop key="/dlnaSettings.view">dlnaSettingsController</prop>
<prop key="/sonosSettings.view">sonosSettingsController</prop> <prop key="/sonosSettings.view">sonosSettingsController</prop>
<prop key="/shareSettings.view">shareSettingsController</prop> <prop key="/shareSettings.view">shareSettingsController</prop>
@ -324,7 +302,6 @@
<prop key="/avatarUpload.view">avatarUploadController</prop> <prop key="/avatarUpload.view">avatarUploadController</prop>
<prop key="/allmusic.view">allmusicController</prop> <prop key="/allmusic.view">allmusicController</prop>
<prop key="/editTags.view">editTagsController</prop> <prop key="/editTags.view">editTagsController</prop>
<prop key="/coverArt.view">coverArtController</prop>
<prop key="/avatar.view">avatarController</prop> <prop key="/avatar.view">avatarController</prop>
<prop key="/proxy.view">proxyController</prop> <prop key="/proxy.view">proxyController</prop>
<prop key="/statusChart.view">statusChartController</prop> <prop key="/statusChart.view">statusChartController</prop>

Loading…
Cancel
Save