/* Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license */ package com.yahoo.astra.managers { import flash.display.DisplayObject; import flash.events.MouseEvent; /** * Methods expected to be defined by FormDataManager. * @author kayoh */ public interface IFormDataManager { /** * Registers items from the FormDataManager */ function addItem(id : String,source : Object, property : Object = null , required : Boolean = false , validation : Function = null, validatorExtraParam : Object = null,eventTargetObj : DisplayObject = null,functionValidationPassed : Function = null,functionValidationFailed : Function = null, errorString : String = null) : void; /** * Unregisters items from the FormDataManager */ function removeItem(id : String) : void; /** * Starts collecting and validating data. */ function collectData(e : MouseEvent = null) : void; /** * Registers a button(DisplayObject) to trigger collectData by MouseEvent.CLICK event. * Also sets functionDataCollectionSuccess and functionDataCollectionFail to be triggered when FormDataManagerEvent.DATACOLLECTION_SUCCESS or FormDataManagerEvent.DATACOLLECTION_FAIL happens. */ function addTrigger(button : DisplayObject, functionDataCollectionSuccess : Function = null, functionDataCollectionFail : Function = null) : void; /** * Unregisters a button(DisplayObject calling collectData). */ function removeTrigger(button : DisplayObject) : void; } }