@grandlinex/bundle-multilang
    Preparing search index...

    Class LangModule

    Hierarchy

    Index
    • Parameters

      • kernel: ICoreKernel<any>
      • defaultLang: string
      • dbFc: (mod: CoreBundleModule<any, any, any, any, any>) => IDataBase<any, any>

      Returns LangModule

    channel: string
    defaultLang: string
    logger: CoreLogger | null
    trigger?: () => Promise<void>

    Optional trigger function to be executed during registration.

    • Adds one or more actions to the module.

      Parameters

      • ...action: CoreAction<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>[]

        Actions to add

      Returns void

    • Adds one or more services to the module.

      Parameters

      • ...service: CoreService<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>[]

        Services to add

      Returns void

    • Adds a source bridge.

      Parameters

      • bridge: ICoreBridge

        The bridge to add

      Returns void

    • Adds a target bridge.

      Parameters

      • bridge: ICoreBridge

        The bridge to add

      Returns void

    • Hook called before services are started.

      Returns Promise<void>

    • Parameters

      • ...ags: unknown[]

      Returns void

    • Parameters

      • ...ags: unknown[]

      Returns void

    • Finalization logic for the module.

      Returns Promise<void>

    • Returns the list of actions.

      Returns ICoreAction<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>[]

    • Returns a bridge module by name.

      Type Parameters

      • M extends ICoreAnyModule

      Parameters

      • name: string

        Name of the module

      Returns M

      The bridge module

    • Returns the list of source bridges.

      Returns ICoreBridge[]

    • Returns the cache instance.

      Returns null

      Error if cache is not set

    • Returns the client instance.

      Returns LangClient

      Error if client is not set

    • Returns the database instance.

      Returns LangDb

      Error if database is not set

    • Returns the list of dependency names.

      Returns string[]

    • Returns the kernel instance.

      Returns ICoreKernel

    • Returns the logger instance from the kernel.

      Returns CoreLogger

    • Returns the name of the module.

      Returns string

    • Returns the presenter instance.

      Returns null

      Error if presenter is not set

    • Returns the list of services.

      Returns ICoreService<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>[]

    • Returns true if a cache is set.

      Returns boolean

    • Returns true if a client is set.

      Returns boolean

    • Returns true if a database is set.

      Returns boolean

    • Returns true if a presenter is set.

      Returns boolean

    • Parameters

      • ...ags: unknown[]

      Returns void

    • Returns Promise<void>

    • Abstract method to initialize the module.

      Returns Promise<void>

    • Parameters

      • message: string

      Returns Error

    • Parameters

      • ...ags: unknown[]

      Returns void

    • Notifies all target bridges of a state change.

      Parameters

      • state: BridgeState

        The state to set

      Returns void

    • Registers the module, actions, and services.

      Parameters

      • Optionalaction: string

        Optional kernel event to trigger

      Returns Promise<void>

    • Sets the cache instance.

      Parameters

      • cache: null

        The cache to set

      Returns void

    • Sets the client instance.

      Parameters

      Returns void

    • Sets the database instance.

      Parameters

      • db: LangDb

        The database to set

      Returns void

    • Parameters

      • logger: CoreLogger

      Returns void

    • Sets the presenter instance.

      Parameters

      • presenter: null

        The presenter to set

      Returns void

    • Shuts down the module and its services.

      Returns Promise<void>

    • Starts the presenter and the module.

      Returns Promise<void>

    • Starts a service by name.

      Parameters

      • name: string

        Name of the service

      Returns Promise<
          | ICoreService<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>
          | null,
      >

      The started service or null

    • Startup logic for the module.

      Returns Promise<void>

    • Stops a service by name.

      Parameters

      • name: string

        Name of the service

      Returns Promise<
          | ICoreService<ICoreKernel<any, ICoreAnyModule>, any, any, any, any>
          | null,
      >

      The stopped service or null

    • Parameters

      • ...ags: unknown[]

      Returns void

    • Waits for all source bridges to reach a specific state.

      Parameters

      • state: BridgeState

        The bridge state to wait for

      Returns Promise<void>

    • Parameters

      • ...ags: unknown[]

      Returns void