The EditLdkitInstanceGenerator class is responsible for generating the implementation of the instance edit 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 edit capability of the generated application.

Hierarchy (View Summary)

Constructors

Properties

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

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 edit capability implementation. After all dependencies needed by template (@see {EditLdkitInstanceTemplate} 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 edit capability.

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