1 16 17 package org.apache.catalina.storeconfig; 18 19 import java.util.ArrayList ; 20 import java.util.List ; 21 22 58 public class StoreDescription { 59 60 private String id; 61 62 private String tag; 63 64 private String tagClass; 65 66 private boolean standard = false; 67 68 private boolean backup = false; 69 70 private boolean externalAllowed = false; 71 72 private boolean myDefault = false; 73 74 private boolean attributes = true; 75 76 private String storeFactoryClass; 77 78 private IStoreFactory storeFactory; 79 80 private String storeWriterClass; 81 82 private boolean childs = false; 83 84 private List transientAttributes; 85 86 private List transientChilds; 87 88 private boolean storeSeparate = false; 89 90 93 public boolean isExternalAllowed() { 94 return externalAllowed; 95 } 96 97 101 public void setExternalAllowed(boolean external) { 102 this.externalAllowed = external; 103 } 104 105 108 public boolean isStandard() { 109 return standard; 110 } 111 112 116 public void setStandard(boolean standard) { 117 this.standard = standard; 118 } 119 120 123 public boolean isBackup() { 124 return backup; 125 } 126 127 131 public void setBackup(boolean backup) { 132 this.backup = backup; 133 } 134 135 138 public boolean isDefault() { 139 return myDefault; 140 } 141 142 146 public void setDefault(boolean aDefault) { 147 this.myDefault = aDefault; 148 } 149 150 153 public String getStoreFactoryClass() { 154 return storeFactoryClass; 155 } 156 157 161 public void setStoreFactoryClass(String storeFactoryClass) { 162 this.storeFactoryClass = storeFactoryClass; 163 } 164 165 168 public IStoreFactory getStoreFactory() { 169 return storeFactory; 170 } 171 172 176 public void setStoreFactory(IStoreFactory storeFactory) { 177 this.storeFactory = storeFactory; 178 } 179 180 183 public String getStoreWriterClass() { 184 return storeWriterClass; 185 } 186 187 191 public void setStoreWriterClass(String storeWriterClass) { 192 this.storeWriterClass = storeWriterClass; 193 } 194 195 198 public String getTag() { 199 return tag; 200 } 201 202 206 public void setTag(String tag) { 207 this.tag = tag; 208 } 209 210 213 public String getTagClass() { 214 return tagClass; 215 } 216 217 221 public void setTagClass(String tagClass) { 222 this.tagClass = tagClass; 223 } 224 225 228 public List getTransientAttributes() { 229 return transientAttributes; 230 } 231 232 236 public void setTransientAttributes(List transientAttributes) { 237 this.transientAttributes = transientAttributes; 238 } 239 240 public void addTransientAttribute(String attribute) { 241 if (transientAttributes == null) 242 transientAttributes = new ArrayList (); 243 transientAttributes.add(attribute); 244 } 245 246 public void removeTransientAttribute(String attribute) { 247 if (transientAttributes != null) 248 transientAttributes.remove(attribute); 249 } 250 251 254 public List getTransientChilds() { 255 return transientChilds; 256 } 257 258 262 public void setTransientChilds(List transientChilds) { 263 this.transientChilds = transientChilds; 264 } 265 266 public void addTransientChild(String classname) { 267 if (transientChilds == null) 268 transientChilds = new ArrayList (); 269 transientChilds.add(classname); 270 } 271 272 public void removeTransientChild(String classname) { 273 if (transientChilds != null) 274 transientChilds.remove(classname); 275 } 276 277 283 public boolean isTransientChild(String classname) { 284 if (transientChilds != null) 285 return transientChilds.contains(classname); 286 return false; 287 } 288 289 295 public boolean isTransientAttribute(String attribute) { 296 if (transientAttributes != null) 297 return transientAttributes.contains(attribute); 298 return false; 299 } 300 301 306 public String getId() { 307 if (id != null) 308 return id; 309 else 310 return getTagClass(); 311 } 312 313 317 public void setId(String id) { 318 this.id = id; 319 } 320 321 324 public boolean isAttributes() { 325 return attributes; 326 } 327 328 332 public void setAttributes(boolean attributes) { 333 this.attributes = attributes; 334 } 335 336 339 public boolean isStoreSeparate() { 340 return storeSeparate; 341 } 342 343 public void setStoreSeparate(boolean storeSeparate) { 344 this.storeSeparate = storeSeparate; 345 } 346 347 350 public boolean isChilds() { 351 return childs; 352 } 353 354 358 public void setChilds(boolean childs) { 359 this.childs = childs; 360 } 361 } | Popular Tags |