Source Code Cross Referenced for SiteContentIntegration.java in  » Content-Management-System » webman » de » webman » generator » 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 » Content Management System » webman » de.webman.generator 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package de.webman.generator;
002:
003:        import com.teamkonzept.lib.*;
004:        import com.teamkonzept.db.TKDBManager;
005:        import com.teamkonzept.db.QueryConstants;
006:
007:        import java.util.*;
008:        import java.sql.*;
009:
010:        /**
011:         Verwaltet die Praesentations-Componenten eines Dokuments ueber die
012:         Content in das Dokument integeriert werden soll
013:         * @author  $Author: alex $
014:         * @version $Revision: 1.5 $
015:         */
016:        public class SiteContentIntegration {
017:            /**
018:            	Verweis zurück auf den aktuellen statischen Kontext des laufenden Threads
019:             */
020:            private GeneratorContext context;
021:
022:            /** Das Dokument, dem das Objekt zugeordnet ist */
023:            private SiteDocument src;
024:
025:            /** der Name der Component */
026:            private String integrationShortName;
027:
028:            /** die Integrationsart (Single oder Group) */
029:            private int integrationType;
030:
031:            /** Der Content-Tree-Knoten, ueber den die Inhalte geholt werden */
032:            private SiteContentNode contentNode;
033:
034:            /** Typ der Sub-Selection in einem Group-Node (Selektionsklasse) */
035:            private String selectionType;
036:
037:            /** Zusaetzliche Daten fuer Selektionsklasse */
038:            private String selectionData;
039:
040:            /** Eindeutiger Schluessel fuer selectionHash (s.u.) */
041:            private String selectionKey;
042:
043:            /**
044:            	Erzeugt ein Objekt aus der aktuellen ResultRow eines ResultSets der
045:            	Query DBGenSiteContNodes.
046:            	
047:            	Die eventuell notwendige Selection wird erst bei Aufruf von select()
048:            	durchgefuerhrt.
049:             */
050:            public SiteContentIntegration(GeneratorContext context,
051:                    ResultSet rs, SiteDocument src) throws SQLException {
052:
053:                this .context = context != null ? context : GeneratorContext
054:                        .setup();
055:                this .src = src;
056:
057:                this .integrationShortName = rs
058:                        .getString("INTEGRATION_SHORTNAME");
059:                this .integrationType = rs.getInt("INTEGRATION_TYPE");
060:                int nodeId = rs.getInt("CONTENT_NODE_ID");
061:                this .contentNode = rs.wasNull() ? null
062:                        : this .context.contentNodes.getContentNode(nodeId);
063:                this .selectionType = rs.getString("SELECTION_TYPE");
064:
065:                // NOTE: as long as we do not use sybase's jdbc 2.0 driver we need to distinguish
066:                //       between oracle and sybase at this point
067:                //       because SELECTION_DATA is of type java.sql.Clob and ResultSet.getString()
068:                //       return null.
069:                if (TKDBManager.getDBVendor() == QueryConstants.ORACLE) {
070:                    Clob clob = rs.getClob("SELECTION_DATA");
071:                    if (clob != null) {
072:                        this .selectionData = clob.getSubString(1, (int) clob
073:                                .length());
074:                    }
075:                } else {
076:                    this .selectionData = rs.getString("SELECTION_DATA");
077:                }
078:                this .selectionKey = null;
079:            }
080:
081:            public String path() {
082:                return src.path() + "." + integrationShortName;
083:            }
084:
085:            public String toString() {
086:                String result = "<content integration '"
087:                        + path()
088:                        + "'>"
089:                        + " 	integrationType = "
090:                        + (integrationType == SiteReference.INTEGRATION_TYPE_GROUP ? "GROUP"
091:                                : "SINGLE")
092:                        + " 	contentNode = "
093:                        + (contentNode == null ? "primary Group content"
094:                                : contentNode.getId() + "("
095:                                        + contentNode.getShortName() + ")");
096:
097:                if (selectionType != null)
098:                    result += " 	selectionType = " + selectionType
099:                            + " 	selectionData = " + selectionData + " ) ";
100:
101:                if (contentNode != null) {
102:                    result += " contents:";
103:                    Enumeration e = getContents().elements();
104:                    while (e.hasMoreElements()) {
105:                        result += " " + e.nextElement();
106:                    }
107:                }
108:
109:                return result + " </content integration '" + path() + "'> ";
110:            }
111:
112:            /**
113:            	Gewahrleistet, dass eine eventuelle Subselection im selectionHash
114:            	gespeichert ist und setzt dabei selectionKey auf den Zugriffskey.
115:             */
116:            public void select() {
117:                if (selectionType == null)
118:                    return;
119:                if (selectionKey != null)
120:                    return;
121:
122:                selectionKey = context.integrations.newSelection(selectionType,
123:                        selectionData, contentNode.getId());
124:            }
125:
126:            /**
127:            	liefert die Inhalte (TKVector of SiteContent), 
128:            	die der Component zugeordnet sind
129:             */
130:            public TKVector getContents() {
131:                if (contentNode == null)
132:                    return null;
133:                if (selectionType == null)
134:                    return contentNode.getContents();
135:                if (selectionKey == null)
136:                    select();
137:                return (TKVector) context.integrations
138:                        .getSelection(selectionKey);
139:            }
140:
141:            public String getShortName() {
142:                return integrationShortName;
143:            }
144:
145:            public int getIntegrationType() {
146:                return integrationType;
147:            }
148:
149:            public SiteContentNode getContentNode() {
150:                return contentNode;
151:            }
152:
153:            public SiteDocument getSourceDocument() {
154:                return src;
155:            }
156:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.