PresentationManager Class

Backend Presentation manager which pulls the presentation data from an iModel using native platform.

Methods

Name Description
constructor(props?: PresentationManagerProps): PresentationManager Creates an instance of PresentationManager.  
compareHierarchies(requestOptions: WithClientRequestContext<HierarchyCompareOptions<IModelDb, NodeKey, RulesetVariable>>): Promise<HierarchyCompareInfo> Compares two hierarchies specified in the request options  
compareHierarchies(requestContext: ClientRequestContext, requestOptions: HierarchyCompareOptions<IModelDb, NodeKey, RulesetVariable>): Promise<PartialHierarchyModification[]>   Deprecated  
computeSelection(requestOptions: WithClientRequestContext<SelectionScopeRequestOptions<IModelDb> & { ids: string[], scopeId: string }>): Promise<KeySet> Computes selection set based on provided selection scope.  
computeSelection(requestContext: ClientRequestContext, requestOptions: SelectionScopeRequestOptions<IModelDb>, ids: string[], scopeId: string): Promise<KeySet> Computes selection set based on provided selection scope. Deprecated  
computeSelection(requestOptions: WithClientRequestContext<ComputeSelectionRequestOptions<IModelDb>>): Promise<KeySet>    
dispose(): void Dispose the presentation manager.  
getContent(requestOptions: WithClientRequestContext<Paged<ExtendedContentRequestOptions<IModelDb, Descriptor, KeySet, RulesetVariable>>>): Promise<undefined | Content> Retrieves the content based on the supplied content descriptor override.  
getContent(requestContext: ClientRequestContext, requestOptions: Paged<ContentRequestOptions<IModelDb, RulesetVariable>>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<undefined | Content> Retrieves the content based on the supplied content descriptor override. Deprecated  
getContentAndSize(requestContext: ClientRequestContext, requestOptions: Paged<ContentRequestOptions<IModelDb, RulesetVariable>>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<{ content: undefined | Content, size: number }> Retrieves the content and content size based on supplied content descriptor override. Deprecated  
getContentDescriptor(requestOptions: WithClientRequestContext<ContentDescriptorRequestOptions<IModelDb, KeySet, RulesetVariable>>): Promise<undefined | Descriptor> Retrieves the content descriptor which can be used to get content  
getContentDescriptor(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb, RulesetVariable>, displayType: string, keys: KeySet, selection: undefined | SelectionInfo): Promise<undefined | Descriptor> Retrieves the content descriptor which can be used to get content. Deprecated  
getContentSetSize(requestOptions: WithClientRequestContext<ExtendedContentRequestOptions<IModelDb, Descriptor, KeySet, RulesetVariable>>): Promise<number> Retrieves the content set size based on the supplied content descriptor override  
getContentSetSize(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb, RulesetVariable>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<number> Retrieves the content set size based on the supplied content descriptor override Deprecated  
getDisplayLabelDefinition(requestOptions: WithClientRequestContext<DisplayLabelRequestOptions<IModelDb, InstanceKey>>): Promise<LabelDefinition> Retrieves display label definition of specific item  
getDisplayLabelDefinition(requestContext: ClientRequestContext, requestOptions: LabelRequestOptions<IModelDb>, key: InstanceKey): Promise<LabelDefinition> Retrieves display label definition of specific item Deprecated  
getDisplayLabelDefinitions(requestOptions: WithClientRequestContext<Paged<DisplayLabelsRequestOptions<IModelDb, InstanceKey>>>): Promise<LabelDefinition[]> Retrieves display label definitions of specific items  
getDisplayLabelDefinitions(requestContext: ClientRequestContext, requestOptions: LabelRequestOptions<IModelDb>, instanceKeys: InstanceKey[]): Promise<LabelDefinition[]> Retrieves display labels definitions of specific items Deprecated  
getDistinctValues(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb, RulesetVariable>, descriptor: Descriptor | DescriptorOverrides, keys: KeySet, fieldName: string, maximumValueCount: number = 0): Promise<string[]> Retrieves distinct values of specific field from the content based on the supplied content descriptor override. Deprecated  
getElementProperties(requestOptions: WithClientRequestContext<ElementPropertiesRequestOptions<IModelDb>>): Promise<undefined | ElementProperties> Retrieves property data in a simplified format for a single element specified by ID. Beta  
getFilteredNodePaths(requestOptions: WithClientRequestContext<HierarchyRequestOptions<IModelDb, RulesetVariable> & { filterText: string }>): Promise<NodePathElement[]> Retrieves paths from root nodes to nodes containing filter text in their label.  
getFilteredNodePaths(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb, RulesetVariable>, filterText: string): Promise<NodePathElement[]> Retrieves paths from root nodes to nodes containing filter text in their label. Deprecated  
getNodePaths(requestOptions: WithClientRequestContext<HierarchyRequestOptions<IModelDb, RulesetVariable> & { markedIndex: number, paths: InstanceKey[][] }>): Promise<NodePathElement[]> Retrieves paths from root nodes to children nodes according to specified instance key paths.  
getNodePaths(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb, RulesetVariable>, paths: InstanceKey[][], markedIndex: number): Promise<NodePathElement[]> Retrieves paths from root nodes to children nodes according to specified instance key paths. Deprecated  
getNodes(requestOptions: WithClientRequestContext<Paged<ExtendedHierarchyRequestOptions<IModelDb, NodeKey, RulesetVariable>>>): Promise<Node[]> Retrieves nodes  
getNodes(requestContext: ClientRequestContext, requestOptions: Paged<HierarchyRequestOptions<IModelDb, RulesetVariable>>, parentKey?: NodeKey): Promise<Node[]> Retrieves nodes Deprecated  
getNodesAndCount(requestContext: ClientRequestContext, requestOptions: Paged<HierarchyRequestOptions<IModelDb, RulesetVariable>>, parentKey?: NodeKey): Promise<{ count: number, nodes: Node[] }> Retrieves nodes and node count Deprecated  
getNodesCount(requestOptions: WithClientRequestContext<ExtendedHierarchyRequestOptions<IModelDb, NodeKey, RulesetVariable>>): Promise<number> Retrieves nodes count  
getNodesCount(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb, RulesetVariable>, parentKey?: NodeKey): Promise<number> Retrieves nodes count Deprecated  
getPagedDistinctValues(requestOptions: WithClientRequestContext<DistinctValuesRequestOptions<IModelDb, Descriptor, KeySet, RulesetVariable>>): Promise<PagedResponse<DisplayValueGroup>> Retrieves distinct values of specific field from the content based on the supplied content descriptor override.  
getSelectionScopes(requestOptions: WithClientRequestContext<SelectionScopeRequestOptions<IModelDb>>): Promise<SelectionScope[]> Retrieves available selection scopes.  
getSelectionScopes(requestContext: ClientRequestContext, requestOptions: SelectionScopeRequestOptions<IModelDb>): Promise<SelectionScope[]> Retrieves available selection scopes. Deprecated  
rulesets(): RulesetManager Get rulesets manager  
vars(rulesetId: string): RulesetVariablesManager Get ruleset variables manager for specific ruleset  

Properties

Name Type Description
activeLocale undefined | string Get / set active locale used for localizing presentation data  
activeUnitSystem undefined | PresentationUnitSystem Get / set active unit system used to format property values with units  
props Accessor ReadOnly PresentationManagerProps Properties used to initialize the manager  

Defined in

Last Updated: 29 November, 2022