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:
-
interfaceName
StringOne 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:
Returns either a ctor function or null.
getAdapterInstance
-
interfaceName
-
[adapterName]
Returns the adapter instance corresponding to the specified interface and adapter names.
Parameters:
-
interfaceName
StringThe 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:
-
interfaceName
StringThe name of the interface to which the adapter to initialize belongs.
-
adapterName
String- 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:
-
config
Object-
[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:
[array of instances]
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:
-
interfaceName
String- one of the following interface names "ajax", "dataService" or "modelLibrary"
-
adapterCtor
Function- 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:
-
config
Object-
[remoteAccessImplementation]
Implementation of remoteAccess-interface optional -
[trackingImplementation]
Implementation of entityTracking-interface optional -
[ajaxImplementation]
Implementation of ajax-interface optional
-