1 package com.dotmarketing.portlets.folders.struts; 2 3 4 import javax.servlet.http.HttpServletRequest ; 5 6 import org.apache.struts.action.ActionErrors; 7 import org.apache.struts.action.ActionMapping; 8 import org.apache.struts.validator.ValidatorForm; 9 10 import com.liferay.portal.util.Constants; 11 12 public class FolderForm extends ValidatorForm { 13 14 private static final long serialVersionUID = 1L; 15 16 17 private long inode; 18 19 20 private String name; 21 22 23 private String path; 24 25 26 private String title; 27 28 29 private int sortOrder; 30 31 32 private boolean showOnMenu; 33 34 35 private long hostInode; 36 37 private String filesMasks; 38 39 40 public FolderForm() { 41 } 42 43 47 public long getInode() { 48 return inode; 49 } 50 51 55 public String getName() { 56 return name; 57 } 58 59 63 public String getPath() { 64 return path; 65 } 66 67 71 public int getSortOrder() { 72 return sortOrder; 73 } 74 75 79 public void setInode(long inode) { 80 this.inode = inode; 81 } 82 83 87 public void setName(String name) { 88 this.name = name; 89 } 90 91 95 public void setPath(String path) { 96 this.path = path; 97 } 98 99 103 public void setSortOrder(int sortOrder) { 104 this.sortOrder = sortOrder; 105 } 106 107 111 public boolean isShowOnMenu() { 112 return showOnMenu; 113 } 114 115 119 public void setShowOnMenu(boolean showOnMenu) { 120 this.showOnMenu = showOnMenu; 121 } 122 123 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 124 if(request.getParameter("cmd")!=null && request.getParameter("cmd").equals(Constants.ADD)) { 125 return super.validate(mapping, request); 126 } 127 return null; 128 } 129 133 public String getTitle() { 134 return title; 135 } 136 137 141 public void setTitle(String title) { 142 this.title = title; 143 } 144 145 146 147 150 public long getHostInode() { 151 return hostInode; 152 } 153 156 public void setHostInode(long hostInode) { 157 this.hostInode = hostInode; 158 } 159 160 public String getFilesMasks() { 161 return filesMasks; 162 } 163 164 public void setFilesMasks(String filesMasks) { 165 this.filesMasks = filesMasks; 166 } 167 } 168 | Popular Tags |