Source Code Cross Referenced for WrappedProcessDefinitionDirectory.java in  » Workflow-Engines » wfmopen-2.1.1 » common » 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 » wfmopen 2.1.1 » common 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the WfMOpen project.
003:         * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
004:         * All rights reserved.
005:         *
006:         * This program is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU General Public License as published by
008:         * the Free Software Foundation; either version 2 of the License, or
009:         * (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * $Id: WrappedProcessDefinitionDirectory.java,v 1.2 2006/09/29 12:32:08 drmlipp Exp $
021:         *
022:         * $Log: WrappedProcessDefinitionDirectory.java,v $
023:         * Revision 1.2  2006/09/29 12:32:08  drmlipp
024:         * Consistently using WfMOpen as projct name now.
025:         *
026:         * Revision 1.1.1.1  2003/12/19 13:01:46  drmlipp
027:         * Updated to 1.1rc1
028:         *
029:         * Revision 1.2  2003/10/28 14:06:13  huaiyang
030:         * refactor it.
031:         *
032:         * Revision 1.1  2003/10/27 15:32:20  huaiyang
033:         * initial.
034:         *
035:         *
036:         *
037:         */
038:        package common;
039:
040:        import java.util.ArrayList;
041:        import java.util.Collection;
042:        import java.util.Iterator;
043:        import java.util.List;
044:
045:        import java.rmi.RemoteException;
046:
047:        import de.danet.an.workflow.omgcore.CannotCompleteException;
048:        import de.danet.an.workflow.omgcore.InvalidStateException;
049:        import de.danet.an.workflow.omgcore.TransitionNotAllowedException;
050:        import de.danet.an.workflow.omgcore.WfActivity;
051:        import de.danet.an.workflow.omgcore.WfProcess;
052:
053:        import de.danet.an.workflow.api.ProcessDefinitionDirectory;
054:        import de.danet.an.workflow.api.Activity;
055:        import de.danet.an.workflow.api.InvalidKeyException;
056:        import de.danet.an.workflow.api.ImportException;
057:        import de.danet.an.workflow.api.ProcessMgr;
058:
059:        /**
060:         * Describe class <code>WrappedProcessDefinitionDirectory</code> here.
061:         *
062:         * @author <a href="mailto:weidauer@danet.de">Christian Weidauer</a>
063:         * @version 1.0
064:         */
065:        public class WrappedProcessDefinitionDirectory {
066:            private ProcessDefinitionDirectory defDir = null;
067:
068:            /**
069:             * Creates a new <code>WrappedProcessDefinitionDirectory</code> instance.
070:             *
071:             * @param  a <code>ProcessDefinitionDirectory</code> value
072:             */
073:            public WrappedProcessDefinitionDirectory(
074:                    ProcessDefinitionDirectory defDir) {
075:                this .defDir = defDir;
076:            }
077:
078:            /**
079:             * This operation method removes a process definition with the
080:             * given ids from the database. If called for a definition that
081:             * does not exist, it does nothing.
082:             * 
083:             * @param packageId Id attribute of the process package.
084:             * @param processId Id attribute of the process.
085:             * @throws RemoteException if a system-level error occurs.
086:             * @throws InvalidKeyException if packageId or processId are
087:             * (formally) invalid ids.
088:             */
089:            public void removeProcessDefinition(String packageId,
090:                    String processId) throws InvalidKeyException {
091:                while (true) {
092:                    try {
093:                        defDir.removeProcessDefinition(packageId, processId);
094:                        break;
095:                    } catch (RemoteException re) {
096:                    }
097:                }
098:            }
099:
100:            /**
101:             * This operation method import new process definitions from an
102:             * XPDL description. <P>
103:             * 
104:             * Note that importing an XPDL description automatically removes
105:             * any existing process definitions that have the same package id
106:             * as the imported package.
107:             * 
108:             * @param processDefinitions document describing the process definitions.
109:             * @return list of prioritized message 
110:             * {@link de.danet.an.workflow.api.PrioritizedMessage 
111:             * <code>PrioritizedMessage</code>}. This list only includes
112:             * messages of priority INFO or WARN. If any (fatal) error has occured, an
113:             * {@link de.danet.an.workflow.api.ImportException
114:             * <code>ImportException</code>}will be thrown and the error
115:             * message can be taken from there.
116:             * @throws RemoteException if a system-level error occurs. The
117:             * import has been aborted.
118:             * @throws ImportException if the input is not a correct.
119:             */
120:            public List importProcessDefinitions(String processDefinitions)
121:                    throws ImportException {
122:                while (true) {
123:                    try {
124:                        return defDir
125:                                .importProcessDefinitions(processDefinitions);
126:                    } catch (RemoteException re) {
127:                        // try again
128:                    }
129:                }
130:            }
131:
132:            /**
133:             * This method delivers the process manager for the process
134:             * definition with the given ids.
135:             *
136:             * @param packageId Id attribute of the process package.
137:             * @param processId Id attribute of the process.
138:             * @return the process manager for the process type.
139:             * @throws InvalidKeyException if not process definition with
140:             * the given ids exists.
141:             * @throws RemoteException if a system-level error occurs.
142:             */
143:            public ProcessMgr processMgr(String packageId, String processId)
144:                    throws InvalidKeyException, RemoteException {
145:                return defDir.processMgr(packageId, processId);
146:            }
147:
148:            /**
149:             * This operation method returns true if the process definition
150:             * with the given ids is enabled.
151:             *
152:             * @param packageId Id attribute of the process package.
153:             * @param processId Id attribute of the process.
154:             * @return if the process definition is enabled.
155:             * @throws InvalidKeyException if no process definition with
156:             * the given ids exists.
157:             * @throws RemoteException if a system-level error occurs.
158:             */
159:            public boolean isEnabled(String packageId, String processId)
160:                    throws RemoteException, InvalidKeyException {
161:                return defDir.isEnabled(packageId, processId);
162:            }
163:
164:            /**
165:             * This operation method set the process definition with the given
166:             * ids as enabled or disabled.
167:             *
168:             * @param packageId Id attribute of the process package.
169:             * @param processId Id attribute of the process.
170:             * @param enabled enable the process definition or not.
171:             * @throws InvalidKeyException if no process definition with
172:             * the given ids exists.
173:             * @throws RemoteException if a system-level error occurs.
174:             */
175:            public void setEnabled(String packageId, String processId,
176:                    boolean enabled) throws RemoteException,
177:                    InvalidKeyException {
178:                defDir.setEnabled(packageId, processId, enabled);
179:            }
180:
181:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.