[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,38 @@
/*global define*/
/**
* Defines the "persistence" capability, used to indicate
* that changes to an object should be written to some
* underlying store.
*
* Current implementation is a stub that simply triggers
* a refresh on modified views, which is a necessary
* side effect of persisting the object.
*/
define(
function () {
'use strict';
function PersistenceCapability(persistenceService, SPACE, domainObject) {
var self = {
persist: function () {
return persistenceService.updateObject(
SPACE,
domainObject.getId(),
domainObject.getModel()
);
},
getSpace: function () {
return SPACE;
},
invoke: function () {
return self;
}
};
return self;
}
return PersistenceCapability;
}
);