Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BreezeConfig

Hierarchy

  • BreezeConfig

Index

Constructors

constructor

Properties

functionRegistry

functionRegistry: {}

Type declaration

interfaceInitialized

interfaceInitialized: BreezeEvent<{ instance: BaseAdapter; interfaceName: string; isDefault: boolean }>

noEval

noEval: boolean

whether to prohibit eval() and Function() in breeze code

objectRegistry

objectRegistry: {}

Type declaration

stringifyPad

stringifyPad: string = ""

typeRegistry

typeRegistry: {}

Type declaration

Methods

getAdapter

  • getAdapter(interfaceName: AdapterType, adapterName: string): any
  • Returns the ctor function used to implement a specific interface with a specific adapter name.

    method

    getAdapter

    Parameters

    • interfaceName: AdapterType

      One of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"

    • adapterName: string

    Returns any

    Returns either a ctor function or null.

getAdapterInstance

  • getAdapterInstance<T>(interfaceName: AdapterType, adapterName?: string): T
  • Returns the adapter instance corresponding to the specified interface and adapter names.

    method

    getAdapterInstance

    internal

    Type parameters

    Parameters

    • interfaceName: AdapterType

      The name of the interface.

    • Optional adapterName: string

    Returns T

getInterfaceDef

  • getInterfaceDef<T>(interfaceName: string): InterfaceDef<T>

getRegisteredFunction

  • getRegisteredFunction(fnName: string): any

initializeAdapterInstance

  • initializeAdapterInstance(interfaceName: AdapterType, adapterName: string, isDefault?: boolean): BaseAdapter
  • 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.

    method

    initializeAdapterInstance

    Parameters

    • interfaceName: AdapterType

      The name of the interface to which the adapter to initialize belongs.

    • adapterName: string

      The name of a previously registered adapter to initialize.

    • Default value isDefault: boolean = true

    Returns BaseAdapter

registerAdapter

  • registerAdapter<T>(interfaceName: AdapterType, adapterCtor: AdapterCtor<T>): void
  • Method use to register implementations of standard breeze interfaces. Calls to this method are usually made as the last step within an adapter implementation.

    method

    registerAdapter

    Type parameters

    Parameters

    • interfaceName: AdapterType

      one of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"

    • adapterCtor: AdapterCtor<T>

      an ctor function that returns an instance of the specified interface.

    Returns void

registerFunction

  • registerFunction(fn: Function, fnName: string): void
  • this is needed for reflection purposes when deserializing an object that needs a fn or ctor. Used to register validators.

    Parameters

    • fn: Function
    • fnName: string

    Returns void

registerType

  • registerType(ctor: Function, typeName: string): void
  • Parameters

    • ctor: Function
    • typeName: string

    Returns void

setQ

  • setQ(q: any): void
  • deprecated

    @internal no-op kept for backward compatibility

    Parameters

    • q: any

    Returns void

Generated using TypeDoc