Source Code Cross Referenced for Bossa.java in  » Workflow-Engines » Bossa » com » bigbross » bossa » 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 » Bossa » com.bigbross.bossa 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Bossa Workflow System
003:         *
004:         * $Id: Bossa.java,v 1.14 2004/01/15 22:13:32 gdvieira Exp $
005:         *
006:         * Copyright (C) 2003,2004 OpenBR Sistemas S/C Ltda.
007:         *
008:         * This file is part of Bossa.
009:         *
010:         * Bossa is free software; you can redistribute it and/or modify it
011:         * under the terms of version 2 of the GNU General Public License as
012:         * published by the Free Software Foundation.
013:         *
014:         * This program is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU General Public
020:         * License along with this program; if not, write to the
021:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
022:         * Boston, MA 02111-1307, USA.
023:         */
024:
025:        package com.bigbross.bossa;
026:
027:        import java.io.IOException;
028:        import java.io.Serializable;
029:
030:        import org.prevayler.Prevayler;
031:
032:        import com.bigbross.bossa.history.Historian;
033:        import com.bigbross.bossa.notify.NotificationBus;
034:        import com.bigbross.bossa.resource.ResourceManager;
035:        import com.bigbross.bossa.wfnet.CaseTypeManager;
036:        import com.bigbross.bossa.work.WorkManager;
037:
038:        /**
039:         * This class represents a workflow engine in the Bossa workflow library. 
040:         * Use an instance of this class, created by the factory class
041:         * <code>BossaFactory</code>, to access all elements of the Bossa API. <p>
042:         *
043:         * @author <a href="http://www.bigbross.com">BigBross Team</a>
044:         * @see com.bigbross.bossa.BossaFactory
045:         */
046:        public class Bossa implements  Serializable {
047:
048:            private CaseTypeManager caseTypeManager;
049:
050:            private ResourceManager resourceManager;
051:
052:            private WorkManager workManager;
053:
054:            private Historian historian;
055:
056:            private NotificationBus notificationBus;
057:
058:            private TimeSource timeSource;
059:
060:            private transient Prevayler prevayler;
061:
062:            /**
063:             * Creates an empty Bossa workflow engine. <p>
064:             */
065:            Bossa() {
066:                caseTypeManager = new CaseTypeManager(this );
067:                resourceManager = new ResourceManager(this );
068:                workManager = new WorkManager(this );
069:                historian = new Historian(this );
070:                notificationBus = null;
071:                timeSource = new DeterministicTimeSource();
072:                prevayler = null;
073:            }
074:
075:            /**
076:             * Associates a notification bus with this engine instance. <p>
077:             * 
078:             * @param notificationBus the notification bus.
079:             */
080:            void setNotificationBus(NotificationBus notificationBus) {
081:                this .notificationBus = notificationBus;
082:            }
083:
084:            /**
085:             * Associates a time source with this engine instance. <p>
086:             * 
087:             * @param timeSource the time source.
088:             */
089:            void setTimeSource(TimeSource timeSource) {
090:                this .timeSource = timeSource;
091:            }
092:
093:            /**
094:             * Associates a prevayler with this engine instance. <p>
095:             * 
096:             * @param prevayler the prevayler.
097:             */
098:            void setPrevayler(Prevayler prevayler) {
099:                this .prevayler = prevayler;
100:            }
101:
102:            /**
103:             * Executes a transaction using the current prevayler. <p>
104:             * 
105:             * @param transaction the transaction to be executed.
106:             * @return the value returned by the transaction.
107:             * @exception BossaException if the transaction throws an exception.
108:             */
109:            public Object execute(BossaTransaction transaction)
110:                    throws BossaException {
111:                try {
112:                    if (prevayler != null) {
113:                        return prevayler.execute(transaction);
114:                    } else {
115:                        return transaction.execute(this );
116:                    }
117:                } catch (BossaException e) {
118:                    throw e;
119:                } catch (Exception e) {
120:                    throw new BossaException("Unexpected exception.", e);
121:                }
122:            }
123:
124:            /**
125:             * Writes to disk the complete object tree of this engine instance. <p>
126:             */
127:            public void takeSnapshot() throws IOException {
128:                prevayler.takeSnapshot();
129:            }
130:
131:            /**
132:             * Returns the case type manager of this engine. <p>
133:             * 
134:             * @return the case type manager of this engine.
135:             */
136:            public CaseTypeManager getCaseTypeManager() {
137:                return caseTypeManager;
138:            }
139:
140:            /**
141:             * Returns the resource manager of this engine. <p>
142:             * 
143:             * @return the resource manager of this engine.
144:             */
145:            public ResourceManager getResourceManager() {
146:                return resourceManager;
147:            }
148:
149:            /**
150:             * Returns the work manager of this engine. <p>
151:             * 
152:             * @return the work manager of this engine.
153:             */
154:            public WorkManager getWorkManager() {
155:                return workManager;
156:            }
157:
158:            /**
159:             * Returns the historian of this engine. <p>
160:             * 
161:             * @return the historian of this engine.
162:             */
163:            public Historian getHistorian() {
164:                return historian;
165:            }
166:
167:            /**
168:             * Returns the time source of this engine. <p>
169:             * 
170:             * @return the time source of this engine.
171:             */
172:            public TimeSource getTimeSource() {
173:                return timeSource;
174:            }
175:
176:            /**
177:             * Returns the notification bus of this engine. <p>
178:             * 
179:             * @return the notification bus of this engine.
180:             */
181:            public NotificationBus getNotificationBus() {
182:                return notificationBus;
183:            }
184:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.