Categories
Articles

Factory Design Pattern Actionscript 3 Print Center – Sanders & Cumaranatunge – Part 2 of 2

By Lon (Alonzo) Hosford

This is the expanded print center Factory design pattern from chapter 2 of William Sanders and Chandima Cumaranatunge Actionscript 3.0 Design Patterns.

Actionscript 3 Design Patterns Learn More

This is an ActionScript project created in Flex Builder and updated to Flex Builder 4. Download the example code. You can build this with the free Flex SDK by using the code in the src folder. Same for Flash CS3 and CS4. You need to create a Flash Document in the src folder and set the document class to Chapter02_Factory_PrintCenters. For your convenience you can download a Flash CS4 ready to go example.

This includes a basic Actionscript debugger console to display tracing statements on stage. Each class sends messages to the console to show their methods working. These messages help you follow the relationships in the Factory design pattern.

The classes that from part 1 are not repeated. Click here to review them.

Application Class – Chapter02_Factory_PrintCenters
This is the client class. It repeats the client class discussed in part 1 use or the PrintCenter classes. It also access the new HighVolPrinterCenter2 and LowVolPrinterCenter2 classes on line 48 and 54 respectively. These are subclasses of the new PrintCenter2. These are new creator classes that take parameters to determine which IPrintJob classes to select. The original PrintCenter subclasses HighVolPrinterCenter2 and LowVolPrinterCenter2 still remain and still work.

/**
 * Demonstrates a more concrete example of decoupling the client, this file, from the products.
 * In this case the products are print jobs on various printers. The print jobs are not coupled
 * to the client. This example uses parameters for the factory choices.
 * <p>
 * This is part two of the example. Additional IPrintJob classes are added along with a second creator
 * classes that take parameters for the type of printing.
 * </p>
 * */
package
{
	import com.lonhosford.util.debug.lite.DebugConsole;

	import flash.display.Sprite;

	import printcenters.HighVolPrinterCenter;
	import printcenters.HighVolPrinterCenter2;
	import printcenters.LowVolPrinterCenter;
	import printcenters.LowVolPrinterCenter2;
	import printcenters.PrintCenter;
	import printcenters.PrintCenter2;

	// {SET STAGE SIZE AND SPEED HERE}
	[SWF(width=500, height = 300, frameRate = 30)]
	public class Chapter02_Factory_PrintCenters extends Sprite
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function Chapter02_Factory_PrintCenters()
		{
			stage.addChild(debugConsole);
			debugConsole.width = stage.stageWidth;
			debugConsole.height = stage.stageHeight;

			debugConsole.write("Actionscript 3.0 Design Patterns");
			debugConsole.write("William Sanders & Chandima Cumaranatunge");
			debugConsole.write("Chapter 2 Print Centers Example");
			debugConsole.write("\n");

			debugConsole.write("\nPrint LongThesis.doc to high volume printer.");
			var pcHighVol:PrintCenter = new HighVolPrinterCenter();
			pcHighVol.print("LongThesis.doc");

			debugConsole.write("\nPrint ShortVita.doc to low volume printer.");
			var pcLowVol:PrintCenter = new LowVolPrinterCenter();
			pcLowVol.print("ShortVita.doc");

			debugConsole.write("\nPrint LongThesis.doc to high volume BW printer.");
			var pc2HighVol:PrintCenter2 = new HighVolPrinterCenter2();
			pc2HighVol.print("LongThesis.doc", HighVolPrinterCenter2.BW);
			debugConsole.write("\nPrint SalesReport.doc to high volume COLOR printer.");
			pc2HighVol.print("SalesReport.doc", HighVolPrinterCenter2.COLOR);

			debugConsole.write("\nPrint LongThesis.doc to low volume BW printer.");
			var pc2LowVol:PrintCenter2 = new LowVolPrinterCenter2();
			pc2LowVol.print("LongThesis.doc", LowVolPrinterCenter2.BW);
			debugConsole.write("\nPrint SalesReport.doc to low volume COLOR printer.");
			pc2LowVol.print("SalesReport.doc", LowVolPrinterCenter2.COLOR);

		}
	}
}

PrintCenter2 Class
The main change over PrintCenter class is the printType parameter in the print() method on line 17 and the createPrintJob() factory method on line 27. Each PrintCenter2 subclass uses the printType parameter to determine which IPrintJob class to create. This expands the capability of unlimited new IPrintJob classes for any single PrintCenter2 creator class.

package printcenters
{
	import flash.errors.IllegalOperationError;
	/**
	 * Handles file printing. Paramatizes the type of print job.
	 * */
	public class PrintCenter2
	{
		public function PrintCenter2()
		{
		}
		/**
		 * Simulate printing a file.
		 * @param fileName Name of file to print.
		 * @param printType Name of file to print.
		 * */
		public function print(fileName:String, printType:uint):void
		{
			var printjob:IPrintJob = this.createPrintJob(printType);
			printjob.start(fileName);
		}
		/**
		 * Creates the IPrintJob products.
		 * @throws flash.errors.IllegalOperationError Must override in subclass.
		 * @param printType Name of file to print.
		 * */
		protected function createPrintJob(printType:uint):IPrintJob
		{
			throw new IllegalOperationError("PrintCenter2.createPrintJob() - override in subclass");
			return null;
		}
	}
}

HighVolPrintCenter2 Class
The key change over the HighVolPrintCenter class are the BW and COLOR constants on line 10 and 11 respectively. These are the printType parameter values for selecting the IPrintJob class to use.

The createPrintJob() function on line 23 uses the code>BW and COLOR constants to select the WorkgroupPrintJob and the new ColorLaserPrintJob product classes. Any other parameter throws an Error.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * HighVolPrinterCenter creator class
	 * */
	public class HighVolPrinterCenter2 extends PrintCenter2
	{
		private var debugger:Debugger = Debugger.getInstance();
		public static const BW:uint = 0;
		public static const COLOR:uint = 1;
		public function HighVolPrinterCenter2()
		{
			debugger.write("HighVolPrinterCenter2() - This is a creator.")
		
		}
		/**
		 * Create IPrintJob object.
		 * @param printType Name of file to print.
		 * @return ColorLaserPrintJob | WorkgroupPrintJob based on printType
		 * @throws Error When printType is not matched.
		 * */
		override protected function createPrintJob(printType:uint):IPrintJob
		{
			
			if (printType == BW)
			{
				debugger.write("HighVolPrinterCenter2.createPrintJob() - BW");
				return new WorkgroupPrintJob();
			}
			else if (printType == COLOR)
			{
				debugger.write("HighVolPrinterCenter2.createPrintJob() - COLOR");
				return new ColorLaserPrintJob();
				
			}
			else
			{
				throw new Error("HighVolPrinterCenter2.createPrintJob() - Invalid printer kind.");
				return null;
			}
			
		}
	}
}

LowVolPrintCenter2 Class
This mimics the HighVolPrintCenter2 class. The InkJetPrintJob and the new ColorInkjetPrintJob product classes are selected by the printerType parameter supplied to the createPrintJob(...) function on line 23. Lines 10 and 11 contain valid values for the printerType parameter.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * LowVolPrinterCenter creator class
	 * */
	public class LowVolPrinterCenter2 extends PrintCenter2
	{
		private var debugger:Debugger = Debugger.getInstance();
		public static const BW:uint = 0;
		public static const COLOR:uint = 1;
		public function LowVolPrinterCenter2()
		{
			debugger.write("LowVolPrinterCenter2() - This is a creator.")
		
		}
		/**
		 * Create IPrintJob object.
		 * @param printType Name of file to print.
		 * @return InkJetPrintJob | ColorInkjetPrintJob based on printType
		 * @throws Error When printType is not matched.
		 * */
		override protected function createPrintJob(printType:uint):IPrintJob
		{
			
			if (printType == BW)
			{
				debugger.write("LowVolPrinterCenter2.createPrintJob() - BW");
				return new InkJetPrintJob();
			}
			else if (printType == COLOR)
			{
				debugger.write("LowVolPrinterCenter2.createPrintJob() - COLOR");
				return new ColorInkjetPrintJob();
				
			}
			else
			{
				throw new Error("LowVolPrinterCenter2.createPrintJob() - Invalid low volume print type.");
				return null;
			}
			
		}
	}
}

[ad name=”Google Adsense”]
There are some new IPrintJob classes introduced. They simulate newer types of products available to the creator classes.

ColorLaserPrintJob Class
Nothing unusual here. Just another IPrintJob class.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * ColorLaserPrintJob product class
	 * */
	internal class ColorLaserPrintJob implements IPrintJob
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function ColorLaserPrintJob()
		{
			debugger.write("ColorLaserPrintJob()")
		}
		/**
		 * Simulate starting an ColorInkjetPrintJob
		 * @param fileName Name of file to print.
		 * */		
		public function start(fileName:String):void
		{
			debugger.write("ColorLaserPrintJob.start() - fileName:" + fileName);
		}
	}
}

ColorInkjetPrintJob Class
Another IPrintJob class. They can be pounded out. Anyone want to make a dot matrix print job?

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * ColorInkjetPrintJob product class
	 * */
	internal class ColorInkjetPrintJob implements IPrintJob
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function ColorInkjetPrintJob()
		{
			debugger.write("ColorInkjetPrintJob()")
		}
		/**
		 * Simulate starting an ColorInkjetPrintJob
		 * @param fileName Name of file to print.
		 * */		
		public function start(fileName:String):void
		{
			debugger.write("ColorInkjetPrintJob.start() - fileName:" + fileName);
		}
	}
}

Categories
Articles

Factory Design Pattern Minimalist Example For Actionscript 3 – Sanders & Cumaranatunge

By Lon (Alonzo) Hosford

This is the minimalist Factory design pattern from chapter 2 of William Sanders and Chandima Cumaranatunge Actionscript 3.0 Design Patterns

Actionscript 3 Design Patterns Learn More

This is an ActionScript project created in Flex Builder and updated to Flex Builder 4. Download the example code. You can build this with the free Flex SDK by using the code in the src folder. Same for Flash CS3 and CS4. You need to create a Flash Document in the src folder and set the document class to Chapter02_Factory_Minimalist_Flash. For your convenience you can download a Flash CS4 ready to go example.

This includes a basic Actionscript debugger console to display tracing statements on stage. Each class sends messages to the console to show their methods working. These messages help you follow the relationships in the Factory design pattern.

Application Class – Chapter02_Factory_Minimalist
This is the client class. The class simply instantiates CreatorA and CreatorB classes and calls the doStuff() method they inherit from the Creator class. The basic idea is that the ProductA and ProductB classes are uncoupled from the client. Uncoupling is a good OOP design principle.

/**
 * Demonstrates a minimalist example of decoupling the client, this file, from the products.
 * The product classes may be modified within the package and the creators maintain the
 * direct interface to the clients.
 * */
package
{
	import com.lonhosford.util.debug.lite.DebugConsole;
	import com.lonhosford.util.debug.lite.DebugMessage;
	import com.lonhosford.util.debug.lite.Debugger;
	import com.lonhosford.util.debug.lite.DebuggerEvent;

	import flash.display.Sprite;

	import example.CreatorA;
	import example.CreatorB;

	// {SET STAGE SIZE AND SPEED HERE}
	[SWF(width=500, height = 300, frameRate = 30)]

	public class Chapter02_Factory_Minimalist extends Sprite
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		private static const backgroundColor:Number = 0xffffff;
		private static const backgroundBorderColor:Number = 0x666666;
		private static const backgroundBorderWidth:Number = 2;

		public function Chapter02_Factory_Minimalist()
		{

			stage.addChild(debugConsole);
			debugConsole.width = stage.stageWidth;
			debugConsole.height = stage.stageHeight;

			debugConsole.write("Actionscript 3.0 Design Patterns");
			debugConsole.write("William Sanders & Chandima Cumaranatunge");
			debugConsole.write("Chapter 2 Factory Minimalist Example");
			debugConsole.write("\n");

			var ca:CreatorA = new CreatorA();
			var cb:CreatorB = new CreatorB();

			ca.doStuff();
			cb.doStuff();
		}
	}
}

Creator Class
This class provides a “factory method” interface to each of the subclasses. The line 16 shows the factoryMethod() method. The method name for the example emphasizes its purpose. The factory method cannot be called from a client class. The method throws an IllegalOperationError to prevent that coding option.

[ad name=”Google Adsense”]
The factoryMethod() method returns a IProduct class. Each Creator subclass will return its own product all having a manipulate() method defined by the IProduct interface discussed later in this post. This Creator class then uses the product class manipulate() method on line 13.

package example
{
	import flash.errors.IllegalOperationError;

	public class Creator
	{
		public function Creator()
		{
		}
		public function doStuff():void
		{
			var product:IProduct = this.factoryMethod(); // this is SubClass CreatorA, CreatorB etc
			product.manipulate();

		}
		protected function factoryMethod():IProduct
		{
			throw new IllegalOperationError("Creator.factoryMethod() - Abstract method. Override in subclass");
			return null;
		}
	}
}

CreatorA Class
This is a class the client classes use. The Creater super class contains the doStuff() method clients use to interact with the product classes.

package example
{
	import com.lonhosford.util.debug.lite.DebugConsole;

	public class CreatorA extends Creator
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function CreatorA()
		{
			debugConsole.write("CreatorA()");
		}
		override protected function factoryMethod():IProduct
		{
			debugConsole.write("CreatorA.factoryMethod() - creating Product1");
			return new Product1();
		}
	}
}

CreatorB Class

package example
{
	import com.lonhosford.util.debug.lite.DebugConsole;

	public class CreatorB extends Creator
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function CreatorB()
		{
			debugConsole.write("CreatorB()");
		}
		override protected function factoryMethod():IProduct
		{
			debugConsole.write ("CreatorB.factoryMethod() - creating Product2");
			return new Product2();
		}
	}
}

[ad name=”Google Adsense”]
IProduct Interface
This interface provides a common manipulate() method for the Creator class, and all its subclasses, in the package. Each product class implements this interface.

package example
{
	public interface IProduct
	{
		function manipulate():void;
	}
}

Product1 Class
This is the worker bee class. It must implement the manipulate() method of the IProduct interface. The Creator class uses this method in its doStuff() method. Remember the doStuff() method is how client classes interact with the products.

package example
{
	import com.lonhosford.util.debug.lite.DebugConsole;

	internal class Product1 implements IProduct
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function Product1()
		{
			debugConsole.write("Product1()");
		}
		public function manipulate():void
		{
			debugConsole.write("Product1.manipulate()");
		}
	}
}

Product2 Class

package example
{
	import com.lonhosford.util.debug.lite.DebugConsole;

	internal class Product2 implements IProduct
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function Product2()
		{
			debugConsole.write("Product2()");
		}
		public function manipulate():void
		{
			debugConsole.write("Product2.manipulate()");
		}
	}
}
Categories
Articles

Factory Design Pattern Print Center Actionscript 3 – Sanders & Cumaranatunge – Part 1 of 2

By Lon (Alonzo) Hosford

This is the print center Factory design pattern from chapter 2 of William Sanders and Chandima Cumaranatunge Actionscript 3.0 Design Patterns.

Actionscript 3 Design Patterns Learn More

This is an ActionScript project created in Flex Builder and updated to Flex Builder 4. Download the example code. You can build this with the free Flex SDK by using the code in the src folder. Same for Flash CS3 and CS4. You need to create a Flash Document in the src folder and set the document class to Chapter02_Factory_PrintCenters. For your convenience you can download a Flash CS4 ready to go example.

This includes a basic Actionscript debugger console to display tracing statements on stage. Each class sends messages to the console to show their methods working. These messages help you follow the relationships in the Factory design pattern.

Application Class – Chapter02_Factory_PrintCenters
This is the client class. The class instantiates HighVolPrinterCenter and LowVolPrinterCenter classes and calls their print() method inherited from the PrintCenter class. The basic idea is the same as the minimalist example to uncouple the product classes from the clientInkJetPrintJob and WorkgroupPrintJob.

/**
 * Demonstrates a more concrete example of decoupling the client, this file, from the products.
 * In this case the products are print jobs on various printers. The print jobs are not coupled
 * to the client. Clients interface with creator classes representing a type of print center. 
 * The product classes doing the work are created by the print center creator classes.
 * <p>
 * This is part one of the example. 
 * </p>
 * */
package
{
	import com.lonhosford.util.debug.lite.DebugConsole;
	
	import flash.display.Sprite;
	
	import printcenters.HighVolPrinterCenter;
	import printcenters.LowVolPrinterCenter;
	import printcenters.PrintCenter;
	
	// {SET STAGE SIZE AND SPEED HERE}
	[SWF(width=500, height = 300, frameRate = 30)]
	public class Chapter02_Factory_PrintCenters extends Sprite
	{
		private var debugConsole:DebugConsole = DebugConsole.getInstance();
		public function Chapter02_Factory_PrintCenters()
		{
			stage.addChild(debugConsole);
			debugConsole.width = stage.stageWidth;
			debugConsole.height = stage.stageHeight;
			
			debugConsole.write("Actionscript 3.0 Design Patterns");
			debugConsole.write("William Sanders & Chandima Cumaranatunge");
			debugConsole.write("Chapter 2 Print Centers Example - Part 1");
			debugConsole.write("\n");
			
			
			debugConsole.write("\nPrint LongThesis.doc to high volume printer.");
			var pcHighVol:PrintCenter = new HighVolPrinterCenter();
			pcHighVol.print("LongThesis.doc");
			
			debugConsole.write("\nPrint ShortVita.doc to low volume printer.");
			var pcLowVol:PrintCenter = new LowVolPrinterCenter();
			pcLowVol.print("ShortVita.doc");
			

			
		}
	}
}

PrintCenter Class
This class provides a “factory method” interface to each of its subclasses LowVolPrintCenter and HighVolPrintCenter. The line 25 shows the createPrintJob()() method. The factory method cannot be called from a client class. The method throws an IllegalOperationError to prevent that coding option.

[ad name=”Google Adsense”]
The createPrintJob()() method returns a IPrintJob interface. Each Creator subclass will return its own product all having a createPrintJob()() method defined by the IPrintJob interface discussed later in this post. This PrintCenter class then uses the product class start() method on line 19.

package printcenters
{
	import flash.errors.IllegalOperationError;
	/**
	 * Handles file printing.
	 * */
	public class PrintCenter
	{
		public function PrintCenter()
		{
		}
		/**
		 * Simulate printing a file.
		 * @param fileName Name of file to print.
		 * */		
		public function print(fileName:String):void
		{
			var printjob:IPrintJob = this.createPrintJob();
			printjob.start(fileName);
		}
		/**
		 * Creates the IPrintJob products.
		 * @throws flash.errors.IllegalOperationError Must override in subclass.
		 * */		
		protected function createPrintJob():IPrintJob
		{
			throw new IllegalOperationError("PrintCenter.createPrintJob() - override in subclass");
			return null;
		}
	}
}

LowVolPrinterCenter Class
This is a class the client classes use. The PrintCenter super class contains the print() method clients use to print a document. The LowVolPrinterCenter then creates the correct IPrintJob class to do the work. In this case it is the InkJetPrintJob class. If programming requires using another IPrintJob class, the change does not impact the print() method interface client classes use.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * LowVolPrinterCenter creator class
	 * */
	public class LowVolPrinterCenter extends PrintCenter
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function LowVolPrinterCenter()
		{
			debugger.write("LowVolPrinterCenter() - This is a creator.")
		
		}
		/**
		 * Create InkJetPrintJob object.
		 * @return InkJetPrintJob
		 * */
		override protected function createPrintJob():IPrintJob
		{
			debugger.write("LowVolPrinterCenter.createPrintJob()");
			return new InkJetPrintJob();
		}
	}
}

HighVolPrinterCenter Class
This is a second subclass to the PrintCenter class. It uses the IPrintJob class WorkgroupPrintJob.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * HighVolPrinterCenter creator class
	 * */
	public class HighVolPrinterCenter extends PrintCenter
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function HighVolPrinterCenter()
		{
			debugger.write("HighVolPrinterCenter() - This is a creator.")
		}
		/**
		 * Create WorkgroupPrintJob object.
		 * @return WorkgroupPrintJob
		 * */
		override protected function createPrintJob():IPrintJob
		{
			debugger.write("HighVolPrinterCenter.createPrintJob()");
			return new WorkgroupPrintJob();
		}
	}
}

[ad name=”Google Adsense”]
Now there are two PrintCenter classes available to client programs. Both use the print() method to print documents. Next we look at the IPrintJob classes starting with the interface.

IPrintJob Interface
This interface defines one method start() for all IPrintJob classes to implement.

package printcenters
{
	/**
	 * Sets the interface for print job product classes
	 * */
	public interface IPrintJob
	{
		/**
		 * @param fileName Name of file to print.
		 * */		
		function start(fileName:String):void;
	}
}

InkJetPrintJob Class
This class implements the IPrintJob interface and includes the required start() method on line 18.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * InkJetPrintJob product class
	 * */
	internal class InkJetPrintJob implements IPrintJob
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function InkJetPrintJob()
		{
			debugger.write("InkJetPrintJob()")
		}
		/**
		 * Simulate starting an InkJetPrintJob
		 * @param fileName Name of file to print.
		 * */		
		public function start(fileName:String):void
		{
			debugger.write("InkJetPrintJob.start() - fileName:" + fileName);
		}
	}
}

WorkgroupPrintJob Class
Like the InkJetPrintJob class this class implements the IPrintJob interface and includes the required start() method on line 18.

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * WorkgroupPrintJob product class
	 * */
	internal class WorkgroupPrintJob implements IPrintJob
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function WorkgroupPrintJob()
		{
			debugger.write("WorkgroupPrintJob()")
		}
		/**
		 * Simulate starting an WorkgroupPrintJob
		 * @param fileName Name of file to print.
		 * */		
		public function start(fileName:String):void
		{
			debugger.write ("WorkgroupPrintJob.start() - fileName:" + fileName);
		}
	}
}

Adding to the PrintCenter class
It is relatively easy to add another PrintCenter class. Here is the FancyPrintCenter class that creates the IProduct class MultifunctionPrintJob. Create the classes in the and see if you can add them to the application Chapter02_Factory_PrintCenters class.

FancyPrinterCenter class

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * FancyPrinterCenter creator class
	 * */
	public class FancyPrinterCenter extends PrintCenter
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function FancyPrinterCenter()
		{
			debugger.write("FancyPrinterCenter() - This is a creator.")
		}
		/**
		 * Create IPrintJob object.
		 * @return MultiFunctionPrintJob
		 * */
		override protected function createPrintJob():IPrintJob
		{
			debugger.write("FancyPrinterCenter.createPrintJob()");
			return new MultiFunctionPrintJob();
		}
	}
}

MultiFunctionPrintJob class

package printcenters
{
	import com.lonhosford.util.debug.lite.Debugger;
	/**
	 * MultiFunctionPrintJob product class
	 * */
	internal class MultiFunctionPrintJob implements IPrintJob
	{
		private var debugger:Debugger = Debugger.getInstance();
		public function MultiFunctionPrintJob()
		{
			debugger.write("MultiFunctionPrintJob()")
		}
		/**
		 * Simulate starting an MultiFunctionPrintJob
		 * @param fileName Name of file to print.
		 * */		
		public function start(fileName:String):void
		{
			debugger.write ("MultiFunctionPrintJob.start() - fileName:" + fileName);
		}
	}
}

Part 2 introduces parameters for selection product classes.