function resolveResource(resolver, name, refObj, wire) {
					var client;

					client = when.defer();
					plugin.resolvers.client(client.resolver, name, refObj, wire);

					when(client, function (client) {
						var args, store;

						args = { client: client };
						if (refObj.idProperty) { args.idProperty = refObj.idProperty; }

						store = new RestStore(args);
						if (refObj.get) {
							// If get was specified, get it, and resolve with the resulting item.
							resolveData(store.get(refObj.get), resolver, refObj.wait);

						}
						else if (refObj.query) {
							// Similarly, query and resolve with the result set.
							resolveData(store.query(refObj.query), resolver, refObj.wait);

						}
						else {
							// Neither get nor query was specified, so resolve with
							// the store itself.
							resolver.resolve(store);
						}
					});
				}
/**
				 * Resolves a RestStore client for the specified path and scopes, e.g. resource!url/to/resource
				 *
				 * @param resolver
				 * @param name
				 * @param refObj
				 * @param wire
				 */
Resolves a RestStore client for the specified path and scopes, e.g.
Resolves a RestStore client for the specified path and scopes e . g .
function resolveResource(resolver, name, refObj, wire) {
					var client;
					client = when.defer();
					plugin.resolvers.client(client.resolver, name, refObj, wire);
					when(client, function (client) {
						var args, store;
						args = { client: client };
						if (refObj.idProperty) { args.idProperty = refObj.idProperty; }
						store = new RestStore(args);
						if (refObj.get) {
							resolveData(store.get(refObj.get), resolver, refObj.wait);
						}
						else if (refObj.query) {
							resolveData(store.query(refObj.query), resolver, refObj.wait);
						}
						else {
							resolver.resolve(store);
						}
					});
				}
function resolveResource ( resolver , name , refObj , wire ) { var client ; client = when . defer ( ) ; plugin . resolvers . client ( client . resolver , name , refObj , wire ) ; when ( client , function ( client ) { var args , store ; args = { client : client } ; if ( refObj . idProperty ) { args . idProperty = refObj . idProperty ; } store = new RestStore ( args ) ; if ( refObj . get ) { resolveData ( store . get ( refObj . get ) , resolver , refObj . wait ) ; } else if ( refObj . query ) { resolveData ( store . query ( refObj . query ) , resolver , refObj . wait ) ; } else { resolver . resolve ( store ) ; } } ) ; }
Resolves a RestStore client for the specified path and scopes, e.g.
Resolves a RestStore client for the specified path and scopes e . g .
// If get was specified, get it, and resolve with the resulting item. // Similarly, query and resolve with the result set. // Neither get nor query was specified, so resolve with // the store itself.