Class BehavioursInstanceManager

Behaviours Instance Manager service provides high-level API for retrieving, storing, validating and updating Behaviours configurations.

Hierarchy

  • BehavioursInstanceManager

Constructors

Properties

_instanceConfigs: {
    [tenantId: string]: Promise<TenantBehavioursConfigs> | undefined;
} = {}

Type declaration

  • [tenantId: string]: Promise<TenantBehavioursConfigs> | undefined
behaviours: BehaviourBase<string, KosmosConfig<string>, InstanceConfig<string>>[]

Methods

  • Stores new instance of the Behaviour.

    Note this method does NOT perform access checks!

    Parameters

    • tenantId: string

      The tenant ID from request.

    • entityType: string

      The entity type. Note that it may be either real schema item type (e.g. vertex label) OR a virtual content type, depending on the way Behaviours are attached.

    • config: InstanceConfig<string>

      The behaviour configuration, including behaviour type.

    Returns Promise<void>

  • Retrieves Behaviour instance config.

    Type Parameters

    • TName extends string

    Parameters

    • tenantId: string

      The tenant ID from request.

    • entityType: string

      The entity type. Note that it may be either real schema item type (e.g. vertex label) OR a virtual content type, depending on the way Behaviours are attached.

    • machineName: TName

      The behaviour machine name.

    • Optional required: false

      Whether the config is required; used to overload the method.

    Returns Promise<null | InstanceConfig<TName>>

  • Type Parameters

    • TName extends string

    Parameters

    • tenantId: string
    • entityType: string
    • machineName: TName
    • required: true

    Returns Promise<InstanceConfig<TName>>

  • Lists all enabled Behaviours instances for a specific tenant and entity type.

    Parameters

    • tenantId: string

      The tenant ID from request.

    • entityType: string

      The entity type. Note that it may be either real schema item type (e.g. vertex label) OR a virtual content type, depending on the way Behaviours are attached.

    Returns Promise<BehavioursConfigsByName>

  • Removes Behaviour instance.

    Note this method does NOT perform access checks!

    Parameters

    • tenantId: string

      The tenant ID from request.

    • entityType: string

      The entity type. Note that it may be either real schema item type (e.g. vertex label) OR a virtual content type, depending on the way Behaviours are attached.

    • machineName: string

      The behaviour machine name.

    Returns Promise<void>

  • Retrieves Behaviours instances configurations for a specific tenant.

    Parameters

    • tenantId: string

      The tenant ID.

    Returns Promise<TenantBehavioursConfigs>

Generated using TypeDoc