Don’t set the request URI anymore, either.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / impl / IdOnlySone.java
1 package net.pterodactylus.sone.data.impl;
2
3 import static java.util.Collections.emptyList;
4 import static java.util.Collections.emptySet;
5
6 import java.util.Collection;
7 import java.util.List;
8 import java.util.Set;
9
10 import net.pterodactylus.sone.data.Album;
11 import net.pterodactylus.sone.data.Client;
12 import net.pterodactylus.sone.data.Post;
13 import net.pterodactylus.sone.data.PostReply;
14 import net.pterodactylus.sone.data.Profile;
15 import net.pterodactylus.sone.data.Sone;
16 import net.pterodactylus.sone.data.SoneOptions;
17 import net.pterodactylus.sone.freenet.wot.Identity;
18
19 import freenet.keys.FreenetURI;
20
21 /**
22  * {@link Sone} implementation that only stores the ID of a Sone and returns
23  * {@code null}, {@code 0}, or empty collections where appropriate.
24  *
25  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
26  */
27 public class IdOnlySone implements Sone {
28
29         private final String id;
30
31         public IdOnlySone(String id) {
32                 this.id = id;
33         }
34
35         @Override
36         public Identity getIdentity() {
37                 return null;
38         }
39
40         @Override
41         public String getName() {
42                 return id;
43         }
44
45         @Override
46         public boolean isLocal() {
47                 return false;
48         }
49
50         @Override
51         public FreenetURI getRequestUri() {
52                 return null;
53         }
54
55         @Override
56         public FreenetURI getInsertUri() {
57                 return null;
58         }
59
60         @Override
61         public long getLatestEdition() {
62                 return 0;
63         }
64
65         @Override
66         public void setLatestEdition(long latestEdition) {
67         }
68
69         @Override
70         public long getTime() {
71                 return 0;
72         }
73
74         @Override
75         public Sone setTime(long time) {
76                 return null;
77         }
78
79         @Override
80         public SoneStatus getStatus() {
81                 return null;
82         }
83
84         @Override
85         public Sone setStatus(SoneStatus status) {
86                 return null;
87         }
88
89         @Override
90         public Profile getProfile() {
91                 return new Profile(this);
92         }
93
94         @Override
95         public void setProfile(Profile profile) {
96         }
97
98         @Override
99         public Client getClient() {
100                 return null;
101         }
102
103         @Override
104         public Sone setClient(Client client) {
105                 return null;
106         }
107
108         @Override
109         public boolean isKnown() {
110                 return false;
111         }
112
113         @Override
114         public Sone setKnown(boolean known) {
115                 return null;
116         }
117
118         @Override
119         public List<String> getFriends() {
120                 return emptyList();
121         }
122
123         @Override
124         public boolean hasFriend(String friendSoneId) {
125                 return false;
126         }
127
128         @Override
129         public Sone addFriend(String friendSone) {
130                 return this;
131         }
132
133         @Override
134         public Sone removeFriend(String friendSoneId) {
135                 return this;
136         }
137
138         @Override
139         public List<Post> getPosts() {
140                 return emptyList();
141         }
142
143         @Override
144         public Sone setPosts(Collection<Post> posts) {
145                 return this;
146         }
147
148         @Override
149         public void addPost(Post post) {
150         }
151
152         @Override
153         public void removePost(Post post) {
154         }
155
156         @Override
157         public Set<PostReply> getReplies() {
158                 return emptySet();
159         }
160
161         @Override
162         public Sone setReplies(Collection<PostReply> replies) {
163                 return this;
164         }
165
166         @Override
167         public void addReply(PostReply reply) {
168         }
169
170         @Override
171         public void removeReply(PostReply reply) {
172         }
173
174         @Override
175         public Set<String> getLikedPostIds() {
176                 return emptySet();
177         }
178
179         @Override
180         public Sone setLikePostIds(Set<String> likedPostIds) {
181                 return this;
182         }
183
184         @Override
185         public boolean isLikedPostId(String postId) {
186                 return false;
187         }
188
189         @Override
190         public Sone addLikedPostId(String postId) {
191                 return this;
192         }
193
194         @Override
195         public Sone removeLikedPostId(String postId) {
196                 return this;
197         }
198
199         @Override
200         public Set<String> getLikedReplyIds() {
201                 return emptySet();
202         }
203
204         @Override
205         public Sone setLikeReplyIds(Set<String> likedReplyIds) {
206                 return this;
207         }
208
209         @Override
210         public boolean isLikedReplyId(String replyId) {
211                 return false;
212         }
213
214         @Override
215         public Sone addLikedReplyId(String replyId) {
216                 return this;
217         }
218
219         @Override
220         public Sone removeLikedReplyId(String replyId) {
221                 return this;
222         }
223
224         @Override
225         public Album getRootAlbum() {
226                 return null;
227         }
228
229         @Override
230         public SoneOptions getOptions() {
231                 return null;
232         }
233
234         @Override
235         public void setOptions(SoneOptions options) {
236         }
237
238         @Override
239         public int compareTo(Sone o) {
240                 return 0;
241         }
242
243         @Override
244         public String getFingerprint() {
245                 return null;
246         }
247
248         @Override
249         public String getId() {
250                 return id;
251         }
252
253 }