The CreateLdkitInstanceGenerator class is responsible for generating the implementation of the instance creation capability using the LDkit library. This class provides specific logic for template population and generation of dependencies needed for the data layer of the instance creation capability of the generated application.

Hierarchy (View Summary)

Constructors

Properties

_filePath: string
_templatePath: string
_templateRenderer: TemplateGenerator<CreateTemplate>

Methods

  • Retrieves the title of a template page in the specified language.

    Parameters

    • pageTitleLanguageString: undefined | LanguageString

      An object containing language-specific titles.

    • languageId: string = "en"

      The language identifier for the title. Defaults to "en", if not provided.

    Returns null | string

    The page title in the specified language, or the first available language if not found.

  • This method is responsible for the population and rendering of the template for create capability implementation. After all dependencies needed by template (@see {CreateLdkitInstanceTemplate} for more details) are populated, the template renderer is invoked to generate the resulting code.

    Parameters

    • dependencies: LdkitDalDependencyMap

      Dependencies providing the information about the aggregate and context for the template.

    Returns Promise<LayerArtifact>

    A promise that resolves to the artifact which contains generated implementation for instance creation capability.

    An error if the creator interface artifact or its dependencies are not found or valid.