1 package com.dotmarketing.portlets.folders.model; 2 3 import java.io.Serializable ; 4 import java.util.Map ; 5 6 import org.apache.commons.lang.builder.ToStringBuilder; 7 8 import com.dotmarketing.beans.Inode; 9 10 11 public class Folder extends Inode implements Serializable { 12 13 private static final long serialVersionUID = 1L; 14 15 16 private String name; 17 18 19 private String path; 20 21 22 private int sortOrder; 23 24 25 private boolean showOnMenu; 26 27 28 private long hostInode; 29 30 31 private String title; 32 33 34 private String filesMasks; 35 36 public Folder() { 37 this.setType("folder"); 38 } 39 40 44 public long getInode() { 45 return inode; 46 } 47 48 52 public String getName() { 53 return name; 54 } 55 56 60 public String getPath() { 61 return path; 62 } 63 64 68 public int getSortOrder() { 69 return sortOrder; 70 } 71 72 76 public void setInode(long inode) { 77 this.inode = inode; 78 } 79 80 84 public void setName(String name) { 85 this.name = name; 86 } 87 88 92 public void setPath(String path) { 93 this.path = path; 94 } 95 96 100 public void setSortOrder(int sortOrder) { 101 this.sortOrder = sortOrder; 102 } 103 104 108 public boolean isShowOnMenu() { 109 return showOnMenu; 110 } 111 112 116 public void setShowOnMenu(boolean showOnMenu) { 117 this.showOnMenu = showOnMenu; 118 } 119 120 124 public String getTitle() { 125 return title; 126 } 127 128 132 public void setTitle(String title) { 133 this.title = title; 134 } 135 136 139 public String toString() { 140 return ToStringBuilder.reflectionToString(this); 141 } 142 143 146 public long getHostInode() { 147 return hostInode; 148 } 149 152 public void setHostInode(long hostInode) { 153 this.hostInode = hostInode; 154 } 155 156 public void copy (Folder template) { 157 this.setHostInode(template.getHostInode()); 158 this.setName(template.getName()); 159 this.setShowOnMenu(template.isShowOnMenu()); 160 this.setSortOrder(template.getSortOrder()); 161 this.setTitle(template.getTitle()); 162 } 163 164 public String getFilesMasks() { 165 return filesMasks; 166 } 167 168 public void setFilesMasks(String filesMasks) { 169 this.filesMasks = filesMasks; 170 } 171 172 public Map <String , Object > getMap() { 173 Map <String , Object > retMap = super.getMap(); 174 retMap.put("filesMasks", this.filesMasks); 175 retMap.put("name", this.name); 176 retMap.put("path", this.path); 177 retMap.put("title", this.title); 178 retMap.put("hostInode", this.hostInode); 179 retMap.put("showOnMenu", this.showOnMenu); 180 retMap.put("sortOrder", this.sortOrder); 181 return retMap; 182 } 183 184 } 185 | Popular Tags |