KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jresearch > gossip > forms > ForumForm


1 /*
2  * $$Id: ForumForm.java,v 1.3 2005/06/07 12:32:17 bel70 Exp $$
3  *
4  * ***** BEGIN LICENSE BLOCK *****
5  * The contents of this file are subject to the Mozilla Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License
8  * at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific language governing rights and
13  * limitations under the License.
14  *
15  * The Original Code is JGossip forum code.
16  *
17  * The Initial Developer of the Original Code is the JResearch, Org.
18  * Portions created by the Initial Developer are Copyright (C) 2004
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s):
22  * Dmitry Belov <bel@jresearch.org>
23  *
24  * ***** END LICENSE BLOCK ***** */

25 /*
26  * Created on 07.05.2003
27  *
28  */

29 package org.jresearch.gossip.forms;
30
31 import javax.servlet.http.HttpServletRequest JavaDoc;
32
33 import org.apache.struts.action.ActionErrors;
34 import org.apache.struts.action.ActionMapping;
35 import org.apache.struts.validator.ValidatorForm;
36
37 /**
38  * DOCUMENT ME!
39  *
40  * @author Bel
41  */

42 public class ForumForm extends ValidatorForm {
43     private String JavaDoc forum_desc;
44
45     private String JavaDoc forumid;
46
47     private String JavaDoc groupid;
48
49     private String JavaDoc forum_sort = "aa";
50
51     private String JavaDoc forum_name;
52
53     /**
54      * Reset all properties to their default values.
55      *
56      * @param mapping
57      * The mapping used to select this instance
58      * @param request
59      * The servlet request we are processing
60      */

61     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
62         this.forum_desc = null;
63         this.forumid = null;
64         this.groupid = null;
65         this.forum_sort = "aa";
66         this.forum_name = null;
67     }
68
69     /**
70      * Validate the properties that have been set from this HTTP request, and
71      * return an <code>ActionErrors</code> object that encapsulates any
72      * validation errors that have been found. If no errors are found, return
73      * <code>null</code> or an <code>ActionErrors</code> object with no
74      * recorded error messages.
75      *
76      * @param mapping
77      * The mapping used to select this instance
78      * @param request
79      * The servlet request we are processing
80      *
81      * @return DOCUMENT ME!
82      */

83     public ActionErrors validate(ActionMapping mapping,
84             HttpServletRequest JavaDoc request) {
85         // Perform validator framework validations
86
ActionErrors errors = super.validate(mapping, request);
87
88         return errors;
89     }
90
91     /**
92      * DOCUMENT ME!
93      *
94      * @return DOCUMENT ME!
95      */

96     public String JavaDoc getForum_desc() {
97         return forum_desc;
98     }
99
100     /**
101      * DOCUMENT ME!
102      *
103      * @return DOCUMENT ME!
104      */

105     public String JavaDoc getForum_name() {
106         return forum_name;
107     }
108
109     /**
110      * DOCUMENT ME!
111      *
112      * @param description
113      * DOCUMENT ME!
114      */

115     public void setForum_desc(String JavaDoc description) {
116         this.forum_desc = description;
117     }
118
119     /**
120      * DOCUMENT ME!
121      *
122      * @param title
123      * DOCUMENT ME!
124      */

125     public void setForum_name(String JavaDoc title) {
126         this.forum_name = title;
127     }
128
129     /**
130      * DOCUMENT ME!
131      *
132      * @return
133      */

134     public String JavaDoc getForumid() {
135         return forumid;
136     }
137
138     /**
139      * DOCUMENT ME!
140      *
141      * @param string
142      */

143     public void setForumid(String JavaDoc string) {
144         forumid = string;
145     }
146
147     /**
148      * DOCUMENT ME!
149      *
150      * @param string
151      */

152     public void setGroupid(String JavaDoc string) {
153         groupid = string;
154     }
155
156     /**
157      * DOCUMENT ME!
158      *
159      * @return
160      */

161     public String JavaDoc getGroupid() {
162         return groupid;
163     }
164
165     /**
166      * DOCUMENT ME!
167      *
168      * @return
169      */

170     public String JavaDoc getForum_sort() {
171         return forum_sort;
172     }
173
174     /**
175      * DOCUMENT ME!
176      *
177      * @param string
178      */

179     public void setForum_sort(String JavaDoc string) {
180         forum_sort = string;
181     }
182 }
183
Popular Tags