Package | org.restfulx.services.http |
Class | public class JSONHTTPServiceProvider |
Inheritance | JSONHTTPServiceProvider XMLHTTPServiceProvider |
Subclasses | MockJSONHTTPServiceProvider |
Property | Defined by | ||
---|---|---|---|
id : int [read-only]
ID uniquely identifies this service provider.
| JSONHTTPServiceProvider | ||
rootUrl : String
Root URL that this service provider will prefix to all requests.
| XMLHTTPServiceProvider |
Method | Defined by | ||
---|---|---|---|
JSONHTTPServiceProvider(httpRootUrl:String = null)
| JSONHTTPServiceProvider | ||
canLazyLoad():Boolean
Indicates if this service provider can perform lazy loading.
| JSONHTTPServiceProvider | ||
create(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: create method.
| XMLHTTPServiceProvider | ||
destroy(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: destroy method.
| XMLHTTPServiceProvider | ||
hasErrors(object:Object):Boolean
Indicates to the ServiceResponder that this particular run (typically create/update or destroy)
has produced errors.
| JSONHTTPServiceProvider | ||
index(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null):void
RESTful CRUD contract: index method.
| XMLHTTPServiceProvider | ||
marshall(object:Object, recursive:Boolean = false):Object
Produces service provider specific model representation suitable for being serialized.
| JSONHTTPServiceProvider | ||
show(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null):void
RESTful CRUD contract: show method.
| XMLHTTPServiceProvider | ||
unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object
The reverse of marshall.
| JSONHTTPServiceProvider | ||
update(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: update method.
| XMLHTTPServiceProvider |
Constant | Defined by | ||
---|---|---|---|
ID : int [static] service id
| JSONHTTPServiceProvider |
id | property |
id:int
[read-only]ID uniquely identifies this service provider. This is typically obtained from ServiceManager like so: public static const ID:int = ServiceManager.generateId(); You can then wrap around this with a getter: public function get id():int { return ID; }
Implementation public function get id():int
See also
JSONHTTPServiceProvider | () | constructor |
public function JSONHTTPServiceProvider(httpRootUrl:String = null)
Parameters
httpRootUrl:String (default = null ) — root URL that this service provider will prefix to all requests.
By default this will be equal to Rx.httpRootUrl parameter
|
canLazyLoad | () | method |
public override function canLazyLoad():Boolean
Indicates if this service provider can perform lazy loading. RxModelsController will then skip pre-fetching of the lazy dependencies and it's the responsibility of the provider to make sure that the data that was requested is loaded (perhaps via nesting, etc).
ReturnsBoolean — true if the service provider can lazy load, false otherwise
|
See also
hasErrors | () | method |
public override function hasErrors(object:Object):Boolean
Indicates to the ServiceResponder that this particular run (typically create/update or destroy) has produced errors. This typically means that response processing must be terminated and instead errors should be displayed.
Parametersobject:Object — the response object being processed
|
Boolean — true if there are errors false otherwise
|
See also
marshall | () | method |
public override function marshall(object:Object, recursive:Boolean = false):Object
Produces service provider specific model representation suitable for being serialized. For example, XMLHTTPServiceProvider would return XML.
Parametersobject:Object — object to marshall into serialized form
|
|
recursive:Boolean (default = false ) — flag indicating if entire object graph should be serialized inline
|
Object |
See also
unmarshall | () | method |
public override function unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object
The reverse of marshall. Takes a response from the underlying service provider and turns it into an object graph of models.
Parametersobject:Object — source object from the service provider/responder
|
|
disconnected:Boolean (default = false ) — a flag indicating that the object should not be reconnected with the cache
|
|
defaultType:String (default = null ) — default type to use if the type cannot be determined by the serializer
|
Object — (dis)connected object graph of the model corresponding to the response
|
See also
ID | constant |
public static const ID:int
service id