1 package com.dotmarketing.portlets.jobs.struts; 2 3 import java.io.Serializable ; 4 import java.text.SimpleDateFormat ; 5 6 import javax.servlet.http.HttpServletRequest ; 7 8 import org.apache.commons.lang.builder.ToStringBuilder; 9 import org.apache.struts.action.ActionErrors; 10 import org.apache.struts.action.ActionMapping; 11 import org.apache.struts.validator.ValidatorForm; 12 13 import com.dotmarketing.util.Logger; 14 import com.liferay.portal.util.Constants; 15 16 17 public class JobsForm extends ValidatorForm implements Serializable { 18 19 20 private long inode; 21 22 23 private String organization; 24 25 26 private String name; 27 28 29 private String title; 30 31 32 private String streetaddress1; 33 34 35 private String streetaddress2; 36 37 38 private String city; 39 40 41 private String state; 42 43 44 private String zip; 45 46 47 private String phone; 48 49 50 private String fax; 51 52 53 private String email; 54 55 56 private String jobtitle; 57 58 59 private String joblocation; 60 61 62 private String salary; 63 64 65 private String description; 66 67 68 private String requirements; 69 70 71 private String contactinfo; 72 73 74 private String cctype; 75 76 77 private String ccnum; 78 79 80 private String ccexp; 81 82 83 private java.util.List paymentmethods; 84 85 private String webexpirationdate; 86 87 private java.util.Date expdate; 88 89 private boolean active; 90 91 private boolean premiumlisting; 92 93 private boolean blind; 94 95 96 98 99 100 101 public JobsForm() { 102 paymentmethods = new java.util.ArrayList (); 103 paymentmethods.add("Invoice Me"); 104 paymentmethods.add("Visa"); 105 paymentmethods.add("Master Card"); 106 paymentmethods.add("American Express"); 107 this.cctype = ""; 109 } 110 111 112 public long getInode() { 113 return this.inode; 114 } 115 116 public void setInode(long inode) { 117 this.inode = inode; 118 } 119 public java.lang.String getOrganization() { 120 return this.organization; 121 } 122 123 public void setOrganization(java.lang.String organization) { 124 this.organization = organization; 125 } 126 public java.lang.String getName() { 127 return this.name; 128 } 129 130 public void setName(java.lang.String name) { 131 this.name = name; 132 } 133 public java.lang.String getTitle() { 134 return this.title; 135 } 136 137 public void setTitle(java.lang.String title) { 138 this.title = title; 139 } 140 public java.lang.String getStreetaddress1() { 141 return this.streetaddress1; 142 } 143 144 public void setStreetaddress1(java.lang.String streetaddress1) { 145 this.streetaddress1 = streetaddress1; 146 } 147 public java.lang.String getStreetaddress2() { 148 return this.streetaddress2; 149 } 150 151 public void setStreetaddress2(java.lang.String streetaddress2) { 152 this.streetaddress2 = streetaddress2; 153 } 154 public java.lang.String getCity() { 155 return this.city; 156 } 157 158 public void setCity(java.lang.String city) { 159 this.city = city; 160 } 161 public java.lang.String getState() { 162 return this.state; 163 } 164 165 public void setState(java.lang.String state) { 166 this.state = state; 167 } 168 public java.lang.String getZip() { 169 return this.zip; 170 } 171 172 public void setZip(java.lang.String zip) { 173 this.zip = zip; 174 } 175 public java.lang.String getPhone() { 176 return this.phone; 177 } 178 179 public void setPhone(java.lang.String phone) { 180 this.phone = phone; 181 } 182 public java.lang.String getFax() { 183 return this.fax; 184 } 185 186 public void setFax(java.lang.String fax) { 187 this.fax = fax; 188 } 189 public java.lang.String getEmail() { 190 return this.email; 191 } 192 193 public void setEmail(java.lang.String email) { 194 this.email = email; 195 } 196 public java.lang.String getJobtitle() { 197 return this.jobtitle; 198 } 199 200 public void setJobtitle(java.lang.String jobtitle) { 201 this.jobtitle = jobtitle; 202 } 203 public java.lang.String getJoblocation() { 204 return this.joblocation; 205 } 206 207 public void setJoblocation(java.lang.String joblocation) { 208 this.joblocation = joblocation; 209 } 210 public java.lang.String getSalary() { 211 return this.salary; 212 } 213 214 public void setSalary(java.lang.String salary) { 215 this.salary = salary; 216 } 217 public java.lang.String getDescription() { 218 return this.description; 219 } 220 221 public void setDescription(java.lang.String description) { 222 this.description = description; 223 } 224 public java.lang.String getRequirements() { 225 return this.requirements; 226 } 227 228 public void setRequirements(java.lang.String requirements) { 229 this.requirements = requirements; 230 } 231 public java.lang.String getContactinfo() { 232 return this.contactinfo; 233 } 234 235 public void setContactinfo(java.lang.String contactinfo) { 236 this.contactinfo = contactinfo; 237 } 238 public java.lang.String getCctype() { 239 return this.cctype; 240 } 241 242 public void setCctype(java.lang.String cctype) { 243 this.cctype = cctype; 244 } 245 public java.lang.String getCcnum() { 246 return this.ccnum; 247 } 248 249 public void setCcnum(java.lang.String ccnum) { 250 this.ccnum = ccnum; 251 } 252 public java.lang.String getCcexp() { 253 return this.ccexp; 254 } 255 256 public void setCcexp(java.lang.String ccexp) { 257 this.ccexp = ccexp; 258 } 259 260 public String toString() { 261 return ToStringBuilder.reflectionToString(this); 262 } 263 264 268 public String getWebexpirationdate() { 269 if(expdate!=null) 270 this.webexpirationdate = new SimpleDateFormat ("MM/dd/yyyy").format(this.expdate); 271 return webexpirationdate; 272 } 273 274 278 public void setWebexpirationdate(String webexpirationdate) { 279 this.webexpirationdate = webexpirationdate; 280 try { 281 expdate = new SimpleDateFormat ("MM/dd/yyyy").parse(webexpirationdate); 282 } catch(java.text.ParseException ex) { 283 } 284 } 285 286 290 public java.util.Date getExpdate() { 291 return expdate; 292 } 293 294 298 public void setExpdate(java.util.Date expirationdate) { 299 this.expdate = expirationdate; 300 } 301 302 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 303 if (request.getParameter("cmd")!=null && 304 ((request.getParameter("cmd").equalsIgnoreCase(Constants.ADD)) || 305 (request.getParameter("cmd").equalsIgnoreCase(Constants.UPDATE)))) { 306 Logger.debug(this, "Jobs Form validation!!!!!!" + mapping.getForward()); 307 return super.validate(mapping, request); 308 } 309 if (request.getParameter("dispatch")!=null && (request.getParameter("dispatch").equalsIgnoreCase("save"))) { 310 Logger.debug(this, "Jobs Form validation!!!!!!" + mapping.getForward()); 311 return super.validate(mapping, request); 312 } 313 return null; 314 } 315 316 320 public java.util.List getPaymentmethods() { 321 return paymentmethods; 322 } 323 324 328 public void setPaymentmethods(java.util.List paymentmethods) { 329 this.paymentmethods = paymentmethods; 330 } 331 332 333 336 public boolean isActive() { 337 return active; 338 } 339 342 public void setActive(boolean active) { 343 this.active = active; 344 } 345 348 public boolean isBlind() { 349 return blind; 350 } 351 354 public void setBlind(boolean blind) { 355 this.blind = blind; 356 } 357 360 public boolean isPremiumlisting() { 361 return premiumlisting; 362 } 363 366 public void setPremiumlisting(boolean premiumlisting) { 367 this.premiumlisting = premiumlisting; 368 } 369 } 370 | Popular Tags |