Source Code Cross Referenced for BasicWorkflowEventBroker.java in  » Workflow-Engines » obe-1.0 » org » obe » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » obe 1.0 » org.obe.event 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*--
002:
003:         Copyright (C) 2002-2005 Adrian Price.
004:         All rights reserved.
005:
006:         Redistribution and use in source and binary forms, with or without
007:         modification, are permitted provided that the following conditions
008:         are met:
009:
010:         1. Redistributions of source code must retain the above copyright
011:            notice, this list of conditions, and the following disclaimer.
012:
013:         2. Redistributions in binary form must reproduce the above copyright
014:            notice, this list of conditions, and the disclaimer that follows
015:            these conditions in the documentation and/or other materials
016:            provided with the distribution.
017:
018:         3. The names "OBE" and "Open Business Engine" must not be used to
019:         	endorse or promote products derived from this software without prior
020:         	written permission.  For written permission, please contact
021:         	adrianprice@sourceforge.net.
022:
023:         4. Products derived from this software may not be called "OBE" or
024:         	"Open Business Engine", nor may "OBE" or "Open Business Engine"
025:         	appear in their name, without prior written permission from
026:         	Adrian Price (adrianprice@users.sourceforge.net).
027:
028:         THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
029:         WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
030:         OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
031:         DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
032:         INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
033:         (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
034:         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
035:         HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
036:         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
037:         IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
038:         POSSIBILITY OF SUCH DAMAGE.
039:
040:         For more information on OBE, please see
041:         <http://obe.sourceforge.net/>.
042:
043:         */
044:
045:        package org.obe.event;
046:
047:        import org.apache.commons.logging.Log;
048:        import org.apache.commons.logging.LogFactory;
049:        import org.obe.client.api.repository.RepositoryException;
050:        import org.obe.client.api.repository.WorkflowEventSubscription;
051:        import org.obe.client.api.repository.WorkflowListenerMetaData;
052:        import org.obe.engine.repository.AbstractRepository;
053:        import org.obe.spi.event.*;
054:        import org.obe.spi.model.ActivityInstance;
055:        import org.obe.spi.model.AttributeInstance;
056:        import org.obe.spi.model.ProcessInstance;
057:        import org.obe.spi.model.WorkItem;
058:        import org.obe.spi.service.ResourceRepository;
059:        import org.obe.spi.service.ServiceManager;
060:        import org.obe.spi.service.WorkflowEventBroker;
061:        import org.obe.xpdl.model.activity.Activity;
062:        import org.obe.xpdl.model.data.DataField;
063:        import org.obe.xpdl.model.pkg.XPDLPackage;
064:        import org.obe.xpdl.model.transition.Transition;
065:        import org.obe.xpdl.model.workflow.WorkflowProcess;
066:
067:        import java.io.IOException;
068:        import java.util.EventListener;
069:        import java.util.HashMap;
070:        import java.util.Map;
071:
072:        /**
073:         * Provides access to OBE run-time events.
074:         * The event object passed to a listener provides access to the entity that was
075:         * the source of the event.  The listener may call methods on that entity (thus
076:         * potentially affecting the entity's state and causing further notifications).
077:         * When running in a transactional environment (such as the J2EE server),
078:         * listeners are also able to veto the transaction, by calling
079:         * <code>setRollbackOnly()</code> on the <code>UserTransaction</code> object.
080:         * At present, exceptions thrown by listener methods are logged and ignored;
081:         * this behaviour may well change.
082:         *
083:         * @author Adrian Price
084:         */
085:        public final class BasicWorkflowEventBroker extends AbstractRepository
086:                implements  WorkflowEventBroker {
087:
088:            private static final Log _logger = LogFactory
089:                    .getLog(BasicWorkflowEventBroker.class);
090:            private static final String LISTENER_PACKAGE = "org.obe.spi.event.";
091:            private static final String[] _keys = { "ActivityInstanceListener",
092:                    "AttributeInstanceListener", "PackageListener",
093:                    "ProcessDefinitionListener", "ProcessInstanceListener",
094:                    "TransitionListener", "WorkItemListener" };
095:            private final ActivityInstanceListenerSupport actInstListenerSupport;
096:            private final AttributeInstanceListenerSupport attrInstListenerSupport;
097:            private final PackageListenerSupport pkgListenerSupport;
098:            private final ProcessDefinitionListenerSupport procDefListenerSupport;
099:            private final ProcessInstanceListenerSupport procInstListenerSupport;
100:            private final TransitionListenerSupport transListenerSupport;
101:            private final WorkItemListenerSupport workItemListenerSupport;
102:            private final AbstractListenerSupport[] listenerSupport;
103:            private final Map listenerSupportMap = new HashMap();
104:
105:            public BasicWorkflowEventBroker(ServiceManager svcMgr) {
106:                super (svcMgr, WorkflowListenerMetaData.class);
107:                listenerSupport = new AbstractListenerSupport[] {
108:                        actInstListenerSupport = new ActivityInstanceListenerSupport(
109:                                this ),
110:                        attrInstListenerSupport = new AttributeInstanceListenerSupport(
111:                                this ),
112:                        pkgListenerSupport = new PackageListenerSupport(this ),
113:                        procDefListenerSupport = new ProcessDefinitionListenerSupport(
114:                                this ),
115:                        procInstListenerSupport = new ProcessInstanceListenerSupport(
116:                                this ),
117:                        transListenerSupport = new TransitionListenerSupport(
118:                                this ),
119:                        workItemListenerSupport = new WorkItemListenerSupport(
120:                                this ) };
121:                for (int i = 0; i < _keys.length; i++)
122:                    listenerSupportMap.put(_keys[i], listenerSupport[i]);
123:            }
124:
125:            protected synchronized void clear() {
126:                super .clear();
127:                for (int i = 0; i < listenerSupport.length; i++)
128:                    listenerSupport[i].clear();
129:            }
130:
131:            public synchronized void init() throws IOException,
132:                    RepositoryException {
133:                super .init();
134:
135:                // Add all the configured event listeners.
136:                ResourceRepository entityResolver = _svcMgr
137:                        .getResourceRepository();
138:                Entry[] entries = findEntries();
139:                for (int i = 0; i < entries.length; i++) {
140:                    Entry entry = entries[i];
141:                    WorkflowListenerMetaData metaData = (WorkflowListenerMetaData) entry
142:                            .getMetaData();
143:
144:                    // Find the appropriate listener support and add the event listener.
145:                    WorkflowEventSubscription[] listeners = metaData
146:                            .getSubscription();
147:                    if (listeners != null) {
148:                        for (int j = 0; j < listeners.length; j++) {
149:                            WorkflowEventSubscription listener = listeners[j];
150:                            findListenerSupport(listener.listenerType)
151:                                    .addListener(
152:                                            (EventListener) entry
153:                                                    .getInstance(entityResolver),
154:                                            listener.eventMask);
155:                        }
156:                    }
157:                }
158:            }
159:
160:            private AbstractListenerSupport findListenerSupport(String type)
161:                    throws RepositoryException {
162:
163:                // Strip leading package name from listener type if present.
164:                if (type.startsWith(LISTENER_PACKAGE))
165:                    type = type.substring(LISTENER_PACKAGE.length(), type
166:                            .length());
167:                AbstractListenerSupport support = (AbstractListenerSupport) listenerSupportMap
168:                        .get(type);
169:                if (support == null)
170:                    throw new RepositoryException("Invalid listener type: "
171:                            + type);
172:                return support;
173:            }
174:
175:            protected Log getLogger() {
176:                return _logger;
177:            }
178:
179:            /**
180:             * Subscribes to activity instance events.
181:             *
182:             * @param listener The activity instance event listener to add.
183:             * @param mask     Bitmask to specify which events to notify.
184:             */
185:            public void addActivityInstanceListener(
186:                    ActivityInstanceListener listener, int mask) {
187:
188:                actInstListenerSupport.addListener(listener, mask);
189:            }
190:
191:            /**
192:             * Subscribes to activity instance events.
193:             *
194:             * @param listener The activity instance event listener to add.
195:             * @param mask     Bitmask to specify which events to notify.
196:             */
197:            public void addActivityInstanceListener(
198:                    ApplicationEventListener listener, int mask) {
199:
200:                actInstListenerSupport.addListener(listener, mask);
201:            }
202:
203:            /**
204:             * Subscribes to attribute instance events.
205:             *
206:             * @param listener The attribute instance event listener to add.
207:             * @param mask     Bitmask to specify which events to notify.
208:             */
209:            public void addAttributeInstanceListener(
210:                    AttributeInstanceListener listener, int mask) {
211:
212:                attrInstListenerSupport.addListener(listener, mask);
213:            }
214:
215:            /**
216:             * Subscribes to attribute instance events.
217:             *
218:             * @param listener The attribute instance event listener to add.
219:             * @param mask     Bitmask to specify which events to notify.
220:             */
221:            public void addAttributeInstanceListener(
222:                    ApplicationEventListener listener, int mask) {
223:
224:                attrInstListenerSupport.addListener(listener, mask);
225:            }
226:
227:            /**
228:             * Subscribes to package events.
229:             *
230:             * @param listener The package event listener to add.
231:             * @param mask     Bitmask to specify which events to notify.
232:             */
233:            public void addPackageListener(PackageListener listener, int mask) {
234:                pkgListenerSupport.addListener(listener, mask);
235:            }
236:
237:            /**
238:             * Subscribes to package events.
239:             *
240:             * @param listener The package event listener to add.
241:             * @param mask     Bitmask to specify which events to notify.
242:             */
243:            public void addPackageListener(ApplicationEventListener listener,
244:                    int mask) {
245:
246:                pkgListenerSupport.addListener(listener, mask);
247:            }
248:
249:            /**
250:             * Subscribes to process definition events.
251:             *
252:             * @param listener The process definition event listener to add.
253:             * @param mask     Bitmask to specify which events to notify.
254:             */
255:            public void addProcessDefinitionListener(
256:                    ProcessDefinitionListener listener, int mask) {
257:
258:                procDefListenerSupport.addListener(listener, mask);
259:            }
260:
261:            /**
262:             * Subscribes to process definition events.
263:             *
264:             * @param listener The process definition event listener to add.
265:             * @param mask     Bitmask to specify which events to notify.
266:             */
267:            public void addProcessDefinitionListener(
268:                    ApplicationEventListener listener, int mask) {
269:
270:                procDefListenerSupport.addListener(listener, mask);
271:            }
272:
273:            /**
274:             * Subscribes to process instance events.
275:             *
276:             * @param listener The process instance event listener to add.
277:             * @param mask     Bitmask to specify which events to notify.
278:             */
279:            public void addProcessInstanceListener(
280:                    ProcessInstanceListener listener, int mask) {
281:
282:                procInstListenerSupport.addListener(listener, mask);
283:            }
284:
285:            /**
286:             * Subscribes to process instance events.
287:             *
288:             * @param listener The process instance event listener to add.
289:             * @param mask     Bitmask to specify which events to notify.
290:             */
291:            public void addProcessInstanceListener(
292:                    ApplicationEventListener listener, int mask) {
293:
294:                procInstListenerSupport.addListener(listener, mask);
295:            }
296:
297:            /**
298:             * Subscribes to transition events.
299:             *
300:             * @param listener The transition event listener to add.
301:             * @param mask     Bitmask to specify which events to notify.
302:             */
303:            public void addTransitionListener(TransitionListener listener,
304:                    int mask) {
305:                transListenerSupport.addListener(listener, mask);
306:            }
307:
308:            /**
309:             * Subscribes to transition events.
310:             *
311:             * @param listener The transition event listener to add.
312:             * @param mask     Bitmask to specify which events to notify.
313:             */
314:            public void addTransitionListener(
315:                    ApplicationEventListener listener, int mask) {
316:
317:                transListenerSupport.addListener(listener, mask);
318:            }
319:
320:            /**
321:             * Subscribes to work item events.
322:             *
323:             * @param listener The work item event listener to add.
324:             * @param mask     Bitmask to specify which events to notify.
325:             */
326:            public void addWorkItemListener(WorkItemListener listener, int mask) {
327:                workItemListenerSupport.addListener(listener, mask);
328:            }
329:
330:            /**
331:             * Subscribes to work item events.
332:             *
333:             * @param listener The work item event listener to add.
334:             * @param mask     Bitmask to specify which events to notify.
335:             */
336:            public void addWorkItemListener(ApplicationEventListener listener,
337:                    int mask) {
338:
339:                workItemListenerSupport.addListener(listener, mask);
340:            }
341:
342:            /**
343:             * Internal use only - do not call.
344:             */
345:            public void fireActivityInstanceEvent(ActivityInstance src, int id,
346:                    Activity defn, int previousState) {
347:
348:                actInstListenerSupport.fireActivityInstanceEvent(src, id, defn,
349:                        previousState);
350:            }
351:
352:            /**
353:             * Internal use only - do not call.
354:             */
355:            public void fireActivityInstanceAborted(ActivityInstance src,
356:                    Activity defn, int previousState) {
357:
358:                actInstListenerSupport.fireActivityInstanceAborted(src, defn,
359:                        previousState);
360:            }
361:
362:            /**
363:             * Internal use only - do not call.
364:             */
365:            public void fireActivityInstanceCompleted(ActivityInstance src,
366:                    Activity defn, int previousState) {
367:
368:                actInstListenerSupport.fireActivityInstanceCompleted(src, defn,
369:                        previousState);
370:            }
371:
372:            /**
373:             * Internal use only - do not call.
374:             */
375:            public void fireActivityInstanceCreated(ActivityInstance src,
376:                    Activity defn) {
377:
378:                actInstListenerSupport.fireActivityInstanceCreated(src, defn);
379:            }
380:
381:            /**
382:             * Internal use only - do not call.
383:             */
384:            public void fireActivityInstanceResumed(ActivityInstance src,
385:                    Activity defn, int previousState) {
386:
387:                actInstListenerSupport.fireActivityInstanceResumed(src, defn,
388:                        previousState);
389:            }
390:
391:            /**
392:             * Internal use only - do not call.
393:             */
394:            public void fireActivityInstanceStarted(ActivityInstance src,
395:                    Activity defn, int previousState) {
396:
397:                actInstListenerSupport.fireActivityInstanceStarted(src, defn,
398:                        previousState);
399:            }
400:
401:            /**
402:             * Internal use only - do not call.
403:             */
404:            public void fireActivityInstanceStopped(ActivityInstance src,
405:                    Activity defn, int previousState) {
406:
407:                actInstListenerSupport.fireActivityInstanceStopped(src, defn,
408:                        previousState);
409:            }
410:
411:            /**
412:             * Internal use only - do not call.
413:             */
414:            public void fireActivityInstanceSuspended(ActivityInstance src,
415:                    Activity defn, int previousState) {
416:
417:                actInstListenerSupport.fireActivityInstanceSuspended(src, defn,
418:                        previousState);
419:            }
420:
421:            /**
422:             * Internal use only - do not call.
423:             */
424:            public void fireActivityInstanceTerminated(ActivityInstance src,
425:                    Activity defn, int previousState) {
426:
427:                actInstListenerSupport.fireActivityInstanceTerminated(src,
428:                        defn, previousState);
429:            }
430:
431:            /**
432:             * Internal use only - do not call.
433:             */
434:            public void fireAttributeInstanceCreated(AttributeInstance src,
435:                    DataField defn) {
436:
437:                attrInstListenerSupport.fireAttributeInstanceCreated(src, defn);
438:            }
439:
440:            /**
441:             * Internal use only - do not call.
442:             */
443:            public void fireAttributeInstanceDeleted(AttributeInstance src,
444:                    DataField defn) {
445:
446:                attrInstListenerSupport.fireAttributeInstanceDeleted(src, defn);
447:            }
448:
449:            /**
450:             * Internal use only - do not call.
451:             */
452:            public void fireAttributeInstanceUpdated(AttributeInstance src,
453:                    DataField defn, Object previousValue) {
454:
455:                attrInstListenerSupport.fireAttributeInstanceUpdated(src, defn,
456:                        previousValue);
457:            }
458:
459:            /**
460:             * Internal use only - do not call.
461:             */
462:            public void firePackageCreated(XPDLPackage src) {
463:                pkgListenerSupport.firePackageCreated(src);
464:            }
465:
466:            /**
467:             * Internal use only - do not call.
468:             */
469:            public void firePackageDeleted(XPDLPackage src) {
470:                pkgListenerSupport.firePackageDeleted(src);
471:            }
472:
473:            /**
474:             * Internal use only - do not call.
475:             */
476:            public void firePackageUpdated(XPDLPackage src) {
477:                pkgListenerSupport.firePackageUpdated(src);
478:            }
479:
480:            /**
481:             * Internal use only - do not call.
482:             */
483:            public void fireProcessDefinitionCreated(WorkflowProcess src) {
484:                procDefListenerSupport.fireProcessDefinitionCreated(src);
485:            }
486:
487:            /**
488:             * Internal use only - do not call.
489:             */
490:            public void fireProcessDefinitionDeleted(WorkflowProcess src) {
491:                procDefListenerSupport.fireProcessDefinitionDeleted(src);
492:            }
493:
494:            /**
495:             * Internal use only - do not call.
496:             */
497:            public void fireProcessDefinitionDisabled(WorkflowProcess src) {
498:                procDefListenerSupport.fireProcessDefinitionDisabled(src);
499:            }
500:
501:            /**
502:             * Internal use only - do not call.
503:             */
504:            public void fireProcessDefinitionEnabled(WorkflowProcess src) {
505:                procDefListenerSupport.fireProcessDefinitionEnabled(src);
506:            }
507:
508:            /**
509:             * Internal use only - do not call.
510:             */
511:            public void fireProcessDefinitionUpdated(WorkflowProcess src) {
512:                procDefListenerSupport.fireProcessDefinitionUpdated(src);
513:            }
514:
515:            /**
516:             * Internal use only - do not call.
517:             */
518:            public void fireProcessInstanceEvent(ProcessInstance src, int id,
519:                    WorkflowProcess defn, int previousState) {
520:
521:                procInstListenerSupport.fireProcessInstanceEvent(src, id, defn,
522:                        previousState);
523:            }
524:
525:            /**
526:             * Internal use only - do not call.
527:             */
528:            public void fireProcessInstanceAborted(ProcessInstance src,
529:                    WorkflowProcess defn, int previousState) {
530:
531:                procInstListenerSupport.fireProcessInstanceAborted(src, defn,
532:                        previousState);
533:            }
534:
535:            /**
536:             * Internal use only - do not call.
537:             */
538:            public void fireProcessInstanceCompleted(ProcessInstance src,
539:                    WorkflowProcess defn, int previousState) {
540:
541:                procInstListenerSupport.fireProcessInstanceCompleted(src, defn,
542:                        previousState);
543:            }
544:
545:            /**
546:             * Internal use only - do not call.
547:             */
548:            public void fireProcessInstanceCreated(ProcessInstance src,
549:                    WorkflowProcess defn) {
550:
551:                procInstListenerSupport.fireProcessInstanceCreated(src, defn);
552:            }
553:
554:            /**
555:             * Internal use only - do not call.
556:             */
557:            public void fireProcessInstanceDeleted(ProcessInstance src,
558:                    WorkflowProcess defn, int previousState) {
559:
560:                procInstListenerSupport.fireProcessInstanceDeleted(src, defn,
561:                        previousState);
562:            }
563:
564:            /**
565:             * Internal use only - do not call.
566:             */
567:            public void fireProcessInstanceResumed(ProcessInstance src,
568:                    WorkflowProcess defn, int previousState) {
569:
570:                procInstListenerSupport.fireProcessInstanceResumed(src, defn,
571:                        previousState);
572:            }
573:
574:            /**
575:             * Internal use only - do not call.
576:             */
577:            public void fireProcessInstanceStarted(ProcessInstance src,
578:                    WorkflowProcess defn, int previousState) {
579:
580:                procInstListenerSupport.fireProcessInstanceStarted(src, defn,
581:                        previousState);
582:            }
583:
584:            /**
585:             * Internal use only - do not call.
586:             */
587:            public void fireProcessInstanceSuspended(ProcessInstance src,
588:                    WorkflowProcess defn, int previousState) {
589:
590:                procInstListenerSupport.fireProcessInstanceSuspended(src, defn,
591:                        previousState);
592:            }
593:
594:            /**
595:             * Internal use only - do not call.
596:             */
597:            public void fireProcessInstanceTerminated(ProcessInstance src,
598:                    WorkflowProcess defn, int previousState) {
599:
600:                procInstListenerSupport.fireProcessInstanceTerminated(src,
601:                        defn, previousState);
602:            }
603:
604:            /**
605:             * Internal use only - do not call.
606:             */
607:            public void fireTransitionEvent(ActivityInstance activityInstance,
608:                    int id, Transition defn) {
609:
610:                transListenerSupport.fireTransitionEvent(activityInstance, id,
611:                        defn);
612:            }
613:
614:            /**
615:             * Internal use only - do not call.
616:             */
617:            public void fireTransitionFired(ActivityInstance activityInstance,
618:                    Transition defn) {
619:
620:                transListenerSupport
621:                        .fireTransitionFired(activityInstance, defn);
622:            }
623:
624:            /**
625:             * Internal use only - do not call.
626:             */
627:            public void fireWorkItemEvent(WorkItem src, int id, Activity defn,
628:                    int previousState) {
629:
630:                workItemListenerSupport.fireWorkItemEvent(src, id, defn,
631:                        previousState);
632:            }
633:
634:            /**
635:             * Internal use only - do not call.
636:             */
637:            public void fireWorkItemAborted(WorkItem src, Activity defn,
638:                    int previousState) {
639:
640:                workItemListenerSupport.fireWorkItemAborted(src, defn,
641:                        previousState);
642:            }
643:
644:            /**
645:             * Internal use only - do not call.
646:             */
647:            public void fireWorkItemAssigned(WorkItem src, Activity defn) {
648:                workItemListenerSupport.fireWorkItemAssigned(src, defn);
649:            }
650:
651:            /**
652:             * Internal use only - do not call.
653:             */
654:            public void fireWorkItemCompleted(WorkItem src, Activity defn,
655:                    int previousState) {
656:
657:                workItemListenerSupport.fireWorkItemCompleted(src, defn,
658:                        previousState);
659:            }
660:
661:            /**
662:             * Internal use only - do not call.
663:             */
664:            public void fireWorkItemCreated(WorkItem src, Activity defn) {
665:                workItemListenerSupport.fireWorkItemCreated(src, defn);
666:            }
667:
668:            /**
669:             * Internal use only - do not call.
670:             */
671:            public void fireWorkItemResumed(WorkItem src, Activity defn,
672:                    int previousState) {
673:
674:                workItemListenerSupport.fireWorkItemResumed(src, defn,
675:                        previousState);
676:            }
677:
678:            /**
679:             * Internal use only - do not call.
680:             */
681:            public void fireWorkItemStarted(WorkItem src, Activity defn,
682:                    int previousState) {
683:
684:                workItemListenerSupport.fireWorkItemStarted(src, defn,
685:                        previousState);
686:            }
687:
688:            /**
689:             * Internal use only - do not call.
690:             */
691:            public void fireWorkItemStopped(WorkItem src, Activity defn,
692:                    int previousState) {
693:
694:                workItemListenerSupport.fireWorkItemStopped(src, defn,
695:                        previousState);
696:            }
697:
698:            /**
699:             * Internal use only - do not call.
700:             */
701:            public void fireWorkItemSuspended(WorkItem src, Activity defn,
702:                    int previousState) {
703:
704:                workItemListenerSupport.fireWorkItemSuspended(src, defn,
705:                        previousState);
706:            }
707:
708:            /**
709:             * Internal use only - do not call.
710:             */
711:            public void fireWorkItemTerminated(WorkItem src, Activity defn,
712:                    int previousState) {
713:
714:                workItemListenerSupport.fireWorkItemTerminated(src, defn,
715:                        previousState);
716:            }
717:
718:            /**
719:             * Unsubscribes from activity instance events.
720:             *
721:             * @param listener The activity instance event listener to remove.
722:             */
723:            public void removeActivityInstanceListener(
724:                    ActivityInstanceListener listener) {
725:
726:                actInstListenerSupport.removeListener(listener);
727:            }
728:
729:            /**
730:             * Unsubscribes from activity instance events.
731:             *
732:             * @param listener The activity instance event listener to remove.
733:             */
734:            public void removeActivityInstanceListener(
735:                    ApplicationEventListener listener) {
736:
737:                actInstListenerSupport.removeListener(listener);
738:            }
739:
740:            /**
741:             * Unsubscribes from attribute instance events.
742:             *
743:             * @param listener The attribute instance event listener to remove.
744:             */
745:            public void removeAttributeInstanceListener(
746:                    AttributeInstanceListener listener) {
747:
748:                attrInstListenerSupport.removeListener(listener);
749:            }
750:
751:            /**
752:             * Unsubscribes from attribute instance events.
753:             *
754:             * @param listener The attribute instance event listener to remove.
755:             */
756:            public void removeAttributeInstanceListener(
757:                    ApplicationEventListener listener) {
758:
759:                attrInstListenerSupport.removeListener(listener);
760:            }
761:
762:            /**
763:             * Unsubscribes from package events.
764:             *
765:             * @param listener The package event listener to remove.
766:             */
767:            public void removePackageListener(PackageListener listener) {
768:                pkgListenerSupport.removeListener(listener);
769:            }
770:
771:            /**
772:             * Unsubscribes from package events.
773:             *
774:             * @param listener The package event listener to remove.
775:             */
776:            public void removePackageListener(ApplicationEventListener listener) {
777:                pkgListenerSupport.removeListener(listener);
778:            }
779:
780:            /**
781:             * Unsubscribes from process definition events.
782:             *
783:             * @param listener The process definition event listener to remove.
784:             */
785:            public void removeProcessDefinitionListener(
786:                    ProcessDefinitionListener listener) {
787:
788:                procDefListenerSupport.removeListener(listener);
789:            }
790:
791:            /**
792:             * Unsubscribes from process definition events.
793:             *
794:             * @param listener The process definition event listener to remove.
795:             */
796:            public void removeProcessDefinitionListener(
797:                    ApplicationEventListener listener) {
798:
799:                procDefListenerSupport.removeListener(listener);
800:            }
801:
802:            /**
803:             * Unsubscribes from process instance events.
804:             *
805:             * @param listener The process instance event listener to remove.
806:             */
807:            public void removeProcessInstanceListener(
808:                    ProcessInstanceListener listener) {
809:
810:                procInstListenerSupport.removeListener(listener);
811:            }
812:
813:            /**
814:             * Unsubscribes from process instance events.
815:             *
816:             * @param listener The process instance event listener to remove.
817:             */
818:            public void removeProcessInstanceListener(
819:                    ApplicationEventListener listener) {
820:
821:                procInstListenerSupport.removeListener(listener);
822:            }
823:
824:            /**
825:             * Unsubscribes from transition events.
826:             *
827:             * @param listener The transition event listener to remove.
828:             */
829:            public void removeTransitionListener(WorkItemListener listener) {
830:                transListenerSupport.removeListener(listener);
831:            }
832:
833:            /**
834:             * Unsubscribes from transition events.
835:             *
836:             * @param listener The transition event listener to remove.
837:             */
838:            public void removeTransitionListener(
839:                    ApplicationEventListener listener) {
840:                transListenerSupport.removeListener(listener);
841:            }
842:
843:            /**
844:             * Unsubscribes from work item events.
845:             *
846:             * @param listener The work item event listener to remove.
847:             */
848:            public void removeWorkItemListener(WorkItemListener listener) {
849:                workItemListenerSupport.removeListener(listener);
850:            }
851:
852:            /**
853:             * Unsubscribes from work item events.
854:             *
855:             * @param listener The work item event listener to remove.
856:             */
857:            public void removeWorkItemListener(ApplicationEventListener listener) {
858:                workItemListenerSupport.removeListener(listener);
859:            }
860:
861:            public String getServiceName() {
862:                return SERVICE_NAME;
863:            }
864:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.