new Connector(id, config)
Parameters:
| Name | Type | Description |
|---|---|---|
id |
String | Connector ID |
config |
Object | Connector Config |
- Source:
Methods
-
buildAjaxConfig(uri, isJson) → {Object}
-
Extension point. Set up default ajax configuration for URL retrieval.
Parameters:
Name Type Description uriisJson- Source:
Returns:
- Type
- Object
-
connect(onSuccess, onError)
-
Makes initial connections to data source.
Parameters:
Name Type Description onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadAll(resources, onSuccess, onError)
-
Loads schema, form, view and data in a single call.
Parameters:
Name Type Description resourcesObject resources
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadData(resource, resources, onSuccess, onError)
-
Loads JSON data.
Parameters:
Name Type Description resourceObject | String Resource to be loaded
resourcesObject Map of resources
onSuccessfunction onSuccess callback
onErrorfunction onError callback
- Source:
-
loadJson(uri, onSuccess, onError)
-
Loads a JSON through Ajax call.
Parameters:
Name Type Description uriString location of the json document
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadOptions(resource, resources, onSuccess, onError)
-
Loads JSON options.
Parameters:
Name Type Description resourceObject | String Resource to be loaded
resourcesObject Map of resources
onSuccessfunction onSuccess callback
onErrorfunction onError callback
- Source:
-
loadReferenceOptions(resource, onSuccess, onError)
-
Loads referenced JSON options.
Parameters:
Name Type Description resourceObject | String Resource to be loaded.
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadReferenceSchema(resource, onSuccess, onError)
-
Loads referenced JSON schema.
Parameters:
Name Type Description resourceObject | String Resource to be loaded.
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadSchema(resource, resources, onSuccess, onError)
-
Loads JSON schema.
Parameters:
Name Type Description resourceObject | String Resource to be loaded
resourcesObject Map of resources
onSuccessfunction onSuccess callback
onErrorfunction onError callback
- Source:
-
loadTemplate(source, onSuccess, onError)
-
Loads a template (HTML or Text).
If the source is a URI, then it is loaded. If it is not a URI, then the source is simply handed back.
Parameters:
Name Type Description sourceObject | String Source to be loaded.
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadUri(uri, isJson, onSuccess, onError)
-
Loads a general document through Ajax call.
This uses jQuery to perform the Ajax call. If you need to customize connectivity to your own remote server, this would be the appropriate place to do so.
Parameters:
Name Type Description uriString uri to be loaded
isJsonBoolean Whether the document is a JSON or not.
onSuccessfunction onSuccess callback.
onErrorfunction onError callback.
- Source:
-
loadView(resource, resources, onSuccess, onError)
-
Loads JSON view.
Parameters:
Name Type Description resourceObject | String Resource to be loaded
resourcesObject Map of resources
onSuccessfunction onSuccess callback
onErrorfunction onError callback
- Source: