00001
00002
00003 #include "reGlobalsExtern.h"
00004 #include "icatHighLevelRoutines.h"
00005 #include "rsGlobalExtern.h"
00006 #include "dataObjCreate.h"
00007 #include "objMetaOpr.h"
00008 #include "regDataObj.h"
00009
00010 #include "miscServerFunct.h"
00011
00012
00013 int
00014 msiGetClosestResourceToClient(ruleExecInfo_t *rei)
00015 {
00016
00017 if (reTestFlag > 0 ) {
00018 if (reTestFlag == LOG_TEST_1)
00019 rodsLog (LOG_NOTICE," Calling GetClosestResourceToClient\n");
00020 if (strlen(rei->uoic->authInfo.host) != 0 && strcmp(rei->uoic->authInfo.host,"null")) {
00021 sprintf(rei->doi->rescName,"closest-resource-to-%s",rei->uoic->authInfo.host);
00022 if (reLoopBackFlag > 0)
00023 return(0);
00024 }
00025 else {
00026 if (reLoopBackFlag > 0)
00027 return(ACTION_FAILED_ERR);
00028 }
00029 }
00030
00031 return(ACTION_FAILED_ERR);
00032 }
00033
00034
00035 int
00036 msiNullAction(ruleExecInfo_t *rei)
00037 {
00038 return(0);
00039 }
00040
00041
00042
00043 int
00044 msiDeleteData(ruleExecInfo_t *rei)
00045 {
00046
00047
00048 if (reTestFlag > 0 ) {
00049 if (reTestFlag == COMMAND_TEST_1 || reTestFlag == HTML_TEST_1) {
00050 print_doi(rei->doi);
00051 }
00052 else {
00053 rodsLog (LOG_NOTICE," Calling chlDelDataObj\n");
00054 print_doi(rei->doi);
00055 }
00056 if (reLoopBackFlag > 0)
00057 return(0);
00058 }
00059
00060
00061 return(0);
00062
00063 }
00064
00065 int
00066 recover_msiDeleteData(ruleExecInfo_t *rei)
00067 {
00068
00069
00070 if (reTestFlag > 0 ) {
00071 if (reTestFlag == LOG_TEST_1)
00072 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_chlDelDataObj\n");
00073 if (reLoopBackFlag > 0)
00074 return(0);
00075 }
00076
00077
00078 return(0);
00079
00080 }
00081
00082 int
00083 msiInheritCollACL(ruleExecInfo_t *rei)
00084 {
00085
00086
00087 char logicalFileName[MAX_NAME_LEN];
00088 char logicalDirName[MAX_NAME_LEN];
00089
00090 splitPathByKey(rei->doi->objPath,
00091 logicalDirName, logicalFileName, '/');
00092 if (reTestFlag > 0) {
00093 if (reTestFlag == LOG_TEST_1) {
00094 rodsLog (LOG_NOTICE," Calling chlInheritCollACL\n");
00095 rodsLog (LOG_NOTICE," From Coll = %s\n",logicalDirName);
00096 }
00097 if (reLoopBackFlag > 0)
00098 return(0);
00099 }
00100
00101
00102 return(0);
00103
00104 }
00105
00106 int
00107 recover_msiInheritCollACL(ruleExecInfo_t *rei)
00108 {
00109
00110
00111 if (reTestFlag > 0 ) {
00112 if (reTestFlag == LOG_TEST_1)
00113 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiInheritCollACL\n");
00114 if (reLoopBackFlag > 0)
00115 return(0);
00116 }
00117
00118
00119 return(0);
00120
00121 }
00122
00123 int
00124 msiInheritDescriptiveMetadataFromColl(ruleExecInfo_t *rei)
00125 {
00126
00127
00128 char logicalFileName[MAX_NAME_LEN];
00129 char logicalDirName[MAX_NAME_LEN];
00130
00131 if (reTestFlag > 0 ) {
00132 if (reTestFlag == LOG_TEST_1) {
00133 splitPathByKey(rei->doi->objPath,
00134 logicalDirName, logicalFileName, '/');
00135 rodsLog (LOG_NOTICE," Calling chlInheritDescriptiveMetadataFromColl\n");
00136 rodsLog (LOG_NOTICE," From Coll = %s\n",logicalDirName);
00137 }
00138 if (reLoopBackFlag > 0)
00139 return(0);
00140 }
00141
00142
00143 return(0);
00144
00145 }
00146
00147 int
00148 recover_msiInheritDescriptiveMetadataFromColl(ruleExecInfo_t *rei)
00149 {
00150
00151
00152 if (reTestFlag > 0 ) {
00153 if (reTestFlag == LOG_TEST_1)
00154 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiInheritDescriptiveMetadataFromColl\n");
00155 if (reLoopBackFlag > 0)
00156 return(0);
00157 }
00158
00159 return(0);
00160
00161 }
00162 int
00163 msiComputeChecksum(ruleExecInfo_t *rei)
00164 {
00165
00166
00167 if (reTestFlag > 0 ) {
00168 if (reTestFlag == LOG_TEST_1)
00169 rodsLog (LOG_NOTICE," Calling msiComputeChecksum\n");
00170 if (reLoopBackFlag > 0)
00171 return(0);
00172 }
00173
00174
00175 return(0);
00176
00177 }
00178
00179 int
00180 recover_msiComputeChecksum(ruleExecInfo_t *rei)
00181 {
00182
00183
00184 if (reTestFlag > 0 ) {
00185 if (reTestFlag == LOG_TEST_1)
00186 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiComputeChecksum\n");
00187 if (reLoopBackFlag > 0)
00188 return(0);
00189 }
00190
00191
00192 return(0);
00193
00194 }
00195
00196
00197 int
00198 msiAddACLForDataToUser(msParam_t* xuser, msParam_t* xaccess, ruleExecInfo_t *rei)
00199 {
00200
00201 char *user, *access;
00202
00203 user = (char *) xuser->inOutStruct;
00204 access= (char *) xaccess->inOutStruct;
00205
00206 if (reTestFlag > 0 ) {
00207 if (reTestFlag == LOG_TEST_1) {
00208 rodsLog (LOG_NOTICE," Calling msiAddACLForDataToUser to add Access Control\n");
00209 rodsLog (LOG_NOTICE," To User = %s With Access = %s\n",user,access);
00210 }
00211 if (reLoopBackFlag > 0)
00212 return(0);
00213 }
00214
00215
00216 return(0);
00217
00218 }
00219
00220 int
00221 recover_msiAddACLForDataToUser(msParam_t* xuser, msParam_t* xaccess, ruleExecInfo_t *rei)
00222 {
00223
00224 char *user, *access;
00225
00226 user = (char *) xuser->inOutStruct;
00227 access= (char *) xaccess->inOutStruct;
00228
00229 if (reTestFlag > 0 ) {
00230 if (reTestFlag == LOG_TEST_1)
00231 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiAddACLForDataToUser\n");
00232 if (reLoopBackFlag > 0)
00233 return(0);
00234 }
00235
00236
00237 return(0);
00238
00239 }
00240
00241
00242
00243
00244 int
00245 msiTurnAuditTrailOn(ruleExecInfo_t *rei)
00246 {
00247
00248 if (reTestFlag > 0 ) {
00249 if (reTestFlag == LOG_TEST_1)
00250 rodsLog (LOG_NOTICE," Calling TurnAuditTrailOn\n");
00251 if (reLoopBackFlag > 0)
00252 return(0);
00253 }
00254
00255
00256 return(0);
00257
00258 }
00259
00260 int
00261 recover_msiTurnAuditTrailOn(ruleExecInfo_t *rei)
00262 {
00263
00264
00265 if (reTestFlag > 0 ) {
00266 if (reTestFlag == LOG_TEST_1)
00267 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiTurnAuditTrailOn\n");
00268 if (reLoopBackFlag > 0)
00269 return(0);
00270 }
00271
00272
00273 return(0);
00274 }
00275
00276 int
00277 msiTurnAuditTrailOff(ruleExecInfo_t *rei)
00278 {
00279
00280 if (reTestFlag > 0 ) {
00281 if (reTestFlag == LOG_TEST_1)
00282 rodsLog (LOG_NOTICE," Calling TurnAuditTrailOff\n");
00283 if (reLoopBackFlag > 0)
00284 return(0);
00285 }
00286
00287
00288 return(0);
00289
00290 }
00291
00292 int
00293 recover_msiTurnAuditTrailOff(ruleExecInfo_t *rei)
00294 {
00295
00296
00297 if (reTestFlag > 0 ) {
00298 if (reTestFlag == LOG_TEST_1)
00299 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiTurnAuditTrailOff\n");
00300 if (reLoopBackFlag > 0)
00301 return(0);
00302 }
00303
00304
00305 return(0);
00306 }
00307
00308 int
00309 msiGetDefaultResourceForData(ruleExecInfo_t *rei)
00310 {
00311
00312 if (reTestFlag > 0 ) {
00313 if (reTestFlag == LOG_TEST_1)
00314 rodsLog (LOG_NOTICE," Calling GetDefaultResourceForData\n");
00315 strcpy(rei->doi->rescName,"default-resource");
00316 if (reLoopBackFlag > 0)
00317 return(0);
00318 }
00319
00320 strcpy(rei->doi->rescName,"default-resource");
00321 return(0);
00322 }
00323
00324 int msiExtractMetadataForFitsImage(ruleExecInfo_t *rei)
00325 {
00326
00327 if (reTestFlag > 0 ) {
00328 if (reTestFlag == LOG_TEST_1)
00329 rodsLog (LOG_NOTICE," Calling ExtractMetadataForFitsImage\n");
00330 if (reLoopBackFlag > 0)
00331 return(0);
00332 }
00333
00334 return(0);
00335 }
00336
00337 int msiExtractMetadataForDicomData(ruleExecInfo_t *rei)
00338 {
00339
00340 if (reTestFlag > 0 ) {
00341 if (reTestFlag == LOG_TEST_1)
00342 rodsLog (LOG_NOTICE," Calling ExtractMetadataForDicomData\n");
00343 if (reLoopBackFlag > 0)
00344 return(0);
00345 }
00346
00347 return(0);
00348 }
00349
00350 int msiExtractMetadataForEmail(ruleExecInfo_t *rei)
00351 {
00352
00353 if (reTestFlag > 0 ) {
00354 if (reTestFlag == LOG_TEST_1)
00355 rodsLog (LOG_NOTICE," Calling ExtractMetadataForEmail\n");
00356 if (reLoopBackFlag > 0)
00357 return(0);
00358 }
00359
00360 return(0);
00361 }
00362
00363 int msiExtractMetadataForCongressionalRecords(ruleExecInfo_t *rei)
00364 {
00365
00366 if (reTestFlag > 0 ) {
00367 if (reTestFlag == LOG_TEST_1)
00368 rodsLog (LOG_NOTICE," Calling ExtractMetadataForCongressionalRecords\n");
00369 if (reLoopBackFlag > 0)
00370 return(0);
00371 }
00372
00373 return(0);
00374 }
00375
00376 int msiCheckQuota(ruleExecInfo_t *rei)
00377 {
00378
00379 if (reTestFlag > 0 ) {
00380 if (reTestFlag == LOG_TEST_1)
00381 rodsLog (LOG_NOTICE," Calling CheckQuota\n");
00382 if (reLoopBackFlag > 0)
00383 return(0);
00384 }
00385
00386 return(0);
00387 }
00388
00389 int msiReplicateData(msParam_t* xrescName, ruleExecInfo_t *rei)
00390 {
00391 char *rescName;
00392
00393 rescName = (char *) xrescName->inOutStruct;
00394
00395
00396 if (reTestFlag > 0 ) {
00397 if (reTestFlag == LOG_TEST_1) {
00398 rodsLog (LOG_NOTICE," Calling ReplicateData\n");
00399 rodsLog (LOG_NOTICE," in Resc = %\n",rescName);
00400 }
00401 if (reLoopBackFlag > 0)
00402 return(0);
00403 }
00404
00405 return(0);
00406 }
00407
00408 int msiNotifyByEmail(msParam_t* xemail, msParam_t* xmessage, ruleExecInfo_t *rei)
00409 {
00410 char *email;
00411 char *message;
00412
00413 email = (char *) xemail->inOutStruct;
00414 message = (char *) xmessage->inOutStruct;
00415
00416
00417
00418 if (reTestFlag > 0 ) {
00419 if (reTestFlag == LOG_TEST_1) {
00420 rodsLog (LOG_NOTICE," Calling msiNotifyByEmail\n");
00421 rodsLog (LOG_NOTICE," To Email=%s With Message =%s",email,message);
00422 }
00423 if (reLoopBackFlag > 0)
00424 return(0);
00425 }
00426
00427 return(0);
00428 }
00429
00430 int msiLinkObjectToCollection(msParam_t* xcollName, ruleExecInfo_t *rei)
00431 {
00432 char *collName;
00433
00434 collName = (char *) xcollName->inOutStruct;
00435
00436 if (reTestFlag > 0 ) {
00437 if (reTestFlag == LOG_TEST_1) {
00438 rodsLog (LOG_NOTICE," Calling LinkObjectToCollection\n");
00439 rodsLog (LOG_NOTICE," To Collection=%s",collName);
00440 }
00441 if (reLoopBackFlag > 0)
00442 return(0);
00443 }
00444
00445 return(0);
00446 }
00447
00448 int msiCreateThumbNail(msParam_t* xrescName, ruleExecInfo_t *rei)
00449 {
00450 char *rescName;
00451
00452 rescName = (char *) xrescName->inOutStruct;
00453
00454 if (reTestFlag > 0 ) {
00455 if (reTestFlag == LOG_TEST_1) {
00456 rodsLog (LOG_NOTICE," Calling CreateThumbNail\n");
00457 rodsLog (LOG_NOTICE," To Resc = %\n",rescName);
00458 }
00459 if (reLoopBackFlag > 0)
00460 return(0);
00461 }
00462
00463 return(0);
00464 }
00465
00466 int msiCreateAbstract(msParam_t* xrescName, ruleExecInfo_t *rei)
00467 {
00468 char *rescName;
00469
00470 rescName = (char *) xrescName->inOutStruct;
00471
00472 if (reTestFlag > 0 ) {
00473 if (reTestFlag == LOG_TEST_1) {
00474 rodsLog (LOG_NOTICE," Calling CreateAbstract\n");
00475 rodsLog (LOG_NOTICE," To Resc = %\n",rescName);
00476 }
00477 if (reLoopBackFlag > 0)
00478 return(0);
00479 }
00480
00481 return(0);
00482 }
00483
00484
00485 int msiOutSource(msParam_t* xremoteHostInfo, msParam_t* xactionList, ruleExecInfo_t *rei)
00486 {
00487 char *remoteHostInfo;
00488 char *actionList;
00489
00490 remoteHostInfo = (char *) xremoteHostInfo->inOutStruct;
00491 actionList = (char *) xactionList->inOutStruct;
00492
00493
00494 if (reTestFlag > 0 ) {
00495 if (reTestFlag == COMMAND_TEST_1) {
00496 fprintf(stdout," OutSourcing Execution for %s to Host %s \n",actionList, remoteHostInfo);
00497 }
00498 else if (reTestFlag == HTML_TEST_1) {
00499 fprintf(stdout,">>>>OutSourcing Execution of %s to Host %s<BR>\n",actionList, remoteHostInfo);
00500 }
00501 else if (reTestFlag == LOG_TEST_1) {
00502 rodsLog (LOG_NOTICE," Calling msiOutSource\n");
00503 rodsLog (LOG_NOTICE," For Actions = %s\n",actionList);
00504 rodsLog (LOG_NOTICE," To Host = %s\n",remoteHostInfo);
00505 }
00506 if (reLoopBackFlag > 0)
00507 return(0);
00508 }
00509
00510 return(0);
00511 }
00512
00513 int msiAsynchExecution(msParam_t* xactionList, ruleExecInfo_t *rei)
00514 {
00515 char *actionList;
00516
00517 actionList = (char *) xactionList->inOutStruct;
00518
00519
00520 if (reTestFlag > 0 ) {
00521 if (reTestFlag == COMMAND_TEST_1) {
00522 fprintf(stdout," Initiating Asynchronous Execution for %s \n",actionList);
00523 }
00524 else if (reTestFlag == HTML_TEST_1) {
00525 fprintf(stdout,">>>>Initiating Asynchronous Execution for %s<BR>\n",actionList);
00526 }
00527 else if (reTestFlag == LOG_TEST_1) {
00528 rodsLog (LOG_NOTICE," Calling msiAsynchExecution\n");
00529 rodsLog (LOG_NOTICE," For Actions = %s\n",actionList);
00530 }
00531 if (reLoopBackFlag > 0)
00532 return(0);
00533 }
00534
00535 return(0);
00536 }
00537
00538 int msiParallelExecution(msParam_t* xactionList, ruleExecInfo_t *rei)
00539 {
00540 char *actionList;
00541
00542 actionList = (char *) xactionList->inOutStruct;
00543
00544
00545 if (reTestFlag > 0 ) {
00546 if (reTestFlag == COMMAND_TEST_1) {
00547 fprintf(stdout," Initiating Parallel Execution for %s \n",actionList);
00548 }
00549 else if (reTestFlag == HTML_TEST_1) {
00550 fprintf(stdout,">>>>Initiating Parallel Execution for %s<BR>\n",actionList);
00551 }
00552 else if (reTestFlag == LOG_TEST_1) {
00553 rodsLog (LOG_NOTICE," Calling msiParallelExecution\n");
00554 rodsLog (LOG_NOTICE," For Actions = %s\n",actionList);
00555 }
00556 if (reLoopBackFlag > 0)
00557 return(0);
00558 }
00559
00560 return(0);
00561 }
00562
00563 int orExec(msParam_t* xactionList, msParam_t *orSuccNum, ruleExecInfo_t *rei)
00564 {
00565 char *actionList;
00566
00567 actionList = (char *) xactionList->inOutStruct;
00568
00569
00570 if (reTestFlag > 0 ) {
00571 if (reTestFlag == COMMAND_TEST_1) {
00572 fprintf(stdout," Initiating Disjunctive Execution for %s \n",actionList);
00573 }
00574 else if (reTestFlag == HTML_TEST_1) {
00575 fprintf(stdout,">>>>Initiating Disjunctive Execution for %s<BR>\n",actionList);
00576 }
00577 else if (reTestFlag == LOG_TEST_1) {
00578 rodsLog (LOG_NOTICE," Calling orExec\n");
00579 rodsLog (LOG_NOTICE," For Actions = %s\n",actionList);
00580 }
00581 if (reLoopBackFlag > 0)
00582 return(0);
00583 }
00584
00585 return(0);
00586 }
00587
00588
00589 int notExec(msParam_t* xactionList, ruleExecInfo_t *rei)
00590 {
00591
00592 char *actionList;
00593
00594 actionList = (char *) xactionList->inOutStruct;
00595
00596
00597 if (reTestFlag > 0 ) {
00598 if (reTestFlag == COMMAND_TEST_1) {
00599 fprintf(stdout," Initiating Negation Execution for %s \n",actionList);
00600 }
00601 else if (reTestFlag == HTML_TEST_1) {
00602 fprintf(stdout,">>>>Initiating Negation Execution for %s<BR>\n",actionList);
00603 }
00604 else if (reTestFlag == LOG_TEST_1) {
00605 rodsLog (LOG_NOTICE," Calling notExec\n");
00606 rodsLog (LOG_NOTICE," For Actions = %s\n",actionList);
00607 }
00608 if (reLoopBackFlag > 0)
00609 return(0);
00610 }
00611
00612 return(0);
00613 }
00614
00615
00616 int recover_msiExtractMetadataForFitsImage(ruleExecInfo_t *rei)
00617 {
00618
00619 if (reTestFlag > 0 ) {
00620 if (reTestFlag == LOG_TEST_1)
00621 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiExtractMetadataForFitsImage\n");
00622 if (reLoopBackFlag > 0)
00623 return(0);
00624 }
00625
00626 return(0);
00627 }
00628
00629 int recover_msiExtractMetadataForDicomData(ruleExecInfo_t *rei)
00630 {
00631
00632 if (reTestFlag > 0 ) {
00633 if (reTestFlag == LOG_TEST_1)
00634 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiExtractMetadataForDicomData\n");
00635 if (reLoopBackFlag > 0)
00636 return(0);
00637 }
00638
00639 return(0);
00640 }
00641
00642 int recover_msiExtractMetadataForEmail(ruleExecInfo_t *rei)
00643 {
00644
00645 if (reTestFlag > 0 ) {
00646 if (reTestFlag == LOG_TEST_1)
00647 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiExtractMetadataForEmail\n");
00648 if (reLoopBackFlag > 0)
00649 return(0);
00650 }
00651
00652 return(0);
00653 }
00654
00655 int recover_msiExtractMetadataForCongressionalRecords(ruleExecInfo_t *rei)
00656 {
00657
00658 if (reTestFlag > 0 ) {
00659 if (reTestFlag == LOG_TEST_1)
00660 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiExtractMetadataForCongressionalRecords\n");
00661 if (reLoopBackFlag > 0)
00662 return(0);
00663 }
00664
00665 return(0);
00666 }
00667
00668 int recover_msiCheckQuota(ruleExecInfo_t *rei)
00669 {
00670
00671 if (reTestFlag > 0 ) {
00672 if (reTestFlag == LOG_TEST_1)
00673 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiCheckQuota\n");
00674 if (reLoopBackFlag > 0)
00675 return(0);
00676 }
00677
00678 return(0);
00679 }
00680
00681 int recover_msiReplicateData(msParam_t* xrescName, ruleExecInfo_t *rei)
00682 {
00683 char *rescName;
00684
00685 rescName = (char *) xrescName->inOutStruct;
00686
00687 if (reTestFlag > 0 ) {
00688 if (reTestFlag == LOG_TEST_1)
00689 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiReplicateData\n");
00690 if (reLoopBackFlag > 0)
00691 return(0);
00692 }
00693
00694 return(0);
00695 }
00696
00697 int recover_msiNotifyByEmail(msParam_t* xemail, msParam_t* xmessage, ruleExecInfo_t *rei)
00698 {
00699 char *email;
00700 char *message;
00701
00702 email = (char *) xemail->inOutStruct;
00703 message = (char *) xmessage->inOutStruct;
00704
00705 if (reTestFlag > 0 ) {
00706 if (reTestFlag == LOG_TEST_1)
00707 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiNotifyByEmail\n");
00708 if (reLoopBackFlag > 0)
00709 return(0);
00710 }
00711
00712 return(0);
00713 }
00714
00715 int recover_msiLinkObjectToCollection(msParam_t* xcollName, ruleExecInfo_t *rei)
00716 {
00717 char *collName;
00718
00719 collName = (char *) xcollName->inOutStruct;
00720
00721 if (reTestFlag > 0 ) {
00722 if (reTestFlag == LOG_TEST_1)
00723 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiLinkObjectToCollection\n");
00724 if (reLoopBackFlag > 0)
00725 return(0);
00726 }
00727
00728 return(0);
00729 }
00730
00731 int recover_msiCreateThumbNail(msParam_t* xrescName, ruleExecInfo_t *rei)
00732 {
00733 char *rescName;
00734
00735 rescName = (char *) xrescName->inOutStruct;
00736
00737 if (reTestFlag > 0 ) {
00738 if (reTestFlag == LOG_TEST_1)
00739 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiCreateThumbNail\n");
00740 if (reLoopBackFlag > 0)
00741 return(0);
00742 }
00743
00744 return(0);
00745 }
00746
00747 int recover_msiCreateAbstract(msParam_t* xrescName, ruleExecInfo_t *rei)
00748 {
00749 char *rescName;
00750
00751 rescName = (char *) xrescName->inOutStruct;
00752
00753 if (reTestFlag > 0 ) {
00754 if (reTestFlag == LOG_TEST_1)
00755 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiCreateAbstract\n");
00756 if (reLoopBackFlag > 0)
00757 return(0);
00758 }
00759
00760 return(0);
00761 }
00762
00763 int recover_msiSendMail(msParam_t* xtoAddr, msParam_t* xsubjectLine, msParam_t* xbody, ruleExecInfo_t *rei)
00764 {
00765 char *toAddr;
00766 char *subjectLine;
00767 char *body;
00768
00769 toAddr = (char *) xtoAddr->inOutStruct;
00770 subjectLine = (char *) xsubjectLine->inOutStruct;
00771 body = (char *) xbody->inOutStruct;
00772
00773 if (reTestFlag > 0 ) {
00774 if (reTestFlag == LOG_TEST_1)
00775 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiSendMailCollByAdmin\n");
00776 if (reLoopBackFlag > 0)
00777 return(0);
00778 }
00779
00780 return(0);
00781 }
00782
00783
00784
00785 int recover_msiOutSource(msParam_t* xremoteHostInfo, msParam_t* xactionList, ruleExecInfo_t *rei)
00786 {
00787 char *remoteHostInfo;
00788 char *actionList;
00789
00790 remoteHostInfo = (char *) xremoteHostInfo->inOutStruct;
00791 actionList = (char *) xactionList->inOutStruct;
00792
00793 if (reTestFlag > 0 ) {
00794 if (reTestFlag == LOG_TEST_1) {
00795 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiOutSource\n");
00796 }
00797 if (reLoopBackFlag > 0)
00798 return(0);
00799 }
00800
00801 return(0);
00802 }
00803
00804
00805 int recover_msiAsynchExecution(msParam_t* xactionList, ruleExecInfo_t *rei)
00806 {
00807 char *actionList;
00808
00809 actionList = (char *) xactionList->inOutStruct;
00810
00811 if (reTestFlag > 0 ) {
00812 if (reTestFlag == LOG_TEST_1) {
00813 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiAsynchExecution\n");
00814 }
00815 if (reLoopBackFlag > 0)
00816 return(0);
00817 }
00818
00819 return(0);
00820 }
00821
00822
00823 int recover_msiParallelExecution(msParam_t* xactionList, ruleExecInfo_t *rei)
00824 {
00825 char *actionList;
00826
00827 actionList = (char *) xactionList->inOutStruct;
00828
00829 if (reTestFlag > 0 ) {
00830 if (reTestFlag == LOG_TEST_1) {
00831 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiParallelExecution\n");
00832 }
00833 if (reLoopBackFlag > 0)
00834 return(0);
00835 }
00836
00837 return(0);
00838 }
00839
00840 int recover_orExec(msParam_t* xactionList, msParam_t *orSuccNum, ruleExecInfo_t *rei)
00841 {
00842 char *actionList;
00843
00844 actionList = (char *) xactionList->inOutStruct;
00845
00846 if (reTestFlag > 0 ) {
00847 if (reTestFlag == LOG_TEST_1) {
00848 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_orExec\n");
00849 }
00850 if (reLoopBackFlag > 0)
00851 return(0);
00852 }
00853
00854 return(0);
00855 }
00856
00857 int recover_notExec(msParam_t* xactionList, ruleExecInfo_t *rei)
00858 {
00859 char *actionList;
00860
00861 actionList = (char *) xactionList->inOutStruct;
00862
00863 if (reTestFlag > 0 ) {
00864 if (reTestFlag == LOG_TEST_1) {
00865 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_notExec\n");
00866 }
00867 if (reLoopBackFlag > 0)
00868 return(0);
00869 }
00870
00871 return(0);
00872 }
00873 int writeExec(msParam_t* where, msParam_t* format, msParam_t* argsList, ruleExecInfo_t *rei)
00874 {
00875 return(0);
00876 }
00877
00878 int remoteExec(msParam_t* where, msParam_t* workflow,
00879 msParam_t* recoverWorkFlow, ruleExecInfo_t *rei)
00880 {
00881 return(0);
00882 }
00883 int parallelExec(msParam_t* condition, msParam_t* workflow,
00884 msParam_t* recoverWorkFlow, ruleExecInfo_t *rei)
00885 {
00886 return(0);
00887 }
00888 int oneOfExec(msParam_t* setOfWFS, msParam_t* recoverSetOfWFS,
00889 ruleExecInfo_t *rei)
00890 {
00891 return(0);
00892 }
00893 int someOfExec(msParam_t* number, msParam_t* setOfWFS, msParam_t* recoverSetOfWFS,
00894 ruleExecInfo_t *rei)
00895 {
00896 return(0);
00897 }
00898 int readExec( msParam_t* where, msParam_t* format, msParam_t* argsList, ruleExecInfo_t *rei)
00899 {
00900 return(0);
00901 }
00902
00903
00904 int recover_msiCreateUser(ruleExecInfo_t *rei)
00905 {
00906
00907 if (reTestFlag > 0 ) {
00908 if (reTestFlag == LOG_TEST_1)
00909 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiCreateUser\n");
00910 if (reLoopBackFlag > 0)
00911 return(0);
00912 }
00913
00914 return(0);
00915 }
00916
00917
00918 int recover_msiCreateCollByAdmin(msParam_t* xparColl, msParam_t* xchildName, ruleExecInfo_t *rei)
00919 {
00920 char *parColl;
00921 char *childName;
00922
00923 parColl = (char *) xparColl->inOutStruct;
00924 childName = (char *) xchildName->inOutStruct;
00925
00926 if (reTestFlag > 0 ) {
00927 if (reTestFlag == LOG_TEST_1)
00928 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiCreateCollByAdmin\n");
00929 if (reLoopBackFlag > 0)
00930 return(0);
00931 }
00932
00933 return(0);
00934 }
00935 int msiGetNewObjDescriptor(ruleExecInfo_t *rei)
00936 {
00937
00938 int i;
00939
00940
00941 if (reTestFlag > 0 ) {
00942 if (reTestFlag == LOG_TEST_1) {
00943 rodsLog (LOG_NOTICE," Calling msiGetNewObjDescriptor\n");
00944 }
00945 if (reLoopBackFlag > 0)
00946 return(0);
00947 }
00948
00949 i = allocL1desc ();
00950 if (i < 0)
00951 return(i);
00952 rei->l1descInx = i;
00953 i = fillL1desc(i, rei->doinp, rei->doi, NEWLY_CREATED_COPY,rei->doinp->dataSize);
00954 if (i < 0)
00955 return(i);
00956 return(0);
00957 }
00958
00959 int msiPhyDataObjCreate(ruleExecInfo_t *rei)
00960 {
00961
00962 int status;
00963 dataObjInfo_t *myDataObjInfo;
00964
00965
00966
00967 if (reTestFlag > 0 ) {
00968 if (reTestFlag == LOG_TEST_1) {
00969 rodsLog (LOG_NOTICE," Calling msiPhyDataObjCreate\n");
00970 }
00971 if (reLoopBackFlag > 0)
00972 return(0);
00973 }
00974
00975
00976 myDataObjInfo = L1desc[rei->l1descInx].dataObjInfo;
00977
00978 status = getFilePathName(rei->rsComm, rei->doi, L1desc[rei->l1descInx].dataObjInp);
00979 if (status < 0)
00980 return(0);
00981 status = l3Create (rei->rsComm, rei->l1descInx);
00982 if (status <= 0) {
00983 rodsLog (LOG_NOTICE,
00984 "msiPhyDataObjCreate: l3Create of %s failed, status = %d",
00985 myDataObjInfo->filePath, status);
00986 return (status);
00987 }
00988 else {
00989 L1desc[rei->l1descInx].l3descInx = status;
00990 }
00991 return(0);
00992 }
00993
00994 int msiSetResourceList(ruleExecInfo_t *rei)
00995 {
00996 int status;
00997 rescGrpInfo_t *myRescGrpInfo = NULL;
00998
00999
01000 if (reTestFlag > 0 ) {
01001 if (reTestFlag == LOG_TEST_1) {
01002 rodsLog (LOG_NOTICE," Calling msiSetResourceList\n");
01003 }
01004 if (reLoopBackFlag > 0)
01005 return(0);
01006 }
01007
01008
01009
01010
01011
01012 status = getRescInfo (rei->rsComm,
01013 NULL, &rei->doinp->condInput, &myRescGrpInfo);
01014 if (status < 0)
01015 return(status);
01016 sortResc (&myRescGrpInfo, &rei->doinp->condInput, NULL);
01017 rstrcpy (rei->doi->rescName, myRescGrpInfo->rescInfo->rescName, NAME_LEN);
01018 rei->rgi = myRescGrpInfo;
01019 return(0);
01020 }
01021
01022
01023 int recover_msiGetNewObjDescriptor(ruleExecInfo_t *rei)
01024 {
01025
01026 if (reTestFlag > 0 ) {
01027 if (reTestFlag == LOG_TEST_1) {
01028 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiGetNewObjDescriptor\n");
01029 }
01030 if (reLoopBackFlag > 0)
01031 return(0);
01032 }
01033
01034
01035
01036 freeL1desc (rei->l1descInx);
01037 return(0);
01038 }
01039
01040 int recover_msiPhyDataObjCreate(ruleExecInfo_t *rei)
01041 {
01042
01043
01044 if (reTestFlag > 0 ) {
01045 if (reTestFlag == LOG_TEST_1) {
01046 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiPhyDataObjCreate\n");
01047 }
01048 if (reLoopBackFlag > 0)
01049 return(0);
01050 }
01051
01052
01053
01054
01055
01056
01057 return(0);
01058 }
01059
01060
01061
01062 int recover_msiSetResourceList(ruleExecInfo_t *rei)
01063 {
01064
01065 if (reTestFlag > 0 ) {
01066 if (reTestFlag == LOG_TEST_1) {
01067 rodsLog (LOG_NOTICE," ROLLBACK:Calling recover_msiSetResourceList\n");
01068 }
01069 if (reLoopBackFlag > 0)
01070 return(0);
01071 }
01072
01073
01074
01075 return(0);
01076 }