/* #1 - Update package for your project */
package net.halcyonsolutions.cairngormchallenge.model 
{	
 	import mx.collections.ArrayCollection; 	
 	import com.adobe.cairngorm.model.ModelLocator;
 	/* #2 - Import VOs to be used */
 	
 	
 	/* #3 - Name class accordingly */
 	[Bindable]
	public class ApplicationModel implements ModelLocator {		
		
		/* #4 - [Optional] Change name of this private var, but then also must 
		                   globally change all subsequent references herein :-) */
		private static var applicationModel:ApplicationModel;
		
		/* #4 - Declare public properties to correspond with data to be 
		        stored in the application model */
		public var products:ArrayCollection;
		public var applicationState:String; /* Note: the property not used in this example */

		
		/* #5 - Be sure all class names references match your class name
		        and all references to the private static var name match too
		*/
		public static function getInstance():ApplicationModel {
			if ( applicationModel == null ) {
				applicationModel = new ApplicationModel();				
			}
			return applicationModel;
	   }
	   
		/* #6 - Constructor.  Must match your class name */
		public function ApplicationModel() {	
	   		if (ApplicationModel.applicationModel != null)
				throw new Error( "Only one ApplicationModel instance should be instantiated" );
			/* #7 - Initialize model values here */	
			products = new ArrayCollection();
			applicationState = "";
	   	}
 
	}
	
}

