[Framework] Add extension sorter

Add priority ordering to loaded extensions in each category;
this allows control over the resulting order of extensions
acquired and used within the application. WTD-590
This commit is contained in:
Victor Woeltjen
2015-01-07 16:39:57 -08:00
parent 2bcb6a1a6e
commit 9d8885d48f
4 changed files with 129 additions and 18 deletions

View File

@ -26,23 +26,26 @@ define(
'./resolve/RequireConfigurator',
'./register/CustomRegistrars',
'./register/ExtensionRegistrar',
'./register/ExtensionSorter',
'./bootstrap/ApplicationBootstrapper'
],
function (require,
es6promise,
angular,
angularRoute,
Constants,
FrameworkInitializer,
BundleLoader,
ImplementationLoader,
ExtensionResolver,
BundleResolver,
RequireConfigurator,
CustomRegistrars,
ExtensionRegistrar,
ApplicationBootstrapper
) {
function (
require,
es6promise,
angular,
angularRoute,
Constants,
FrameworkInitializer,
BundleLoader,
ImplementationLoader,
ExtensionResolver,
BundleResolver,
RequireConfigurator,
CustomRegistrars,
ExtensionRegistrar,
ExtensionSorter,
ApplicationBootstrapper
) {
"use strict";
// Get a reference to Angular's injector, so we can get $http and $log
@ -68,6 +71,7 @@ define(
registrar = new ExtensionRegistrar(
app,
new CustomRegistrars(app, $log),
new ExtensionSorter($log),
$log
),
bootstrapper = new ApplicationBootstrapper(