Commit 123cd4b2 authored by Tristan Cavelier's avatar Tristan Cavelier

All job rules changed

parent 7d7f2aeb
...@@ -182,50 +182,62 @@ var jobRules = (function(spec) { ...@@ -182,50 +182,62 @@ var jobRules = (function(spec) {
For more information, see documentation For more information, see documentation
*/ */
var putput = function(job1,job2){ that.addActionRule('post' ,true ,'post' ,that.dontAccept);
if (job1.getCommand().getDocInfo('content') === that.addActionRule('post' ,true ,'put' ,that.wait);
job2.getCommand().getDocInfo('content')) {
return that.dontAccept();
} else {
return that.wait();
}
};
that.addActionRule('post' ,true ,'post', putput);
that.addActionRule('post' ,true ,'put', putput);
that.addActionRule('post' ,true ,'get' ,that.wait); that.addActionRule('post' ,true ,'get' ,that.wait);
that.addActionRule('post' ,true ,'remove' ,that.wait); that.addActionRule('post' ,true ,'remove' ,that.wait);
that.addActionRule('post' ,true ,'putAttachment',that.wait);
that.addActionRule('post' ,false,'post' ,that.update); that.addActionRule('post' ,false,'post' ,that.update);
that.addActionRule('post' ,false,'put' ,that.update); that.addActionRule('post' ,false,'put' ,that.wait);
that.addActionRule('post' ,false,'get' ,that.wait); that.addActionRule('post' ,false,'get' ,that.wait);
that.addActionRule('post' ,false,'remove' ,that.eliminate); that.addActionRule('post' ,false,'remove' ,that.eliminate);
that.addActionRule('post' ,false,'putAttachment',that.wait);
that.addActionRule('put' ,true ,'post', putput); that.addActionRule('put' ,true ,'post' ,that.dontAccept);
that.addActionRule('put' ,true ,'put', putput); that.addActionRule('put' ,true ,'put' ,that.wait);
that.addActionRule('put' ,true ,'get' ,that.wait); that.addActionRule('put' ,true ,'get' ,that.wait);
that.addActionRule('put' ,true ,'remove' ,that.wait); that.addActionRule('put' ,true ,'remove' ,that.wait);
that.addActionRule('put' ,false,'post' ,that.update); that.addActionRule('put' ,true ,'putAttachment',that.wait);
that.addActionRule('put' ,false,'post' ,that.dontAccept);
that.addActionRule('put' ,false,'put' ,that.update); that.addActionRule('put' ,false,'put' ,that.update);
that.addActionRule('put' ,false,'get' ,that.wait); that.addActionRule('put' ,false,'get' ,that.wait);
that.addActionRule('put' ,false,'remove' ,that.eliminate); that.addActionRule('put' ,false,'remove' ,that.eliminate);
that.addActionRule('put' ,false,'putAttachment',that.wait);
that.addActionRule('get' ,true ,'post' ,that.wait); that.addActionRule('get' ,true ,'post' ,that.wait);
that.addActionRule('get' ,true ,'put' ,that.wait); that.addActionRule('get' ,true ,'put' ,that.wait);
that.addActionRule('get' ,true ,'get' ,that.dontAccept); that.addActionRule('get' ,true ,'get' ,that.dontAccept);
that.addActionRule('get' ,true ,'remove' ,that.wait); that.addActionRule('get' ,true ,'remove' ,that.wait);
that.addActionRule('get' ,true ,'putAttachment',that.wait);
that.addActionRule('get' ,false,'post' ,that.wait); that.addActionRule('get' ,false,'post' ,that.wait);
that.addActionRule('get' ,false,'put' ,that.wait); that.addActionRule('get' ,false,'put' ,that.wait);
that.addActionRule('get' ,false,'get' ,that.update); that.addActionRule('get' ,false,'get' ,that.update);
that.addActionRule('get' ,false,'remove' ,that.wait); that.addActionRule('get' ,false,'remove' ,that.wait);
that.addActionRule('get' ,false,'putAttachment',that.wait);
that.addActionRule('remove' ,true ,'post' ,that.wait);
that.addActionRule('remove' ,true ,'get' ,that.dontAccept); that.addActionRule('remove' ,true ,'get' ,that.dontAccept);
that.addActionRule('remove' ,true ,'remove' ,that.dontAccept); that.addActionRule('remove' ,true ,'remove' ,that.dontAccept);
that.addActionRule('remove' ,true ,'putAttachment',that.dontAccept);
that.addActionRule('remove' ,false,'post' ,that.eliminate); that.addActionRule('remove' ,false,'post' ,that.eliminate);
that.addActionRule('remove' ,false,'put' ,that.eliminate); that.addActionRule('remove' ,false,'put' ,that.dontAccept);
that.addActionRule('remove' ,false,'get' ,that.dontAccept); that.addActionRule('remove' ,false,'get' ,that.dontAccept);
that.addActionRule('remove' ,false,'remove' ,that.update); that.addActionRule('remove' ,false,'remove' ,that.update);
that.addActionRule('remove' ,false,'putAttachment',that.dontAccept);
that.addActionRule('allDocs' ,true ,'allDocs' ,that.dontAccept);
that.addActionRule('allDocs' ,false,'allDocs' ,that.update);
that.addActionRule('allDocs',true ,'allDocs',that.dontAccept); that.addActionRule('putAttachment',true ,'post' ,that.dontAccept);
that.addActionRule('allDocs',false,'allDocs',that.update); that.addActionRule('putAttachment',true ,'put' ,that.wait);
that.addActionRule('putAttachment',true ,'get' ,that.wait);
that.addActionRule('putAttachment',true ,'remove' ,that.wait);
that.addActionRule('putAttachment',true ,'putAttachment',that.wait);
that.addActionRule('putAttachment',false,'post' ,that.dontAccept);
that.addActionRule('putAttachment',false,'put' ,that.wait);
that.addActionRule('putAttachment',false,'get' ,that.wait);
that.addActionRule('putAttachment',false,'remove' ,that.eliminate);
that.addActionRule('putAttachment',false,'putAttachment',that.update);
// end adding rules // end adding rules
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
return that; return that;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment