[Roots] Add new root model provider

...to read roots from the new API's registry.
This commit is contained in:
Victor Woeltjen
2016-10-19 16:20:02 -07:00
parent 7b0506bbdb
commit 650824574c
3 changed files with 52 additions and 4 deletions

View File

@ -60,6 +60,13 @@ define([
return this.providers[key.namespace] || this.fallbackProvider;
};
/**
* Get the root-level object.
* @returns {Promise.<DomainObject>} a promise for the root object
*/
ObjectAPI.prototype.getRoot = function () {
return this.rootProvider.get();
};
/**
* Register a new object provider for a particular namespace.