package de.dtele.messages {
import flash.events.EventDispatcher;
/**
* Represents a message action and its response
*
* @author Mathias Brodala
*/
public class MessageAction extends EventDispatcher {
/**
* Signifies a close action
*/
public static const CLOSE:String = "close";
/**
* Signifies a finishing confirmation action
*/
public static const OK:String = "ok";
/**
* Signifies a cancelling action
*/
public static const CANCEL:String = "cancel";
/**
* Signifies an applying action
*/
public static const APPLY:String ="apply";
/**
* Signfies a retry action
*/
public static const RETRY:String = "retry";
private var _type:String;
[Bindable]
Inspectable("close,ok,cancel,apply,retry")]
/**
* The type of the action
*/
public function get type():String { return this._type; }
protected function set type(type:String):void { this._type = type; }
private var _response:MessageResponse;
[Bindable]
/**
* The response to the action
*/
public function get response():MessageResponse { return this._response; }
protected function set response(response:MessageResponse):void { this._response = response; }
public function MessageAction(type:String, response:MessageResponse) {
this.type = type;
this.response = response;
}
}
}