1 package com.dotmarketing.portlets.virtuallinks.struts; 2 3 import javax.servlet.http.HttpServletRequest ; 4 5 import org.apache.struts.action.ActionErrors; 6 import org.apache.struts.action.ActionMapping; 7 import org.apache.struts.validator.ValidatorForm; 8 9 import com.liferay.portal.util.Constants; 10 11 12 13 public class VirtualLinkForm extends ValidatorForm { 14 15 16 private long inode; 17 18 19 private String title; 20 21 22 private String url; 23 24 25 private String uri; 26 27 28 private boolean active; 29 30 31 private long htmlInode; 32 33 34 private long hostId; 35 36 37 public VirtualLinkForm() { 38 active = true; 39 htmlInode = 0; 40 } 41 42 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 43 if(request.getParameter("cmd")!=null && request.getParameter("cmd").equals(Constants.ADD)) { 44 return super.validate(mapping, request); 45 } 46 return null; 47 } 48 49 52 public boolean isActive() { 53 return active; 54 } 55 58 public void setActive(boolean active) { 59 this.active = active; 60 } 61 64 public long getInode() { 65 return inode; 66 } 67 70 public void setInode(long inode) { 71 this.inode = inode; 72 } 73 76 public String getUri() { 77 return uri; 78 } 79 82 public void setUri(String uri) { 83 this.uri = uri; 84 } 85 88 public String getUrl() { 89 return url; 90 } 91 94 public void setUrl(String url) { 95 this.url = url; 96 } 97 98 101 public long getHtmlInode() { 102 return htmlInode; 103 } 104 107 public void setHtmlInode(long htmlInode) { 108 this.htmlInode = htmlInode; 109 } 110 113 public String getTitle() { 114 return title; 115 } 116 119 public void setTitle(String title) { 120 this.title = title; 121 } 122 123 public long getHostId() { 124 return hostId; 125 } 126 public void setHostId(long hostId) { 127 this.hostId = hostId; 128 } 129 } 130 | Popular Tags |