Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExternalContextCreator

Hierarchy

  • ExternalContextCreator

Index

Constructors

constructor

  • new ExternalContextCreator(guardsContextCreator: any, guardsConsumer: any, interceptorsContextCreator: any, interceptorsConsumer: any, modulesContainer: any, pipesContextCreator: any, pipesConsumer: any, filtersContextCreator: any): ExternalContextCreator
  • Parameters

    • guardsContextCreator: any
    • guardsConsumer: any
    • interceptorsContextCreator: any
    • interceptorsConsumer: any
    • modulesContainer: any
    • pipesContextCreator: any
    • pipesConsumer: any
    • filtersContextCreator: any

    Returns ExternalContextCreator

Properties

Private container

container: NestContainer

Private Readonly contextUtils

contextUtils: ContextUtils = new ContextUtils()

Private Readonly externalErrorProxy

externalErrorProxy: ExternalErrorProxy = new ExternalErrorProxy()

Private Readonly filtersContextCreator

filtersContextCreator: ExternalExceptionFilterContext

Private Readonly guardsConsumer

guardsConsumer: GuardsConsumer

Private Readonly guardsContextCreator

guardsContextCreator: GuardsContextCreator

Private Readonly handlerMetadataStorage

handlerMetadataStorage: HandlerMetadataStorage<ExternalHandlerMetadata, any> = new HandlerMetadataStorage<ExternalHandlerMetadata>()

Private Readonly interceptorsConsumer

interceptorsConsumer: InterceptorsConsumer

Private Readonly interceptorsContextCreator

interceptorsContextCreator: InterceptorsContextCreator

Private Readonly modulesContainer

modulesContainer: ModulesContainer

Private Readonly pipesConsumer

pipesConsumer: PipesConsumer

Private Readonly pipesContextCreator

pipesContextCreator: PipesContextCreator

Methods

create

  • create(instance: any, callback: any, methodName: any, metadataKey: any, paramsFactory: any, contextId?: ContextId, inquirerId: any, options?: { filters: boolean; guards: boolean; interceptors: boolean }, contextType?: string): target
  • Parameters

    • instance: any
    • callback: any
    • methodName: any
    • metadataKey: any
    • paramsFactory: any
    • Default value contextId: ContextId = constants_3.STATIC_CONTEXT
    • inquirerId: any
    • Default value options: { filters: boolean; guards: boolean; interceptors: boolean } = {interceptors: true,guards: true,filters: true,}
      • filters: boolean
      • guards: boolean
      • interceptors: boolean
    • Default value contextType: string = "http"

    Returns target

createGuardsFn

  • createGuardsFn(guards: any, instance: any, callback: any, contextType: any): canActivateFn
  • Parameters

    • guards: any
    • instance: any
    • callback: any
    • contextType: any

    Returns canActivateFn

createPipesFn

  • createPipesFn(pipes: any, paramsOptions: any): pipesFn
  • Parameters

    • pipes: any
    • paramsOptions: any

    Returns pipesFn

exchangeKeysForValues

  • exchangeKeysForValues(keys: any, metadata: any, moduleContext: any, paramsFactory: any, contextId?: ContextId, inquirerId: any, contextFactory?: (args: unknown[]) => ExecutionContextHost): any
  • Parameters

    • keys: any
    • metadata: any
    • moduleContext: any
    • paramsFactory: any
    • Default value contextId: ContextId = constants_3.STATIC_CONTEXT
    • inquirerId: any
    • Default value contextFactory: (args: unknown[]) => ExecutionContextHost = this.contextUtils.getContextFactory('http')
        • (args: unknown[]): ExecutionContextHost
        • Parameters

          • args: unknown[]

          Returns ExecutionContextHost

    Returns any

getContextModuleName

  • getContextModuleName(constructor: any): any
  • Parameters

    • constructor: any

    Returns any

getMetadata

  • getMetadata(instance: any, methodName: any, metadataKey: any, paramsFactory: any, contextType: any): { argsLength: number; getParamsMetadata: getParamsMetadata; paramtypes: any[] }
  • Parameters

    • instance: any
    • methodName: any
    • metadataKey: any
    • paramsFactory: any
    • contextType: any

    Returns { argsLength: number; getParamsMetadata: getParamsMetadata; paramtypes: any[] }

    • argsLength: number
    • getParamsMetadata: getParamsMetadata
    • paramtypes: any[]

getParamValue

  • getParamValue(value: any, __namedParameters: { data: any; metatype: any; type: any }, pipes: any): Promise<any>
  • Parameters

    • value: any
    • __namedParameters: { data: any; metatype: any; type: any }
      • data: any
      • metatype: any
      • type: any
    • pipes: any

    Returns Promise<any>

getProviderByClassName

  • getProviderByClassName(module: any, className: any): boolean
  • Parameters

    • module: any
    • className: any

    Returns boolean

registerRequestProvider

  • registerRequestProvider(request: any, contextId: any): void
  • Parameters

    • request: any
    • contextId: any

    Returns void

transformToResult

  • transformToResult(resultOrDeffered: any): Promise<any>
  • Parameters

    • resultOrDeffered: any

    Returns Promise<any>

Static fromContainer

  • Parameters

    • container: any

    Returns ExternalContextCreator

Generated using TypeDoc