1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 /***
22 * This class provides the Azureus preferences.
23 */
24 package org.xnap.plugin.azureus;
25
26 import org.xnap.util.AbstractPluginPreferences;
27 import org.xnap.util.prefs.PortRangeValidator;
28
29 public class AzureusPreferences extends AbstractPluginPreferences {
30
31
32
33 public static final int VERSION = 1;
34
35
36
37
38
39 public AzureusPreferences()
40 {
41 super("plugin.azureus", VERSION);
42
43 setDefault("autoConnect", "false");
44 setDefault("connectionTableColumns",
45 "host;status;msgCount;type;uptime");
46 setDefault("hostCaches", "connect1.gnutellanet.com:6346;connect2.gnutellanet.com:6346;");
47 setDefault("localPortRange", "6249-6349", new PortRangeValidator());
48 }
49
50
51
52 public void convert(int oldVersion)
53 {
54
55 }
56
57 public boolean getAutoConnect() {
58 return getBoolean("autoConnect");
59 }
60
61 public void setAutoConnect(boolean newValue) {
62 set("autoConnect", newValue);
63 }
64
65 public String[] getHostCaches() {
66 return getArray("hostCaches");
67 }
68
69 public void setHostCaches(String[] newValue) {
70 set("hostCaches", newValue);
71 }
72
73 public String getLocalPortRange() {
74 return get("localPortRange");
75 }
76
77 public void setLocalPortRange(String newValue) {
78 set("localPortRange", newValue);
79 }
80
81 }