| Package | org.springextensions.actionscript.cairngorm.business |
| SVN browsing | AbstractDataTranslatorAwareBusinessDelegate.as |
| Fisheye | AbstractDataTranslatorAwareBusinessDelegate.as |
| Class | public class AbstractDataTranslatorAwareBusinessDelegate |
| Inheritance | AbstractDataTranslatorAwareBusinessDelegate AbstractBusinessDelegate |
| Implements | IDataTranslatorAware, mx.rpc.IResponder |
IDataTranslator instance
to do some initial data conversion before the delegate's result is sent back to it's initial responder.
Subclasses should use the addResponderToToken() method to intercept service calls
.
public function getProducts():void {
var token:AsyncToken = service.getProducts();
addResponderToToken(token);
}
See also
Documentation reference: the idatatranslator interface
| Property | Defined by | ||
|---|---|---|---|
| dataTranslator : IDataTranslator
The specified
IDataTranslator instance. | AbstractDataTranslatorAwareBusinessDelegate | ||
![]() | responder : IResponder
Returns the current
IResponder iinstance for this delegate. | AbstractBusinessDelegate | |
![]() | service : *
Returns the current service for this delegate.
| AbstractBusinessDelegate | |
| Method | Defined by | ||
|---|---|---|---|
|
AbstractDataTranslatorAwareBusinessDelegate(service:* = null, responder:IResponder = null, dataTranslator:IDataTranslator = null)
| AbstractDataTranslatorAwareBusinessDelegate | ||
|
fault(info:Object):void
Immediately returns the fault object back to the delegate's initial responder. | AbstractDataTranslatorAwareBusinessDelegate | ||
|
result(data:Object):void
Sends the result of the | AbstractDataTranslatorAwareBusinessDelegate | ||
| Method | Defined by | ||
|---|---|---|---|
|
addResponderToToken(token:AsyncToken):void
If an
IDataTranslator instance has been assigned to the current delegate than the current delegate will be
added as a responder to the specified AsyncToken. | AbstractDataTranslatorAwareBusinessDelegate | ||
| dataTranslator | property |
dataTranslator:IDataTranslator [read-write]
The specified IDataTranslator instance.
public function get dataTranslator():IDataTranslator
public function set dataTranslator(value:IDataTranslator):void
| AbstractDataTranslatorAwareBusinessDelegate | () | constructor |
public function AbstractDataTranslatorAwareBusinessDelegate(service:* = null, responder:IResponder = null, dataTranslator:IDataTranslator = null)Parameters
service:* (default = null) — an IDataTranslator instance that will be used to convert the delegate's result
|
|
responder:IResponder (default = null) |
|
dataTranslator:IDataTranslator (default = null) |
| addResponderToToken | () | method |
protected function addResponderToToken(token:AsyncToken):void
If an IDataTranslator instance has been assigned to the current delegate than the current delegate will be
added as a responder to the specified AsyncToken. That way the delegate can intercept the service response
and have its IDataTranslator instance convert it, befire it sends the result back to the delegate's initial responder.
token:AsyncToken — The specified AsyncToken instance.
|
| fault | () | method |
public function fault(info:Object):void
Immediately returns the fault object back to the delegate's initial responder.
Parametersinfo:Object |
| result | () | method |
public function result(data:Object):void
Sends the result of the IDataTranslator's translate() method back to the delegate's initial responder
data:Object |
See also