Source Code Cross Referenced for MockModule.java in  » Content-Management-System » TransferCM » com » methodhead » shim » 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 » TransferCM » com.methodhead.shim 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * Copyright (C) 2006 Methodhead Software LLC.  All rights reserved.
003:         * 
004:         * This file is part of TransferCM.
005:         * 
006:         * TransferCM is free software; you can redistribute it and/or modify it under the
007:         * terms of the GNU General Public License as published by the Free Software
008:         * Foundation; either version 2 of the License, or (at your option) any later
009:         * version.
010:         * 
011:         * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
012:         * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
013:         * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
014:         * details.
015:         * 
016:         * You should have received a copy of the GNU General Public License along with
017:         * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
018:         * Fifth Floor, Boston, MA  02110-1301  USA
019:         */
020:
021:        package com.methodhead.shim;
022:
023:        import javax.servlet.http.HttpServletRequest;
024:        import javax.servlet.http.HttpServletResponse;
025:        import javax.servlet.jsp.JspWriter;
026:        import org.apache.struts.action.ActionMapping;
027:        import org.apache.struts.action.ActionForward;
028:        import org.apache.struts.action.DynaActionForm;
029:        import java.io.IOException;
030:
031:        public class MockModule implements  Module {
032:
033:            // constructors /////////////////////////////////////////////////////////////
034:
035:            // constants ////////////////////////////////////////////////////////////////
036:
037:            // classes //////////////////////////////////////////////////////////////////
038:
039:            // methods //////////////////////////////////////////////////////////////////
040:
041:            /**
042:             * Returns a short descriptive name for the module.
043:             */
044:            public String getName() {
045:                return "Mock";
046:            }
047:
048:            /**
049:             * Returns <tt>true</tt> if the module has a configuration interface; that
050:             * is, if {@link #configure} actually does something.
051:             */
052:            public boolean isConfigurable() {
053:                return configurable_;
054:            }
055:
056:            public static void setConfigurable(boolean configurable) {
057:                configurable_ = configurable;
058:            }
059:
060:            public boolean isEditable() {
061:                return editable_;
062:            }
063:
064:            public static void setEditable(boolean editable) {
065:                editable_ = editable;
066:            }
067:
068:            /**
069:             * Sets the module's <tt>page</tt> and <tt>panel</tt>.  This method is called
070:             * before any other operations are performed.
071:             */
072:            public void init(Page page, String panel) {
073:
074:                text_ = "";
075:            }
076:
077:            /**
078:             * Creates the module.  This method is called when a module is instantiated
079:             * for a page and panel.  The module should be initialized such that future
080:             * calls to {@link #configure} and {@link #display} are successful.
081:             */
082:            public void create() {
083:            }
084:
085:            /**
086:             * Manages the configuration interface for the module.
087:             */
088:            public ActionForward configure(ActionMapping mapping,
089:                    DynaActionForm form, HttpServletRequest request,
090:                    HttpServletResponse response) {
091:
092:                return mapping.findForward("accessDenied");
093:            }
094:
095:            public void update(String text) {
096:
097:                //
098:                // use a null text_ to indicate whether the module has been init'd; this
099:                // turned up in PageActionTest.testDoSavePanel()
100:                //
101:                if (text_ != null)
102:                    ;
103:                text_ = text;
104:            }
105:
106:            public static String getText() {
107:                return text_;
108:            }
109:
110:            /**
111:             * Displays the module.
112:             */
113:            public void display(HttpServletRequest request,
114:                    HttpServletResponse response, JspWriter out)
115:                    throws IOException {
116:
117:                out.println("Hello from MockModule.display().");
118:            }
119:
120:            public static void setDestroyed(boolean destroyed) {
121:                destroyed_ = destroyed;
122:            }
123:
124:            public static boolean isDestroyed() {
125:                return destroyed_;
126:            }
127:
128:            public static void setCopied(boolean copied) {
129:                copied_ = copied;
130:            }
131:
132:            public static boolean isCopied() {
133:                return copied_;
134:            }
135:
136:            /**
137:             * Destroys the module, freeing any resources associated with the module.
138:             */
139:            public void destroy() {
140:                destroyed_ = true;
141:            }
142:
143:            /**
144:             * Copies the module to <tt>page</tt>.
145:             */
146:            public void copyTo(Page page) {
147:                copied_ = true;
148:            }
149:
150:            // properties ///////////////////////////////////////////////////////////////
151:
152:            private static boolean configurable_ = false;
153:
154:            private static boolean editable_ = false;
155:
156:            private static String text_ = null;
157:
158:            private static boolean destroyed_ = false;
159:
160:            private static boolean copied_ = false;
161:
162:            // attributes ///////////////////////////////////////////////////////////////
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.