1 package net.pterodactylus.sone.data;
3 import static net.pterodactylus.sone.data.SoneOptions.LoadExternalContent.NEVER;
6 * All Sone-specific options.
8 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
10 public interface SoneOptions {
12 boolean isAutoFollow();
13 void setAutoFollow(boolean autoFollow);
15 boolean isSoneInsertNotificationEnabled();
16 void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled);
18 boolean isShowNewSoneNotifications();
19 void setShowNewSoneNotifications(boolean showNewSoneNotifications);
21 boolean isShowNewPostNotifications();
22 void setShowNewPostNotifications(boolean showNewPostNotifications);
24 boolean isShowNewReplyNotifications();
25 void setShowNewReplyNotifications(boolean showNewReplyNotifications);
27 LoadExternalContent getShowCustomAvatars();
28 void setShowCustomAvatars(LoadExternalContent showCustomAvatars);
31 * Possible values for all options that are related to loading external content.
33 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
35 enum LoadExternalContent {
37 /** Never show custom avatars. */
40 /** Only show custom avatars of followed Sones. */
43 /** Only show custom avatars of Sones you manually trust. */
46 /** Only show custom avatars of automatically trusted Sones. */
49 /** Always show custom avatars. */
55 * {@link SoneOptions} implementation.
57 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
59 public class DefaultSoneOptions implements SoneOptions {
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 LoadExternalContent showCustomAvatars = NEVER;
69 public boolean isAutoFollow() {
74 public void setAutoFollow(boolean autoFollow) {
75 this.autoFollow = autoFollow;
79 public boolean isSoneInsertNotificationEnabled() {
80 return soneInsertNotificationsEnabled;
84 public void setSoneInsertNotificationEnabled(boolean soneInsertNotificationEnabled) {
85 this.soneInsertNotificationsEnabled = soneInsertNotificationEnabled;
89 public boolean isShowNewSoneNotifications() {
90 return showNewSoneNotifications;
94 public void setShowNewSoneNotifications(boolean showNewSoneNotifications) {
95 this.showNewSoneNotifications = showNewSoneNotifications;
99 public boolean isShowNewPostNotifications() {
100 return showNewPostNotifications;
104 public void setShowNewPostNotifications(boolean showNewPostNotifications) {
105 this.showNewPostNotifications = showNewPostNotifications;
109 public boolean isShowNewReplyNotifications() {
110 return showNewReplyNotifications;
114 public void setShowNewReplyNotifications(boolean showNewReplyNotifications) {
115 this.showNewReplyNotifications = showNewReplyNotifications;
119 public LoadExternalContent getShowCustomAvatars() {
120 return showCustomAvatars;
124 public void setShowCustomAvatars(LoadExternalContent showCustomAvatars) {
125 this.showCustomAvatars = showCustomAvatars;