Source Code Cross Referenced for DocumentFileSystemDirectoryTag.java in  » Workflow-Engines » JFolder » org » jfolder » dms » model » v1 » 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.dms.model.v1 
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.dms.model.v1;
009:
010:        //base classes
011:        import java.util.ArrayList;
012:        import java.util.HashMap;
013:        import java.util.HashSet;
014:        import java.util.Iterator;
015:
016:        //project specific classes
017:        import org.jfolder.common.UnexpectedSystemException;
018:        import org.jfolder.common.entity.InitializeSystemEntityTagContext;
019:        import org.jfolder.common.entity.SystemEntity;
020:        import org.jfolder.common.entity.SystemEntityUpdates;
021:        import org.jfolder.common.entity.SystemEntityUpdatesContext;
022:        import org.jfolder.common.tagging.AppraiseConceptTagContext;
023:        import org.jfolder.common.tagging.ConceptTag;
024:        import org.jfolder.common.tagging.ConceptTagCharacteristic;
025:        import org.jfolder.common.tagging.ConceptTagCharacteristicHolder;
026:        import org.jfolder.common.tagging.ConceptTagConstraint;
027:        import org.jfolder.common.tagging.ConceptTagConstraintHolder;
028:        import org.jfolder.common.tagging.DynamicConceptTagConstraintContext;
029:        import org.jfolder.common.tagging.InitializeConceptTagContext;
030:        import org.jfolder.common.tagging.StaticConceptTagConstraintContext;
031:        import org.jfolder.common.tagging.StudioConceptTagInstanceInfoContext;
032:        import org.jfolder.common.tagging.StudioConceptTagTypeInfoContext;
033:        import org.jfolder.dms.model.DocumentFileSystemDirectory;
034:        import org.jfolder.dms.model.DocumentFileSystemDirectoryUpdates;
035:        import org.jfolder.dms.model.DocumentFileSystemFile;
036:        import org.jfolder.dms.model.DocumentFileSystemFileUpdates;
037:        import org.jfolder.security.audit.SecurityAudit;
038:
039:        //other classes
040:
041:        public class DocumentFileSystemDirectoryTag extends
042:                DocumentFileSystemHolderTag implements 
043:                DocumentFileSystemDirectory {
044:
045:            //
046:            private ConceptTagCharacteristic nameCtchar = null;
047:
048:            //
049:            //name details
050:            private final static String NAME_CTCON = "name";
051:            private final static String NAME_TITLE = "Name";
052:            private final static String NAME_SHORT_DESCRIPTION = "Name";
053:
054:            //
055:            public DocumentFileSystemDirectoryTag() {
056:            }
057:
058:            //
059:            public ConceptTagConstraint[] initializeConstraints(
060:                    ConceptTagConstraintHolder inCtconh) {
061:                //
062:                ConceptTagConstraint outValue[] = new ConceptTagConstraint[1];
063:
064:                //constrain "path"
065:                ConceptTagConstraint nameCtcon = ConceptTagConstraint
066:                        .newInstance(NAME_CTCON, inCtconh);
067:                nameCtcon.setTitle(NAME_TITLE);
068:                nameCtcon.setShortDescription(NAME_SHORT_DESCRIPTION);
069:                //
070:                StaticConceptTagConstraintContext pathSctcc = StaticConceptTagConstraintContext
071:                        .newInstance(nameCtcon);
072:
073:                //
074:                outValue[0] = nameCtcon;
075:
076:                return outValue;
077:            }
078:
079:            public void initializeCharacteristics(
080:                    ConceptTagConstraint inCtcon[]) {
081:                this .nameCtchar = (inCtcon[0]).getCharacteristic();
082:            }
083:
084:            protected void setName(String inName) {
085:                if (this .nameCtchar.getValueLength() > 0) {
086:                    this .nameCtchar.replaceValueAndRemoveLocalFiles(0, inName);
087:                } else {
088:                    this .nameCtchar.addValue(0, inName);
089:                }
090:            }
091:
092:            protected final static DocumentFileSystemDirectoryTag newInstance(
093:                    ConceptTagCharacteristic inCtchar, int inIndex,
094:                    String inName) {
095:
096:                DocumentFileSystemDirectoryTag outValue = new DocumentFileSystemDirectoryTag();
097:
098:                ConceptTagCharacteristicHolder ctcharh = inCtchar.addValue(
099:                        inIndex, outValue, true);
100:
101:                InitializeSystemEntityTagContext isetc = new InitializeSystemEntityTagContext(
102:                        ctcharh);
103:
104:                outValue.initialize(isetc);
105:
106:                outValue.nameCtchar.addValue(0, inName);
107:
108:                return outValue;
109:            }
110:
111:            //
112:            public void appraise(AppraiseConceptTagContext inCtic) {
113:                if (inCtic instanceof  StudioConceptTagInstanceInfoContext) {
114:                    StudioConceptTagInstanceInfoContext sctiic = (StudioConceptTagInstanceInfoContext) inCtic;
115:                    sctiic.setInstanceTitle("Document Directory");
116:                    sctiic.setInstanceDescription("Document Directory");
117:                } else if (inCtic instanceof  StudioConceptTagTypeInfoContext) {
118:                    StudioConceptTagTypeInfoContext scttic = (StudioConceptTagTypeInfoContext) inCtic;
119:                    scttic.setTypeTitle("Document Directory");
120:                    scttic.setTypeDescription("Document Directory");
121:                }
122:            }
123:
124:            //
125:            public SystemEntityUpdates getSystemEntityUpdates(
126:                    SystemEntityUpdatesContext inSeuc) {
127:                //
128:                throw UnexpectedSystemException.unknownState();
129:            }
130:
131:            //
132:            //public SystemEntityUpdates getSystemEntityUpdates(
133:            //    SystemEntityUpdatesContext inSeuc) {
134:            //    
135:            //    DocumentGroupUpdatesTag outValue =
136:            //        new DocumentGroupUpdatesTag(this.path);
137:            //    
138:            //    //
139:            //    HashSet allInstanceKeys = new HashSet();
140:            //    allInstanceKeys.addAll(this.documentInstanceMap.keySet());
141:            //    allInstanceKeys.addAll(this.originalDocumentInstanceMap.keySet());
142:            //    
143:            //    //
144:            //    Iterator keyIter = allInstanceKeys.iterator();
145:            //    while (keyIter.hasNext()) {
146:            //        Object nextDiKey = keyIter.next();
147:            //        boolean nextOrigPresent =
148:            //            this.originalDocumentInstanceMap.containsKey(nextDiKey);
149:            //        boolean nextCurrPresent =
150:            //            this.documentInstanceMap.containsKey(nextDiKey);
151:            //        //DocumentGroup nextDg
152:            //        
153:            //        if (nextOrigPresent && nextCurrPresent) {
154:            //            //no high level changes document groups
155:            //        }
156:            //        else if (!nextOrigPresent && nextCurrPresent) {
157:            //            Object o = this.documentInstanceMap.get(nextDiKey);
158:            //            outValue.addCreateInstance((DocumentInstance)o);
159:            //        }
160:            //        else if (nextOrigPresent && !nextCurrPresent) {
161:            //            Object o = this.originalDocumentInstanceMap.get(nextDiKey);
162:            //            outValue.addDeleteInstance((DocumentInstance)o);
163:            //        }
164:            //        else {
165:            //            throw UnexpectedSystemException.unknownState();
166:            //        }
167:            //    }
168:            //    
169:            //    //
170:            //    HashSet allInstanceValues = new HashSet();
171:            //    allInstanceValues.addAll(this.documentInstanceMap.values());
172:            //    allInstanceValues.addAll(this.originalDocumentInstanceMap.values());
173:            //    
174:            //    //
175:            //    Iterator valueIter = allInstanceValues.iterator();
176:            //    while (valueIter.hasNext()) {
177:            //        DocumentInstance nextDiValue = (DocumentInstance)valueIter.next();
178:            //        
179:            //        SystemEntityUpdatesContext nextSeuc =
180:            //            SystemEntityUpdatesContext.newInstance(outValue, inSeuc);
181:            //        
182:            //        SystemEntityUpdates nextSeu =
183:            //            nextDiValue.getSystemEntityUpdates(nextSeuc);
184:            //        outValue.addInstanceUpdate((DocumentInstanceUpdates)nextSeu);
185:            //    }
186:            //    
187:            //    return outValue;
188:            //}
189:
190:            protected boolean isNameAvailable() {
191:                return (this .nameCtchar.getValueLength() > 0);
192:            }
193:
194:            public String getName() {
195:
196:                String outValue = null;
197:
198:                if (this .nameCtchar.getValueLength() > 0) {
199:                    outValue = this .nameCtchar.getValueAsString(0, null);
200:                } else {
201:                    throw UnexpectedSystemException.unknownState();
202:                }
203:
204:                return outValue;
205:            }
206:
207:            public String toString() {
208:
209:                StringBuffer outValue = new StringBuffer();
210:
211:                return outValue.toString();
212:            }
213:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.