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,11 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
define(
function () {
"use strict";
/**
* Actions are reusable processes/behaviors performed by users within

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 ActionCapability. Created by vwoeltje on 11/10/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* The ActionCapability allows applicable Actions to be retrieved and

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 ActionProvider. Created by vwoeltje on 11/7/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* An ActionProvider (implementing ActionService) provides actions

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 LoggingActionDecorator. Created by vwoeltje on 11/17/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* The LoggingActionDecorator decorates an ActionService such that

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

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';
var SEPARATOR = ":";

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(
["uuid", "./Identifier"],
function (uuid, Identifier) {
'use strict';
/**
* Parses and generates domain object identifiers.

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";
/**
* The caching model decorator maintains a cache of loaded domain

View File

@@ -20,11 +20,9 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Adds placeholder domain object models for any models which

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 ModelAggregator. Created by vwoeltje on 11/7/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* Allow domain object models to be looked up by their identifiers.

View File

@@ -19,10 +19,8 @@
* 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';
/**
* Provides a cache for domain object models which exist in memory,

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 PersistedModelProvider. Created by vwoeltje on 11/12/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* A model service which reads domain object models from an external

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 RootModelProvider. Created by vwoeltje on 11/7/14.
@@ -27,7 +26,6 @@
define(
['./StaticModelProvider'],
function (StaticModelProvider) {
"use strict";
/**
* Provides the root object (id = "ROOT"), which is the top-level

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 StaticModelProvider. Created by vwoeltje on 11/7/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* Loads static models, provided as declared extensions of bundles.

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 DomainObject. Created by vwoeltje on 11/7/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* A domain object is an entity of interest to the user.

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*/
/**
* This bundle implements core components of Open MCT Web's service
@@ -29,7 +28,6 @@
define(
[],
function () {
"use strict";
/**
* Provides instances of domain objects, as retrieved by their
@@ -63,7 +61,7 @@ define(
* @memberof platform/core
* @constructor
*/
function DomainObjectProvider(modelService, instantiate, $q) {
function DomainObjectProvider(modelService, instantiate) {
this.modelService = modelService;
this.instantiate = instantiate;
}
@@ -77,7 +75,7 @@ define(
// from this service.
function assembleResult(models) {
var result = {};
ids.forEach(function (id, index) {
ids.forEach(function (id) {
if (models[id]) {
// Create the domain object
result[id] = instantiate(models[id], id);

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(
['../capabilities/ContextualDomainObject'],
function (ContextualDomainObject) {
"use strict";
/**
* Wrap a domain object such that it has a `context` capability

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';
/**
* The `instantiate` service allows new domain object instances to be

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";
/**
* Defines the `now` service, which is a simple wrapper upon

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";
/**
* Throttler for function executions, registered as the `throttle`

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";
var ERROR_PREFIX = "Error when notifying listener: ";

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*/
/**
* Defines MergedModel, which allows a deep merge of domain object
@@ -28,7 +27,6 @@
*/
define(
function () {
'use strict';
/**
* Utility function for merging domain object models (or any

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 TypeCapability. Created by vwoeltje on 11/10/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* The `type` capability makes information about a domain object's

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(
['./TypeProperty'],
function (TypeProperty) {
"use strict";
/**
* Describes a type of domain object.

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(
['./TypePropertyConversion'],
function (TypePropertyConversion) {
'use strict';
/**
* Instantiate a property associated with domain objects of a

View File

@@ -19,11 +19,9 @@
* 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';
var conversions = {

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(
['./TypeImpl', './MergeModels'],
function (TypeImpl, mergeModels) {
'use strict';
/**
* Provides domain object types that are available/recognized within

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 ViewCapability. Created by vwoeltje on 11/10/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* A `view` capability can be used to retrieve an array 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 ViewProvider. Created by vwoeltje on 11/10/14.
@@ -27,7 +26,6 @@
define(
[],
function () {
"use strict";
/**
* Provides definitions for views that are available for specific