Source Code Cross Referenced for WCSContentForm.java in  » GIS » GeoServer » org » vfny » geoserver » form » wcs » 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.form.wcs 
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.form.wcs;
006:
007:        import org.apache.struts.action.ActionError;
008:        import org.apache.struts.action.ActionErrors;
009:        import org.apache.struts.action.ActionForm;
010:        import org.apache.struts.action.ActionMapping;
011:        import org.vfny.geoserver.config.WCSConfig;
012:        import java.net.MalformedURLException;
013:        import java.net.URL;
014:        import javax.servlet.ServletContext;
015:        import javax.servlet.http.HttpServletRequest;
016:
017:        /**
018:         * DOCUMENT ME!
019:         *
020:         * @author $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last modification)
021:         * @author $Author: Simone Giannecchini (simboss1@gmail.com) $ (last modification)
022:         */
023:        public class WCSContentForm extends ActionForm {
024:            /**
025:             * Comment for <code>serialVersionUID</code>
026:             */
027:            private static final long serialVersionUID = 3977860674510534961L;
028:
029:            /**
030:             *
031:             */
032:            private boolean enabled;
033:
034:            /**
035:             *
036:             */
037:            private String onlineResource;
038:
039:            /**
040:             *
041:             */
042:            private String describeURL;
043:
044:            /**
045:             *
046:             */
047:            private boolean enabledChecked = false;
048:
049:            /**
050:             * DOCUMENT ME!
051:             *
052:             * @return
053:             */
054:            public boolean isEnabled() {
055:                return enabled;
056:            }
057:
058:            /**
059:             * DOCUMENT ME!
060:             *
061:             * @return
062:             */
063:            public String getOnlineResource() {
064:                return onlineResource;
065:            }
066:
067:            /**
068:             * DOCUMENT ME!
069:             *
070:             * @param string
071:             */
072:            public void setDescribeURL(String string) {
073:                describeURL = string;
074:            }
075:
076:            /**
077:             * DOCUMENT ME!
078:             *
079:             * @param b
080:             */
081:            public void setEnabled(boolean b) {
082:                enabledChecked = true;
083:                //System.out.println("setEnabled: enabledCheck/Enabled now " + b);
084:                enabled = b;
085:            }
086:
087:            /**
088:             * DOCUMENT ME!
089:             *
090:             * @param string
091:             */
092:            public void setOnlineResource(String string) {
093:                onlineResource = string;
094:            }
095:
096:            public void reset(ActionMapping arg0, HttpServletRequest arg1) {
097:                super .reset(arg0, arg1);
098:
099:                enabledChecked = false;
100:
101:                ServletContext context = getServlet().getServletContext();
102:                WCSConfig config = (WCSConfig) context
103:                        .getAttribute(WCSConfig.CONFIG_KEY);
104:
105:                this .enabled = config.isEnabled();
106:
107:                URL url = config.getOnlineResource();
108:
109:                if (url != null) {
110:                    this .onlineResource = url.toString();
111:                } else {
112:                    this .onlineResource = "";
113:                }
114:            }
115:
116:            public ActionErrors validate(ActionMapping mapping,
117:                    HttpServletRequest request) {
118:                ActionErrors errors = new ActionErrors();
119:
120:                if ((onlineResource == null) || onlineResource.equals("")) {
121:                    errors.add("onlineResource", new ActionError(
122:                            "error.wcs.onlineResource.required"));
123:                } else {
124:                    try {
125:                        URL url = new URL(onlineResource);
126:                    } catch (MalformedURLException badURL) {
127:                        errors.add("onlineResource", new ActionError(
128:                                "error.wcs.onlineResource.malformed", badURL));
129:                    }
130:                }
131:
132:                return errors;
133:            }
134:
135:            /**
136:             * DOCUMENT ME!
137:             *
138:             * @return
139:             */
140:            public boolean isEnabledChecked() {
141:                return enabledChecked;
142:            }
143:
144:            /**
145:             * DOCUMENT ME!
146:             *
147:             * @param b
148:             */
149:            public void setEnabledChecked(boolean b) {
150:                enabledChecked = b;
151:            }
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.