Move check for composition up higher in the sequence of
if-blocks in the validation step of linking; remove
fallback to [] for undefined composition, which is no
longer necessary as a consequence of this.
nasa/openmctweb#98
Remove redundant test case; modify composition-checking
test case to expose correct capability information.
In response to feedback from nasa/openmctweb#98
Reoder validation to consider the composition capability
first; refactor to express as a single expression to clarify
validation logic (explicitly say 'and' instead of implying
it with control flow.)
Based on feedback from nasa/openmctweb#98
Separate out location property from the CreationService,
instead handle in the entanglement bundle; this is
consistent with changes for identity management (attaching
a creator to newly-created domain object models).
for nasa/openmctweb#92
Merge in latest in preparation to merge; WTD-1482
Conflicts:
platform/commonUI/browse/src/creation/CreationService.js
platform/core/src/models/RootModelProvider.js
platform/entanglement/src/services/LinkService.js
platform/entanglement/src/services/MoveService.js
Clarify naming of method for retrieving contextual location of a domain
object.
Default behavior for objects that do not have a context is to return
undefined. Note that default behavior is not specified and could change
if needed.
Use the parent id as the location for a model.
This greatly reduces the recursive work that must be done
during move operations to keep the location accurate.
Additionally, the locationService now implements a method
`persistLocation` which can be used to persist the current object
location as it's original location.
When moving an object that supports composition, child objects which
are originals must have their location updated as well. Children which
are links should not have their location updated, nor should any of
their children be updated.
MockLinkService.perform returns a promise for the linked domainObject.
When resolving the promise and not specifying an object to resolve it
with, it will resolve it with the domainObject that was originally
passed to it.
DomainObjects with a context capability also gain a LocationCapability.
This capability allows you to determine the location of the current
instance of a domain object, and also provides methods for determining
if the current instance of a domain object is a link, or if it is an
original.
The entanglement bundle defines move, copy, and link actions, and
exposes them as context menu actions.
* The Move action moves an object from it's current parent to a new
parent object.
* The Copy action deep-copies an object to a new parent object.
* The Link action links an object to a new parent object.
These actions are implemented by three new services: moveService,
copyService, and linkService.
Mocks are provided for each service for easy testing of components
that depend on them.
Additionally, this bundle provides a DomainObjectFactory that simplifies
the construction of mockDomainObjects for tests.
These actions are exposed to the user as context menu options.