Skip to content

Commit 01f508f

Browse files
committed
# Conflicts: # bower.json # component.json # package.json
2 parents 3ec80ff + a8e5b07 commit 01f508f

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

js/gitana/repository/Branch.js

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
*
107107
* @param {String} nodeId the node id
108108
* @param [String] offset path
109-
* @param [String] params
109+
* @param [Object] params
110110
*/
111111
readNode: function(nodeId, path, params)
112112
{
@@ -444,10 +444,11 @@
444444
* @hcained branch
445445
*
446446
* @param nodeIds
447+
* @param options
447448
*
448449
* @returns Gitana.Branch
449450
*/
450-
deleteNodes: function(nodeIds)
451+
deleteNodes: function(nodeIds, options)
451452
{
452453
var self = this;
453454

@@ -456,7 +457,13 @@
456457
return self.getUri() + "/nodes/delete";
457458
};
458459

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, {
460467
"_docs": nodeIds
461468
});
462469
},
@@ -1571,6 +1578,35 @@
15711578
return this.getUri() + "/history/start";
15721579
};
15731580

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+
15741610
return this.chainPostResponse(this, uriFunction, params).then(function(response) {
15751611

15761612
var jobId = response._doc;

0 commit comments

Comments
 (0)