1 package org.enhydra.shark.api.internal.instancepersistence; 2 3 import java.util.List ; 4 import org.enhydra.shark.api.RootException; 5 import org.enhydra.shark.api.SharkTransaction; 6 import org.enhydra.shark.api.internal.working.CallbackUtilities; 7 8 16 public interface PersistentManagerInterface { 17 18 27 void configure(CallbackUtilities cus) throws RootException; 28 29 34 public void shutdownDatabase() throws PersistenceException; 35 36 45 public void persist(ProcessMgrPersistenceInterface pm, boolean isInitialPersistence, 46 SharkTransaction ti) 47 throws PersistenceException; 48 49 58 public void persist(ProcessPersistenceInterface pr, boolean isInitialPersistence, 59 SharkTransaction ti) 60 throws PersistenceException; 61 62 71 public void persist(ActivityPersistenceInterface act, boolean isInitialPersistence, 72 SharkTransaction ti) 73 throws PersistenceException; 74 75 84 public void persist(ResourcePersistenceInterface res, boolean isInitialPersistence,SharkTransaction ti) 85 throws PersistenceException; 86 87 96 public void persist(AssignmentPersistenceInterface ass, boolean isInitialPersistence,SharkTransaction ti) 97 throws PersistenceException; 98 99 109 public void persist (AssignmentPersistenceInterface ass,String oldResUname,SharkTransaction ti) throws PersistenceException; 110 111 120 public void persist(ProcessVariablePersistenceInterface var, 121 boolean isInitialPersistence, 122 SharkTransaction ti) 123 throws PersistenceException; 124 125 134 public void persist(ActivityVariablePersistenceInterface var, 135 boolean isInitialPersistence, 136 SharkTransaction ti) 137 throws PersistenceException; 138 139 148 public void persist(AndJoinEntryInterface aje, SharkTransaction ti) 149 throws PersistenceException; 150 151 161 public void persist(DeadlinePersistenceInterface dpe, boolean isInitialPersistence, SharkTransaction ti) 162 throws PersistenceException; 163 164 175 public ProcessMgrPersistenceInterface restoreProcessMgr(String mgrName, 176 SharkTransaction ti) 177 throws PersistenceException; 178 179 190 public ProcessPersistenceInterface restoreProcess(String procId, 191 SharkTransaction ti) 192 throws PersistenceException; 193 194 205 public ActivityPersistenceInterface restoreActivity(String actId, 206 SharkTransaction ti) 207 throws PersistenceException; 208 209 220 public ResourcePersistenceInterface restoreResource(String resUsername, 221 SharkTransaction ti) 222 throws PersistenceException; 223 224 236 public AssignmentPersistenceInterface restoreAssignment(String actId, 237 String resUsername, 238 SharkTransaction ti) 239 throws PersistenceException; 240 241 253 public boolean restore(ProcessVariablePersistenceInterface var, 254 SharkTransaction ti) 255 throws PersistenceException; 256 257 269 public boolean restore(ActivityVariablePersistenceInterface var, 270 SharkTransaction ti) 271 throws PersistenceException; 272 273 281 public void deleteProcessMgr(String mgrName,SharkTransaction ti) 282 throws PersistenceException; 283 284 292 public void deleteProcess(String procId,boolean administrative,SharkTransaction ti) 293 throws PersistenceException; 294 295 296 304 public void deleteActivity(String actId,SharkTransaction ti) 305 throws PersistenceException; 306 307 315 public void deleteResource(String resUsername,SharkTransaction ti) 316 throws PersistenceException; 317 318 327 public void deleteAssignment(String actId, 328 String resUsername, 329 SharkTransaction ti) 330 throws PersistenceException; 331 332 342 public void deleteAndJoinEntries(String procId, 343 String asDefId, 344 String aDefId, 345 SharkTransaction ti) 346 throws PersistenceException; 347 348 357 public void deleteDeadlines (String procId, 358 SharkTransaction ti) 359 throws PersistenceException; 360 361 371 public void deleteDeadlines (String procId, 372 String actId, 373 SharkTransaction ti) 374 throws PersistenceException; 375 376 384 public void delete(ProcessVariablePersistenceInterface var, 385 SharkTransaction ti) 386 throws PersistenceException; 387 388 396 public void delete(ActivityVariablePersistenceInterface var, 397 SharkTransaction ti) 398 throws PersistenceException; 399 400 402 408 public List getProcessMgrsWhere(SharkTransaction ti, String sqlWhere) 409 throws PersistenceException; 410 411 420 public List getAllProcessMgrs(SharkTransaction ti) 421 throws PersistenceException; 422 423 424 430 List getResourcesWhere(SharkTransaction t, String sqlWhere) throws PersistenceException; 431 432 441 public List getAllResources(SharkTransaction ti) 442 throws PersistenceException; 443 444 453 public List getAllAssignments(SharkTransaction ti) 454 throws PersistenceException; 455 456 465 public List getAllProcesses(SharkTransaction ti) throws PersistenceException; 466 467 476 public List getAllActivities(SharkTransaction ti) 477 throws PersistenceException; 478 479 489 public List getAllProcessesForMgr(String mgrName, SharkTransaction ti) 490 throws PersistenceException; 491 492 public List getProcessesForMgr(String mgrName, String procState,SharkTransaction ti) 493 throws PersistenceException; 494 495 504 public List getAllRunningProcesses(SharkTransaction ti) throws PersistenceException; 505 506 515 public List getAllFinishedProcesses(SharkTransaction ti) throws PersistenceException; 516 517 527 public List getAllFinishedProcesses(SharkTransaction ti,java.util.Date finishedBefore) throws PersistenceException; 528 529 539 public List getAllFinishedProcesses(SharkTransaction ti,String pkgId) throws PersistenceException; 540 541 552 public List getAllFinishedProcesses(SharkTransaction ti,String pkgId,String procDefId) throws PersistenceException; 553 554 566 public List getAllFinishedProcesses(SharkTransaction ti,String pkgId,String procDefId,String pkgVer) throws PersistenceException; 567 568 578 public List getAllActivitiesForProcess(String procId, SharkTransaction ti) 579 throws PersistenceException; 580 581 public List getActivitiesForProcess(String procId, String actState, SharkTransaction ti) 582 throws PersistenceException; 583 584 594 public List getAllFinishedActivitiesForProcess(String procId, SharkTransaction ti) 595 throws PersistenceException; 596 597 607 public List getAllActiveActivitiesForProcess(String procId, SharkTransaction ti) 608 throws PersistenceException; 609 610 620 public List getAllAssignmentsForResource(String resUsername, 621 SharkTransaction ti) 622 throws PersistenceException; 623 624 634 637 638 648 public List getAllValidAssignmentsForResource(String resUsername, 649 SharkTransaction ti) 650 throws PersistenceException; 651 652 662 public List getAllAssignmentsForActivity(String actId,SharkTransaction ti) 663 throws PersistenceException; 664 665 675 678 679 689 public List getAllValidAssignmentsForActivity(String actId, 690 SharkTransaction ti) 691 throws PersistenceException; 692 693 703 public List getAllVariablesForProcess(String procId,SharkTransaction ti) 704 throws PersistenceException; 705 706 716 public List getProcessVariables(String procId,List variableIds,SharkTransaction ti) 717 throws PersistenceException; 718 719 729 public List getAllVariablesForActivity(String actId,SharkTransaction ti) 730 throws PersistenceException; 731 732 742 public List getActivityVariables(String actId,List variableIds,SharkTransaction ti) 743 throws PersistenceException; 744 745 755 public List getResourceRequestersProcessIds(String resUsername, 756 SharkTransaction ti) 757 throws PersistenceException; 758 759 771 public List getAndJoinEntries(String procId, 772 String asDefId, 773 String aDefId, 774 SharkTransaction ti) 775 throws PersistenceException; 776 777 789 public int howManyAndJoinEntries(String procId, 790 String asDefId, 791 String aDefId, 792 SharkTransaction ti) 793 throws PersistenceException; 794 795 806 public List getAllDeadlinesForProcess (String procId, 807 SharkTransaction ti) 808 throws PersistenceException; 809 810 821 public List getAllDeadlinesForProcess (String procId, 822 long timeLimitBoundary, 823 SharkTransaction ti) 824 throws PersistenceException; 825 826 829 public List getAllIdsForProcessesWithExpiriedDeadlines (long timeLimitBoundary,SharkTransaction ti) throws PersistenceException; 830 831 843 public List getAllDeadlinesForActivity (String procId, 844 String actId, 845 SharkTransaction ti) 846 throws PersistenceException; 847 848 860 public List getAllDeadlinesForActivity (String procId, 861 String actId, 862 long timeLimitBoundary, 863 SharkTransaction ti) 864 throws PersistenceException; 865 866 878 public int getExecuteCount(String procId, 879 String asDefId, 880 String aDefId, 881 SharkTransaction ti) 882 throws PersistenceException; 883 884 889 public ActivityPersistenceInterface createActivity(); 890 891 896 public ProcessPersistenceInterface createProcess(); 897 898 903 public ProcessMgrPersistenceInterface createProcessMgr(); 904 905 910 public AssignmentPersistenceInterface createAssignment(); 911 912 917 public ResourcePersistenceInterface createResource(); 918 919 924 public ProcessVariablePersistenceInterface createProcessVariable(); 925 926 931 public ActivityVariablePersistenceInterface createActivityVariable(); 932 933 938 public AndJoinEntryInterface createAndJoinEntry(); 939 940 946 public DeadlinePersistenceInterface createDeadline(); 947 948 957 public String getNextId(String idName) throws PersistenceException; 958 959 964 List getAssignmentsWhere(SharkTransaction t, String sqlWhere) throws PersistenceException; 965 966 972 List getProcessesWhere(SharkTransaction t, String sqlWhere) throws PersistenceException; 973 974 980 List getActivitiesWhere(SharkTransaction t, String sqlWhere) throws PersistenceException; 981 } 982 | Popular Tags |