var AbstractFormMediator = function(viewComponent/*Object*/){
	
	this.Extends = Mediator;
	
	/**
	 * 
	 * PUBLIC
	 * 
	 * */
	
	this.initialize = function(name/*String*/,viewComponent/*AbstractFormApp*/)/*void*/{
		this.parent(name,viewComponent);
	};
	
	this.listNotificationInterests=function(){
		return [this.getFinishValidacaoNotification()];
	}
	
	this.handleNotification=function(note/*INotification*/){
		
		switch(note.getName()){
			case this.getFinishValidacaoNotification():
				
				this.validacaoCompleta(note.getBody());
				
				break;
		}
		
	}
	
	this.getFormApp=function()/*AbstractFormApp*/{return this.viewComponent};
	
	/**
	 * 
	 * PROTECTED
	 * 
	 * */

	this.getStartValidacaoNotification=function()/*String*/{
		return null;
	}
	
	this.getFinishValidacaoNotification=function()/*String*/{
		return null;
	}
	
	this.validacaoCompleta=function(invalidos/*Array*/){
		
		
	}
	
	/**
	 * 
	 * PRIVATE
	 * 
	 * */
	
	this.startValidacao=function(){
		var formApp/*AbstractFormApp*/ = this.getFormApp();
		
		this.getFacade().sendNotification(this.getStartValidacaoNotification(),{inputs:formApp.getInputs()});
	}
}

AbstractFormMediator = new Class(new AbstractFormMediator());

