[Core] Bring in core bundle from sandbox

Bring in bundle platform/core from the sandbox
branch, in preparation for clean up, tests, and
integration. WTD-573
This commit is contained in:
Victor Woeltjen
2014-11-20 12:58:21 -08:00
parent c50ca2e92b
commit 0fdce798f7
38 changed files with 2914 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/*global define,Promise*/
/**
* Module defining PersistedModelProvider. Created by vwoeltje on 11/12/14.
*/
define(
[],
function () {
"use strict";
/**
*
* @constructor
*/
function PersistedModelProvider(persistenceService, $q, SPACE) {
function promiseModels(ids) {
return $q.all(ids.map(function (id) {
return persistenceService.readObject(SPACE, id);
})).then(function (models) {
var result = {};
ids.forEach(function (id, index) {
result[id] = models[index];
});
return result;
});
}
return {
getModels: promiseModels
};
}
return PersistedModelProvider;
}
);