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.  
computeSelection(requestContext: ClientRequestContext, requestOptions: SelectionScopeRequestOptions<IModelDb>, ids: Id64String[], scopeId: string): Promise<KeySet> Computes selection set based on provided selection scope.  
dispose(): void Dispose the presentation manager.  
getContent(requestContext: ClientRequestContext, requestOptions: Paged<ContentRequestOptions<IModelDb>>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<Content | undefined> Retrieves the content based on the supplied content descriptor override.  
getContentAndSize(requestContext: ClientRequestContext, requestOptions: Paged<ContentRequestOptions<IModelDb>>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<object> Retrieves the content and content size based on supplied content descriptor override.  
getContentDescriptor(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb>, displayType: string, keys: KeySet, selection: SelectionInfo | undefined): Promise<Descriptor | undefined> Retrieves the content descriptor which can be used to get content.  
getContentSetSize(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb>, descriptorOrOverrides: Descriptor | DescriptorOverrides, keys: KeySet): Promise<number> Retrieves the content set size based on the supplied content descriptor override.  
getDisplayLabel(requestContext: ClientRequestContext, requestOptions: LabelRequestOptions<IModelDb>, key: InstanceKey): Promise<string> Retrieves display label of specific item  
getDisplayLabels(requestContext: ClientRequestContext, requestOptions: LabelRequestOptions<IModelDb>, instanceKeys: InstanceKey[]): Promise<string[]> Retrieves display labels of specific items  
getDistinctValues(requestContext: ClientRequestContext, requestOptions: ContentRequestOptions<IModelDb>, descriptor: Descriptor, 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.  
getFilteredNodePaths(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb>, filterText: string): Promise<NodePathElement[]> Retrieves paths from root nodes to nodes containing filter text in their label.  
getNodePaths(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb>, paths: InstanceKey[][], markedIndex: number): Promise<NodePathElement[]> Retrieves paths from root nodes to children nodes according to specified keys.  
getNodes(requestContext: ClientRequestContext, requestOptions: Paged<HierarchyRequestOptions<IModelDb>>, parentKey?: NodeKey): Promise<Node[]> Retrieves nodes  
getNodesAndCount(requestContext: ClientRequestContext, requestOptions: Paged<HierarchyRequestOptions<IModelDb>>, parentKey?: NodeKey): Promise<object> Retrieves nodes and node count  
getNodesCount(requestContext: ClientRequestContext, requestOptions: HierarchyRequestOptions<IModelDb>, parentKey?: NodeKey): Promise<number> Retrieves nodes count  
getSelectionScopes(requestContext: ClientRequestContext, requestOptions: SelectionScopeRequestOptions<IModelDb>): Promise<SelectionScope[]> Retrieves available selection scopes.  
rulesets(): RulesetManager Get rulesets manager  
vars(rulesetId: string): RulesetVariablesManager Get ruleset variables manager for specific ruleset  

Properties

Name Type Description
activeLocale string | undefined Get / set active locale used for localizing presentation data  
props Accessor ReadOnly PresentationManagerProps Properties used to initialize the manager  

Defined in

Last Updated: 20 September, 2019