Merge branch 'master' into persist-on-mutation-825

Conflicts:
	platform/core/src/capabilities/PersistenceCapability.js
	platform/features/timeline/src/controllers/swimlane/TimelineSwimlaneDropHandler.js
This commit is contained in:
Victor Woeltjen
2016-05-19 11:41:08 -07:00
817 changed files with 1867 additions and 4586 deletions

View File

@ -19,14 +19,12 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/**
* Module defining CompositionCapability. Created by vwoeltje on 11/7/14.
*/
define(
function () {
"use strict";
/**
* Composition capability. A domain object's composition is the set of

View File

@ -19,7 +19,6 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining ContextCapability. Created by vwoeltje on 11/17/14.
@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* The `context` capability of a domain object (retrievable with

View File

@ -19,7 +19,6 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining ContextualDomainObject. Created by vwoeltje on 11/18/14.
@ -27,7 +26,6 @@
define(
["./ContextCapability"],
function (ContextCapability) {
"use strict";
/**
* Wraps a domain object, such that it exposes a `context` capability.

View File

@ -19,7 +19,6 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining CoreCapabilityProvider. Created by vwoeltje on 11/7/14.
@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* A capability provides an interface with dealing with some

View File

@ -19,7 +19,6 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/**
* Module defining DelegationCapability. Created by vwoeltje on 11/18/14.
@ -27,7 +26,6 @@
define(
[],
function () {
'use strict';
/**

View File

@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
define(
['../objects/DomainObjectImpl'],
function (DomainObjectImpl) {
'use strict';
[],
function () {
/**
* Implements the `instantiation` capability. This allows new domain

View File

@ -1,9 +1,7 @@
/*global define*/
define(
['moment'],
function (moment) {
"use strict";
/**
* A piece of information about a domain object.

View File

@ -19,7 +19,6 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining MutationCapability. Created by vwoeltje on 11/12/14.
@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
var GENERAL_TOPIC = "mutation",
TOPIC_PREFIX = "mutation:";

View File

@ -19,13 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/*jslint es5: true */
define(
function () {
'use strict';
/**
* Defines the `persistence` capability, used to trigger the
@ -64,16 +60,6 @@ define(
this.$q = $q;
}
// Utility function for creating promise-like objects which
// resolve synchronously when possible
function fastPromise(value) {
return (value || {}).then ? value : {
then: function (callback) {
return fastPromise(callback(value));
}
};
}
function getKey(id) {
var parts = id.split(":");
return parts.length > 1 ? parts.slice(1).join(":") : id;
@ -133,9 +119,8 @@ define(
model = domainObject.getModel(),
modified = model.modified,
persisted = model.persisted,
cacheService = this.cacheService,
persistenceService = this.persistenceService,
persistenceFn = model.persisted !== undefined ?
persistenceFn = persisted !== undefined ?
this.persistenceService.updateObject :
this.persistenceService.createObject;
@ -167,8 +152,7 @@ define(
* when the update is complete
*/
PersistenceCapability.prototype.refresh = function () {
var domainObject = this.domainObject,
model = domainObject.getModel();
var domainObject = this.domainObject;
// Update a domain object's model upon refresh
function updateModel(model) {
@ -178,13 +162,10 @@ define(
}, modified);
}
// Only update if we don't have unsaved changes
return (model.modified === model.persisted) ?
this.persistenceService.readObject(
return this.persistenceService.readObject(
this.getSpace(),
this.domainObject.getId()
).then(updateModel) :
fastPromise(false);
).then(updateModel);
};
/**

View File

@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Relationship capability. Describes a domain objects relationship