1 package com.dotmarketing.cms.inquiry.struts; 2 3 4 import javax.servlet.http.HttpServletRequest ; 5 6 import org.apache.struts.Globals; 7 import org.apache.struts.action.ActionErrors; 8 import org.apache.struts.action.ActionMapping; 9 import org.apache.struts.action.ActionMessage; 10 import org.apache.struts.action.ActionMessages; 11 import org.apache.struts.validator.ValidatorForm; 12 13 import com.dotmarketing.util.UtilMethods; 14 15 16 17 public class InquiryForm extends ValidatorForm { 18 19 22 private static final long serialVersionUID = 1L; 23 String userName; 24 String password; 25 String dispatch; 26 boolean rememberMe; 27 String password2; 28 String firstName; 29 String lastName; 30 String middleName; 31 String address1; 32 String address2; 33 String address3; 34 String city; 35 String country; 36 String state; 37 String phone; 38 String [] contactMethods; 39 String [] interests; 40 String zip; 41 boolean alumni; 42 String degree; 43 String comments; 44 45 String organization; 46 String email; 47 String title; 48 String message; 49 50 String ssn; 51 String status; 52 String categories; 53 String cid; 54 String [] departments; 55 boolean optOut; 56 57 60 public String getAddress1() { 61 return this.address1; 62 } 63 66 public void setAddress1(String address1) { 67 this.address1 = address1; 68 } 69 72 public String getAddress2() { 73 return this.address2; 74 } 75 78 public void setAddress2(String address2) { 79 this.address2 = address2; 80 } 81 84 public String getAddress3() { 85 return this.address3; 86 } 87 90 public void setAddress3(String address3) { 91 this.address3 = address3; 92 } 93 96 public boolean isAlumni() { 97 return this.alumni; 98 } 99 102 public void setAlumni(boolean alumni) { 103 this.alumni = alumni; 104 } 105 108 public String getCity() { 109 return this.city; 110 } 111 114 public void setCity(String city) { 115 this.city = city; 116 } 117 120 public String getComments() { 121 return this.comments; 122 } 123 126 public void setComments(String comments) { 127 this.comments = comments; 128 } 129 132 public String [] getContactMethods() { 133 return this.contactMethods; 134 } 135 138 public void setContactMethods(String [] contactMethods) { 139 this.contactMethods = contactMethods; 140 } 141 144 public String getDegree() { 145 return this.degree; 146 } 147 150 public void setDegree(String degree) { 151 this.degree = degree; 152 } 153 154 157 public String getFirstName() { 158 return this.firstName; 159 } 160 163 public void setFirstName(String firstName) { 164 this.firstName = firstName; 165 } 166 169 public String getHowHeard() { 170 return this.howHeard; 171 } 172 175 public void setHowHeard(String howHeard) { 176 this.howHeard = howHeard; 177 } 178 179 182 public String getCategories() { 183 return this.categories; 184 } 185 188 public void setCategories(String categories) { 189 this.categories = categories; 190 } 191 194 public String [] getInterests() { 195 return this.interests; 196 } 197 200 public void setInterests(String [] interests) { 201 this.interests = interests; 202 } 203 206 public String getLastName() { 207 return this.lastName; 208 } 209 212 public void setLastName(String lastName) { 213 this.lastName = lastName; 214 } 215 218 public String getMiddleName() { 219 return this.middleName; 220 } 221 224 public void setMiddleName(String middleName) { 225 this.middleName = middleName; 226 } 227 230 public String getPassword2() { 231 return this.password2; 232 } 233 236 public void setPassword2(String password2) { 237 this.password2 = password2; 238 } 239 242 public String getPhone() { 243 return this.phone; 244 } 245 248 public void setPhone(String phone) { 249 this.phone = phone; 250 } 251 254 public String getState() { 255 return this.state; 256 } 257 260 public void setState(String state) { 261 this.state = state; 262 } 263 266 public String getZip() { 267 return this.zip; 268 } 269 272 public void setZip(String zip) { 273 this.zip = zip; 274 } 275 String howHeard; 276 277 278 279 public InquiryForm() { 280 } 281 282 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 283 ActionErrors errors = new ActionErrors(); 284 if (!UtilMethods.isSet(email)) 285 { 286 errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","eMail")); 287 } 288 if (!UtilMethods.isSet(firstName)) 289 { 290 errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","First Name")); 291 } 292 if (!UtilMethods.isSet(lastName)) 293 { 294 errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","Last Name")); 295 } 296 if (!UtilMethods.isSet(organization)) 297 { 298 errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","Organization")); 299 } 300 return errors; 301 302 } 303 304 305 306 309 public boolean isRememberMe() { 310 return this.rememberMe; 311 } 312 315 public void setRememberMe(boolean rememberMe) { 316 this.rememberMe = rememberMe; 317 } 318 321 public String getDispatch() { 322 return this.dispatch; 323 } 324 327 public void setDispatch(String dispatch) { 328 this.dispatch = dispatch; 329 } 330 333 public String getPassword() { 334 return this.password; 335 } 336 339 public void setPassword(String password) { 340 this.password = password; 341 } 342 343 346 public String getCountry() { 347 return this.country; 348 } 349 352 public void setCountry(String country) { 353 this.country = country; 354 } 355 358 public String getCid() { 359 return this.cid; 360 } 361 364 public void setCid(String cid) { 365 this.cid = cid; 366 } 367 370 public String getSsn() { 371 return this.ssn; 372 } 373 376 public void setSsn(String ssn) { 377 this.ssn = ssn; 378 } 379 382 public String getStatus() { 383 return this.status; 384 } 385 388 public void setStatus(String status) { 389 this.status = status; 390 } 391 394 public String getUserName() { 395 return this.userName; 396 } 397 400 public void setUserName(String userName) { 401 this.userName = userName; 402 } 403 public String [] getDepartments() { 404 return this.departments; 405 } 406 public void setDepartments(String [] departments) { 407 this.departments = departments; 408 } 409 410 public boolean isOptOut() { 411 return this.optOut; 412 } 413 public void setOptOut(boolean optOut) { 414 this.optOut = optOut; 415 } 416 public String getEmail() { 417 return email; 418 } 419 public void setEmail(String email) { 420 this.email = email; 421 } 422 public String getMessage() { 423 return message; 424 } 425 public void setMessage(String message) { 426 this.message = message; 427 } 428 public String getOrganization() { 429 return organization; 430 } 431 public void setOrganization(String organization) { 432 this.organization = organization; 433 } 434 public String getTitle() { 435 return title; 436 } 437 public void setTitle(String title) { 438 this.title = title; 439 } 440 } 441 | Popular Tags |