1 19 20 21 package org.netbeans.tests.j2eeserver.plugin.jsr88; 22 23 import java.beans.*; 24 25 29 public class ResourceManager extends Object implements java.io.Serializable { 30 31 private static final String PROP_SAMPLE_PROPERTY = "SampleProperty"; 32 33 private PropertyChangeSupport propertySupport; 34 35 36 private String resourceName; 37 38 39 private String resourceJndiName; 40 41 42 private String resourceUrl; 43 44 45 public ResourceManager(String resourceName) { 46 this.resourceName = resourceName; 47 propertySupport = new PropertyChangeSupport( this ); 48 } 49 50 51 public void addPropertyChangeListener(PropertyChangeListener listener) { 52 propertySupport.addPropertyChangeListener(listener); 53 } 54 55 public void removePropertyChangeListener(PropertyChangeListener listener) { 56 propertySupport.removePropertyChangeListener(listener); 57 } 58 59 62 public String getResourceName() { 63 return this.resourceName; 64 } 65 66 69 public String getResourceJndiName() { 70 return this.resourceJndiName; 71 } 72 73 76 public void setResourceJndiName(String resourceJndiName) { 77 String oldResourceJndiName = this.resourceJndiName; 78 this.resourceJndiName = resourceJndiName; 79 propertySupport.firePropertyChange("resourceJndiName", oldResourceJndiName, resourceJndiName); 80 } 81 82 85 public String getResourceUrl() { 86 return this.resourceUrl; 87 } 88 89 92 public void setResourceUrl(String resourceUrl) { 93 String oldResourceUrl = this.resourceUrl; 94 this.resourceUrl = resourceUrl; 95 propertySupport.firePropertyChange("resourceUrl", oldResourceUrl, resourceUrl); 96 } 97 98 } 99 | Popular Tags |