/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_data_Api({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"

Files

Ext.data.Api is a singleton designed to manage the data API including methods\nfor validating a developer's DataProxy API. Defines variables for CRUD actions\ncreate, read, update and destroy in addition to a mapping of RESTful HTTP methods\nGET, POST, PUT and DELETE to CRUD actions.

\n
Defined By

Properties

Ext.data.Api
view source
: Object
Defined actions corresponding to remote actions:\n\nactions: {\n create : 'create', // Text representing the remote...

Defined actions corresponding to remote actions:

\n\n
actions: {\n    create  : 'create',  // Text representing the remote-action to create records on server.\n    read    : 'read',    // Text representing the remote-action to read/load data from server.\n    update  : 'update',  // Text representing the remote-action to update records on server.\n    destroy : 'destroy'  // Text representing the remote-action to destroy records on server.\n}\n
\n\n

Defaults to: {create: 'create', read: 'read', update: 'update', destroy: 'destroy'}

Ext.data.Api
view source
: Object
Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the\ncorresponding actions for RESTful proxies. ...

Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the\ncorresponding actions for RESTful proxies.\nDefaults to:

\n\n
restActions : {\n    create  : 'POST',\n    read    : 'GET',\n    update  : 'PUT',\n    destroy : 'DELETE'\n},\n
\n\n

Defaults to: {create: 'POST', read: 'GET', update: 'PUT', destroy: 'DELETE'}

Defined By

Methods

Ext.data.Api
view source
( name ) : String/null
Returns the actual CRUD action KEY \"create\", \"read\", \"update\" or \"destroy\" from the supplied action-name. ...

Returns the actual CRUD action KEY \"create\", \"read\", \"update\" or \"destroy\" from the supplied action-name. This method is used internally and shouldn't generally\nneed to be used directly. The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true. A developer can override this naming\nconvention if desired. However, the framework internally calls methods based upon the KEY so a way of retreiving the the words \"create\", \"read\", \"update\" and \"destroy\" is\nrequired. This method will cache discovered KEYS into the private validActions hash.

\n

Parameters

  • name : String

    The runtime name of the action.

    \n

Returns

  • String/null

    returns the action-key, or verb of the user-action or null if invalid.\n@nodoc

    \n
Ext.data.Api
view source
( proxy, verb ) : Boolean
Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-action...

Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions\npoint to the same url. The question is important for deciding whether to insert the \"xaction\" HTTP parameter within an\nAjax request. This method is used internally and shouldn't generally need to be called directly.

\n

Parameters

Returns

  • Boolean
    \n
Ext.data.Api
view source
( action ) : Boolean
Returns true if supplied action-name is a valid API action defined in actions constants ...

Returns true if supplied action-name is a valid API action defined in actions constants

\n

Parameters

  • action : String

    Action to test for availability.

    \n

Returns

  • Boolean
    \n
Ext.data.Api
view source
( api ) : String[]|true
Returns true if the supplied API is valid; that is, check that all keys match defined actions\notherwise returns an ar...

Returns true if the supplied API is valid; that is, check that all keys match defined actions\notherwise returns an array of mistakes.

\n

Parameters

  • api : Object
    \n

Returns

  • String[]|true
    \n
Ext.data.Api
view source
( proxy )
This method is used internally by DataProxy and should not generally need to be used directly. ...

This method is used internally by DataProxy and should not generally need to be used directly.\nEach action of a DataProxy api can be initially defined as either a String or an Object. When specified as an object,\none can explicitly define the HTTP method (GET|POST) to use for each CRUD action. This method will prepare the supplied API, setting\neach action to the Object form. If your API-actions do not explicitly define the HTTP method, the \"method\" configuration-parameter will\nbe used. If the method configuration parameter is not specified, POST will be used.

\n\n
new Ext.data.HttpProxy({\n    method: \"POST\",     // <-- default HTTP method when not specified.\n    api: {\n        create: 'create.php',\n        load: 'read.php',\n        save: 'save.php',\n        destroy: 'destroy.php'\n    }\n});\n\n// Alternatively, one can use the object-form to specify the API\nnew Ext.data.HttpProxy({\n    api: {\n        load: {url: 'read.php', method: 'GET'},\n        create: 'create.php',\n        destroy: 'destroy.php',\n        save: 'update.php'\n    }\n});\n        
\n\n

Parameters

Ext.data.Api
view source
( proxy )
Prepares a supplied Proxy to be RESTful. ...

Prepares a supplied Proxy to be RESTful. Sets the HTTP method for each api-action to be one of\nGET, POST, PUT, DELETE according to the defined restActions.

\n

Parameters

","superclasses":[],"meta":{},"requires":[],"html_meta":{},"statics":{"property":[],"cfg":[],"css_var":[],"method":[],"event":[],"css_mixin":[]},"files":[{"href":"Api.html#Ext-data-Api","filename":"Api.js"}],"linenr":2,"members":{"property":[{"tagname":"property","owner":"Ext.data.Api","meta":{},"name":"actions","id":"property-actions"},{"tagname":"property","owner":"Ext.data.Api","meta":{},"name":"restActions","id":"property-restActions"}],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"getVerb","id":"method-getVerb"},{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"hasUniqueUrl","id":"method-hasUniqueUrl"},{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"isAction","id":"method-isAction"},{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"isValid","id":"method-isValid"},{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"prepare","id":"method-prepare"},{"tagname":"method","owner":"Ext.data.Api","meta":{},"name":"restify","id":"method-restify"}],"event":[],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.data.Api","singleton":true,"override":null,"inheritdoc":null,"id":"class-Ext.data.Api","mixins":[],"mixedInto":[]});