Source Code Cross Referenced for ParamForm.java in  » Portal » DLOG4J » dlog4j » formbean » 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 » Portal » DLOG4J » dlog4j.formbean 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  This program is free software; you can redistribute it and/or modify
003:         *  it under the terms of the GNU General Public License as published by
004:         *  the Free Software Foundation; either version 2 of the License, or
005:         *  (at your option) any later version.
006:         *
007:         *  This program is distributed in the hope that it will be useful,
008:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
009:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
010:         *  GNU Library General Public License for more details.
011:         *
012:         *  You should have received a copy of the GNU General Public License
013:         *  along with this program; if not, write to the Free Software
014:         *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
015:         */
016:        package dlog4j.formbean;
017:
018:        import javax.servlet.http.HttpServletRequest;
019:
020:        import org.apache.commons.lang.StringUtils;
021:        import org.apache.struts.action.ActionError;
022:        import org.apache.struts.action.ActionErrors;
023:        import org.apache.struts.action.ActionMapping;
024:
025:        /**
026:         * @author Liudong
027:         * 系统参数对象
028:         */
029:        public class ParamForm extends DlogActionForm {
030:
031:            public final static int TYPE_INTEGER = 0x01;
032:            public final static int TYPE_STRING = 0x02;
033:            public final static int TYPE_BOOLEAN = 0x03;
034:            public final static int TYPE_DATE = 0x04;
035:            public final static int TYPE_TIME = 0x08;
036:            public final static int TYPE_DATETIME = 0x10;
037:
038:            private int id;
039:            private String name;
040:            private int type;
041:            private String value;
042:            private String desc;
043:
044:            private SiteForm site;
045:
046:            /* (non-Javadoc)
047:             * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
048:             */
049:            public ActionErrors validate(ActionMapping mapping,
050:                    HttpServletRequest req) {
051:                ActionErrors es = new ActionErrors();
052:                if (type == TYPE_INTEGER && !StringUtils.isNumeric(value))
053:                    es.add("value", new ActionError("illegal_input_value"));
054:                return es;
055:            }
056:
057:            /**
058:             * @return
059:             */
060:            public String getName() {
061:                return name;
062:            }
063:
064:            /**
065:             * @return
066:             */
067:            public int getType() {
068:                return type;
069:            }
070:
071:            public String getTypeDesc() {
072:                switch (type) {
073:                case TYPE_INTEGER:
074:                    return "INTEGER";
075:                case TYPE_STRING:
076:                    return "STRING";
077:                case TYPE_BOOLEAN:
078:                    return "BOOLEAN";
079:                case TYPE_DATE:
080:                    return "DATE";
081:                case TYPE_TIME:
082:                    return "TIME";
083:                case TYPE_DATETIME:
084:                    return "DATETIME";
085:                }
086:                return "UNKNOWN";
087:            }
088:
089:            /**
090:             * @return
091:             */
092:            public String getValue() {
093:                return value;
094:            }
095:
096:            /**
097:             * @param string
098:             */
099:            public void setName(String string) {
100:                name = string;
101:            }
102:
103:            /**
104:             * @param i
105:             */
106:            public void setType(int i) {
107:                type = i;
108:            }
109:
110:            /**
111:             * @param string
112:             */
113:            public void setValue(String string) {
114:                value = string;
115:            }
116:
117:            /**
118:             * @return
119:             */
120:            public String getDesc() {
121:                return desc;
122:            }
123:
124:            /**
125:             * @param string
126:             */
127:            public void setDesc(String string) {
128:                desc = string;
129:            }
130:
131:            /**
132:             * @return
133:             */
134:            public SiteForm getSite() {
135:                return site;
136:            }
137:
138:            /**
139:             * @param form
140:             */
141:            public void setSite(SiteForm form) {
142:                site = form;
143:            }
144:
145:            /**
146:             * @return
147:             */
148:            public int getId() {
149:                return id;
150:            }
151:
152:            /**
153:             * @param i
154:             */
155:            public void setId(int i) {
156:                id = i;
157:            }
158:
159:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.