Merge pull request #222 from muff1nman/standardize-import-order

Standardize import order and add maven plugin to check
master
Tom Powell 8 years ago committed by GitHub
commit aa8ab6e5fe
  1. 25
      checkstyle.xml
  2. 4
      libresonic-main/pom.xml
  3. 10
      libresonic-main/src/main/java/org/json/JSONObject.java
  4. 7
      libresonic-main/src/main/java/org/json/JSONTokener.java
  5. 22
      libresonic-main/src/main/java/org/libresonic/player/Logger.java
  6. 4
      libresonic-main/src/main/java/org/libresonic/player/ajax/ArtistInfo.java
  7. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/ChatService.java
  8. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/CoverArtService.java
  9. 9
      libresonic-main/src/main/java/org/libresonic/player/ajax/LyricsService.java
  10. 21
      libresonic-main/src/main/java/org/libresonic/player/ajax/MultiService.java
  11. 20
      libresonic-main/src/main/java/org/libresonic/player/ajax/NowPlayingService.java
  12. 4
      libresonic-main/src/main/java/org/libresonic/player/ajax/PlayQueueInfo.java
  13. 43
      libresonic-main/src/main/java/org/libresonic/player/ajax/PlayQueueService.java
  14. 5
      libresonic-main/src/main/java/org/libresonic/player/ajax/PlaylistInfo.java
  15. 10
      libresonic-main/src/main/java/org/libresonic/player/ajax/PlaylistService.java
  16. 4
      libresonic-main/src/main/java/org/libresonic/player/ajax/StarService.java
  17. 1
      libresonic-main/src/main/java/org/libresonic/player/ajax/TagService.java
  18. 8
      libresonic-main/src/main/java/org/libresonic/player/ajax/TransferService.java
  19. 9
      libresonic-main/src/main/java/org/libresonic/player/cache/CacheFactory.java
  20. 8
      libresonic-main/src/main/java/org/libresonic/player/command/MusicFolderSettingsCommand.java
  21. 2
      libresonic-main/src/main/java/org/libresonic/player/command/PasswordSettingsCommand.java
  22. 10
      libresonic-main/src/main/java/org/libresonic/player/command/PersonalSettingsCommand.java
  23. 6
      libresonic-main/src/main/java/org/libresonic/player/command/PlayerSettingsCommand.java
  24. 8
      libresonic-main/src/main/java/org/libresonic/player/command/SearchCommand.java
  25. 10
      libresonic-main/src/main/java/org/libresonic/player/controller/AbstractChartController.java
  26. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/AdvancedSettingsController.java
  27. 4
      libresonic-main/src/main/java/org/libresonic/player/controller/AllmusicController.java
  28. 13
      libresonic-main/src/main/java/org/libresonic/player/controller/AutoCoverDemo.java
  29. 13
      libresonic-main/src/main/java/org/libresonic/player/controller/AvatarController.java
  30. 12
      libresonic-main/src/main/java/org/libresonic/player/controller/AvatarUploadController.java
  31. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/ChangeCoverArtController.java
  32. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/CoverArtController.java
  33. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/DBController.java
  34. 15
      libresonic-main/src/main/java/org/libresonic/player/controller/DLNASettingsController.java
  35. 51
      libresonic-main/src/main/java/org/libresonic/player/controller/DownloadController.java
  36. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/EditTagsController.java
  37. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/ExternalPlayerController.java
  38. 6
      libresonic-main/src/main/java/org/libresonic/player/controller/GettingStartedController.java
  39. 33
      libresonic-main/src/main/java/org/libresonic/player/controller/HLSController.java
  40. 20
      libresonic-main/src/main/java/org/libresonic/player/controller/HelpController.java
  41. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/HomeController.java
  42. 20
      libresonic-main/src/main/java/org/libresonic/player/controller/ImportPlaylistController.java
  43. 6
      libresonic-main/src/main/java/org/libresonic/player/controller/IndexController.java
  44. 7
      libresonic-main/src/main/java/org/libresonic/player/controller/InternetRadioSettingsController.java
  45. 27
      libresonic-main/src/main/java/org/libresonic/player/controller/JAXBWriter.java
  46. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/LeftController.java
  47. 4
      libresonic-main/src/main/java/org/libresonic/player/controller/LoginController.java
  48. 4
      libresonic-main/src/main/java/org/libresonic/player/controller/LyricsController.java
  49. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/M3UController.java
  50. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/MainController.java
  51. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/MoreController.java
  52. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/NowPlayingController.java
  53. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/PersonalSettingsController.java
  54. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/PlayQueueController.java
  55. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/PlayerSettingsController.java
  56. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/PlaylistController.java
  57. 28
      libresonic-main/src/main/java/org/libresonic/player/controller/PlaylistsController.java
  58. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/PodcastChannelController.java
  59. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/PodcastChannelsController.java
  60. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/PodcastController.java
  61. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/ProxyController.java
  62. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/RESTController.java
  63. 15
      libresonic-main/src/main/java/org/libresonic/player/controller/RandomPlayQueueController.java
  64. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/RecoverController.java
  65. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/RightController.java
  66. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/SearchController.java
  67. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/SettingsController.java
  68. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/ShareManagementController.java
  69. 10
      libresonic-main/src/main/java/org/libresonic/player/controller/ShareSettingsController.java
  70. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java
  71. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/StarredController.java
  72. 26
      libresonic-main/src/main/java/org/libresonic/player/controller/StatusChartController.java
  73. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/StatusController.java
  74. 52
      libresonic-main/src/main/java/org/libresonic/player/controller/StreamController.java
  75. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/TopController.java
  76. 8
      libresonic-main/src/main/java/org/libresonic/player/controller/TranscodingSettingsController.java
  77. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/UploadController.java
  78. 17
      libresonic-main/src/main/java/org/libresonic/player/controller/UserChartController.java
  79. 7
      libresonic-main/src/main/java/org/libresonic/player/controller/UserSettingsController.java
  80. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/VideoPlayerController.java
  81. 18
      libresonic-main/src/main/java/org/libresonic/player/dao/AbstractDao.java
  82. 7
      libresonic-main/src/main/java/org/libresonic/player/dao/ArtistDao.java
  83. 3
      libresonic-main/src/main/java/org/libresonic/player/dao/DaoHelper.java
  84. 3
      libresonic-main/src/main/java/org/libresonic/player/dao/GenericDaoHelper.java
  85. 5
      libresonic-main/src/main/java/org/libresonic/player/dao/InternetRadioDao.java
  86. 5
      libresonic-main/src/main/java/org/libresonic/player/dao/MediaFileDao.java
  87. 6
      libresonic-main/src/main/java/org/libresonic/player/dao/PlaylistDao.java
  88. 10
      libresonic-main/src/main/java/org/libresonic/player/dao/RatingDao.java
  89. 12
      libresonic-main/src/main/java/org/libresonic/player/domain/MediaFile.java
  90. 8
      libresonic-main/src/main/java/org/libresonic/player/domain/MusicFolder.java
  91. 10
      libresonic-main/src/main/java/org/libresonic/player/domain/PlayQueue.java
  92. 2
      libresonic-main/src/main/java/org/libresonic/player/domain/PodcastEpisode.java
  93. 5
      libresonic-main/src/main/java/org/libresonic/player/domain/SearchResult.java
  94. 4
      libresonic-main/src/main/java/org/libresonic/player/domain/TransferStatus.java
  95. 8
      libresonic-main/src/main/java/org/libresonic/player/filter/BootstrapVerificationFilter.java
  96. 1
      libresonic-main/src/main/java/org/libresonic/player/filter/ParameterDecodingFilter.java
  97. 20
      libresonic-main/src/main/java/org/libresonic/player/filter/RESTFilter.java
  98. 5
      libresonic-main/src/main/java/org/libresonic/player/filter/RequestEncodingFilter.java
  99. 7
      libresonic-main/src/main/java/org/libresonic/player/filter/ResponseHeaderFilter.java
  100. 18
      libresonic-main/src/main/java/org/libresonic/player/i18n/LibresonicLocaleResolver.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name = "Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
<module name="TreeWalker">
<module name="CustomImportOrder">
<property name="customImportOrderRules"
value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###STATIC"/>
<property name="specialImportsRegExp" value="^javax\."/>
<property name="standardPackageRegExp" value="^java\."/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
</module>
<module name="UnusedImports"/>
<module name="RedundantImport"/>
</module>
</module>

@ -394,6 +394,10 @@
<build>
<finalName>libresonic</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

@ -27,15 +27,9 @@ SOFTWARE.
import java.io.IOException;
import java.io.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.lang.reflect.Modifier;
import java.util.*;
/**
* A JSONObject is an unordered collection of name/value pairs. Its

@ -1,11 +1,6 @@
package org.json;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java.io.*;
/*
Copyright (c) 2002 JSON.org

@ -19,14 +19,22 @@
*/
package org.libresonic.player;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.libresonic.player.domain.Version;
import org.libresonic.player.service.*;
import org.libresonic.player.util.*;
import org.apache.commons.lang.exception.*;
import java.io.*;
import java.text.*;
import java.util.*;
import org.libresonic.player.service.ServiceLocator;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.VersionService;
import org.libresonic.player.util.BoundedList;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
* Logger implementation which logs to LIBRESONIC_HOME/libresonic.log.

@ -19,10 +19,10 @@
package org.libresonic.player.ajax;
import java.util.List;
import org.libresonic.player.domain.ArtistBio;
import java.util.List;
/**
* @author Sindre Mehus
* @version $Id$

@ -19,20 +19,17 @@
*/
package org.libresonic.player.ajax;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.util.BoundedList;
import org.apache.commons.lang.StringUtils;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.util.BoundedList;
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

@ -19,19 +19,12 @@
*/
package org.libresonic.player.ajax;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.LastFmCoverArt;
import org.libresonic.player.domain.MediaFile;
@ -40,6 +33,12 @@ import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.util.StringUtil;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
/**
* Provides AJAX-enabled services for changing cover art images.
* <p/>

@ -19,10 +19,6 @@
*/
package org.libresonic.player.ajax;
import java.io.IOException;
import java.io.StringReader;
import java.net.SocketException;
import org.apache.commons.lang.StringUtils;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.config.RequestConfig;
@ -34,10 +30,13 @@ import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.libresonic.player.Logger;
import org.libresonic.player.util.StringUtil;
import java.io.IOException;
import java.io.StringReader;
import java.net.SocketException;
/**
* Provides AJAX-enabled services for retrieving song lyrics from chartlyrics.com.
* <p/>

@ -19,25 +19,20 @@
*/
package org.libresonic.player.ajax;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.ArtistBio;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.LastFmService;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.NetworkService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.*;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* Provides miscellaneous AJAX-enabled services.

@ -19,29 +19,23 @@
*/
package org.libresonic.player.ajax;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.AvatarScheme;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.PlayStatus;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.MediaScannerService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.StatusService;
import org.libresonic.player.util.StringUtil;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Provides AJAX-enabled services for retrieving the currently playing file and directory.
* This class is used by the DWR framework (http://getahead.ltd.uk/dwr/).

@ -19,10 +19,10 @@
*/
package org.libresonic.player.ajax;
import java.util.List;
import org.libresonic.player.util.StringUtil;
import java.util.List;
/**
* The playlist of a player.
*

@ -19,46 +19,21 @@
*/
package org.libresonic.player.ajax;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.directwebremoting.WebContextFactory;
import org.springframework.web.servlet.support.RequestContextUtils;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.dao.MediaFileDao;
import org.libresonic.player.dao.PlayQueueDao;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import org.libresonic.player.domain.PlayQueue;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.PodcastEpisode;
import org.libresonic.player.domain.PodcastStatus;
import org.libresonic.player.domain.SavedPlayQueue;
import org.libresonic.player.domain.UrlRedirectType;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.JukeboxService;
import org.libresonic.player.service.LastFmService;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.*;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.PodcastService;
import org.libresonic.player.service.RatingService;
import org.libresonic.player.service.SearchService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.TranscodingService;
import org.libresonic.player.util.StringUtil;
import org.springframework.web.servlet.support.RequestContextUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**
* Provides AJAX-enabled services for manipulating the play queue of a player.

@ -19,11 +19,10 @@
*/
package org.libresonic.player.ajax;
import java.util.List;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.Playlist;
import java.util.List;
/**
* The playlist of a player.
*

@ -19,6 +19,7 @@
*/
package org.libresonic.player.ajax;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.dao.MediaFileDao;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
@ -29,17 +30,12 @@ import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.directwebremoting.WebContextFactory;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.*;
/**
* Provides AJAX-enabled services for manipulating playlists.

@ -19,12 +19,12 @@
*/
package org.libresonic.player.ajax;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.dao.MediaFileDao;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.SecurityService;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
/**
* Provides AJAX-enabled services for starring.

@ -22,7 +22,6 @@ package org.libresonic.player.ajax;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.service.MediaFileService;

@ -19,11 +19,11 @@
*/
package org.libresonic.player.ajax;
import org.libresonic.player.domain.*;
import org.libresonic.player.controller.*;
import org.directwebremoting.*;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.controller.UploadController;
import org.libresonic.player.domain.TransferStatus;
import javax.servlet.http.*;
import javax.servlet.http.HttpSession;
/**
* Provides AJAX-enabled services for retrieving the status of ongoing transfers.

@ -19,18 +19,15 @@
*/
package org.libresonic.player.cache;
import java.io.File;
import org.springframework.beans.factory.InitializingBean;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.config.Configuration;
import net.sf.ehcache.config.ConfigurationFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.InitializingBean;
import java.io.File;
/**
* Initializes Ehcache and creates caches.

@ -19,14 +19,14 @@
*/
package org.libresonic.player.command;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.controller.MusicFolderSettingsController;
import org.libresonic.player.domain.MusicFolder;
import java.io.File;
import java.util.Date;
import java.util.List;
import org.libresonic.player.controller.MusicFolderSettingsController;
import org.libresonic.player.domain.MusicFolder;
import org.apache.commons.lang.StringUtils;
/**
* Command used in {@link MusicFolderSettingsController}.
*

@ -19,7 +19,7 @@
*/
package org.libresonic.player.command;
import org.libresonic.player.controller.*;
import org.libresonic.player.controller.PasswordSettingsController;
/**
* Command used in {@link PasswordSettingsController}.

@ -19,14 +19,10 @@
*/
package org.libresonic.player.command;
import java.util.List;
import org.libresonic.player.controller.PersonalSettingsController;
import org.libresonic.player.domain.AlbumListType;
import org.libresonic.player.domain.Avatar;
import org.libresonic.player.domain.Theme;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.domain.*;
import java.util.List;
/**
* Command used in {@link PersonalSettingsController}.

@ -19,15 +19,15 @@
*/
package org.libresonic.player.command;
import java.util.Date;
import java.util.List;
import org.libresonic.player.controller.PlayerSettingsController;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.PlayerTechnology;
import org.libresonic.player.domain.TranscodeScheme;
import org.libresonic.player.domain.Transcoding;
import java.util.Date;
import java.util.List;
/**
* Command used in {@link PlayerSettingsController}.
*

@ -19,10 +19,12 @@
*/
package org.libresonic.player.command;
import org.libresonic.player.domain.*;
import org.libresonic.player.controller.*;
import org.libresonic.player.controller.SearchController;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.User;
import java.util.*;
import java.util.List;
/**
* Command used in {@link SearchController}.

@ -19,13 +19,13 @@
*/
package org.libresonic.player.controller;
import org.springframework.web.servlet.support.*;
import org.springframework.web.servlet.mvc.*;
import org.springframework.ui.context.*;
import org.springframework.ui.context.Theme;
import org.springframework.web.servlet.support.RequestContextUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
import java.awt.*;
import java.util.*;
import java.util.Locale;
/**
* Abstract super class for controllers which generate charts.

@ -25,11 +25,9 @@ import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
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.support.RedirectAttributes;
/**

@ -19,13 +19,13 @@
*/
package org.libresonic.player.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Controller for the page which forwards to allmusic.com.

@ -19,17 +19,12 @@
*/
package org.libresonic.player.controller;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.io.IOException;
import org.apache.commons.lang.RandomStringUtils;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.*;
import org.apache.commons.lang.RandomStringUtils;
import java.awt.*;
import java.io.IOException;
/**
* @author Sindre Mehus

@ -19,9 +19,10 @@
*/
package org.libresonic.player.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.libresonic.player.domain.Avatar;
import org.libresonic.player.domain.AvatarScheme;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestUtils;
@ -30,10 +31,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.LastModified;
import org.libresonic.player.domain.Avatar;
import org.libresonic.player.domain.AvatarScheme;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.SettingsService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Controller which produces avatar images.

@ -19,27 +19,27 @@
*/
package org.libresonic.player.controller;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.Avatar;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.util.StringUtil;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.Avatar;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ParameterizableViewController;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

@ -31,6 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -41,6 +41,7 @@ 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.*;

@ -31,6 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@ -18,23 +18,22 @@
*/
package org.libresonic.player.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.UPnPService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.UPnPService;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
/**
* Controller for the page used to administrate the UPnP/DLNA server settings.
*

@ -19,25 +19,15 @@
*/
package org.libresonic.player.controller;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.zip.CRC32;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.*;
import org.libresonic.player.io.RangeOutputStream;
import org.libresonic.player.service.*;
import org.libresonic.player.util.FileUtil;
import org.libresonic.player.util.HttpRange;
import org.libresonic.player.util.Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestBindingException;
@ -47,23 +37,16 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.LastModified;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.PlayQueue;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.domain.TransferStatus;
import org.libresonic.player.domain.User;
import org.libresonic.player.io.RangeOutputStream;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.StatusService;
import org.libresonic.player.util.FileUtil;
import org.libresonic.player.util.HttpRange;
import org.libresonic.player.util.Util;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.zip.CRC32;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* A controller used for downloading files to a remote client. If the requested path refers to a file, the

@ -34,6 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@ -35,6 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;

@ -19,10 +19,6 @@
*/
package org.libresonic.player.controller;
import org.libresonic.player.domain.AvatarScheme;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -32,7 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -19,24 +19,7 @@
*/
package org.libresonic.player.controller;
import java.awt.Dimension;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
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.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.Player;
import org.libresonic.player.service.MediaFileService;
@ -44,6 +27,22 @@ import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.util.Pair;
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Controller which produces the HLS (Http Live Streaming) playlist.

@ -19,23 +19,21 @@
*/
package org.libresonic.player.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.VersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ParameterizableViewController;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.VersionService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* Controller for the help page.

@ -29,6 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.*;

@ -19,29 +19,27 @@
*/
package org.libresonic.player.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ParameterizableViewController;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SecurityService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Sindre Mehus

@ -1,21 +1,17 @@
package org.libresonic.player.controller;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.stereotype.Controller;
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.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -19,20 +19,17 @@
*/
package org.libresonic.player.controller;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.InternetRadio;
import org.libresonic.player.service.SettingsService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
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.ParameterizableViewController;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.Date;
import java.util.HashMap;

@ -19,31 +19,30 @@
*/
package org.libresonic.player.controller;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import org.apache.commons.io.IOUtils;
import org.eclipse.persistence.jaxb.JAXBContext;
import org.eclipse.persistence.jaxb.MarshallerProperties;
import org.jdom.Attribute;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
import org.libresonic.player.Logger;
import org.libresonic.player.util.StringUtil;
import org.libresonic.restapi.Error;
import org.libresonic.restapi.ObjectFactory;
import org.libresonic.restapi.Response;
import org.libresonic.restapi.ResponseStatus;
import org.libresonic.player.Logger;
import org.libresonic.player.util.StringUtil;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.Date;
import java.util.GregorianCalendar;
import static org.springframework.web.bind.ServletRequestUtils.getStringParameter;

@ -33,6 +33,7 @@ import org.springframework.web.servlet.support.RequestContextUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.*;

@ -6,10 +6,7 @@ import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -18,6 +15,7 @@ import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -22,13 +22,13 @@ package org.libresonic.player.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.ParameterizableViewController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.HashMap;
import java.util.Map;
/**
* Controller for the lyrics popup.

@ -34,6 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

@ -31,6 +31,7 @@ import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;

@ -35,6 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.Calendar;
import java.util.HashMap;

@ -34,6 +34,7 @@ import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

@ -30,9 +30,9 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.Date;
import java.util.Locale;

@ -33,6 +33,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -31,9 +31,9 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.ArrayList;
import java.util.List;

@ -33,11 +33,11 @@ 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.ParameterizableViewController;
import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -18,31 +18,21 @@
*/
package org.libresonic.player.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
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.ParameterizableViewController;
import org.springframework.web.servlet.view.RedirectView;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.Playlist;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Controller for the playlists page.

@ -30,6 +30,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -31,6 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

@ -33,6 +33,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;

@ -34,6 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
/**

@ -57,6 +57,7 @@ import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

@ -19,14 +19,12 @@
*/
package org.libresonic.player.controller;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.*;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
@ -36,6 +34,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**
* Controller for the creating a random play queue.
*

@ -22,6 +22,7 @@ import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

@ -23,15 +23,12 @@ import org.libresonic.player.domain.User;
import org.libresonic.player.service.SecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestAttribute;
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.AbstractController;
import org.springframework.web.servlet.view.RedirectView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Controller for the main settings page.

@ -34,6 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**

@ -19,7 +19,6 @@
*/
package org.libresonic.player.controller;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
@ -37,12 +36,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
* Controller for the page used to administrate the set of shared media.

@ -18,7 +18,6 @@
*/
package org.libresonic.player.controller;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.SonosService;
@ -30,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@ -33,6 +33,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@ -19,23 +19,29 @@
*/
package org.libresonic.player.controller;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.*;
import org.jfree.chart.*;
import org.jfree.chart.axis.*;
import org.jfree.chart.plot.*;
import org.jfree.chart.renderer.xy.*;
import org.jfree.data.*;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYItemRenderer;
import org.jfree.data.Range;
import org.jfree.data.time.*;
import org.libresonic.player.domain.TransferStatus;
import org.libresonic.player.service.StatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
import java.awt.*;
import java.util.*;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**

@ -33,6 +33,7 @@ import org.springframework.web.servlet.support.RequestContextUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**

@ -19,48 +19,34 @@
*/
package org.libresonic.player.controller;
import java.awt.Dimension;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestBindingException;
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.libresonic.player.Logger;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.PlayQueue;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.TransferStatus;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.VideoTranscodingSettings;
import org.libresonic.player.domain.*;
import org.libresonic.player.io.PlayQueueInputStream;
import org.libresonic.player.io.RangeOutputStream;
import org.libresonic.player.io.ShoutCastOutputStream;
import org.libresonic.player.service.AudioScrobblerService;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.PlaylistService;
import org.libresonic.player.service.SearchService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.StatusService;
import org.libresonic.player.service.TranscodingService;
import org.libresonic.player.service.*;
import org.libresonic.player.service.sonos.SonosHelper;
import org.libresonic.player.util.HttpRange;
import org.libresonic.player.util.StringUtil;
import org.libresonic.player.util.Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestBindingException;
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A controller which streams the content of a {@link org.libresonic.player.domain.PlayQueue} to a remote

@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@ -19,20 +19,18 @@
*/
package org.libresonic.player.controller;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.Transcoding;
import org.libresonic.player.service.TranscodingService;
import org.libresonic.player.service.SettingsService;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.service.TranscodingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
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.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.HashMap;
import java.util.Map;

@ -42,6 +42,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;

@ -19,14 +19,6 @@
*/
package org.libresonic.player.controller;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Paint;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
@ -39,14 +31,19 @@ import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.BarRenderer;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultCategoryDataset;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.SecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.SecurityService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.util.List;
/**
* Controller for generating a chart showing bitrate vs time.

@ -38,10 +38,13 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.ArrayList;
import java.util.Date;

@ -35,6 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

@ -19,24 +19,16 @@
*/
package org.libresonic.player.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.libresonic.player.Logger;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.*;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.libresonic.player.Logger;
import org.springframework.jdbc.support.JdbcUtils;
import org.springframework.jdbc.support.KeyHolder;
import org.springframework.util.Assert;
/**
* Abstract superclass for all DAO's.
*

@ -22,17 +22,12 @@ package org.libresonic.player.dao;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.Artist;
import org.libresonic.player.domain.MusicFolder;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.transaction.annotation.Transactional;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* Provides database services for artists.

@ -19,10 +19,11 @@
*/
package org.libresonic.player.dao;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import javax.sql.DataSource;
/**
* DAO helper class which creates the data source, and updates the database schema.
*

@ -1,9 +1,10 @@
package org.libresonic.player.dao;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import javax.sql.DataSource;
public class GenericDaoHelper implements DaoHelper {
final JdbcTemplate jdbcTemplate;

@ -19,15 +19,14 @@
*/
package org.libresonic.player.dao;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.InternetRadio;
import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.InternetRadio;
/**
* Provides database services for internet radio.
*

@ -20,12 +20,11 @@
package org.libresonic.player.dao;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.RandomSearchCriteria;
import org.springframework.jdbc.core.RowMapper;
import org.libresonic.player.domain.Genre;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import org.libresonic.player.domain.RandomSearchCriteria;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.transaction.annotation.Transactional;
import java.sql.ResultSet;

@ -27,11 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.*;
/**
* Provides database services for playlists.

@ -19,17 +19,15 @@
*/
package org.libresonic.player.dao;
import java.util.ArrayList;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import org.springframework.dao.EmptyResultDataAccessException;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.dao.EmptyResultDataAccessException;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import static org.libresonic.player.domain.MediaFile.MediaType.ALBUM;
/**

@ -19,17 +19,15 @@
*/
package org.libresonic.player.domain;
import java.io.File;
import java.util.Date;
import java.util.List;
import org.apache.commons.io.FilenameUtils;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.apache.commons.io.FilenameUtils;
import org.libresonic.player.util.FileUtil;
import java.io.File;
import java.util.Date;
import java.util.List;
/**
* A media file (audio, video or directory) with an assortment of its meta data.
*

@ -19,15 +19,15 @@
*/
package org.libresonic.player.domain;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.collect.Lists;
import java.io.File;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.collect.Lists;
/**
* Represents a top level directory in which music or other media is stored.
*

@ -19,15 +19,11 @@
*/
package org.libresonic.player.domain;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.util.*;
/**
* A play queue is a list of music files that are associated to a remote player.
*

@ -21,8 +21,6 @@ package org.libresonic.player.domain;
import java.util.Date;
import org.libresonic.player.util.StringUtil;
/**
* A Podcast episode belonging to a channel.
*

@ -19,12 +19,11 @@
*/
package org.libresonic.player.domain;
import org.libresonic.player.service.SearchService;
import java.util.ArrayList;
import java.util.List;
import org.libresonic.player.service.MediaScannerService;
import org.libresonic.player.service.SearchService;
/**
* The outcome of a search.
*

@ -19,10 +19,10 @@
*/
package org.libresonic.player.domain;
import java.io.File;
import org.libresonic.player.util.BoundedList;
import java.io.File;
/**
* Status for a single transfer (stream, download or upload).
*

@ -22,13 +22,7 @@ package org.libresonic.player.filter;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SettingsService;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.File;

@ -25,6 +25,7 @@ import org.libresonic.player.util.StringUtil;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;

@ -19,23 +19,17 @@
*/
package org.libresonic.player.filter;
import java.io.IOException;
import org.libresonic.player.Logger;
import org.libresonic.player.controller.JAXBWriter;
import org.libresonic.player.controller.RESTController;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.util.NestedServletException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.util.NestedServletException;
import org.libresonic.player.Logger;
import org.libresonic.player.controller.JAXBWriter;
import org.libresonic.player.controller.RESTController;
import java.io.IOException;
import static org.libresonic.player.controller.RESTController.ErrorCode.GENERIC;
import static org.libresonic.player.controller.RESTController.ErrorCode.MISSING_PARAMETER;

@ -20,8 +20,9 @@
package org.libresonic.player.filter;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* Configurable filter for setting the character encoding to use for the HTTP request.

@ -20,9 +20,10 @@
package org.libresonic.player.filter;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Enumeration;
/**
* Configurable filter for setting HTTP response headers. Can be used, for instance, to

@ -19,12 +19,18 @@
*/
package org.libresonic.player.i18n;
import org.libresonic.player.service.*;
import org.libresonic.player.domain.*;
import org.springframework.web.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import org.libresonic.player.domain.UserSettings;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.springframework.web.servlet.LocaleResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
/**
* Locale resolver implementation which returns the locale selected in the settings.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save