|
@@ -224,16 +224,15 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
|
224
|
224
|
*/
|
225
|
225
|
private void getDefaults() {
|
226
|
226
|
final ConfigProvider defaults = IdentityManager.getIdentityManager().getAddonSettings();
|
227
|
|
- final String domain = "plugin-" + metaData.getName();
|
228
|
227
|
|
229
|
228
|
log.trace("{}: Using domain '{}'",
|
230
|
|
- new Object[]{metaData.getName(), domain});
|
|
229
|
+ new Object[]{metaData.getName(), getDomain()});
|
231
|
230
|
|
232
|
231
|
for (Map.Entry<String, String> entry : metaData.getDefaultSettings().entrySet()) {
|
233
|
232
|
final String key = entry.getKey();
|
234
|
233
|
final String value = entry.getValue();
|
235
|
234
|
|
236
|
|
- defaults.setOption(domain, key, value);
|
|
235
|
+ defaults.setOption(getDomain(), key, value);
|
237
|
236
|
}
|
238
|
237
|
|
239
|
238
|
for (Map.Entry<String, String> entry : metaData.getFormatters().entrySet()) {
|
|
@@ -717,13 +716,12 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
|
717
|
716
|
Logger.userError(ErrorLevel.LOW, lastError);
|
718
|
717
|
}
|
719
|
718
|
} else {
|
720
|
|
- final String domain = "plugin-" + metaData.getName();
|
721
|
719
|
plugin = (Plugin) temp;
|
722
|
720
|
|
723
|
721
|
log.debug("{}: Setting domain '{}'",
|
724
|
|
- new Object[]{metaData.getName(), domain});
|
|
722
|
+ new Object[]{metaData.getName(), getDomain()});
|
725
|
723
|
|
726
|
|
- plugin.setDomain(domain);
|
|
724
|
+ plugin.setDomain(getDomain());
|
727
|
725
|
if (!tempLoaded) {
|
728
|
726
|
try {
|
729
|
727
|
plugin.load(this, getObjectGraph());
|
|
@@ -764,6 +762,15 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
|
764
|
762
|
}
|
765
|
763
|
}
|
766
|
764
|
|
|
765
|
+ /**
|
|
766
|
+ * Gets the configuration domain that should be used by this plugin.
|
|
767
|
+ *
|
|
768
|
+ * @return The configuration domain to use.
|
|
769
|
+ */
|
|
770
|
+ public String getDomain() {
|
|
771
|
+ return "plugin-" + metaData.getName();
|
|
772
|
+ }
|
|
773
|
+
|
767
|
774
|
/**
|
768
|
775
|
* Unload the plugin if possible.
|
769
|
776
|
*/
|