|
106 | 106 | *
|
107 | 107 | * @param {String} nodeId the node id
|
108 | 108 | * @param [String] offset path
|
109 |
| - * @param [String] params |
| 109 | + * @param [Object] params |
110 | 110 | */
|
111 | 111 | readNode: function(nodeId, path, params)
|
112 | 112 | {
|
|
444 | 444 | * @hcained branch
|
445 | 445 | *
|
446 | 446 | * @param nodeIds
|
| 447 | + * @param options |
447 | 448 | *
|
448 | 449 | * @returns Gitana.Branch
|
449 | 450 | */
|
450 |
| - deleteNodes: function(nodeIds) |
| 451 | + deleteNodes: function(nodeIds, options) |
451 | 452 | {
|
452 | 453 | var self = this;
|
453 | 454 |
|
|
456 | 457 | return self.getUri() + "/nodes/delete";
|
457 | 458 | };
|
458 | 459 |
|
459 |
| - return this.chainPost(this, uriFunction, {}, { |
| 460 | + var params = {}; |
| 461 | + if (options && options.undeploy) |
| 462 | + { |
| 463 | + params.undeploy = options.undeploy; |
| 464 | + } |
| 465 | + |
| 466 | + return this.chainPost(this, uriFunction, params, { |
460 | 467 | "_docs": nodeIds
|
461 | 468 | });
|
462 | 469 | },
|
|
1571 | 1578 | return this.getUri() + "/history/start";
|
1572 | 1579 | };
|
1573 | 1580 |
|
| 1581 | + return this.chainPostResponse(this, uriFunction, params).then(function(response) { |
| 1582 | + |
| 1583 | + var jobId = response._doc; |
| 1584 | + |
| 1585 | + callback(jobId); |
| 1586 | + }); |
| 1587 | + }, |
| 1588 | + |
| 1589 | + /** |
| 1590 | + * Starts the branch validation job (looking for issues with relator mappings) |
| 1591 | + * |
| 1592 | + * @public |
| 1593 | + * |
| 1594 | + * @param repair {boolean} |
| 1595 | + * @param callback {function} |
| 1596 | + */ |
| 1597 | + startValidation: function(repair, callback) |
| 1598 | + { |
| 1599 | + var params = {}; |
| 1600 | + |
| 1601 | + if(repair){ |
| 1602 | + params.repair = repair; |
| 1603 | + } |
| 1604 | + |
| 1605 | + var uriFunction = function() |
| 1606 | + { |
| 1607 | + return this.getUri() + "/validate/start"; |
| 1608 | + }; |
| 1609 | + |
1574 | 1610 | return this.chainPostResponse(this, uriFunction, params).then(function(response) {
|
1575 | 1611 |
|
1576 | 1612 | var jobId = response._doc;
|
|
0 commit comments