1 package com.dotmarketing.portlets.htmlpages.struts; 2 3 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.liferay.portal.util.Constants; 14 15 16 public class HTMLPageForm extends ValidatorForm { 17 18 19 private static final long serialVersionUID = 1L; 20 21 22 private long parent; 23 24 25 private String selectedparent; 26 27 28 private String selectedparentPath; 29 30 31 private String metadata; 32 33 34 private java.util.Date startDate; 35 36 37 private java.util.Date endDate; 38 39 40 private String webStartDate; 41 42 43 private String webEndDate; 44 45 46 private String pageUrl; 47 48 49 private boolean httpsRequired; 50 51 52 private String redirect; 53 54 55 private long template; 56 57 58 private String selectedtemplate; 59 60 61 62 private String title; 63 64 65 private String friendlyName; 66 67 68 private boolean showOnMenu; 69 70 71 private int sortOrder; 72 73 74 75 76 public HTMLPageForm() { 77 } 78 79 public String toString() { 80 return ToStringBuilder.reflectionToString(this); 81 } 82 83 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 84 if(request.getParameter("cmd")!=null && request.getParameter("cmd").equals(Constants.ADD)) { 85 return super.validate(mapping, request); 86 } 87 return null; 88 } 89 90 91 95 public java.util.Date getEndDate() { 96 return endDate; 97 } 98 99 103 public boolean isHttpsRequired() { 104 return httpsRequired; 105 } 106 107 111 public String getMetadata() { 112 return metadata; 113 } 114 115 119 public String getPageUrl() { 120 return pageUrl; 121 } 122 123 127 public long getParent() { 128 return parent; 129 } 130 131 135 public String getRedirect() { 136 return redirect; 137 } 138 139 143 public java.util.Date getStartDate() { 144 return startDate; 145 } 146 147 151 public void setEndDate(java.util.Date endDate) { 152 this.endDate = endDate; 153 } 154 155 159 public void setHttpsRequired(boolean httpsRequired) { 160 this.httpsRequired = httpsRequired; 161 } 162 163 167 public void setMetadata(String metadata) { 168 this.metadata = metadata; 169 } 170 171 175 public void setPageUrl(String pageUrl) { 176 this.pageUrl = pageUrl; 177 } 178 179 183 public void setParent(long parent) { 184 this.parent = parent; 185 } 186 187 191 public void setRedirect(String redirect) { 192 this.redirect = redirect; 193 } 194 195 199 public void setStartDate(java.util.Date startDate) { 200 this.startDate = startDate; 201 } 202 203 207 public String getWebEndDate() { 208 return webEndDate; 209 } 210 211 215 public String getWebStartDate() { 216 return webStartDate; 217 } 218 219 223 public void setWebEndDate(String webEndDate) { 224 this.webEndDate = webEndDate; 225 226 try { 227 this.endDate = new SimpleDateFormat ("MM/dd/yyyy").parse(webEndDate); 228 } 229 catch(Exception ex) { 230 } 231 } 232 233 237 public void setWebStartDate(String webStartDate) { 238 this.webStartDate = webStartDate; 239 240 try { 241 this.startDate = new SimpleDateFormat ("MM/dd/yyyy").parse(webStartDate); 242 } 243 catch(Exception ex) { 244 } 245 } 246 247 251 public String getFriendlyName() { 252 return friendlyName; 253 } 254 255 259 public boolean isShowOnMenu() { 260 return showOnMenu; 261 } 262 263 267 public int getSortOrder() { 268 return sortOrder; 269 } 270 271 275 public String getTitle() { 276 return title; 277 } 278 279 283 public void setFriendlyName(String friendlyName) { 284 this.friendlyName = friendlyName; 285 } 286 287 291 public void setShowOnMenu(boolean showOnMenu) { 292 this.showOnMenu = showOnMenu; 293 } 294 295 299 public void setSortOrder(int sortOrder) { 300 this.sortOrder = sortOrder; 301 } 302 303 307 public void setTitle(String title) { 308 this.title = title; 309 } 310 311 312 316 public String getSelectedtemplate() { 317 return selectedtemplate; 318 } 319 320 324 public long getTemplate() { 325 return template; 326 } 327 328 332 public void setSelectedtemplate(String selectedtemplate) { 333 this.selectedtemplate = selectedtemplate; 334 } 335 336 340 public void setTemplate(long template) { 341 this.template = template; 342 } 343 344 348 public String getSelectedparent() { 349 return selectedparent; 350 } 351 352 356 public void setSelectedparent(String selectedparent) { 357 this.selectedparent = selectedparent; 358 } 359 360 364 public String getSelectedparentPath() { 365 return selectedparentPath; 366 } 367 368 372 public void setSelectedparentPath(String selectedparentPath) { 373 this.selectedparentPath = selectedparentPath; 374 } 375 376 } 377 | Popular Tags |