alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 * ResourceManager.java
 *
 * Created on March 13, 2002, 4:58 PM
 */

package org.netbeans.tests.j2eeserver.plugin.jsr88;

import java.beans.*;

/**
 *
 * @author  George Finklang
 */
public class ResourceManager extends Object implements java.io.Serializable {

    private static final String PROP_SAMPLE_PROPERTY = "SampleProperty";

    private PropertyChangeSupport propertySupport;

    /** Holds value of property resourceName. */
    private String resourceName;

    /** Holds value of property resourceJndiName. */
    private String resourceJndiName;

    /** Holds value of property resourceUrl. */
    private String resourceUrl;

    /** Creates new ResourceManager */
    public ResourceManager(String resourceName) {
        this.resourceName = resourceName;
        propertySupport = new PropertyChangeSupport( this );
    }


    public void addPropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.removePropertyChangeListener(listener);
    }

    /** Getter for property resourceName.
     * @return Value of property resourceName.
     */
    public String getResourceName() {
        return this.resourceName;
    }

    /** Getter for property resourceJndiName.
     * @return Value of property resourceJndiName.
     */
    public String getResourceJndiName() {
        return this.resourceJndiName;
    }

    /** Setter for property resourceJndiName.
     * @param resourceJndiName New value of property resourceJndiName.
     */
    public void setResourceJndiName(String resourceJndiName) {
        String oldResourceJndiName = this.resourceJndiName;
        this.resourceJndiName = resourceJndiName;
        propertySupport.firePropertyChange("resourceJndiName", oldResourceJndiName, resourceJndiName);
    }

    /** Getter for property resourceUrl.
     * @return Value of property resourceUrl.
     */
    public String getResourceUrl() {
        return this.resourceUrl;
    }

    /** Setter for property resourceUrl.
     * @param resourceUrl New value of property resourceUrl.
     */
    public void setResourceUrl(String resourceUrl) {
        String oldResourceUrl = this.resourceUrl;
        this.resourceUrl = resourceUrl;
        propertySupport.firePropertyChange("resourceUrl", oldResourceUrl, resourceUrl);
    }

}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.