config Class
A singleton object that is the repository of all configuration options.
config.initializeAdapterInstance( {
modelLibrary: "ko",
dataService: "webApi"
});
Item Index
Methods
getAdapter
-
interfaceName -
[adapterName]
Returns the ctor function used to implement a specific interface with a specific adapter name.
Parameters:
-
interfaceNameStringOne of the following interface names "ajax", "dataService" or "modelLibrary"
-
[adapterName]String optionalThe name of any previously registered adapter. If this parameter is omitted then this method returns the "default" adapter for this interface. If there is no default adapter, then a null is returned.
Returns:
getAdapterInstance
-
interfaceName -
[adapterName]
Returns the adapter instance corresponding to the specified interface and adapter names.
Parameters:
-
interfaceNameStringThe name of the interface.
-
[adapterName]String optional- The name of a previously registered adapter. If this parameter is omitted then the default implementation of the specified interface is returned. If there is no defaultInstance of this interface, then the first registered instance of this interface is returned.
Returns:
initializeAdapterInstance
-
interfaceName -
adapterName -
[isDefault=true]
Initializes a single adapter implementation. Initialization means either newing a instance of the specified interface and then calling "initialize" on it or simply calling "initialize" on the instance if it already exists.
Parameters:
-
interfaceNameStringThe name of the interface to which the adapter to initialize belongs.
-
adapterNameString- The name of a previously registered adapter to initialize.
-
[isDefault=true]Boolean optional- Whether to make this the default "adapter" for this interface.
Returns:
initializeAdapterInstances
-
config
Initializes a collection of adapter implementations and makes each one the default for its corresponding interface.
Parameters:
-
configObject-
[ajax]String optional- the name of a previously registered "ajax" adapter
-
[dataService]String optional- the name of a previously registered "dataService" adapter
-
[modelLibrary]String optional- the name of a previously registered "modelLibrary" adapter
-
Returns:
registerAdapter
-
interfaceName -
adapterCtor
Method use to register implementations of standard breeze interfaces. Calls to this method are usually made as the last step within an adapter implementation.
Parameters:
-
interfaceNameString- one of the following interface names "ajax", "dataService" or "modelLibrary"
-
adapterCtorFunction- an ctor function that returns an instance of the specified interface.
setProperties
-
config
This method is now OBSOLETE. Use the "initializeAdapterInstances" to accomplish the same result.
Parameters:
-
configObject-
[remoteAccessImplementation]Implementation of remoteAccess-interface optional -
[trackingImplementation]Implementation of entityTracking-interface optional -
[ajaxImplementation]Implementation of ajax-interface optional
-
