- /** The wrapped options. */
- private final Options options;
-
- /**
- * Creates a new preferences object wrapped around the given options.
- *
- * @param options
- * The options to wrap
- */
- public Preferences(Options options) {
- this.options = options;
+ private final EventBus eventBus;
+ private final Option<Integer> insertionDelay =
+ new DefaultOption<>(60, range(0, MAX_VALUE));
+ private final Option<Integer> postsPerPage =
+ new DefaultOption<>(10, range(1, MAX_VALUE));
+ private final Option<Integer> imagesPerPage =
+ new DefaultOption<>(9, range(1, MAX_VALUE));
+ private final Option<Integer> charactersPerPost =
+ new DefaultOption<>(400, Predicates.<Integer>or(
+ range(50, MAX_VALUE), equalTo(-1)));
+ private final Option<Integer> postCutOffLength =
+ new DefaultOption<>(200, range(50, MAX_VALUE));
+ private final Option<Boolean> requireFullAccess =
+ new DefaultOption<>(false);
+ private final Option<Integer> positiveTrust =
+ new DefaultOption<>(75, range(0, 100));
+ private final Option<Integer> negativeTrust =
+ new DefaultOption<>(-25, range(-100, 100));
+ private final Option<String> trustComment =
+ new DefaultOption<>("Set from Sone Web Interface");
+ private final Option<Boolean> activateFcpInterface =
+ new DefaultOption<>(false);
+ private final Option<FullAccessRequired> fcpFullAccessRequired =
+ new DefaultOption<>(ALWAYS);
+
+ public Preferences(EventBus eventBus) {
+ this.eventBus = eventBus;