1 /*
2  * aTunes
3  * Copyright (C) Alex Aranda, Sylvain Gaudard and contributors
4  *
5  * See http://www.atunes.org/wiki/index.php?title=Contributing for information about contributors
6  *
7  * http://www.atunes.org
8  * http://sourceforge.net/projects/atunes
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  */
20 
21 package net.sourceforge.atunes.kernel.modules.repository;
22 
23 import java.io.File;
24 import java.util.Collection;
25 import java.util.Collections;
26 import java.util.List;
27 import java.util.Map;
28 
29 import net.sourceforge.atunes.model.IArtist;
30 import net.sourceforge.atunes.model.IFolder;
31 import net.sourceforge.atunes.model.IGenre;
32 import net.sourceforge.atunes.model.ILocalAudioObject;
33 import net.sourceforge.atunes.model.IRepository;
34 import net.sourceforge.atunes.model.IStateRepository;
35 import net.sourceforge.atunes.model.IUnknownObjectChecker;
36 import net.sourceforge.atunes.model.IYear;
37 import net.sourceforge.atunes.model.InconsistentRepositoryException;
38 
39 /**
40  * A repository used before repository is loaded or selected, it does nothing
41  *
42  * @author alex
43  *
44  */
45 public class VoidRepository implements IRepository {
46 
47 	@Override
setStateRepository(final IStateRepository state)48 	public void setStateRepository(final IStateRepository state) {
49 	}
50 
51 	@Override
getRepositoryFolders()52 	public List<File> getRepositoryFolders() {
53 		return Collections.emptyList();
54 	}
55 
56 	@Override
addDurationInSeconds(final long seconds)57 	public void addDurationInSeconds(final long seconds) {
58 	}
59 
60 	@Override
removeDurationInSeconds(final long seconds)61 	public void removeDurationInSeconds(final long seconds) {
62 	}
63 
64 	@Override
getTotalDurationInSeconds()65 	public long getTotalDurationInSeconds() {
66 		return 0;
67 	}
68 
69 	@Override
addSizeInBytes(final long bytes)70 	public void addSizeInBytes(final long bytes) {
71 	}
72 
73 	@Override
removeSizeInBytes(final long bytes)74 	public void removeSizeInBytes(final long bytes) {
75 	}
76 
77 	@Override
getTotalSizeInBytes()78 	public long getTotalSizeInBytes() {
79 		return 0;
80 	}
81 
82 	@Override
exists()83 	public boolean exists() {
84 		return false;
85 	}
86 
87 	@Override
validateRepository()88 	public void validateRepository() throws InconsistentRepositoryException {
89 	}
90 
91 	@Override
countFiles()92 	public int countFiles() {
93 		return 0;
94 	}
95 
96 	@Override
getFile(final String fileName)97 	public ILocalAudioObject getFile(final String fileName) {
98 		return null;
99 	}
100 
101 	@Override
getFiles()102 	public Collection<ILocalAudioObject> getFiles() {
103 		return Collections.emptyList();
104 	}
105 
106 	@Override
putFile(final ILocalAudioObject file)107 	public ILocalAudioObject putFile(final ILocalAudioObject file) {
108 		return null;
109 	}
110 
111 	@Override
removeFile(final ILocalAudioObject file)112 	public void removeFile(final ILocalAudioObject file) {
113 	}
114 
115 	@Override
countArtists()116 	public int countArtists() {
117 		return 0;
118 	}
119 
120 	@Override
getArtist(final String artistName)121 	public IArtist getArtist(final String artistName) {
122 		return null;
123 	}
124 
125 	@Override
getArtists()126 	public Collection<IArtist> getArtists() {
127 		return Collections.emptyList();
128 	}
129 
130 	@Override
putArtist(final IArtist artist)131 	public IArtist putArtist(final IArtist artist) {
132 		return null;
133 	}
134 
135 	@Override
removeArtist(final IArtist artist)136 	public void removeArtist(final IArtist artist) {
137 	}
138 
139 	@Override
getFolder(final String path)140 	public IFolder getFolder(final String path) {
141 		return null;
142 	}
143 
144 	@Override
getFolders()145 	public Collection<IFolder> getFolders() {
146 		return null;
147 	}
148 
149 	@Override
putFolder(final IFolder folder)150 	public IFolder putFolder(final IFolder folder) {
151 		return null;
152 	}
153 
154 	@Override
getGenres()155 	public Collection<IGenre> getGenres() {
156 		return null;
157 	}
158 
159 	@Override
getGenre(final String genre)160 	public IGenre getGenre(final String genre) {
161 		return null;
162 	}
163 
164 	@Override
putGenre(final IGenre genre)165 	public IGenre putGenre(final IGenre genre) {
166 		return null;
167 	}
168 
169 	@Override
removeGenre(final IGenre genre)170 	public void removeGenre(final IGenre genre) {
171 	}
172 
173 	@Override
getYear(final String year)174 	public IYear getYear(final String year) {
175 		return null;
176 	}
177 
178 	@Override
getYears()179 	public Collection<IYear> getYears() {
180 		return null;
181 	}
182 
183 	@Override
putYear(final IYear year, final IUnknownObjectChecker unknownObjectChecker)184 	public IYear putYear(final IYear year,
185 			final IUnknownObjectChecker unknownObjectChecker) {
186 		return null;
187 	}
188 
189 	@Override
removeYear(final IYear year, final IUnknownObjectChecker unknownObjectChecker)190 	public void removeYear(final IYear year,
191 			final IUnknownObjectChecker unknownObjectChecker) {
192 	}
193 
194 	@Override
getYearStructure()195 	public Map<String, ?> getYearStructure() {
196 		return Collections.emptyMap();
197 	}
198 
199 	@Override
getGenreStructure()200 	public Map<String, ?> getGenreStructure() {
201 		return Collections.emptyMap();
202 	}
203 
204 	@Override
getFolderStructure()205 	public Map<String, ?> getFolderStructure() {
206 		return Collections.emptyMap();
207 	}
208 
209 	@Override
getAlbumStructure()210 	public Map<String, ?> getAlbumStructure() {
211 		return Collections.emptyMap();
212 	}
213 
214 	@Override
getArtistStructure()215 	public Map<String, ?> getArtistStructure() {
216 		return Collections.emptyMap();
217 	}
218 
219 	@Override
removeFile(String path)220 	public void removeFile(String path) {
221 	}
222 }
223