Source Code Cross Referenced for Controller.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » portlet » mvc » 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 » J2EE » spring framework 2.0.6 » org.springframework.web.portlet.mvc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * Copyright 2002-2006 the original author or authors.
03:         *
04:         * Licensed under the Apache License, Version 2.0 (the "License");
05:         * you may not use this file except in compliance with the License.
06:         * You may obtain a copy of the License at
07:         *
08:         *      http://www.apache.org/licenses/LICENSE-2.0
09:         *
10:         * Unless required by applicable law or agreed to in writing, software
11:         * distributed under the License is distributed on an "AS IS" BASIS,
12:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13:         * See the License for the specific language governing permissions and
14:         * limitations under the License.
15:         */
16:
17:        package org.springframework.web.portlet.mvc;
18:
19:        import javax.portlet.ActionRequest;
20:        import javax.portlet.ActionResponse;
21:        import javax.portlet.RenderRequest;
22:        import javax.portlet.RenderResponse;
23:
24:        import org.springframework.web.portlet.ModelAndView;
25:
26:        /**
27:         * Base portlet Controller interface, representing a component that receives 
28:         * RenderRequest/RenderResponse and ActionRequest/ActionResponse like a 
29:         * <code>Portlet</code> but is able to participate in an MVC workflow.
30:         *
31:         * <p>Any implementation of the portlet Controller interface should be a
32:         * <i>reusable, threadsafe</i> class, capable of handling multiple
33:         * portlet requests throughout the lifecycle of an application. To be able to
34:         * configure Controller(s) in an easy way, Controllers are usually JavaBeans.</p>
35:         *
36:         * <p><b><a name="workflow">Workflow</a>:</b></p>
37:         *
38:         * <p>After the DispatcherPortlet has received a request and has done its work
39:         * to resolve locales, themes and suchlike, it tries to resolve a
40:         * Controller to handle that request, using a
41:         * {@link org.springframework.web.portlet.HandlerMapping HandlerMapping}.
42:         * When a Controller has been found, the
43:         * {@link #handleRenderRequest handleRenderRequest} or {@link #handleActionRequest handleActionRequest}
44:         * method will be invoked, which is responsible for handling the actual
45:         * request and - if applicable - returning an appropriate ModelAndView.
46:         * So actually, these method are the main entrypoint for the
47:         * {@link org.springframework.web.portlet.DispatcherPortlet DispatcherPortlet}
48:         * which delegates requests to controllers. These method - and also this interface -
49:         * should preferrably not be implemented by custom controllers <i>directly</i>, since
50:         * abstract controllers also provided by this package already provide a lot of
51:         * functionality for typical use cases in portlet applications. A few examples of
52:         * those controllers:
53:         * {@link AbstractController AbstractController},
54:         * {@link AbstractCommandController AbstractCommandController},
55:         * {@link AbstractFormController AbstractFormController},
56:         * {@link SimpleFormController SimpleFormController}.</p>
57:         * 
58:         * <p>So basically any <i>direct</i> implementation of the Controller interface
59:         * just handles RenderRequests/ActionRequests and should return a ModelAndView, to be
60:         * further used by the DispatcherPortlet. Any additional functionality such as
61:         * optional validation, form handling, etc should be obtained through extending
62:         * one of the abstract controller classes mentioned above.</p>
63:         *
64:         * @author William G. Thompson, Jr.
65:         * @author John A. Lewis
66:         * @since 2.0
67:         * @see SimpleControllerHandlerAdapter
68:         * @see AbstractController
69:         * @see AbstractCommandController
70:         * @see AbstractFormController
71:         * @see SimpleFormController
72:         * @see org.springframework.context.ApplicationContextAware
73:         * @see org.springframework.context.ResourceLoaderAware
74:         * @see org.springframework.web.portlet.context.PortletContextAware
75:         */
76:        public interface Controller {
77:
78:            /**
79:             * Process the action request.  There is nothing to return.
80:             * @param request current portlet action request
81:             * @param response current portlet action response
82:             * @throws Exception in case of errors
83:             */
84:            void handleActionRequest(ActionRequest request,
85:                    ActionResponse response) throws Exception;
86:
87:            /**
88:             * Process the render request and return a ModelAndView object which the DispatcherPortlet
89:             * will render. A <code>null</code> return value is not an error: It indicates that this
90:             * object completed request processing itself, thus there is no ModelAndView to render.
91:             * @param request current portlet render request
92:             * @param response current portlet render response
93:             * @return a ModelAndView to render, or null if handled directly
94:             * @throws Exception in case of errors
95:             */
96:            ModelAndView handleRenderRequest(RenderRequest request,
97:                    RenderResponse response) throws Exception;
98:
99:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.