| 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.struts.action.ActionErrors; 9 import org.apache.struts.action.ActionMapping; 10 import org.apache.struts.validator.ValidatorForm; 11 12 import com.dotmarketing.util.Logger; 13 import com.liferay.portal.util.Constants; 14 22 public class SearchfirmForm extends ValidatorForm implements Serializable { 23 24 25 private long inode; 26 27 28 private String name; 29 30 private String organization; 31 32 33 private String title; 34 35 36 private String streetaddress1; 37 38 39 private String streetaddress2; 40 41 42 private String phone; 43 44 45 private String fax; 46 47 48 private String email; 49 50 51 private String url; 52 53 54 private String description; 55 56 57 private String contactinfo; 58 59 60 private String cctype; 61 62 63 private String ccnum; 64 65 66 private String ccexp; 67 68 69 private java.util.Date expirationdate; 70 71 private String webexpirationdate; 72 73 74 private boolean linking; 75 76 private boolean active; 77 78 79 public SearchfirmForm() { 80 this.cctype = ""; 81 } 82 83 public long getInode() { 84 return this.inode; 85 } 86 87 public void setInode(long inode) { 88 this.inode = inode; 89 } 90 public java.lang.String getName() { 91 return this.name; 92 } 93 94 public void setName(java.lang.String name) { 95 this.name = name; 96 } 97 public java.lang.String getTitle() { 98 return this.title; 99 } 100 101 public void setTitle(java.lang.String title) { 102 this.title = title; 103 } 104 public java.lang.String getStreetaddress1() { 105 return this.streetaddress1; 106 } 107 108 public void setStreetaddress1(java.lang.String streetaddress1) { 109 this.streetaddress1 = streetaddress1; 110 } 111 public java.lang.String getStreetaddress2() { 112 return this.streetaddress2; 113 } 114 115 public void setStreetaddress2(java.lang.String streetaddress2) { 116 this.streetaddress2 = streetaddress2; 117 } 118 public java.lang.String getPhone() { 119 return this.phone; 120 } 121 122 public void setPhone(java.lang.String phone) { 123 this.phone = phone; 124 } 125 public java.lang.String getFax() { 126 return this.fax; 127 } 128 129 public void setFax(java.lang.String fax) { 130 this.fax = fax; 131 } 132 public java.lang.String getEmail() { 133 return this.email; 134 } 135 136 public void setEmail(java.lang.String email) { 137 this.email = email; 138 } 139 public java.lang.String getUrl() { 140 return this.url; 141 } 142 143 public void setUrl(java.lang.String url) { 144 this.url = url; 145 } 146 public java.lang.String getDescription() { 147 return this.description; 148 } 149 150 public void setDescription(java.lang.String description) { 151 this.description = description; 152 } 153 public java.lang.String getContactinfo() { 154 return this.contactinfo; 155 } 156 157 public void setContactinfo(java.lang.String contactinfo) { 158 this.contactinfo = contactinfo; 159 } 160 public java.lang.String getCctype() { 161 return this.cctype; 162 } 163 164 public void setCctype(java.lang.String cctype) { 165 this.cctype = cctype; 166 } 167 public java.lang.String getCcnum() { 168 return this.ccnum; 169 } 170 171 public void setCcnum(java.lang.String ccnum) { 172 this.ccnum = ccnum; 173 } 174 public java.lang.String getCcexp() { 175 return this.ccexp; 176 } 177 178 public void setCcexp(java.lang.String ccexp) { 179 this.ccexp = ccexp; 180 } 181 182 public java.util.Date getExpirationdate() { 183 return this.expirationdate; 184 } 185 186 public void setExpirationdate(java.util.Date expirationdate) { 187 this.expirationdate = expirationdate; 188 if(expirationdate != null) 189 this.webexpirationdate = new SimpleDateFormat ("MM/dd/yyyy").format(this.expirationdate); 190 } 191 192 public String getWebexpirationdate() { 193 return this.webexpirationdate; 194 } 195 196 public void setWebexpirationdate(String webexpirationdate) { 197 this.webexpirationdate = webexpirationdate; 198 try { 199 this.expirationdate = new SimpleDateFormat ().parse(webexpirationdate); 200 } catch(java.text.ParseException ex) { 201 } 202 } 203 204 208 public String getOrganization() { 209 return organization; 210 } 211 212 216 public void setOrganization(String organization) { 217 this.organization = organization; 218 } 219 220 221 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 222 if(request.getParameter("cmd")!=null && 223 ((request.getParameter("cmd").equalsIgnoreCase(Constants.ADD)) || 224 (request.getParameter("cmd").equalsIgnoreCase(Constants.UPDATE)))) { 225 Logger.debug(this, "Search Firm Form validation!!!!!!" + mapping.getForward()); 226 return super.validate(mapping, request); 227 } 228 if (request.getParameter("dispatch")!=null && (request.getParameter("dispatch").equalsIgnoreCase("save"))) { 229 Logger.debug(this, "Search Firm Form validation!!!!!!" + mapping.getForward()); 230 return super.validate(mapping, request); 231 } 232 return null; 233 } 234 235 236 239 public boolean isActive() { 240 return active; 241 } 242 245 public void setActive(boolean active) { 246 this.active = active; 247 } 248 251 public boolean isLinking() { 252 return linking; 253 } 254 257 public void setLinking(boolean linking) { 258 this.linking = linking; 259 } 260 } 261 | Popular Tags |