Move enum to more appropriate class
[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.SoneOptions.ShowCustomAvatars.NEVER;
4
5 /**
6  * All Sone-specific options.
7  *
8  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
9  */
10 public interface SoneOptions {
11
12         boolean isAutoFollow();
13         void setAutoFollow(boolean autoFollow);
14
15         boolean isSoneInsertNotificationEnabled();
16         void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled);
17
18         boolean isShowNewSoneNotifications();
19         void setShowNewSoneNotifications(boolean showNewSoneNotifications);
20
21         boolean isShowNewPostNotifications();
22         void setShowNewPostNotifications(boolean showNewPostNotifications);
23
24         boolean isShowNewReplyNotifications();
25         void setShowNewReplyNotifications(boolean showNewReplyNotifications);
26
27         ShowCustomAvatars getShowCustomAvatars();
28         void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars);
29
30         /**
31          * The possible values for the “show custom avatars” option.
32          *
33          * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
34          */
35         enum ShowCustomAvatars {
36
37                 /** Never show custom avatars. */
38                 NEVER,
39
40                 /** Only show custom avatars of followed Sones. */
41                 FOLLOWED,
42
43                 /** Only show custom avatars of Sones you manually trust. */
44                 MANUALLY_TRUSTED,
45
46                 /** Only show custom avatars of automatically trusted Sones. */
47                 TRUSTED,
48
49                 /** Always show custom avatars. */
50                 ALWAYS,
51
52         }
53
54         /**
55          * {@link SoneOptions} implementation.
56          *
57          * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
58          */
59         public class DefaultSoneOptions implements SoneOptions {
60
61                 private boolean autoFollow = false;
62                 private boolean soneInsertNotificationsEnabled = false;
63                 private boolean showNewSoneNotifications = true;
64                 private boolean showNewPostNotifications = true;
65                 private boolean showNewReplyNotifications = true;
66                 private ShowCustomAvatars showCustomAvatars = NEVER;
67
68                 @Override
69                 public boolean isAutoFollow() {
70                         return autoFollow;
71                 }
72
73                 @Override
74                 public void setAutoFollow(boolean autoFollow) {
75                         this.autoFollow = autoFollow;
76                 }
77
78                 @Override
79                 public boolean isSoneInsertNotificationEnabled() {
80                         return soneInsertNotificationsEnabled;
81                 }
82
83                 @Override
84                 public void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled) {
85                         this.soneInsertNotificationsEnabled = soneInsertNotificationEnabled;
86                 }
87
88                 @Override
89                 public boolean isShowNewSoneNotifications() {
90                         return showNewSoneNotifications;
91                 }
92
93                 @Override
94                 public void setShowNewSoneNotifications(boolean showNewSoneNotifications) {
95                         this.showNewSoneNotifications = showNewSoneNotifications;
96                 }
97
98                 @Override
99                 public boolean isShowNewPostNotifications() {
100                         return showNewPostNotifications;
101                 }
102
103                 @Override
104                 public void setShowNewPostNotifications(boolean showNewPostNotifications) {
105                         this.showNewPostNotifications = showNewPostNotifications;
106                 }
107
108                 @Override
109                 public boolean isShowNewReplyNotifications() {
110                         return showNewReplyNotifications;
111                 }
112
113                 @Override
114                 public void setShowNewReplyNotifications(boolean showNewReplyNotifications) {
115                         this.showNewReplyNotifications = showNewReplyNotifications;
116                 }
117
118                 @Override
119                 public ShowCustomAvatars getShowCustomAvatars() {
120                         return showCustomAvatars;
121                 }
122
123                 @Override
124                 public void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars) {
125                         this.showCustomAvatars = showCustomAvatars;
126                 }
127
128         }
129
130 }