Browse Source

DI the notifications plugin.

Change-Id: I7a6ea92a1bb845ac330c610e829184bffc26606f
Reviewed-on: http://gerrit.dmdirc.com/3201
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.8
Greg Holmes 10 years ago
parent
commit
d4d1f78699

+ 11
- 10
src/com/dmdirc/addons/notifications/NotificationCommand.java View File

@@ -49,19 +49,20 @@ public class NotificationCommand extends Command implements
49 49
             "notification [--methods|--method <method>] text - "
50 50
             + "Notifies you of the text",
51 51
             CommandType.TYPE_GLOBAL);
52
-    /** The plugin that's using this command. */
53
-    private final NotificationsPlugin parent;
52
+    /** The notifications manager to get notification plugins from. */
53
+    private final NotificationsManager manager;
54 54
 
55 55
     /**
56 56
      * Creates a new instance of this notification command.
57 57
      *
58 58
      * @param controller The controller to use for command information.
59
-     * @param parent     The plugin that's instantiating this command
59
+     * @param manager     The notifications manager to get notification plugins from
60 60
      */
61
-    public NotificationCommand(final CommandController controller, final NotificationsPlugin parent) {
61
+    public NotificationCommand(final CommandController controller,
62
+            final NotificationsManager manager) {
62 63
         super(controller);
63 64
 
64
-        this.parent = parent;
65
+        this.manager = manager;
65 66
     }
66 67
 
67 68
     /** {@inheritDoc} */
@@ -75,7 +76,7 @@ public class NotificationCommand extends Command implements
75 76
                 .equalsIgnoreCase("--method")) {
76 77
             if (args.getArguments().length > 1) {
77 78
                 final String sourceName = args.getArguments()[1];
78
-                final ExportedService source = parent.getMethod(sourceName)
79
+                final ExportedService source = manager.getMethod(sourceName)
79 80
                         .getExportedService("showNotification");
80 81
 
81 82
                 if (source == null) {
@@ -88,8 +89,8 @@ public class NotificationCommand extends Command implements
88 89
                 sendLine(origin, args.isSilent(), FORMAT_ERROR,
89 90
                         "You must specify a method when using --method.");
90 91
             }
91
-        } else if (parent.hasActiveMethod()) {
92
-            parent.getPreferredMethod().getExportedService("showNotification")
92
+        } else if (manager.hasActiveMethod()) {
93
+            manager.getPreferredMethod().getExportedService("showNotification")
93 94
                     .execute("DMDirc", args.getArgumentsAsString(0));
94 95
         } else {
95 96
             sendLine(origin, args.isSilent(), FORMAT_ERROR,
@@ -105,7 +106,7 @@ public class NotificationCommand extends Command implements
105 106
      */
106 107
     private void doMethodList(final FrameContainer origin,
107 108
             final boolean isSilent) {
108
-        final List<PluginInfo> methods = parent.getMethods();
109
+        final List<PluginInfo> methods = manager.getMethods();
109 110
 
110 111
         if (methods.isEmpty()) {
111 112
             sendLine(origin, isSilent, FORMAT_ERROR, "No notification "
@@ -135,7 +136,7 @@ public class NotificationCommand extends Command implements
135 136
             return res;
136 137
         } else if (arg == 1 && context.getPreviousArgs().get(0)
137 138
                 .equalsIgnoreCase("--method")) {
138
-            for (PluginInfo source : parent.getMethods()) {
139
+            for (PluginInfo source : manager.getMethods()) {
139 140
                 res.add(source.getMetaData().getName());
140 141
             }
141 142
             return res;

+ 13
- 7
src/com/dmdirc/addons/notifications/NotificationConfig.java View File

@@ -25,6 +25,7 @@ package com.dmdirc.addons.notifications;
25 25
 import com.dmdirc.addons.ui_swing.components.reorderablelist.ListReorderButtonPanel;
26 26
 import com.dmdirc.addons.ui_swing.components.reorderablelist.ReorderableJList;
27 27
 import com.dmdirc.config.prefs.PreferencesInterface;
28
+import com.dmdirc.interfaces.config.ConfigProvider;
28 29
 
29 30
 import java.util.Enumeration;
30 31
 import java.util.LinkedList;
@@ -49,16 +50,21 @@ public class NotificationConfig extends JPanel implements PreferencesInterface {
49 50
     private ReorderableJList<String> list;
50 51
     /** Notification methods. */
51 52
     private final List<String> methods;
52
-    /** The plugin that owns this panel. */
53
-    private final NotificationsPlugin plugin;
53
+    /** User settings config to save to. */
54
+    private final ConfigProvider userSettings;
55
+    /** This plugin's settings domain. */
56
+    private final String domain;
54 57
 
55 58
     /**
56 59
      * Creates a new instance of NotificationConfig panel.
57 60
      *
58
-     * @param plugin  The plugin that owns this panel
61
+     * @param userSettings Config to save settings to
62
+     * @param domain This plugin's settings domain
59 63
      * @param methods A list of methods to be used in the panel
60 64
      */
61
-    public NotificationConfig(final NotificationsPlugin plugin,
65
+    public NotificationConfig(
66
+            final ConfigProvider userSettings,
67
+            final String domain,
62 68
             final List<String> methods) {
63 69
         super();
64 70
 
@@ -67,7 +73,8 @@ public class NotificationConfig extends JPanel implements PreferencesInterface {
67 73
         } else {
68 74
             this.methods = new LinkedList<>(methods);
69 75
         }
70
-        this.plugin = plugin;
76
+        this.userSettings = userSettings;
77
+        this.domain = domain;
71 78
 
72 79
         initComponents();
73 80
     }
@@ -122,10 +129,9 @@ public class NotificationConfig extends JPanel implements PreferencesInterface {
122 129
         return newMethods;
123 130
     }
124 131
 
125
-    /** {@inheritDoc} */
126 132
     @Override
127 133
     public void save() {
128
-        plugin.saveSettings(getMethods());
134
+        userSettings.setOption(domain, "methodOrder", getMethods());
129 135
     }
130 136
 
131 137
 }

+ 188
- 0
src/com/dmdirc/addons/notifications/NotificationsManager.java View File

@@ -0,0 +1,188 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.addons.notifications;
24
+
25
+import com.dmdirc.ClientModule.GlobalConfig;
26
+import com.dmdirc.ClientModule.UserConfig;
27
+import com.dmdirc.actions.ActionManager;
28
+import com.dmdirc.actions.CoreActionType;
29
+import com.dmdirc.interfaces.ActionListener;
30
+import com.dmdirc.interfaces.actions.ActionType;
31
+import com.dmdirc.interfaces.config.AggregateConfigProvider;
32
+import com.dmdirc.interfaces.config.ConfigProvider;
33
+import com.dmdirc.plugins.PluginDomain;
34
+import com.dmdirc.plugins.PluginInfo;
35
+import com.dmdirc.plugins.PluginManager;
36
+
37
+import java.util.ArrayList;
38
+import java.util.List;
39
+
40
+import javax.inject.Inject;
41
+
42
+public class NotificationsManager implements ActionListener {
43
+
44
+    /** The notification methods that we know of. */
45
+    private final List<String> methods = new ArrayList<>();
46
+    /** The user's preferred order for method usage. */
47
+    private List<String> order;
48
+    /** This plugin's settings domain. */
49
+    private final String domain;
50
+    /** Global config to read settings from. */
51
+    private final AggregateConfigProvider globalConfig;
52
+    /** Plugin manager. */
53
+    private final PluginManager pluginManager;
54
+
55
+    @Inject
56
+    public NotificationsManager(
57
+            @PluginDomain(NotificationsPlugin.class) final String domain,
58
+            @GlobalConfig final AggregateConfigProvider globalConfig,
59
+            @UserConfig final ConfigProvider userSettings,
60
+            final PluginManager pluginManager) {
61
+        this.domain = domain;
62
+        this.globalConfig = globalConfig;
63
+        this.pluginManager = pluginManager;
64
+    }
65
+
66
+    public void onLoad() {
67
+        methods.clear();
68
+        loadSettings();
69
+        ActionManager.getActionManager().registerListener(this,
70
+                CoreActionType.PLUGIN_LOADED, CoreActionType.PLUGIN_UNLOADED);
71
+        for (PluginInfo target : pluginManager.getPluginInfos()) {
72
+            if (target.isLoaded()) {
73
+                addPlugin(target);
74
+            }
75
+        }
76
+    }
77
+
78
+    public void onUnload() {
79
+        methods.clear();
80
+        ActionManager.getActionManager().unregisterListener(this);
81
+    }
82
+
83
+    /** Loads the plugins settings. */
84
+    private void loadSettings() {
85
+        if (globalConfig.hasOptionString(domain, "methodOrder")) {
86
+            order = globalConfig.getOptionList(domain, "methodOrder");
87
+        } else {
88
+            order = new ArrayList<>();
89
+        }
90
+    }
91
+
92
+    /** {@inheritDoc} */
93
+    @Override
94
+    public void processEvent(final ActionType type, final StringBuffer format,
95
+            final Object... arguments) {
96
+        if (type == CoreActionType.PLUGIN_LOADED) {
97
+            addPlugin((PluginInfo) arguments[0]);
98
+        } else if (type == CoreActionType.PLUGIN_UNLOADED) {
99
+            removePlugin((PluginInfo) arguments[0]);
100
+        }
101
+    }
102
+
103
+    /**
104
+     * Checks to see if a plugin implements the notification method interface and if it does, adds
105
+     * the method to our list.
106
+     *
107
+     * @param target The plugin to be tested
108
+     */
109
+    private void addPlugin(final PluginInfo target) {
110
+        if (target.hasExportedService("showNotification")) {
111
+            methods.add(target.getMetaData().getName());
112
+            addMethodToOrder(target);
113
+        }
114
+    }
115
+
116
+    /**
117
+     * Checks to see if the specified notification method needs to be added to our order list, and
118
+     * adds it if neccessary.
119
+     *
120
+     * @param source The notification method to be tested
121
+     */
122
+    private void addMethodToOrder(final PluginInfo source) {
123
+        if (!order.contains(source.getMetaData().getName())) {
124
+            order.add(source.getMetaData().getName());
125
+        }
126
+    }
127
+
128
+    /**
129
+     * Checks to see if a plugin implements the notification method interface and if it does,
130
+     * removes the method from our list.
131
+     *
132
+     * @param target The plugin to be tested
133
+     */
134
+    private void removePlugin(final PluginInfo target) {
135
+        methods.remove(target.getMetaData().getName());
136
+    }
137
+
138
+    /**
139
+     * Retrieves a method based on its name.
140
+     *
141
+     * @param name The name to search for
142
+     *
143
+     * @return The method with the specified name or null if none were found.
144
+     */
145
+    public PluginInfo getMethod(final String name) {
146
+        return pluginManager.getPluginInfoByName(name);
147
+    }
148
+
149
+    /**
150
+     * Retrieves all the methods registered with this plugin.
151
+     *
152
+     * @return All known notification sources
153
+     */
154
+    public List<PluginInfo> getMethods() {
155
+        final List<PluginInfo> plugins = new ArrayList<>();
156
+        for (String method : methods) {
157
+            plugins.add(pluginManager.getPluginInfoByName(method));
158
+        }
159
+        return plugins;
160
+    }
161
+
162
+    /**
163
+     * Does this plugin have any active notification methods?
164
+     *
165
+     * @return true iif active notification methods are registered
166
+     */
167
+    public boolean hasActiveMethod() {
168
+        return !methods.isEmpty();
169
+    }
170
+
171
+    /**
172
+     * Returns the user's preferred method if loaded, or null if none loaded.
173
+     *
174
+     * @return Preferred notification method
175
+     */
176
+    public PluginInfo getPreferredMethod() {
177
+        if (methods.isEmpty()) {
178
+            return null;
179
+        }
180
+        for (String method : order) {
181
+            if (methods.contains(method)) {
182
+                return pluginManager.getPluginInfoByName(method);
183
+            }
184
+        }
185
+        return null;
186
+    }
187
+
188
+}

+ 48
- 0
src/com/dmdirc/addons/notifications/NotificationsModule.java View File

@@ -0,0 +1,48 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.addons.notifications;
24
+
25
+import com.dmdirc.ClientModule;
26
+import com.dmdirc.plugins.PluginDomain;
27
+import com.dmdirc.plugins.PluginInfo;
28
+
29
+import dagger.Module;
30
+import dagger.Provides;
31
+
32
+@Module(injects = {NotificationCommand.class, NotificationsManager.class},
33
+        addsTo = ClientModule.class)
34
+public class NotificationsModule {
35
+
36
+    private final PluginInfo pluginInfo;
37
+
38
+    public NotificationsModule(final PluginInfo pluginInfo) {
39
+        this.pluginInfo = pluginInfo;
40
+    }
41
+
42
+    @Provides
43
+    @PluginDomain(NotificationsPlugin.class)
44
+    public String getSettingsDomain() {
45
+        return pluginInfo.getDomain();
46
+    }
47
+
48
+}

+ 26
- 168
src/com/dmdirc/addons/notifications/NotificationsPlugin.java View File

@@ -22,91 +22,69 @@
22 22
 
23 23
 package com.dmdirc.addons.notifications;
24 24
 
25
-import com.dmdirc.actions.ActionManager;
26
-import com.dmdirc.actions.CoreActionType;
27 25
 import com.dmdirc.addons.ui_swing.UIUtilities;
28 26
 import com.dmdirc.config.prefs.PluginPreferencesCategory;
29 27
 import com.dmdirc.config.prefs.PreferencesCategory;
30 28
 import com.dmdirc.config.prefs.PreferencesDialogModel;
31
-import com.dmdirc.interfaces.ActionListener;
32
-import com.dmdirc.interfaces.CommandController;
33
-import com.dmdirc.interfaces.actions.ActionType;
34
-import com.dmdirc.interfaces.config.IdentityController;
35 29
 import com.dmdirc.plugins.PluginInfo;
36 30
 import com.dmdirc.plugins.implementations.BaseCommandPlugin;
37 31
 
38
-import java.util.ArrayList;
39
-import java.util.List;
40 32
 import java.util.concurrent.Callable;
41 33
 
34
+import dagger.ObjectGraph;
35
+
42 36
 /**
43 37
  * Notification Manager plugin, aggregates notification sources exposing them via a single command.
44 38
  */
45
-public class NotificationsPlugin extends BaseCommandPlugin implements ActionListener {
39
+public class NotificationsPlugin extends BaseCommandPlugin {
46 40
 
47
-    /** The notification methods that we know of. */
48
-    private final List<String> methods = new ArrayList<>();
49
-    /** The user's preferred order for method usage. */
50
-    private List<String> order;
51 41
     /** This plugin's plugin info. */
52 42
     private final PluginInfo pluginInfo;
53
-    /** The controller to read and write settings with. */
54
-    private final IdentityController identityController;
43
+    /** Notifications manager. */
44
+    private NotificationsManager manager;
55 45
 
56 46
     /**
57 47
      * Creates a new instance of this plugin.
58 48
      *
59
-     * @param pluginInfo         This plugin's plugin info
60
-     * @param commandController  Command controller to register commands
61
-     * @param identityController The controller to read and write settings with.
49
+     * @param pluginInfo This plugin's plugin info
62 50
      */
63
-    public NotificationsPlugin(
64
-            final PluginInfo pluginInfo,
65
-            final CommandController commandController,
66
-            final IdentityController identityController) {
67
-        super(commandController);
51
+    public NotificationsPlugin(final PluginInfo pluginInfo) {
68 52
         this.pluginInfo = pluginInfo;
69
-        this.identityController = identityController;
70
-        registerCommand(new NotificationCommand(commandController, this),
71
-                NotificationCommand.INFO);
53
+
54
+    }
55
+
56
+    @Override
57
+    public void load(final PluginInfo pluginInfo, final ObjectGraph graph) {
58
+        super.load(pluginInfo, graph);
59
+        setObjectGraph(graph.plus(new NotificationsModule(pluginInfo)));
60
+        registerCommand(NotificationCommand.class, NotificationCommand.INFO);
61
+        manager = getObjectGraph().get(NotificationsManager.class);
72 62
     }
73 63
 
74
-    /** {@inheritDoc} */
75 64
     @Override
76 65
     public void onLoad() {
77
-        methods.clear();
78
-        loadSettings();
79
-        ActionManager.getActionManager().registerListener(this,
80
-                CoreActionType.PLUGIN_LOADED, CoreActionType.PLUGIN_UNLOADED);
81
-        for (PluginInfo target : pluginInfo.getMetaData().getManager()
82
-                .getPluginInfos()) {
83
-            if (target.isLoaded()) {
84
-                addPlugin(target);
85
-            }
86
-        }
66
+        manager.onLoad();
87 67
         super.onLoad();
88 68
     }
89 69
 
90
-    /** {@inheritDoc} */
91 70
     @Override
92 71
     public void onUnload() {
93
-        methods.clear();
94
-        ActionManager.getActionManager().unregisterListener(this);
72
+        manager.onUnload();
95 73
         super.onUnload();
96 74
     }
97 75
 
98
-    /** {@inheritDoc} */
99 76
     @Override
100 77
     public void showConfig(final PreferencesDialogModel manager) {
101 78
         final NotificationConfig configPanel = UIUtilities.invokeAndWait(
102 79
                 new Callable<NotificationConfig>() {
103
-            /** {@inheritDoc} */
104
-            @Override
105
-            public NotificationConfig call() {
106
-                return new NotificationConfig(NotificationsPlugin.this,
107
-                        order);
108
-            }
109
-        });
80
+                    /** {@inheritDoc} */
81
+                    @Override
82
+                    public NotificationConfig call() {
83
+                        return new NotificationConfig(manager.getIdentity(), pluginInfo.getDomain(),
84
+                                manager.getConfigManager().getOptionList(pluginInfo.getDomain(),
85
+                                        "methodOrder"));
86
+                    }
87
+                });
110 88
 
111 89
         final PreferencesCategory category = new PluginPreferencesCategory(
112 90
                 pluginInfo, "Notifications", "", "category-notifications",
@@ -114,124 +92,4 @@ public class NotificationsPlugin extends BaseCommandPlugin implements ActionList
114 92
         manager.getCategory("Plugins").addSubCategory(category);
115 93
     }
116 94
 
117
-    /** Loads the plugins settings. */
118
-    private void loadSettings() {
119
-        if (identityController.getGlobalConfiguration()
120
-                .hasOptionString(pluginInfo.getDomain(), "methodOrder")) {
121
-            order = identityController.getGlobalConfiguration().
122
-                    getOptionList(pluginInfo.getDomain(), "methodOrder");
123
-        } else {
124
-            order = new ArrayList<>();
125
-        }
126
-    }
127
-
128
-    /** {@inheritDoc} */
129
-    @Override
130
-    public void processEvent(final ActionType type, final StringBuffer format,
131
-            final Object... arguments) {
132
-        if (type == CoreActionType.PLUGIN_LOADED) {
133
-            addPlugin((PluginInfo) arguments[0]);
134
-        } else if (type == CoreActionType.PLUGIN_UNLOADED) {
135
-            removePlugin((PluginInfo) arguments[0]);
136
-        }
137
-    }
138
-
139
-    /**
140
-     * Checks to see if a plugin implements the notification method interface and if it does, adds
141
-     * the method to our list.
142
-     *
143
-     * @param target The plugin to be tested
144
-     */
145
-    private void addPlugin(final PluginInfo target) {
146
-        if (target.hasExportedService("showNotification")) {
147
-            methods.add(target.getMetaData().getName());
148
-            addMethodToOrder(target);
149
-        }
150
-    }
151
-
152
-    /**
153
-     * Checks to see if the specified notification method needs to be added to our order list, and
154
-     * adds it if neccessary.
155
-     *
156
-     * @param source The notification method to be tested
157
-     */
158
-    private void addMethodToOrder(final PluginInfo source) {
159
-        if (!order.contains(source.getMetaData().getName())) {
160
-            order.add(source.getMetaData().getName());
161
-        }
162
-    }
163
-
164
-    /**
165
-     * Checks to see if a plugin implements the notification method interface and if it does,
166
-     * removes the method from our list.
167
-     *
168
-     * @param target The plugin to be tested
169
-     */
170
-    private void removePlugin(final PluginInfo target) {
171
-        methods.remove(target.getMetaData().getName());
172
-    }
173
-
174
-    /**
175
-     * Retrieves a method based on its name.
176
-     *
177
-     * @param name The name to search for
178
-     *
179
-     * @return The method with the specified name or null if none were found.
180
-     */
181
-    public PluginInfo getMethod(final String name) {
182
-        return pluginInfo.getMetaData().getManager().getPluginInfoByName(name);
183
-    }
184
-
185
-    /**
186
-     * Retrieves all the methods registered with this plugin.
187
-     *
188
-     * @return All known notification sources
189
-     */
190
-    public List<PluginInfo> getMethods() {
191
-        final List<PluginInfo> plugins = new ArrayList<>();
192
-        for (String method : methods) {
193
-            plugins.add(pluginInfo.getMetaData().getManager()
194
-                    .getPluginInfoByName(method));
195
-        }
196
-        return plugins;
197
-    }
198
-
199
-    /**
200
-     * Does this plugin have any active notification methods?
201
-     *
202
-     * @return true iif active notification methods are registered
203
-     */
204
-    public boolean hasActiveMethod() {
205
-        return !methods.isEmpty();
206
-    }
207
-
208
-    /**
209
-     * Returns the user's preferred method if loaded, or null if none loaded.
210
-     *
211
-     * @return Preferred notification method
212
-     */
213
-    public PluginInfo getPreferredMethod() {
214
-        if (methods.isEmpty()) {
215
-            return null;
216
-        }
217
-        for (String method : order) {
218
-            if (methods.contains(method)) {
219
-                return pluginInfo.getMetaData().getManager().getPluginInfoByName(
220
-                        method);
221
-            }
222
-        }
223
-        return null;
224
-    }
225
-
226
-    /**
227
-     * Saves the plugins settings.
228
-     *
229
-     * @param newOrder The new order for methods
230
-     */
231
-    protected void saveSettings(final List<String> newOrder) {
232
-        order = newOrder;
233
-        identityController.getUserSettings()
234
-                .setOption(pluginInfo.getDomain(), "methodOrder", order);
235
-    }
236
-
237 95
 }

Loading…
Cancel
Save