01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: * See the GNU Lesser General Public License for more details at gnu.org.
11: */
12:
13: package com.eviware.soapui.impl.wsdl.panels.request.components.editor.support;
14:
15: import java.beans.PropertyChangeListener;
16: import java.beans.PropertyChangeSupport;
17:
18: import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlDocument;
19:
20: /**
21: * Abstract base-class for XmlDocument implementations
22: *
23: * @author ole.matzura
24: */
25:
26: public abstract class AbstractXmlDocument implements XmlDocument {
27: private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
28: this );
29:
30: public void addPropertyChangeListener(String propertyName,
31: PropertyChangeListener listener) {
32: propertyChangeSupport.addPropertyChangeListener(propertyName,
33: listener);
34: }
35:
36: public void addPropertyChangeListener(
37: PropertyChangeListener listener) {
38: propertyChangeSupport.addPropertyChangeListener(listener);
39: }
40:
41: public void removePropertyChangeListener(
42: PropertyChangeListener listener) {
43: propertyChangeSupport.removePropertyChangeListener(listener);
44: }
45:
46: public void removePropertyChangeListener(String propertyName,
47: PropertyChangeListener listener) {
48: propertyChangeSupport.removePropertyChangeListener(
49: propertyName, listener);
50: }
51:
52: protected void fireXmlChanged(String oldValue, String newValue) {
53: propertyChangeSupport.firePropertyChange(XML_PROPERTY,
54: oldValue, newValue);
55: }
56:
57: public void release() {
58: }
59: }
|