1 29 30 package com.caucho.jsp.cfg; 31 32 import com.caucho.config.DependencyBean; 33 import com.caucho.server.webapp.Application; 34 import com.caucho.vfs.Path; 35 import com.caucho.vfs.PersistentDependency; 36 37 import java.util.ArrayList ; 38 39 42 public class TldTaglib implements DependencyBean { 43 private String _tlibVersion; 44 private String _jspVersion; 45 private String _shortName; 46 private String _uri; 47 private String _displayName; 48 private String _smallIcon; 49 private String _largeIcon; 50 private String _description; 51 private String _info; 52 private TldValidator _validator; 53 private ArrayList <TldListener> _listeners = new ArrayList <TldListener>(); 54 private ArrayList <TldTag> _tags = new ArrayList <TldTag>(); 55 private ArrayList <TldTagFile> _tagFiles = new ArrayList <TldTagFile>(); 56 private ArrayList <TldFunction> _functionList = new ArrayList <TldFunction>(); 57 58 private Path _jarPath; 59 private Throwable _configException; 60 61 private ArrayList <PersistentDependency> _dependList 62 = new ArrayList <PersistentDependency>(); 63 64 private boolean _isInit; 65 66 69 public void addDependency(PersistentDependency depend) 70 { 71 _dependList.add(depend); 72 } 73 74 77 public void setVersion(String version) 78 { 79 _jspVersion = version; 80 } 81 82 85 public void setSchemaLocation(String location) 86 { 87 } 88 89 92 public void setIcon(com.caucho.config.types.Icon icon) 93 { 94 } 95 96 99 public void setTlibVersion(String tlibVersion) 100 { 101 _tlibVersion = tlibVersion; 102 } 103 104 107 public String getTlibVersion() 108 { 109 return _tlibVersion; 110 } 111 112 115 public void setJspVersion(String jspVersion) 116 { 117 _jspVersion = jspVersion; 118 } 119 120 123 public String getJspVersion() 124 { 125 return _jspVersion; 126 } 127 128 131 public void setInfo(String info) 132 { 133 _info = info; 134 } 135 136 139 public String getInfo() 140 { 141 return _info; 142 } 143 144 147 public void setShortName(String shortName) 148 { 149 _shortName = shortName; 150 } 151 152 155 public String getShortName() 156 { 157 return _shortName; 158 } 159 160 163 public void setURI(String uri) 164 { 165 _uri = uri; 166 } 167 168 171 public String getURI() 172 { 173 return _uri; 174 } 175 176 179 public void setDisplayName(String displayName) 180 { 181 _displayName = displayName; 182 } 183 184 187 public String getDisplayName() 188 { 189 return _displayName; 190 } 191 192 195 public void setSmallIcon(String smallIcon) 196 { 197 _smallIcon = smallIcon; 198 } 199 200 203 public String getSmallIcon() 204 { 205 return _smallIcon; 206 } 207 208 211 public void setLargeIcon(String largeIcon) 212 { 213 _largeIcon = largeIcon; 214 } 215 216 219 public String getLargeIcon() 220 { 221 return _largeIcon; 222 } 223 224 227 public void setDescription(String description) 228 { 229 _description = description; 230 } 231 232 235 public String getDescription() 236 { 237 return _description; 238 } 239 240 243 public void setValidator(TldValidator validator) 244 { 245 _validator = validator; 246 } 247 248 251 public TldValidator getValidator() 252 { 253 return _validator; 254 } 255 256 259 public void addListener(TldListener listener) 260 { 261 _listeners.add(listener); 262 } 263 264 267 public void addTag(TldTag tag) 268 { 269 _tags.add(tag); 270 } 271 272 275 public ArrayList <TldTag> getTagList() 276 { 277 return _tags; 278 } 279 280 283 public void addTagFile(TldTagFile tagFile) 284 { 285 _tagFiles.add(tagFile); 286 } 287 288 291 public ArrayList <TldTagFile> getTagFileList() 292 { 293 return _tagFiles; 294 } 295 296 299 public void addFunction(TldFunction function) 300 { 301 _functionList.add(function); 302 } 303 304 307 public ArrayList <TldFunction> getFunctionList() 308 { 309 return _functionList; 310 } 311 312 315 public void setJarPath(Path path) 316 { 317 _jarPath = path; 318 } 319 320 323 public Path getJarPath() 324 { 325 return _jarPath; 326 } 327 328 331 public void setConfigException(Throwable e) 332 { 333 _configException = e; 334 } 335 336 339 public Throwable getConfigException() 340 { 341 return _configException; 342 } 343 344 347 public void initListeners(Application app) 348 throws InstantiationException , IllegalAccessException 349 { 350 if (app == null) 351 return; 352 353 for (int i = 0; i < _listeners.size(); i++) { 354 TldListener listener = _listeners.get(i); 355 356 listener.register(app); 357 } 358 } 359 360 363 public boolean isModified() 364 { 365 for (int i = 0; i < _dependList.size(); i++) { 366 if (_dependList.get(i).isModified()) 367 return true; 368 } 369 370 return false; 371 } 372 } 373 | Popular Tags |