[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
@@ -31,6 +31,8 @@ define(
|
||||
* deep copy an object to another location of their choosing.
|
||||
*
|
||||
* @implements Action
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function CopyAction(locationService, copyService, context) {
|
||||
|
||||
@@ -90,3 +92,4 @@ define(
|
||||
return CopyAction;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ define(
|
||||
* link an object to another location of their choosing.
|
||||
*
|
||||
* @implements Action
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function LinkAction(locationService, linkService, context) {
|
||||
|
||||
@@ -87,3 +89,4 @@ define(
|
||||
return LinkAction;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ define(
|
||||
* move an object to another location of their choosing.
|
||||
*
|
||||
* @implements Action
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function MoveAction(locationService, moveService, context) {
|
||||
|
||||
@@ -88,3 +90,4 @@ define(
|
||||
return MoveAction;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ define(
|
||||
* CopyService provides an interface for deep copying objects from one
|
||||
* location to another. It also provides a method for determining if
|
||||
* an object can be copied to a specific location.
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function CopyService($q, creationService, policyService) {
|
||||
|
||||
@@ -46,6 +48,7 @@ define(
|
||||
* create the duplicate in.
|
||||
* @returns {Promise} A promise that is fulfilled when the
|
||||
* duplicate operation has completed.
|
||||
* @memberof platform/entanglement.CopyService#
|
||||
*/
|
||||
function duplicateObject(domainObject, parent) {
|
||||
var model = JSON.parse(JSON.stringify(domainObject.getModel()));
|
||||
@@ -78,6 +81,7 @@ define(
|
||||
/**
|
||||
* Returns true if `object` can be copied into
|
||||
* `parentCandidate`'s composition.
|
||||
* @memberof platform/entanglement.CopyService#
|
||||
*/
|
||||
validate: function (object, parentCandidate) {
|
||||
if (!parentCandidate || !parentCandidate.getId) {
|
||||
@@ -94,6 +98,7 @@ define(
|
||||
},
|
||||
/**
|
||||
* Wrapper, @see {@link duplicateObject} for implementation.
|
||||
* @memberof platform/entanglement.CopyService#
|
||||
*/
|
||||
perform: function (object, parentObject) {
|
||||
return duplicateObject(object, parentObject);
|
||||
@@ -104,3 +109,4 @@ define(
|
||||
return CopyService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,12 +30,15 @@ define(
|
||||
* LinkService provides an interface for linking objects to additional
|
||||
* locations. It also provides a method for determining if an object
|
||||
* can be copied to a specific location.
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function LinkService(policyService) {
|
||||
return {
|
||||
/**
|
||||
* Returns `true` if `object` can be linked into
|
||||
* `parentCandidate`'s composition.
|
||||
* @memberof platform/entanglement.LinkService#
|
||||
*/
|
||||
validate: function (object, parentCandidate) {
|
||||
if (!parentCandidate || !parentCandidate.getId) {
|
||||
@@ -58,6 +61,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} A promise that is fulfilled when the
|
||||
* linking operation has completed.
|
||||
* @memberof platform/entanglement.LinkService#
|
||||
*/
|
||||
perform: function (object, parentObject) {
|
||||
return parentObject.useCapability('mutation', function (model) {
|
||||
@@ -74,3 +78,4 @@ define(
|
||||
return LinkService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ define(
|
||||
/**
|
||||
* The LocationService allows for easily prompting the user for a
|
||||
* location in the root tree.
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function LocationService(dialogService) {
|
||||
return {
|
||||
@@ -43,6 +45,7 @@ define(
|
||||
* @param {domainObject} initialLocation - tree location to
|
||||
* display at start
|
||||
* @returns {Promise} promise for a domain object.
|
||||
* @memberof platform/entanglement.LocationService#
|
||||
*/
|
||||
getLocationFromUser: function (title, label, validate, initialLocation) {
|
||||
var formStructure,
|
||||
@@ -81,3 +84,4 @@ define(
|
||||
return LocationService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,12 +30,15 @@ define(
|
||||
* MoveService provides an interface for moving objects from one
|
||||
* location to another. It also provides a method for determining if
|
||||
* an object can be copied to a specific location.
|
||||
* @constructor
|
||||
* @memberof platform/entanglement
|
||||
*/
|
||||
function MoveService(policyService, linkService) {
|
||||
return {
|
||||
/**
|
||||
* Returns `true` if `object` can be moved into
|
||||
* `parentCandidate`'s composition.
|
||||
* @memberof platform/entanglement.MoveService#
|
||||
*/
|
||||
validate: function (object, parentCandidate) {
|
||||
var currentParent = object
|
||||
@@ -65,6 +68,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} A promise that is fulfilled when the
|
||||
* move operation has completed.
|
||||
* @memberof platform/entanglement.MoveService#
|
||||
*/
|
||||
perform: function (object, parentObject) {
|
||||
return linkService
|
||||
@@ -81,3 +85,4 @@ define(
|
||||
return MoveService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user