Yair Zaslavsky has posted comments on this change. Change subject: aaa: Chages to ExtensionsManager ......................................................................
Patch Set 7: (3 comments) http://gerrit.ovirt.org/#/c/27785/7/backend/manager/modules/extensions-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionsManager.java File backend/manager/modules/extensions-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionsManager.java: Line 117: private Map<String, BindingsLoader> bindingsLoaders = new HashMap<>(); Line 118: private Map<String, ExtensionEntry> loadedEntries = new HashMap<>(); Line 119: private ExtMap globalContext = new ExtMap().mput(Base.GlobalContextKeys.EXTENSIONS, new ArrayList<ExtMap>()); Line 120: Line 121: private Properties configProperties = new Properties(); > we should remove this in favour of explicit structure. Like what ? I have chosen properties due to the ability to getProperty(key, default). Don't you think this is enough for our needs? Line 122: Line 123: public ExtMap getGlobalContext() { Line 124: return globalContext; Line 125: } Line 142: } Line 143: return result; Line 144: } Line 145: Line 146: public ExtensionsManager(Map<String, String> properties, String applicationName) { > you do not need application name, you get get global as you have done... Done Line 147: bindingsLoaders.put(Base.ConfigBindingsMethods.JBOSSMODULE, new JBossBindingsLoader()); Line 148: this.configProperties.putAll(properties); Line 149: globalContext.put(Base.GlobalContextKeys.APPLICATION_NAME, applicationName); Line 150: } Line 289: } Line 290: } Line 291: setChanged(); Line 292: notifyObservers(); Line 293: return entry != null ? entry.name : null; > now you can throw exception if something fails... no longer singleton Done Line 294: } Line 295: Line 296: private Extension loadExtension(Properties props) throws Exception { Line 297: Extension extension; -- To view, visit http://gerrit.ovirt.org/27785 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1c914df29a0dbf52ff6d2f8149687b31b4faffe1 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
