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


001:        /*
002:         * Bossa Workflow System
003:         *
004:         * $Id: Transition.java,v 1.15 2004/02/05 21:43:24 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.wfnet;
026:
027:        import java.io.Serializable;
028:        import java.util.ArrayList;
029:        import java.util.Collections;
030:        import java.util.List;
031:
032:        import com.bigbross.bossa.resource.Expression;
033:
034:        /**
035:         * This class represents the definition of a transition.
036:         *
037:         * @author <a href="http://www.bigbross.com">BigBross Team</a>
038:         */
039:        public class Transition implements  Serializable {
040:
041:            private CaseType caseType;
042:
043:            private String id;
044:
045:            private Expression resource;
046:
047:            private long timeout;
048:
049:            private ArrayList inputs;
050:
051:            private ArrayList outputs;
052:
053:            /**
054:             * Creates a new transition. <p>
055:             * 
056:             * @param caseType the case type this transition is contained.
057:             * @param id the id of this transition.
058:             * @param resource the expression to select the resource responsible by
059:             *                 this transition.
060:             * @param timeout the number of milliseconds this transition will wait
061:             *                before it fires automatically.
062:             */
063:            Transition(CaseType caseType, String id, String resource,
064:                    long timeout) {
065:                this .caseType = caseType;
066:                this .id = id;
067:                this .resource = resource == null ? null : caseType
068:                        .getResourceRegistry().compile(resource);
069:                this .timeout = timeout;
070:                this .inputs = new ArrayList();
071:                this .outputs = new ArrayList();
072:            }
073:
074:            /**
075:             * Returns the id of this transition. <p>
076:             * 
077:             * @return the id of this transition.
078:             */
079:            public String getId() {
080:                return id;
081:            }
082:
083:            /**
084:             * Returns the resource of this transition. <p>
085:             * 
086:             * @return the resource of this transition.
087:             */
088:            Expression getResource() {
089:                return resource;
090:            }
091:
092:            /**
093:             * Returns the timeout of this transition. <p>
094:             * 
095:             * @return the timeout of this transition.
096:             */
097:            long getTimeout() {
098:                return timeout;
099:            }
100:
101:            /**
102:             * Returns all the input edges of this transition. <p>
103:             * 
104:             * @return a list of all the input edges of this transition.
105:             */
106:            List getInputEdges() {
107:                return Collections.unmodifiableList(inputs);
108:            }
109:
110:            /**
111:             * Returns all the output edges of this transition. <p>
112:             * 
113:             * @return a list of all the output edges of this transition.
114:             */
115:            List getOutputEdges() {
116:                return Collections.unmodifiableList(outputs);
117:            }
118:
119:            /**
120:             * Creates an input edge connecting a place to this transition.
121:             * An input edge ties the firing of this transition to the
122:             * availability in the place of a number of tokens given by an integer
123:             * weight expression. <p>
124:             * 
125:             * @param p the place.
126:             * @param expression the weight expression.
127:             */
128:            public void input(Place p, String expression) {
129:                inputs.add(Edge.newInput(p, expression));
130:            }
131:
132:            /**
133:             * Creates an output edge connecting this transition to a place.
134:             * An output edge produces in the place, after the firing of this
135:             * transition, a number of tokens given by an integer
136:             * weight expression. <p>
137:             * 
138:             * @param p the place.
139:             * @param expression the weight expression.
140:             */
141:            public void output(Place p, String expression) {
142:                outputs.add(Edge.newOutput(p, expression));
143:            }
144:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.