Source Code Cross Referenced for WorkflowDocumentSet.java in  » Workflow-Engines » JFolder » org » jfolder » workflow » model » dms » 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 » JFolder » org.jfolder.workflow.model.dms 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JFolder, Copyright 2001-2006 Gary Steinmetz
003:         *
004:         * Distributable under LGPL license.
005:         * See terms of license at gnu.org.
006:         */
007:
008:        package org.jfolder.workflow.model.dms;
009:
010:        //base classes
011:        import java.io.ByteArrayInputStream;
012:        import java.io.InputStream;
013:        import java.util.ArrayList;
014:        import java.util.HashMap;
015:        import java.util.Iterator;
016:
017:        //project specific classes
018:        import org.jfolder.common.UnexpectedSystemException;
019:        import org.jfolder.workflow.model.WorkflowComponent;
020:        import org.jfolder.workflow.model.WorkflowComponentApplyUpdatesContext;
021:        import org.jfolder.workflow.model.WorkflowComponentIdentifyUpdatesContext;
022:        import org.jfolder.workflow.model.WorkflowComponentUpdates;
023:
024:        //other classes
025:
026:        public class WorkflowDocumentSet extends WorkflowComponent {
027:
028:            //  Document Group -> Documents
029:            //  Document -> Audits, including comments
030:            //
031:            //  each group add, delete, and update (rename?)
032:            //  (add group access?)
033:
034:            //private boolean notNew = false;
035:            //private String workflowInstanceId = null;
036:            private HashMap documentGroupMap = null;
037:            private ArrayList documentGroupArray = null;
038:            private HashMap originalDocumentGroupMap = null;
039:
040:            private WorkflowDocumentSet() {
041:                //this.workflowInstanceId = inWorkflowInstanceId;
042:                //this.notNew = true;
043:                //
044:                this .documentGroupMap = new HashMap();
045:                this .documentGroupArray = new ArrayList();
046:                this .originalDocumentGroupMap = new HashMap();
047:            }
048:
049:            public final static WorkflowDocumentSet newInstance() {
050:                return new WorkflowDocumentSet();
051:            }
052:
053:            //public boolean isNotNew() {
054:            //    return this.notNew;
055:            //}
056:
057:            //public void setNotNew(boolean inNotNew) {
058:            //    this.notNew = inNotNew;
059:            //}
060:
061:            public void addDocumentGroup(WorkflowDocumentGroup inDg) {
062:                String dgName = inDg.getName();
063:                if (!this .documentGroupMap.containsKey(dgName)) {
064:                    this .documentGroupMap.put(dgName, inDg);
065:                    this .documentGroupArray.add(inDg);
066:                } else {
067:                    throw new UnexpectedSystemException("DocumentGroup '"
068:                            + dgName + "' already exists");
069:                }
070:            }
071:
072:            public void removeDocumentGroup(String inName) {
073:                if (this .documentGroupMap.containsKey(inName)) {
074:                    this .documentGroupMap.remove(inName);
075:                    for (int i = 0; i < this .documentGroupArray.size(); i++) {
076:                        WorkflowDocumentGroup nextDg = (WorkflowDocumentGroup) this .documentGroupArray
077:                                .get(i);
078:                        if (nextDg.getName().equals(inName)) {
079:                            this .documentGroupArray.remove(i);
080:                        }
081:                    }
082:                } else {
083:                    throw new UnexpectedSystemException("DocumentGroup '"
084:                            + inName + "' does not exists");
085:                }
086:            }
087:
088:            public int getDocumentGroupCount() {
089:                return this .documentGroupArray.size();
090:            }
091:
092:            public WorkflowDocumentGroup getDocumentGroup(String inName) {
093:                return (WorkflowDocumentGroup) this .documentGroupMap
094:                        .get(inName);
095:            }
096:
097:            public WorkflowDocumentGroup getDocumentGroup(int inIndex) {
098:                return (WorkflowDocumentGroup) this .documentGroupArray
099:                        .get(inIndex);
100:            }
101:
102:            //public String getWorkflowInstanceId() {
103:            //    return this.workflowInstanceId;
104:            //}
105:
106:            //public boolean isDocumentGroupPresent() {
107:            //}
108:
109:            //public int getDocumentGroupCount() {
110:            //}
111:
112:            //public String getDocumentGroupName(int inIndex) {
113:            //}
114:
115:            //public boolean isDeletedDocumentGroupPresent() {
116:            //}
117:
118:            //public int getDelectedDocumentGroupCount() {
119:            //}
120:
121:            //public String getDeletedDocumentGroupName(int inIndex) {
122:            //}
123:
124:            public WorkflowComponentUpdates identifyUpdates(
125:                    WorkflowComponentIdentifyUpdatesContext inWciuc) {
126:
127:                WorkflowDocumentSetUpdates outValue = WorkflowDocumentSetUpdates
128:                        .newInstance();
129:
130:                //
131:                //DOCUMENT GROUPS
132:                //
133:                ArrayList removeDgArray = new ArrayList();
134:                ArrayList addDgArray = new ArrayList();
135:                HashMap removeDgMap = (HashMap) this .originalDocumentGroupMap
136:                        .clone();
137:                Iterator sameDgIter = this .documentGroupMap.keySet().iterator();
138:                while (sameDgIter.hasNext()) {
139:                    String nextSameDg = (String) sameDgIter.next();
140:                    if (removeDgMap.containsKey(nextSameDg)) {
141:                        removeDgMap.remove(nextSameDg);
142:                    } else {
143:                        addDgArray.add(removeDgMap.get(nextSameDg));
144:                    }
145:                }
146:                Iterator removeDgIter = removeDgMap.keySet().iterator();
147:                while (removeDgIter.hasNext()) {
148:                    removeDgArray.add(removeDgIter.next());
149:                }
150:
151:                //
152:                this .originalDocumentGroupMap = (HashMap) this .documentGroupMap
153:                        .clone();
154:
155:                //throw UnexpectedSystemException.notImplemented();
156:
157:                return outValue;
158:            }
159:
160:            public void applyUpdates(
161:                    WorkflowComponentApplyUpdatesContext inWcauc) {
162:                throw UnexpectedSystemException.notImplemented();
163:            }
164:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.