1 19 package org.netbeans.modules.serviceapi; 20 21 import java.beans.PropertyChangeListener ; 22 import java.beans.PropertyChangeSupport ; 23 import java.util.Collection ; 24 import org.netbeans.api.project.Project; 25 26 33 public abstract class ServiceModule { 34 35 38 public static final String SERVICE_COMPONENT_ADDED_PROPERTY = "serviceComponentAdded"; 39 public static final String SERVICE_COMPONENT_REMOVED_PROPERTY = "serviceComponentRemoved"; 40 41 private PropertyChangeSupport pcs = new PropertyChangeSupport (this); 42 43 46 public void addPropertyListener(PropertyChangeListener listener) { 47 pcs.addPropertyChangeListener(listener); 48 } 49 public void removePropertyListener(PropertyChangeListener listener) { 50 pcs.removePropertyChangeListener(listener); 51 } 52 53 56 public abstract String getName(); 57 58 61 public abstract Collection <ServiceComponent> getServiceComponents(); 62 63 66 67 public abstract void addServiceComponent(ServiceComponent component); 68 69 72 public abstract void removeServiceComponent(ServiceComponent component); 73 74 77 public abstract Project getProject(); 78 } 79 | Popular Tags |