RelatedProxyUtil Class
Utility for creating promise proxy objects for related resources
Item Index
Methods
Methods
createProxy
(
PromiseProxy | ObjectProxy | ArrayProxy
-
resource
-
kind
Proxy for the requested relation, resolves w/ content from fulfilled promise
Parameters:
-
resource
Resource -
kind
String'toMany' or 'toOne'
Returns:
PromiseProxy | ObjectProxy | ArrayProxy:
proxy instance, new resource uses mock relations
init
()
Checks for required relationship
property
linksPath
(
String
-
relation
Parameters:
-
relation
String
Returns:
String:
path to the related link
promiseFromCache
(
Promise | Null
-
resource
-
relation
-
service
Lookup relation from service cache and pomisify result
Parameters:
-
resource
Resource -
relation
String -
service
Object
Returns:
Promise | Null:
proxyResolution
(
PromiseProxy
-
resource
Parameters:
-
resource
Proxy
Returns:
PromiseProxy:
proxy
proxySetup
(
PromiseProxy
-
resource
-
kind
-
proxyFactory
Parameters:
-
resource
Resource -
kind
String'toMany' or 'toOne'
-
proxyFactory
Ember.ObjectProxy | Ember.ArrayProxy
Returns:
PromiseProxy:
proxy
proxyUrl
(
PromiseProxy
-
resource
-
relation
Proxy url to fetch for the resource's relation
Parameters:
-
resource
Resource -
relation
String
Returns:
PromiseProxy:
proxy
Properties
resource
String
The name of the relationship
type
String
The name of the type of resource