Class PresentationLayerTemplateGenerator<TemplateType>Abstract

An abstract base class that defines a the base for presentation layer artifact generators which use template population approach. The class extends the generic TemplateConsumer to reuse shared functionality for populating templates. Additionally, it implements the PresentationLayerGenerator interface to provide the methods used within the presentation layer generation process.

The PresentationLayerTemplateGenerator is the base class for concrete presentation layer template processors. Each derived class generates the source code for a specific capability by providing its own template and values for the required placeholders.

  • CreateInstanceComponentTemplateProcessor
  • DeleteInstanceComponentTemplateProcessor
  • DetailComponentTemplateProcessor
  • EditInstanceComponentTemplateProcessor
  • ListTableTemplateProcessor

Type Parameters

Hierarchy (View Summary)

Implements

Constructors

Properties

_filePath: string
_templatePath: string
_templateRenderer: TemplateGenerator<TemplateType>
strategyIdentifier: string = ""

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.

  • Restores the data model interface for an aggregate and converts it to the corresponding JSON schema.

    Parameters

    • aggregate: AggregateMetadata

      The metadata of the aggregate for which the data model interface needs to be restored.

    Returns JSONSchema7

    The restored schema as a JSON Schema object.