# DeveloperSubSystemFactory Class After Editing

    package samples.subsystems;

    import RSESamples.*;
    import com.ibm.etools.systems.dftsubsystem.impl.DefaultSubSystemFactoryImpl;

    import com.ibm.etools.systems.subsystems.impl.*;
    import com.ibm.etools.systems.subsystems.*;
    import com.ibm.etools.systems.model.*;
    import com.ibm.etools.systems.filters.*;

    import java.util.*;

    /**
     * This is our subsystem factory, which creates instances of our subsystems,
     *  and supplies the subsystem and filter actions to their popup menus.
     */
    public class DeveloperSubSystemFactory extends DefaultSubSystemFactoryImpl
    {

    	/**
    	 * Constructor for DeveloperSubSystemFactory.
    	 */
    	public DeveloperSubSystemFactory()
    	{
    		super();
    	}

    	/**
    	 * Create an instance of our subsystem.
    	 */
    	protected SubSystem createSubSystemInternal(SystemConnection conn)
    	{
    	   	return new DeveloperSubSystem();
    	}

    	/**
    	 * Intercept of parent method that creates an initial default filter pool.
    	 * We intercept so that we can create an initial filter in that pool, which will
    	 *  list all teams.
    	 */
    	protected SystemFilterPool createDefaultFilterPool(SystemFilterPoolManager mgr)
    	{
    		SystemFilterPool defaultPool = super.createDefaultFilterPool(mgr);
    		Vector strings = new Vector();
    		strings.add("*");
    		try {
    		  mgr.createSystemFilter(defaultPool, "All teams", strings);
    		} catch (Exception exc) {}
    		return defaultPool;
    	}

    	/**
    	 * Intercept of parent method so we can supply our own value shown in the property
    	 *  sheet for the "type" property when a filter is selected within our subsystem.
    	 *
    	 * Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
    	 */
    	public String getTranslatedFilterTypeProperty(SystemFilter selectedFilter)
    	{
    	   	return RSESamplesPlugin.getResourceString("property.type.teamfilter");
    	}
    }