Source code: openfuture/util/forms/QueryAnswerForm.java
1 package openfuture.util.forms;
2 /*
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.<p>
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.<p>
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br>
16 * http://www.gnu.org/copyleft/lesser.html
17 */
18
19 import org.apache.struts.action.ActionForm;
20 import java.util.LinkedList;
21
22 // Configuration Management Information:
23 // -------------------------------------
24 // $Id: QueryAnswerForm.java,v 1.3 2001/07/01 06:46:30 wreissen Exp $
25 //
26 // Version History:
27 // ----------------
28 // $Log: QueryAnswerForm.java,v $
29 // Revision 1.3 2001/07/01 06:46:30 wreissen
30 // fixed errors in DOS/Unix-translation.
31 //
32 // Revision 1.2 2001/05/29 18:26:43 wreissen
33 // updated to version 1.0b2 of Struts
34 //
35 // Revision 1.1 2001/03/08 07:51:09 wreissen
36 // initial version.
37 //
38 //
39 // ***********************************************************************************
40 /**
41 * Form bean for yes/no questions.<p>
42 *
43 *
44 * Created: Mon Mar 05 07:21:43 2001
45 *
46 * @author <a href="mailto:wolfgang@openfuture.de">Wolfgang Reissenberger</a>
47 * @version $Revision: 1.3 $
48 */
49
50 public class QueryAnswerForm extends ActionForm {
51
52 private LinkedList messages;
53 private String noText;
54 private String noUrl;
55 private String question;
56 private String title;
57 private String yesText;
58 private String yesUrl;
59
60
61 /**
62 * Creates a new form instance.
63 *
64 * @param title page title
65 * @param question question to be posed
66 * @param messages messages to be displayed
67 * @param yesText Text of the YES link
68 * @param noText Text of the no link
69 * @param yesUrl URL of the YES link
70 * @param noUrl URL of the NO link
71 */
72 public QueryAnswerForm(String title, String question, LinkedList messages,
73 String yesText, String noText,
74 String yesUrl, String noUrl) {
75
76 setTitle(title);
77 setQuestion(question);
78 setMessages(messages);
79 setYesText(yesText);
80 setNoText(noText);
81 setYesUrl(yesUrl);
82 setNoUrl(noUrl);
83 }
84
85 /**
86 * Returns the title to be displayed.
87 * @return the title.
88 */
89 public String getTitle() {return title;}
90
91 /**
92 * Set the title to be displayed.
93 * @param v the title.
94 */
95 public void setTitle(String v) {
96 this.title = v;
97 }
98
99
100
101 /**
102 * Returns the messages to be displayed.
103 * @return the list of messages.
104 */
105 public LinkedList getMessages() {return messages;}
106
107 /**
108 * Set the messages to be displayed.
109 * @param v the list of messages.
110 */
111 public void setMessages(LinkedList v) {
112 this.messages = v;
113 }
114
115
116
117 /**
118 * Get the value of yesText.
119 * @return value of yesText.
120 */
121 public String getYesText() {
122 return yesText;
123 }
124
125 /**
126 * Set the value of yesText.
127 * @param v Value to assign to yesText.
128 */
129 public void setYesText(String v) {
130 this.yesText = v;
131 }
132
133
134
135 /**
136 * Get the value of noText.
137 * @return value of noText.
138 */
139 public String getNoText() {
140 return noText;
141 }
142
143 /**
144 * Set the value of noText.
145 * @param v Value to assign to noText.
146 */
147 public void setNoText(String v) {
148 this.noText = v;
149 }
150
151
152
153 /**
154 * Get the value of yesUrl.
155 * @return value of yesUrl.
156 */
157 public String getYesUrl() {
158 return yesUrl;
159 }
160
161 /**
162 * Set the value of yesUrl.
163 * @param v Value to assign to yesUrl.
164 */
165 public void setYesUrl(String v) {
166 this.yesUrl = v;
167 }
168
169
170 /**
171 * Get the value of noUrl.
172 * @return value of noUrl.
173 */
174 public String getNoUrl() {
175 return noUrl;
176 }
177
178 /**
179 * Set the value of noUrl.
180 * @param v Value to assign to noUrl.
181 */
182 public void setNoUrl(String v) {
183 this.noUrl = v;
184 }
185
186
187 /**
188 * Get the value of question.
189 * @return value of question.
190 */
191 public String getQuestion() {
192 return question;
193 }
194
195 /**
196 * Set the value of question.
197 * @param v Value to assign to question.
198 */
199 public void setQuestion(String v) {
200 this.question = v;
201 }
202
203 } // QueryAnswerForm