Source Code Cross Referenced for SiteForm.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 java.text.SimpleDateFormat;
019:        import java.util.Date;
020:        import java.util.List;
021:
022:        import javax.servlet.http.HttpServletRequest;
023:
024:        import org.apache.commons.lang.StringUtils;
025:        import org.apache.struts.action.ActionError;
026:        import org.apache.struts.action.ActionErrors;
027:        import org.apache.struts.action.ActionMapping;
028:
029:        /**
030:         * 子站点
031:         * @author Liudong
032:         */
033:        public class SiteForm extends DlogActionForm {
034:
035:            public final static int STATUS_PENDING = 0x00; //已申请尚未开通
036:            public final static int STATUS_NORMAL = 0x01; //正常
037:            public final static int STATUS_PAUSE = 0x02; //已暂停
038:            public final static int STATUS_DELETED = 0x04; //已删除
039:
040:            int id;
041:            String name;
042:            String displayName;
043:            String detail;
044:            String icon;
045:            String logo;
046:            String css;
047:            Date createTime;
048:            Date lastTime;
049:            String url;
050:            int status = STATUS_NORMAL;
051:
052:            List users;
053:            List categories;
054:            List params;
055:            List summaries;
056:
057:            public ActionErrors validate(ActionMapping mapping,
058:                    HttpServletRequest req) {
059:                ActionErrors errors = new ActionErrors();
060:                if (StringUtils.isEmpty(name))
061:                    errors.add("name", new ActionError("not_empty_allow"));
062:                if (StringUtils.isEmpty(displayName))
063:                    errors.add("displayName",
064:                            new ActionError("not_empty_allow"));
065:                return errors;
066:            }
067:
068:            public SiteForm() {
069:            }
070:
071:            public SiteForm(String sitename) {
072:                this .name = sitename;
073:            }
074:
075:            /**
076:             * @return
077:             */
078:            public int getId() {
079:                return id;
080:            }
081:
082:            /**
083:             * @return
084:             */
085:            public String getName() {
086:                return name;
087:            }
088:
089:            /**
090:             * @param i
091:             */
092:            public void setId(int i) {
093:                id = i;
094:            }
095:
096:            /**
097:             * @param string
098:             */
099:            public void setName(String string) {
100:                name = string;
101:            }
102:
103:            /**
104:             * @return
105:             */
106:            public List getCategories() {
107:                return categories;
108:            }
109:
110:            /**
111:             * @return
112:             */
113:            public List getParams() {
114:                return params;
115:            }
116:
117:            /**
118:             * @return
119:             */
120:            public List getSummaries() {
121:                return summaries;
122:            }
123:
124:            /**
125:             * @return
126:             */
127:            public List getUsers() {
128:                return users;
129:            }
130:
131:            /**
132:             * @param list
133:             */
134:            public void setCategories(List list) {
135:                categories = list;
136:            }
137:
138:            /**
139:             * @param list
140:             */
141:            public void setParams(List list) {
142:                params = list;
143:            }
144:
145:            /**
146:             * @param list
147:             */
148:            public void setSummaries(List list) {
149:                summaries = list;
150:            }
151:
152:            /**
153:             * @param list
154:             */
155:            public void setUsers(List list) {
156:                users = list;
157:            }
158:
159:            public int hashCode() {
160:                return id;
161:            }
162:
163:            public Date getCreateTime() {
164:                return createTime;
165:            }
166:
167:            public void setCreateTime(Date createTime) {
168:                this .createTime = createTime;
169:            }
170:
171:            public String getCss() {
172:                return css;
173:            }
174:
175:            public void setCss(String css) {
176:                this .css = css;
177:            }
178:
179:            public String getDisplayName() {
180:                return displayName;
181:            }
182:
183:            public void setDisplayName(String displayName) {
184:                this .displayName = displayName;
185:            }
186:
187:            public String getIcon() {
188:                return icon;
189:            }
190:
191:            public void setIcon(String icon) {
192:                this .icon = icon;
193:            }
194:
195:            public String getLogo() {
196:                return logo;
197:            }
198:
199:            public void setLogo(String logo) {
200:                this .logo = logo;
201:            }
202:
203:            public int getStatus() {
204:                return status;
205:            }
206:
207:            public void setStatus(int status) {
208:                this .status = status;
209:            }
210:
211:            public String getUrl() {
212:                return url;
213:            }
214:
215:            public void setUrl(String url) {
216:                this .url = url;
217:            }
218:
219:            public String getLastTimeString() {
220:                return new SimpleDateFormat("MM-dd")
221:                        .format((lastTime == null) ? new Date() : lastTime);
222:            }
223:
224:            public Date getLastTime() {
225:                return lastTime;
226:            }
227:
228:            public void setLastTime(Date lastTime) {
229:                this .lastTime = lastTime;
230:            }
231:
232:            public String getDetail() {
233:                return detail;
234:            }
235:
236:            public void setDetail(String detail) {
237:                this.detail = detail;
238:            }
239:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.