import type { PageTypeV2, PageTypeV4 } from '@sap/ux-specification-types'; import type { V2Controls, V2Pages } from '../../v2/types'; import type { V4Controls, V4Pages } from '../../v4/types'; /** * Common interface that is used for all instantiations of (reflect) metadata classes */ export interface MetadataInstanceInterface { /** * */ createInstance(pageType: PageTypeV2 | PageTypeV4, schemaPropertyName: string, data?: object, controlPropertyValue?: string): any; /** * */ createPageInstance(pageType: PageTypeV2 | PageTypeV4, data?: object): object; } export declare abstract class MetadataFactory implements MetadataInstanceInterface { private readonly controls; private readonly pages; private readonly pageTypes; /** * Sub-classes for V2 and V4 have to pass their specific (reflect) metadata classes. * * @param controls - list of imported metadata classes for controls * @param pages - list of imported metadata classes for pages * @param pageTypes - list of supported pages, entry point to further definitions */ protected constructor(controls: V2Controls | V4Controls, pages: V2Pages | V4Pages, pageTypes: object); /** * Creates an instance of a metadata class for a given (complex) property of a JSON schema. * * @param {PageTypeV2} pageType - page type of a Fiori Element * @param schemaPropertyName - name of the complex property in the JSON schema of the page. * Used as fallback if no metadataclass can be found by evaluating controlPropertyValue. * @param data - data object from which the values shall be taken over, representing a part of the config * @param controlPropertyValue - value of a controling property that categorizes the complex property, e.g. table type or card template * @returns a class instance comprising the reflect metadata for import or export. * If no metadata class could be identified, assumption is that no dedicated handler class exists; thus the original data object is returned as is. */ createInstance(pageType: PageTypeV2 | PageTypeV4, schemaPropertyName: string, data?: object, controlPropertyValue?: string): any; /** * Creates an instance of a metadata class for a given page. * * @param {PageTypeV2} pageType - page type of a Fiori Element * @param data - data to be taken over (from the config) * @returns a class instance comprising the reflect metadata for import or export */ createPageInstance(pageType: PageTypeV2 | PageTypeV4, data?: object): object; } //# sourceMappingURL=factory.d.ts.map