import { DataSourceProperty, DataSourcePropertyDisplayInformation, PropertyConfiguration, PropertyDataSourceId, PropertyDefinition, PropertyDefinitionId, UserIdentity } from "../../../models"; import { WritebackResult } from "./DataSourcePropertiesService"; export interface IDataSourcePropertyCreator { createPropertyFromString(propertyName: string): Promise; } export declare abstract class PropertyDataSourceBase { readonly currentUser: UserIdentity; readonly isImpersonatedUser: boolean; abstract readonly title: string; abstract readonly id: PropertyDataSourceId; abstract supportsWriteback2(properties: Array): Promise>; abstract writeback(properties: Array<{ dataSourceProperty: TDataSourceProperty; valueToWriteback: any; }>): Promise>; /** * Should compare the properties 1 and 2 and return true if they match, on property values * @param dataSourceProperty1 DataSourceProperty 1 * @param dataSourceProperty2 DataSourceProperty 2 */ abstract isEqual(dataSourceProperty1: DataSourceProperty, dataSourceProperty2: DataSourceProperty): boolean; /** * Get all the properties supported by this data source, this is the @type {TDataSourceProperty} is extended to represent the information within a data source to identify a data source property * */ abstract getProperties(): Promise>; /** * Returns the property configuration that should be used when representing this property, if the propertyconfiguration is not know by the source return null * */ abstract getPropertyConfiguration(property: TDataSourceProperty): Promise>>; /** * Returns the property definition id that should be used for representing this property, if the propertydefinition is not know by the source return undefined, selection among source property creators can be made explicitly * */ abstract getPropertyDefinition(property: TDataSourceProperty): Promise; /** * Get the value for datasource properties, the returned data type TDataSourceData must have a matching DataSourcePropertyDefinitionHandler * I.e. so a handler exists that can create property values from the source value type * */ abstract getPropertyValues(properties: Array): Promise>; /** * Get the current display information for a data source property, this is resolved from a data source property, as this information migth relay on system/source data that change over time * */ abstract getPropertyDisplayInformation(dataSourceProperties: Array): Promise>; } export declare abstract class DynamicPropertyDataSource extends PropertyDataSourceBase implements IDataSourcePropertyCreator { abstract createPropertyFromString(propertyName: string): Promise; }