| 1 package org.enhydra.shark; 2 3 import org.enhydra.shark.api.RootException; 4 import org.enhydra.shark.api.SharkTransaction; 5 import org.enhydra.shark.api.client.wfbase.BaseException; 6 import org.enhydra.shark.api.client.wfservice.AdminMisc; 7 import org.enhydra.shark.api.common.SharkConstants; 8 import org.enhydra.shark.api.internal.working.*; 9 10 16 public class AdminMiscImpl implements AdminMisc { 17 18 private CallbackUtilities cus; 19 private String userId="Unknown"; 20 21 protected AdminMiscImpl () { 22 this.cus=SharkEngineManager.getInstance().getCallbackUtilities(); 23 } 24 25 public void connect (String userId) { 26 this.userId=userId; 27 } 28 29 public String [][] getPackageExtendedAttributeNameValuePairs (String pkgId) throws BaseException { 30 String [][] ret = null; 31 SharkTransaction t = null; 32 try { 33 t = SharkUtilities.createTransaction(); 34 ret = getPackageExtendedAttributeNameValuePairs(t,pkgId); 35 } catch (RootException e) { 37 SharkUtilities.emptyCaches(t); 39 if (e instanceof BaseException) 40 throw (BaseException)e; 41 else 42 throw new BaseException(e); 43 } finally { 44 SharkUtilities.releaseTransaction(t); 45 } 46 return ret; 47 } 48 49 public String [][] getPackageExtendedAttributeNameValuePairs (SharkTransaction t,String pkgId) throws BaseException { 50 try { 51 return SharkUtilities.getPackageExtendedAttributeNameValuePairs(t,pkgId); 52 } catch (Exception ex) { 53 throw new BaseException(ex); 54 } 55 } 56 57 public String [] getPackageExtendedAttributeNames (String pkgId) throws BaseException { 58 String [] ret = null; 59 SharkTransaction t = null; 60 try { 61 t = SharkUtilities.createTransaction(); 62 ret = getPackageExtendedAttributeNames(t,pkgId); 63 } catch (RootException e) { 65 SharkUtilities.emptyCaches(t); 67 if (e instanceof BaseException) 68 throw (BaseException)e; 69 else 70 throw new BaseException(e); 71 } finally { 72 SharkUtilities.releaseTransaction(t); 73 } 74 return ret; 75 } 76 77 public String [] getPackageExtendedAttributeNames (SharkTransaction t,String pkgId) throws BaseException { 78 try { 79 return SharkUtilities.getPackageExtendedAttributeNames(t,pkgId); 80 } catch (Exception ex) { 81 throw new BaseException(ex); 82 } 83 } 84 85 public String getPackageExtendedAttributeValue (String pkgId,String extAttrName) throws BaseException { 86 String ret = null; 87 SharkTransaction t = null; 88 try { 89 t = SharkUtilities.createTransaction(); 90 ret = getPackageExtendedAttributeValue(t,pkgId,extAttrName); 91 } catch (RootException e) { 93 SharkUtilities.emptyCaches(t); 95 if (e instanceof BaseException) 96 throw (BaseException)e; 97 else 98 throw new BaseException(e); 99 } finally { 100 SharkUtilities.releaseTransaction(t); 101 } 102 return ret; 103 } 104 105 public String getPackageExtendedAttributeValue (SharkTransaction t,String pkgId,String extAttrName) throws BaseException{ 106 try { 107 return SharkUtilities.getProcessExtendedAttributeValue(t,pkgId,extAttrName); 108 } catch (Exception ex) { 109 throw new BaseException(ex); 110 } 111 } 112 113 public String [][] getProcessDefinitionExtendedAttributeNameValuePairs (String mgrName) throws BaseException { 114 String [][] ret = null; 115 SharkTransaction t = null; 116 try { 117 t = SharkUtilities.createTransaction(); 118 ret = getProcessDefinitionExtendedAttributeNameValuePairs(t,mgrName); 119 } catch (RootException e) { 121 SharkUtilities.emptyCaches(t); 123 if (e instanceof BaseException) 124 throw (BaseException)e; 125 else 126 throw new BaseException(e); 127 } finally { 128 SharkUtilities.releaseTransaction(t); 129 } 130 return ret; 131 } 132 133 public String [][] getProcessDefinitionExtendedAttributeNameValuePairs (SharkTransaction t,String mgrName) throws BaseException { 134 try { 135 return SharkUtilities.getProcessDefinitionExtendedAttributeNameValuePairs(t,mgrName); 136 } catch (Exception ex) { 137 throw new BaseException(ex); 138 } 139 } 140 141 public String [] getProcessDefinitionExtendedAttributeNames (String mgrName) throws BaseException { 142 String [] ret = null; 143 SharkTransaction t = null; 144 try { 145 t = SharkUtilities.createTransaction(); 146 ret = getProcessDefinitionExtendedAttributeNames(t,mgrName); 147 } catch (RootException e) { 149 SharkUtilities.emptyCaches(t); 151 if (e instanceof BaseException) 152 throw (BaseException)e; 153 else 154 throw new BaseException(e); 155 } finally { 156 SharkUtilities.releaseTransaction(t); 157 } 158 return ret; 159 } 160 161 public String [] getProcessDefinitionExtendedAttributeNames (SharkTransaction t,String mgrName) throws BaseException { 162 try { 163 return SharkUtilities.getProcessDefinitionExtendedAttributeNames(t,mgrName); 164 } catch (Exception ex) { 165 throw new BaseException(ex); 166 } 167 } 168 169 public String getProcessDefinitionExtendedAttributeValue (String mgrName,String extAttrName) throws BaseException { 170 String ret = null; 171 SharkTransaction t = null; 172 try { 173 t = SharkUtilities.createTransaction(); 174 ret = getProcessDefinitionExtendedAttributeValue(t,mgrName,extAttrName); 175 } catch (RootException e) { 177 SharkUtilities.emptyCaches(t); 179 if (e instanceof BaseException) 180 throw (BaseException)e; 181 else 182 throw new BaseException(e); 183 } finally { 184 SharkUtilities.releaseTransaction(t); 185 } 186 return ret; 187 } 188 189 public String getProcessDefinitionExtendedAttributeValue (SharkTransaction t,String mgrName,String extAttrName) throws BaseException { 190 try { 191 return SharkUtilities.getProcessDefinitionExtendedAttributeValue(t,mgrName,extAttrName); 192 } catch (Exception ex) { 193 throw new BaseException(ex); 194 } 195 } 196 197 public String [][] getProcessExtendedAttributeNameValuePairs (String procId) throws BaseException { 198 String [][] ret = null; 199 SharkTransaction t = null; 200 try { 201 t = SharkUtilities.createTransaction(); 202 ret = getProcessExtendedAttributeNameValuePairs(t,procId); 203 } catch (RootException e) { 205 SharkUtilities.emptyCaches(t); 207 if (e instanceof BaseException) 208 throw (BaseException)e; 209 else 210 throw new BaseException(e); 211 } finally { 212 SharkUtilities.releaseTransaction(t); 213 } 214 return ret; 215 } 216 217 public String [][] getProcessExtendedAttributeNameValuePairs (SharkTransaction t,String procId) throws BaseException { 218 try { 219 return SharkUtilities.getProcessExtendedAttributeNameValuePairs(t,procId); 220 } catch (Exception ex) { 221 throw new BaseException(ex); 222 } 223 } 224 225 public String [] getProcessExtendedAttributeNames (String procId) throws BaseException { 226 String [] ret = null; 227 SharkTransaction t = null; 228 try { 229 t = SharkUtilities.createTransaction(); 230 ret = getProcessExtendedAttributeNames(t,procId); 231 } catch (RootException e) { 233 SharkUtilities.emptyCaches(t); 235 if (e instanceof BaseException) 236 throw (BaseException)e; 237 else 238 throw new BaseException(e); 239 } finally { 240 SharkUtilities.releaseTransaction(t); 241 } 242 return ret; 243 } 244 245 public String [] getProcessExtendedAttributeNames (SharkTransaction t,String procId) throws BaseException { 246 try { 247 return SharkUtilities.getProcessExtendedAttributeNames(t,procId); 248 } catch (Exception ex) { 249 throw new BaseException(ex); 250 } 251 } 252 253 public String getProcessExtendedAttributeValue (String procId,String extAttrName) throws BaseException { 254 String ret = null; 255 SharkTransaction t = null; 256 try { 257 t = SharkUtilities.createTransaction(); 258 ret = getProcessExtendedAttributeValue(t,procId,extAttrName); 259 } catch (RootException e) { 261 SharkUtilities.emptyCaches(t); 263 if (e instanceof BaseException) 264 throw (BaseException)e; 265 else 266 throw new BaseException(e); 267 } finally { 268 SharkUtilities.releaseTransaction(t); 269 } 270 return ret; 271 } 272 273 public String getProcessExtendedAttributeValue (SharkTransaction t,String procId,String extAttrName) throws BaseException{ 274 try { 275 return SharkUtilities.getProcessExtendedAttributeValue(t,procId,extAttrName); 276 } catch (Exception ex) { 277 throw new BaseException(ex); 278 } 279 } 280 281 public String getActivitiesExtendedAttributes (String procId,String actId) throws BaseException { 282 String ret = null; 283 SharkTransaction t = null; 284 try { 285 t = SharkUtilities.createTransaction(); 286 ret = getActivitiesExtendedAttributes(t,procId,actId); 287 } catch (RootException e) { 289 SharkUtilities.emptyCaches(t); 291 if (e instanceof BaseException) 292 throw (BaseException)e; 293 else 294 throw new BaseException(e); 295 } finally { 296 SharkUtilities.releaseTransaction(t); 297 } 298 return ret; 299 } 300 301 public String getActivitiesExtendedAttributes (SharkTransaction t,String procId,String actId) throws BaseException{ 302 try { 303 return SharkUtilities.getActivitiesExtendedAttributes(t,procId,actId); 304 } catch (Exception ex) { 305 throw new BaseException(ex); 306 } 307 } 308 309 public String [][] getActivitiesExtendedAttributeNameValuePairs (String procId,String actId) throws BaseException { 310 String [][] ret = null; 311 SharkTransaction t = null; 312 try { 313 t = SharkUtilities.createTransaction(); 314 ret = getActivitiesExtendedAttributeNameValuePairs(t,procId,actId); 315 } catch (RootException e) { 317 SharkUtilities.emptyCaches(t); 319 if (e instanceof BaseException) 320 throw (BaseException)e; 321 else 322 throw new BaseException(e); 323 } finally { 324 SharkUtilities.releaseTransaction(t); 325 } 326 return ret; 327 } 328 329 public String [][] getActivitiesExtendedAttributeNameValuePairs (SharkTransaction t,String procId,String actId) throws BaseException { 330 try { 331 return SharkUtilities.getActivitiesExtendedAttributeNameValuePairs(t,procId,actId); 332 } catch (Exception ex) { 333 throw new BaseException(ex); 334 } 335 } 336 337 public String [] getActivitiesExtendedAttributeNames (String procId,String actId) throws BaseException { 338 String [] ret = null; 339 SharkTransaction t = null; 340 try { 341 t = SharkUtilities.createTransaction(); 342 ret = getActivitiesExtendedAttributeNames(t,procId,actId); 343 } catch (RootException e) { 345 SharkUtilities.emptyCaches(t); 347 if (e instanceof BaseException) 348 throw (BaseException)e; 349 else 350 throw new BaseException(e); 351 } finally { 352 SharkUtilities.releaseTransaction(t); 353 } 354 return ret; 355 } 356 357 public String [] getActivitiesExtendedAttributeNames (SharkTransaction t,String procId,String actId) throws BaseException { 358 try { 359 return SharkUtilities.getActivitiesExtendedAttributeNames(t,procId,actId); 360 } catch (Exception ex) { 361 throw new BaseException(ex); 362 } 363 } 364 365 public String getActivitiesExtendedAttributeValue (String procId,String actId,String extAttrName) throws BaseException { 366 String ret = null; 367 SharkTransaction t = null; 368 try { 369 t = SharkUtilities.createTransaction(); 370 ret = getActivitiesExtendedAttributeValue(t,procId,actId,extAttrName); 371 } catch (RootException e) { 373 SharkUtilities.emptyCaches(t); 375 if (e instanceof BaseException) 376 throw (BaseException)e; 377 else 378 throw new BaseException(e); 379 } finally { 380 SharkUtilities.releaseTransaction(t); 381 } 382 return ret; 383 } 384 385 public String getActivitiesExtendedAttributeValue (SharkTransaction t,String procId,String actId,String extAttrName) throws BaseException{ 386 try { 387 return SharkUtilities.getActivitiesExtendedAttributeValue(t,procId,actId,extAttrName); 388 } catch (Exception ex) { 389 throw new BaseException(ex); 390 } 391 } 392 393 394 public String [][] getDefVariableExtendedAttributeNameValuePairs (String mgrName,String variableId) throws BaseException { 395 String [][] ret = null; 396 SharkTransaction t = null; 397 try { 398 t = SharkUtilities.createTransaction(); 399 ret = getDefVariableExtendedAttributeNameValuePairs(t,mgrName,variableId); 400 } catch (RootException e) { 402 SharkUtilities.emptyCaches(t); 404 if (e instanceof BaseException) 405 throw (BaseException)e; 406 else 407 throw new BaseException(e); 408 } finally { 409 SharkUtilities.releaseTransaction(t); 410 } 411 return ret; 412 } 413 414 public String [][] getDefVariableExtendedAttributeNameValuePairs (SharkTransaction t,String mgrName,String variableId) throws BaseException { 415 try { 416 return SharkUtilities.getDefVariableExtendedAttributeNameValuePairs(t,mgrName,variableId); 417 } catch (Exception ex) { 418 throw new BaseException(ex); 419 } 420 } 421 422 public String [] getDefVariableExtendedAttributeNames (String mgrName,String variableId) throws BaseException { 423 String [] ret = null; 424 SharkTransaction t = null; 425 try { 426 t = SharkUtilities.createTransaction(); 427 ret = getDefVariableExtendedAttributeNames(t,mgrName,variableId); 428 } catch (RootException e) { 430 SharkUtilities.emptyCaches(t); 432 if (e instanceof BaseException) 433 throw (BaseException)e; 434 else 435 throw new BaseException(e); 436 } finally { 437 SharkUtilities.releaseTransaction(t); 438 } 439 return ret; 440 } 441 442 public String [] getDefVariableExtendedAttributeNames (SharkTransaction t,String mgrName,String variableId) throws BaseException { 443 try { 444 return SharkUtilities.getDefVariableExtendedAttributeNames(t,mgrName,variableId); 445 } catch (Exception ex) { 446 throw new BaseException(ex); 447 } 448 } 449 450 public String getDefVariableExtendedAttributeValue (String mgrName,String variableId,String extAttrName) throws BaseException { 451 String ret = null; 452 SharkTransaction t = null; 453 try { 454 t = SharkUtilities.createTransaction(); 455 ret = getDefVariableExtendedAttributeValue(t,mgrName,variableId,extAttrName); 456 } catch (RootException e) { 458 SharkUtilities.emptyCaches(t); 460 if (e instanceof BaseException) 461 throw (BaseException)e; 462 else 463 throw new BaseException(e); 464 } finally { 465 SharkUtilities.releaseTransaction(t); 466 } 467 return ret; 468 } 469 470 public String getDefVariableExtendedAttributeValue (SharkTransaction t,String mgrName,String variableId,String extAttrName) throws BaseException{ 471 try { 472 return SharkUtilities.getDefVariableExtendedAttributeValue(t,mgrName,variableId,extAttrName); 473 } catch (Exception ex) { 474 throw new BaseException(ex); 475 } 476 } 477 478 public String [][] getVariableExtendedAttributeNameValuePairs (String procId,String variableId) throws BaseException { 479 String [][] ret = null; 480 SharkTransaction t = null; 481 try { 482 t = SharkUtilities.createTransaction(); 483 ret = getVariableExtendedAttributeNameValuePairs(t,procId,variableId); 484 } catch (RootException e) { 486 SharkUtilities.emptyCaches(t); 488 if (e instanceof BaseException) 489 throw (BaseException)e; 490 else 491 throw new BaseException(e); 492 } finally { 493 SharkUtilities.releaseTransaction(t); 494 } 495 return ret; 496 } 497 498 public String [][] getVariableExtendedAttributeNameValuePairs (SharkTransaction t,String procId,String variableId) throws BaseException { 499 try { 500 return SharkUtilities.getVariableExtendedAttributeNameValuePairs(t,procId,variableId); 501 } catch (Exception ex) { 502 throw new BaseException(ex); 503 } 504 } 505 506 public String [] getVariableExtendedAttributeNames (String procId,String variableId) throws BaseException { 507 String [] ret = null; 508 SharkTransaction t = null; 509 try { 510 t = SharkUtilities.createTransaction(); 511 ret = getVariableExtendedAttributeNames(t,procId,variableId); 512 } catch (RootException e) { 514 SharkUtilities.emptyCaches(t); 516 if (e instanceof BaseException) 517 throw (BaseException)e; 518 else 519 throw new BaseException(e); 520 } finally { 521 SharkUtilities.releaseTransaction(t); 522 } 523 return ret; 524 } 525 526 public String [] getVariableExtendedAttributeNames (SharkTransaction t,String procId,String variableId) throws BaseException { 527 try { 528 return SharkUtilities.getVariableExtendedAttributeNames(t,procId,variableId); 529 } catch (Exception ex) { 530 throw new BaseException(ex); 531 } 532 } 533 534 public String getVariableExtendedAttributeValue (String procId,String variableId,String extAttrName) throws BaseException { 535 String ret = null; 536 SharkTransaction t = null; 537 try { 538 t = SharkUtilities.createTransaction(); 539 ret = getVariableExtendedAttributeValue(t,procId,variableId,extAttrName); 540 } catch (RootException e) { 542 SharkUtilities.emptyCaches(t); 544 if (e instanceof BaseException) 545 throw (BaseException)e; 546 else 547 throw new BaseException(e); 548 } finally { 549 SharkUtilities.releaseTransaction(t); 550 } 551 return ret; 552 } 553 554 public String getVariableExtendedAttributeValue (SharkTransaction t,String procId,String variableId,String extAttrName) throws BaseException{ 555 try { 556 return SharkUtilities.getVariableExtendedAttributeValue(t,procId,variableId,extAttrName); 557 } catch (Exception ex) { 558 throw new BaseException(ex); 559 } 560 } 561 562 public String [][] getParticipantExtendedAttributeNameValuePairs (String pkgId,String pDefId,String participantId) throws BaseException { 563 String [][] ret = null; 564 SharkTransaction t = null; 565 try { 566 t = SharkUtilities.createTransaction(); 567 ret = getParticipantExtendedAttributeNameValuePairs(t,pkgId,pDefId,participantId); 568 } catch (RootException e) { 570 SharkUtilities.emptyCaches(t); 572 if (e instanceof BaseException) 573 throw (BaseException)e; 574 else 575 throw new BaseException(e); 576 } finally { 577 SharkUtilities.releaseTransaction(t); 578 } 579 return ret; 580 } 581 582 public String [][] getParticipantExtendedAttributeNameValuePairs (SharkTransaction t,String pkgId,String pDefId,String participantId) throws BaseException { 583 try { 584 return SharkUtilities.getParticipantExtendedAttributeNameValuePairs(t,pkgId,pDefId,participantId); 585 } catch (Exception ex) { 586 throw new BaseException(ex); 587 } 588 } 589 590 public String [] getParticipantExtendedAttributeNames (String pkgId,String pDefId,String participantId) throws BaseException { 591 String [] ret = null; 592 SharkTransaction t = null; 593 try { 594 t = SharkUtilities.createTransaction(); 595 ret = getParticipantExtendedAttributeNames(t,pkgId,pDefId,participantId); 596 } catch (RootException e) { 598 SharkUtilities.emptyCaches(t); 600 if (e instanceof BaseException) 601 throw (BaseException)e; 602 else 603 throw new BaseException(e); 604 } finally { 605 SharkUtilities.releaseTransaction(t); 606 } 607 return ret; 608 } 609 610 public String [] getParticipantExtendedAttributeNames (SharkTransaction t,String pkgId,String pDefId,String participantId) throws BaseException { 611 try { 612 return SharkUtilities.getParticipantExtendedAttributeNames(t,pkgId,pDefId,participantId); 613 } catch (Exception ex) { 614 throw new BaseException(ex); 615 } 616 } 617 618 public String getParticipantExtendedAttributeValue (String pkgId,String pDefId,String participantId,String extAttrName) throws BaseException { 619 String ret = null; 620 SharkTransaction t = null; 621 try { 622 t = SharkUtilities.createTransaction(); 623 ret = getParticipantExtendedAttributeValue(t,pkgId,pDefId,participantId,extAttrName); 624 } catch (RootException e) { 626 SharkUtilities.emptyCaches(t); 628 if (e instanceof BaseException) 629 throw (BaseException)e; 630 else 631 throw new BaseException(e); 632 } finally { 633 SharkUtilities.releaseTransaction(t); 634 } 635 return ret; 636 } 637 638 public String getParticipantExtendedAttributeValue (SharkTransaction t,String pkgId,String pDefId,String participantId,String extAttrName) throws BaseException{ 639 try { 640 return SharkUtilities.getParticipantExtendedAttributeValue(t,pkgId,pDefId,participantId,extAttrName); 641 } catch (Exception ex) { 642 throw new BaseException(ex); 643 } 644 } 645 646 public String [][]
|