Source Code Cross Referenced for GeoServerAction.java in  » GIS » GeoServer » org » vfny » geoserver » action » 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 » GIS » GeoServer » org.vfny.geoserver.action 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
002:         * This code is licensed under the GPL 2.0 license, availible at the root
003:         * application directory.
004:         */
005:        package org.vfny.geoserver.action;
006:
007:        import org.apache.struts.action.Action;
008:        import org.geoserver.wfs.WFS;
009:        import org.springframework.web.struts.ActionSupport;
010:        import org.vfny.geoserver.global.ApplicationState;
011:        import org.vfny.geoserver.global.GeoServer;
012:        import org.vfny.geoserver.global.UserContainer;
013:        import org.vfny.geoserver.global.WCS;
014:        import org.vfny.geoserver.global.WMS;
015:        import org.vfny.geoserver.util.Requests;
016:        import java.util.logging.Logger;
017:        import javax.servlet.http.HttpServletRequest;
018:
019:        /**
020:         * GeoServerAction is a common super class used by STRUTS Actions.
021:         *
022:         * <p>
023:         * GeoServerAction is used to store shared services, such as looking up the
024:         * GeoServer Application.
025:         * </p>
026:         * Capabilities:
027:         *
028:         * <ul>
029:         * <li>
030:         * LoggedIn: Convience routines for checking if User has been Authenticated.
031:         * These will need to be extended in the future if we allow User based
032:         * Capabilities documents.
033:         * </li>
034:         * <li>
035:         * GeoServer (Application) Access: Convience routines have been writen to allow
036:         * access to the GeoServer Application from the Web Container.
037:         * </li>
038:         * </ul>
039:         *
040:         * Example Use:
041:         * <pre><code>
042:         * class MyAction extends GeoServerAction {
043:         *   ...
044:         * }
045:         * </code></pre>
046:         *
047:         * <p>
048:         * Please remember that Actions (like servlets) should never make use of
049:         * instance variables in order to remain thread-safe.
050:         * </p>
051:         *
052:         * <p>
053:         * The Services provided by this class are convience methods for the Services
054:         * provided by the Requests utiltiy class.
055:         * </p>
056:         *
057:         * @author Jody Garnett, Refractions Research, Inc.
058:         * @author $Author: cholmesny $ (last modification)
059:         * @version $Id: GeoServerAction.java 7746 2007-11-13 15:38:35Z aaime $
060:         */
061:        public class GeoServerAction extends ActionSupport {
062:            /** Class logger */
063:            protected static Logger LOGGER = org.geotools.util.logging.Logging
064:                    .getLogger("org.vfny.geoserver.action");
065:
066:            //    /**
067:            //     * Logs the user out from the current Session.
068:            //     *
069:            //     * @param request DOCUMENT ME!
070:            //     */
071:            //    public void logOut(HttpServletRequest request) {
072:            //        Requests.logOut(request);
073:            //    }
074:            //
075:            //    /**
076:            //     * Tests if the user has logged onto the current Session
077:            //     *
078:            //     * @param request DOCUMENT ME!
079:            //     *
080:            //     * @return DOCUMENT ME!
081:            //     */
082:            //    public boolean isLoggedIn(HttpServletRequest request) {
083:            //        return Requests.isLoggedIn(request);
084:            //    }
085:
086:            /**
087:             * Aquire type safe session information in a UserContainer.
088:             *
089:             * <p>
090:             * Please note that the UserContainer may be lazyly created.
091:             * </p>
092:             *
093:             * @param request Http Request used to aquire session reference
094:             *
095:             * @return UserContainer containing typesafe session information.
096:             */
097:            public UserContainer getUserContainer(HttpServletRequest request) {
098:                return Requests.getUserContainer(request);
099:            }
100:
101:            /**
102:             * Aquire WMS from Web Container.
103:             *
104:             * <p>
105:             * The WMS instance is create by a STRUTS plug-in and is available
106:             * through the Web container. (Test cases may seed the request object with
107:             * a Mock WebContainer and a Mock WMS)
108:             * </p>
109:             *
110:             * @param request HttpServletRequest used to aquire session reference
111:             *
112:             * @return WMS instance for this Web Application
113:             */
114:            public WMS getWMS(HttpServletRequest request) {
115:                return (WMS) getWebApplicationContext().getBean("wms");
116:            }
117:
118:            /**
119:             * Aquire WCS from Web Container.
120:             *
121:             * <p>
122:             * The WCS instance is create by a STRUTS plug-in and is available
123:             * through the Web container. (Test cases may seed the request object with
124:             * a Mock WebContainer and a Mock WMS)
125:             * </p>
126:             *
127:             * @param request HttpServletRequest used to aquire session reference
128:             *
129:             * @return WCS instance for this Web Application
130:             */
131:            public WCS getWCS(HttpServletRequest request) {
132:                return (WCS) getWebApplicationContext().getBean("wcs");
133:            }
134:
135:            /**
136:             * Aquire WFS from Web Container.
137:             *
138:             * <p>
139:             * The WFS instance is create by a STRUTS plug-in and is available
140:             * through the Web container. (Test cases may seed the request object with
141:             * a Mock WebContainer and a Mock WFS)
142:             * </p>
143:             *
144:             * @param request HttpServletRequest used to aquire session reference
145:             *
146:             * @return WFS instance for this Web Application
147:             */
148:            public WFS getWFS(HttpServletRequest request) {
149:                return (WFS) getWebApplicationContext().getBean("wfs");
150:            }
151:
152:            /**
153:             * Aquire global configuration from the Spring context.
154:
155:             * @return Global configuration of this web app
156:             */
157:            public GeoServer getGeoServer() {
158:                return (GeoServer) getWebApplicationContext().getBean(
159:                        "geoServer");
160:            }
161:
162:            /**
163:             * Access GeoServer Application State from the WebContainer.
164:             *
165:             * @param request DOCUMENT ME!
166:             *
167:             * @return Configuration model for Catalog information.
168:             */
169:            protected ApplicationState getApplicationState(
170:                    HttpServletRequest request) {
171:                return (ApplicationState) getWebApplicationContext().getBean(
172:                        "applicationState");
173:            }
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.