Use Sone builder to set the posts of a Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / SoneOptions.java
1 package net.pterodactylus.sone.data;
2
3 import static net.pterodactylus.sone.data.Sone.ShowCustomAvatars.NEVER;
4
5 import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
6
7 /**
8  * All Sone-specific options.
9  *
10  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
11  */
12 public interface SoneOptions {
13
14         boolean isAutoFollow();
15         void setAutoFollow(boolean autoFollow);
16
17         boolean isSoneInsertNotificationEnabled();
18         void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled);
19
20         boolean isShowNewSoneNotifications();
21         void setShowNewSoneNotifications(boolean showNewSoneNotifications);
22
23         boolean isShowNewPostNotifications();
24         void setShowNewPostNotifications(boolean showNewPostNotifications);
25
26         boolean isShowNewReplyNotifications();
27         void setShowNewReplyNotifications(boolean showNewReplyNotifications);
28
29         ShowCustomAvatars getShowCustomAvatars();
30         void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars);
31
32         /**
33          * {@link SoneOptions} implementation.
34          *
35          * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
36          */
37         public class DefaultSoneOptions implements SoneOptions {
38
39                 private boolean autoFollow = false;
40                 private boolean soneInsertNotificationsEnabled = false;
41                 private boolean showNewSoneNotifications = true;
42                 private boolean showNewPostNotifications = true;
43                 private boolean showNewReplyNotifications = true;
44                 private ShowCustomAvatars showCustomAvatars = NEVER;
45
46                 @Override
47                 public boolean isAutoFollow() {
48                         return autoFollow;
49                 }
50
51                 @Override
52                 public void setAutoFollow(boolean autoFollow) {
53                         this.autoFollow = autoFollow;
54                 }
55
56                 @Override
57                 public boolean isSoneInsertNotificationEnabled() {
58                         return soneInsertNotificationsEnabled;
59                 }
60
61                 @Override
62                 public void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled) {
63                         this.soneInsertNotificationsEnabled = soneInsertNotificationEnabled;
64                 }
65
66                 @Override
67                 public boolean isShowNewSoneNotifications() {
68                         return showNewSoneNotifications;
69                 }
70
71                 @Override
72                 public void setShowNewSoneNotifications(boolean showNewSoneNotifications) {
73                         this.showNewSoneNotifications = showNewSoneNotifications;
74                 }
75
76                 @Override
77                 public boolean isShowNewPostNotifications() {
78                         return showNewPostNotifications;
79                 }
80
81                 @Override
82                 public void setShowNewPostNotifications(boolean showNewPostNotifications) {
83                         this.showNewPostNotifications = showNewPostNotifications;
84                 }
85
86                 @Override
87                 public boolean isShowNewReplyNotifications() {
88                         return showNewReplyNotifications;
89                 }
90
91                 @Override
92                 public void setShowNewReplyNotifications(boolean showNewReplyNotifications) {
93                         this.showNewReplyNotifications = showNewReplyNotifications;
94                 }
95
96                 @Override
97                 public ShowCustomAvatars getShowCustomAvatars() {
98                         return showCustomAvatars;
99                 }
100
101                 @Override
102                 public void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars) {
103                         this.showCustomAvatars = showCustomAvatars;
104                 }
105
106         }
107
108 }