1 22 package org.jboss.services.deployment.metadata; 23 24 import java.io.Serializable ; 25 import java.util.ArrayList ; 26 import java.util.List ; 27 28 35 public class ConfigInfo 36 implements Serializable 37 { 38 39 private static final long serialVersionUID = 3455531161586923775L; 40 41 private String name; 43 private String copydir; 44 private String template; 45 private String extension; 46 private String description; 47 48 private List propertyList = new ArrayList (); 49 private List templateList = new ArrayList (); 50 51 55 public ConfigInfo() 56 { 57 } 59 60 66 public ConfigInfo(String name, String copydir, 67 String template, String extension, String description) 68 { 69 this.name = name; 70 this.copydir = copydir; 71 this.template = template; 72 this.extension = extension; 73 this.description = description; 74 } 75 76 78 79 82 public String getExtension() 83 { 84 return extension; 85 } 86 87 90 public void setExtension(String extension) 91 { 92 this.extension = extension; 93 } 94 95 98 public String getName() 99 { 100 return name; 101 } 102 105 public void setName(String name) 106 { 107 this.name = name; 108 } 109 110 113 public String getTemplate() 114 { 115 return template; 116 } 117 118 121 public void setTemplate(String template) 122 { 123 this.template = template; 124 } 125 126 129 public String getDescription() 130 { 131 return description; 132 } 133 134 137 public void setDescription(String description) 138 { 139 this.description = description; 140 } 141 142 145 public String getCopydir() 146 { 147 return copydir; 148 } 149 150 153 public void setCopydir(String copydir) 154 { 155 this.copydir = copydir; 156 } 157 158 161 public List getPropertyInfoList() 162 { 163 return propertyList; 164 } 165 166 169 public void setPropertyInfoList(List propertyList) 170 { 171 this.propertyList = propertyList; 172 } 173 174 public void addPropertyInfo(PropertyInfo propertyInfo) 175 { 176 this.propertyList.add(propertyInfo); 177 } 178 179 182 public List getTemplateInfoList() 183 { 184 return templateList; 185 } 186 187 190 public void setTemplateInfoList(List templateList) 191 { 192 this.templateList = templateList; 193 } 194 195 public void addTemplateInfo(TemplateInfo templateInfo) 196 { 197 this.templateList.add(templateInfo); 198 } 199 200 202 public String toString() 203 { 204 StringBuffer sb = new StringBuffer (1024); 205 sb.append('[') 206 .append("name=").append(name) 207 .append(", copydir=").append(copydir) 208 .append(", template=").append(template) 209 .append(", extension=").append(extension) 210 .append(", description=").append(description) 211 .append(", propertyList=").append(propertyList) 212 .append(", templateList=").append(templateList) 213 .append(']'); 214 return sb.toString(); 215 } 216 217 public boolean equals(Object other) 218 { 219 if(this == other) return true; 220 if(!(other instanceof ConfigInfo)) return false; 221 222 if (name != null && name.equals(((ConfigInfo)other).name)) 224 return true; 225 else 226 return false; 227 } 228 229 public int hashCode() 230 { 231 if (name != null) 232 return name.hashCode(); 233 else 234 return 0; 235 } 236 } 237 | Popular Tags |