1 package org.enhydra.shark; 2 3 import org.enhydra.shark.api.client.wfmodel.*; 4 import org.enhydra.shark.api.client.wfservice.*; 5 import org.enhydra.shark.api.internal.working.*; 6 7 import java.util.Map ; 8 import org.enhydra.shark.api.SharkTransaction; 9 import org.enhydra.shark.api.client.wfbase.BaseException; 10 import org.enhydra.shark.api.internal.eventaudit.AssignmentEventAuditPersistenceInterface; 11 import org.enhydra.shark.api.internal.eventaudit.CreateProcessEventAuditPersistenceInterface; 12 import org.enhydra.shark.api.internal.eventaudit.DataEventAuditPersistenceInterface; 13 import org.enhydra.shark.api.internal.eventaudit.StateEventAuditPersistenceInterface; 14 import org.enhydra.shark.api.internal.instancepersistence.ActivityPersistenceInterface; 15 import org.enhydra.shark.api.internal.instancepersistence.AssignmentPersistenceInterface; 16 import org.enhydra.shark.api.internal.instancepersistence.ProcessMgrPersistenceInterface; 17 import org.enhydra.shark.api.internal.instancepersistence.ProcessPersistenceInterface; 18 import org.enhydra.shark.api.internal.instancepersistence.ResourcePersistenceInterface; 19 20 25 public class SharkObjectFactory implements ObjectFactory { 26 27 protected SharkObjectFactory () {} 28 29 public WfProcessMgrInternal createProcessMgr ( 31 SharkTransaction t, 32 String packageId, 33 String version, 34 String procDefId) throws BaseException { 35 36 return new WfProcessMgrImpl(t,packageId,version,procDefId); 37 } 38 39 public WfProcessMgrInternal createProcessMgr (ProcessMgrPersistenceInterface po) throws BaseException { 40 return new WfProcessMgrImpl(po); 41 } 42 43 public WfProcessMgr createProcessMgrWrapper ( 44 String userAuth, 45 String name) 46 throws BaseException { 47 48 return new WfProcessMgrWrapper(userAuth,name); 49 } 50 51 public WfProcessInternal createProcess ( 52 SharkTransaction t, 53 WfProcessMgrInternal manager, 54 WfRequesterInternal requester, 55 String key) throws BaseException { 56 57 return new WfProcessImpl(t,manager,requester,key); 58 } 59 60 public WfProcessInternal createProcess (ProcessPersistenceInterface po) throws BaseException { 61 return new WfProcessImpl(po); 62 } 63 64 public WfProcess createProcessWrapper ( 65 String userAuth, 66 String mgrName, 67 String procId) { 68 69 return new WfProcessWrapper(userAuth,mgrName,procId); 70 } 71 72 public WfRequesterInternal createDefaultRequester (String resUsername,WfRequester extRequester) { 73 return new WfDefaultRequester(resUsername,extRequester); 74 } 75 76 public WfRequester createRequesterWrapper ( 77 String userAuth, 78 String resUsername) { 79 80 return new WfRequesterWrapper(userAuth,resUsername); 81 } 82 83 public WfActivityInternal createActivity ( 84 SharkTransaction t, 85 WfProcessInternal process, 86 String key, 87 String activitySetDefId, 88 String activityDefId, 89 WfActivityInternal blockActivity) throws BaseException { 90 91 return new WfActivityImpl(t,process,key,activitySetDefId,activityDefId,blockActivity); 92 } 93 94 public WfActivityInternal createActivity (ActivityPersistenceInterface po, 95 WfProcessInternal process) throws BaseException { 96 return new WfActivityImpl(po,process); 97 } 98 99 public WfActivity createActivityWrapper ( 100 String userAuth, 101 String mgrName, 102 String procId, 103 String actId) { 104 105 return new WfActivityWrapper(userAuth,mgrName,procId,actId); 106 } 107 108 public WfAssignmentInternal createAssignment ( 109 SharkTransaction t, 110 WfActivityInternal activity, 111 WfResourceInternal resource) 112 throws BaseException { 113 114 return new WfAssignmentImpl(t,activity,resource); 115 } 116 117 public WfAssignmentInternal createAssignment (AssignmentPersistenceInterface po, 118 WfResourceInternal res) throws BaseException { 119 return new WfAssignmentImpl(po,res); 120 } 121 122 public WfAssignment createAssignmentWrapper ( 123 String userAuth, 124 String mgrName, 125 String procId, 126 String actId, 127 String username) { 128 129 return new WfAssignmentWrapper(userAuth,mgrName,procId,actId,username); 130 } 131 132 public WfResourceInternal createResource ( 133 SharkTransaction t, 134 String resourceKey) throws BaseException { 135 136 return new WfResourceImpl(t, resourceKey); 137 } 138 139 public WfResourceInternal createResource (ResourcePersistenceInterface po) throws BaseException { 140 return new WfResourceImpl(po); 141 } 142 143 public WfResource createResourceWrapper ( 144 String userAuth, 145 String username) { 146 147 return new WfResourceWrapper(userAuth,username); 148 } 149 150 public WfAssignmentEventAuditInternal createAssignmentEventAuditWrapper ( 152 SharkTransaction t, 153 WfActivityInternal activity, 154 WfResourceInternal oldRes, 155 WfResourceInternal newRes, 156 boolean isAccepted) throws BaseException { 157 158 return new WfAssignmentEventAuditWrapper(t,activity,oldRes,newRes,isAccepted); 159 } 160 161 public WfAssignmentEventAuditInternal createAssignmentEventAuditWrapper ( 162 String userAuth, 163 AssignmentEventAuditPersistenceInterface po) throws BaseException { 164 165 return new WfAssignmentEventAuditWrapper(userAuth,po); 166 } 167 168 public WfCreateProcessEventAuditInternal createCreateProcessEventAuditWrapper ( 169 SharkTransaction t, 170 WfProcessInternal process, 171 WfRequesterInternal requester) throws BaseException { 172 173 return new WfCreateProcessEventAuditWrapper(t,process,requester); 174 } 175 176 public WfCreateProcessEventAuditInternal createCreateProcessEventAuditWrapper ( 177 String userAuth, 178 CreateProcessEventAuditPersistenceInterface po) throws BaseException { 179 180 return new WfCreateProcessEventAuditWrapper(userAuth,po); 181 } 182 183 public WfDataEventAuditInternal createDataEventAuditWrapper ( 184 SharkTransaction t, 185 WfExecutionObjectInternal object, 186 String eventType, 187 Map oldData, 188 Map newData) throws BaseException { 189 190 return new WfDataEventAuditWrapper(t,object,eventType,oldData,newData); 191 } 192 193 public WfDataEventAuditInternal createDataEventAuditWrapper ( 194 String userAuth, 195 DataEventAuditPersistenceInterface po) throws BaseException { 196 197 return new WfDataEventAuditWrapper(userAuth,po); 198 } 199 200 public WfStateEventAuditInternal createStateEventAuditWrapper ( 201 SharkTransaction t, 202 WfExecutionObjectInternal object, 203 String eventType, 204 String oldState, 205 String newState) throws BaseException { 206 207 return new WfStateEventAuditWrapper(t,object,eventType,oldState,newState); 208 } 209 210 public WfStateEventAuditInternal createStateEventAuditWrapper ( 211 String userAuth, 212 StateEventAuditPersistenceInterface po) throws BaseException { 213 214 return new WfStateEventAuditWrapper(userAuth,po); 215 } 216 217 public WfProcessMgrIterator createProcessMgrIteratorWrapper ( 219 SharkTransaction t, 220 String userAuth) throws BaseException { 221 222 return new WfProcessMgrIteratorWrapper(t,userAuth); 223 } 224 225 public WfProcessIterator createProcessIteratorWrapper ( 226 SharkTransaction t, 227 String userAuth, 228 String mgrName) throws BaseException { 229 230 return new WfProcessIteratorWrapper(t,userAuth,mgrName); 231 } 232 233 public WfProcessIterator createProcessIteratorWrapper ( 234 SharkTransaction t, 235 String userAuth, 236 String procId, 237 String actId) throws BaseException { 238 239 return new WfProcessIteratorWrapper(t,userAuth,procId,actId); 240 } 241 242 public WfProcessIterator createProcessIteratorWrapper ( 243 SharkTransaction t, 244 String userAuth, 245 String username, 246 boolean ext) throws BaseException { 247 248 return new WfProcessIteratorWrapper(t,userAuth,username,true); 249 } 250 251 public WfActivityIterator createActivityIteratorWrapper ( 252 SharkTransaction t, 253 String userAuth, 254 String procId) throws BaseException { 255 256 return new WfActivityIteratorWrapper(t,userAuth,procId); 257 } 258 259 public WfAssignmentIterator createAssignmentIteratorWrapper ( 260 SharkTransaction t, 261 String userAuth, 262 String procId, 263 String actId) throws BaseException { 264 265 return new WfAssignmentIteratorWrapper(t,userAuth,procId,actId); 266 } 267 268 public WfAssignmentIterator createAssignmentIteratorWrapper ( 269 SharkTransaction t, 270 String userAuth, 271 String username) throws BaseException { 272 273 return new WfAssignmentIteratorWrapper(t,userAuth,username); 274 } 275 276 public WfResourceIterator createResourceIteratorWrapper ( 277 SharkTransaction t, 278 String userAuth) throws BaseException { 279 280 return new WfResourceIteratorWrapper(t,userAuth); 281 } 282 283 public WfEventAuditIterator createEventAuditIteratorWrapper ( 284 SharkTransaction t, 285 String userAuth, 286 String procId) throws BaseException { 287 288 return new WfEventAuditIteratorWrapper(t,userAuth,procId); 289 } 290 291 public WfEventAuditIterator createEventAuditIteratorWrapper ( 292 SharkTransaction t, 293 String userAuth, 294 String procId, 295 String actId) throws BaseException { 296 297 return new WfEventAuditIteratorWrapper(t,userAuth,procId,actId); 298 } 299 300 public AdminInterface createAdminInterface () { 301 return new Administration(); 302 } 303 304 public AdminMisc createAdminMisc () { 305 return new AdminMiscImpl(); 306 } 307 308 public ApplicationMap createApplicationMap () { 309 return new ApplicationMapImpl(); 310 } 311 312 public ExecutionAdministration createExecutionAdministration () { 313 return new ExecutionAdmin(); 314 } 315 316 public ParticipantMappingAdministration createParticipantMappingAdministration () { 317 return new ParticipantMappingsAdministrationImpl(); 318 } 319 320 public ApplicationMappingAdministration createApplicationMappingAdministration () { 321 return new ApplicationMappingsAdministrationImpl(); 322 } 323 324 public ScriptMappingAdministration createScriptMappingAdministration () { 325 return new ScriptMappingsAdministrationImpl(); 326 } 327 328 public PackageAdministration createPackageAdministration () { 329 return new PackageAdmin(); 330 } 331 332 public ParticipantMap createParticipantMap () { 333 return new ParticipantMapImpl(); 334 } 335 336 public RepositoryMgr createRepositoryManager () { 337 return new RepositoryManager(); 338 } 339 340 public SharkConnection createSharkConnection () { 341 return new SharkConnectionImpl(); 342 } 343 344 public UserGroupAdministration createUserGroupAdministration () { 345 return new UserGroupAdmin(); 346 } 347 348 public CacheAdministration createCacheAdministration () { 349 return new CacheAdmin(); 350 } 351 352 public DeadlineAdministration createDeadlineAdministration () { 353 return new DeadlineAdmin(); 354 } 355 356 public LimitAdministration createLimitAdministration () { 357 return new LimitAdmin(); 358 } 359 360 } 361 | Popular Tags |