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


001:        package de.webman.sitetree.eventhandler;
002:
003:        import com.teamkonzept.web.*;
004:        import com.teamkonzept.webman.*;
005:        import com.teamkonzept.webman.db.TKWebmanDBManager;
006:        import com.teamkonzept.webman.mainint.*;
007:        import com.teamkonzept.webman.mainint.db.*;
008:
009:        import com.teamkonzept.webman.mainint.db.queries.*;
010:        import com.teamkonzept.webman.mainint.events.*;
011:        import com.teamkonzept.lib.*;
012:        import com.teamkonzept.field.*;
013:        import com.teamkonzept.field.db.*;
014:        import com.teamkonzept.db.*;
015:        import com.teamkonzept.publishing.markups.*;
016:
017:        import java.sql.*;
018:        import java.io.*;
019:        import java.util.*;
020:
021:        /**
022:         * neue Seite mit einer Presentations-Komponente eines Documents und einer
023:         * Auswahlliste (pulldown) mit allen moeglichen zuzuordnenden Contents aus dem
024:         * ContentTree
025:         *
026:         * @author  $Author: sebastian $
027:         * @version $Revision: 1.4 $
028:         */
029:        public class STEditPresentationComponentHandler extends
030:                DefaultEventHandler implements  ParameterTypes, FrameConstants,
031:                DatabaseDefaults {
032:
033:            private STEditPresentationComponentHandler() {
034:            }
035:
036:            private static STEditPresentationComponentHandler instance = new STEditPresentationComponentHandler();
037:
038:            public static STEditPresentationComponentHandler getInstance() {
039:                return instance;
040:            }
041:
042:            public void handleEvent(TKEvent evt) throws TKException {
043:                try {
044:                    WebManEvent.checkEvent(evt.getRemoteUser(), evt.getName(),
045:                            ContextConstants.SITE_TREE);
046:                    String sFormId = evt.getParameter(PARAMETER, "FORM_ID");
047:                    String sIntType = evt.getParameter(PARAMETER,
048:                            "INTEGRATION_TYPE");
049:                    String sConNodeId = evt.getNotNullParameter(PARAMETER,
050:                            "CONTENT_NODE_ID");
051:                    String sSelType = evt.getNotNullParameter(PARAMETER,
052:                            "SELECTION_TYPE");
053:
054:                    TKHTMLTemplate t = evt
055:                            .getPrepHTMLTemplate("st_editComp.tmpl");
056:
057:                    // Hier den vollen Pfad rein
058:                    TKQuery q = TKDBManager
059:                            .newQuery(TKDBContentTreeGetFormSingle.class);
060:                    q.setQueryParams("CONTENT_FORM", new Integer(sFormId));
061:
062:                    q.execute();
063:                    //ResultSet rs = q.fetchResultSet();
064:                    //TKDBTemplate.prepareListTemplate( rs, t, "ST_SCON_LIST" );	// single content liste
065:                    TKDBResult srs = new TKDBResult(q.fetchResultSet());
066:
067:                    TKContentSelectionIterator iterator = new TKContentSelectionIterator(
068:                            srs, t.getListIterator(), "ST_SCON_LIST");
069:                    t.setListIterator(iterator);
070:                    q.close();
071:
072:                    // hier auch den vollen Pfad !!
073:                    q = TKDBManager.newQuery(TKDBContentTreeGetFormType.class);
074:                    q.setQueryParams("CONTENT_NODE_TYPE", GROUP_INTEGER);
075:                    q.setQueryParams("CONTENT_FORM", new Integer(sFormId));
076:                    q.execute();
077:                    TKDBResult grs = new TKDBResult(q.fetchResultSet());
078:                    iterator = new TKContentSelectionIterator(grs, t
079:                            .getListIterator(), "ST_GCON_LIST");
080:                    t.setListIterator(iterator);
081:
082:                    //TKDBTemplate.prepareListTemplate( grs, t, "ST_GCON_LIST" );	// group content liste
083:
084:                    q = TKDBManager.newQuery(TKDBContentSelClassGet.class);
085:                    q.setQueryParams("RESULT_TYPE", new Integer(sIntType));
086:                    q.execute();
087:                    ResultSet rs = q.fetchResultSet();
088:                    TKDBTemplate.prepareListTemplate(rs, t, "ST_SELTYPE_LIST");
089:
090:                    String siteNodeType = evt.getParameter(PARAMETER,
091:                            "SITE_NODE_TYPE");
092:                    String sAttachSel = "";
093:                    t.set(evt.getParams().getClass(PARAMETER));
094:                    if (sIntType.equals(SINGLE)) {
095:                        if (sSelType.equals("") && sConNodeId.equals("")) { // beide null, -> primary group content initial
096:                            if (siteNodeType.equals(GROUP)) { // bei groupknoten (sitetree)
097:                                sAttachSel = "PGC";
098:                            } else { // bei single knoten (sitetree)
099:                                sAttachSel = "SC";
100:                            }
101:                        } else if (sSelType.equals("")
102:                                && !sConNodeId.equals("")) {
103:                            if (SiteTreeUtils.isGroupNode(sConNodeId, grs)) {
104:                                sAttachSel = "GC";
105:                                t.set("THE_CONTENT_NODE_ID", sConNodeId);
106:                            } else {
107:                                sAttachSel = "SC"; // content node != null und seltype null, -> single content initial
108:                                t.set("SINGLE_CONTENT_NODE_ID", sConNodeId);
109:                            }
110:                        } else {
111:                            sAttachSel = "GC"; // content node != null und seltype != null, -> group content initial
112:                            t.set("THE_CONTENT_NODE_ID", sConNodeId);
113:                        }
114:                    }
115:                    t.set("ATTACH_SEL", sAttachSel);
116:                    t
117:                            .set("UPDATE", (evt.getParameter(PARAMETER,
118:                                    "FILLED")) == null ? "" : "Yes");
119:                    t.set("THE_SELECTION_TYPE", sSelType);
120:                    WebManEvent.fillEventsIntoTemplate(evt.getRemoteUser(), t,
121:                            SITE_TREE);
122:                    evt.finishTemplate(t);
123:                } catch (Throwable e) {
124:                    // TO DO : Analyze Exception !
125:                    throw WebmanExceptionHandler.getException(e);
126:                }
127:            }
128:
129:            public boolean isHandler(TKEvent evt) {
130:                return evt.getName().equalsIgnoreCase("ST_EDIT_PRES_COMPONENT");
131:            }
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.