Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CaseTreeService

Implements

  • OnDestroy

Index

Constructors

Properties

_caseResourceService: CaseResourceService
_currentNode: CaseTreeNode
_isEagerLoaded: boolean = false

Weather the tree is eager loaded or not.

Defaults to false.

It is not recommended to eager load large trees as each node sends a separate backend request to load its data.

_logger: LoggerService
_optionSelectorComponent: any
_processService: ProcessService
_reloadedCaseId: string

string id of the case, that is currently being reloaded, undefined if no case is currently being reloaded

_rootNode: CaseTreeNode
_rootNodesFilter: Filter
_showRoot: boolean
_sideMenuService: SideMenuService
_taskResourceService: TaskResourceService
_translateService: TranslateService
_treeCaseViewService: TreeCaseViewService
_treeConfiguration: TreeCaseViewConfiguration
_treeControl: NestedTreeControl<CaseTreeNode, CaseTreeNode>
_treeDataSource: MatTreeNestedDataSource<CaseTreeNode>
_treeRootLoaded$: ReplaySubject<boolean>
DEFAULT_PAGE_SIZE: 50 = 50

Accessors

  • get _currentCase(): Case
  • get isEagerLoaded(): boolean
  • set isEagerLoaded(eager: boolean): void
  • set rootFilter(filter: Filter): void
  • get rootNodeAddingChild$(): Observable<boolean>
  • get rootNodeLoading$(): Observable<boolean>
  • get treeRootLoaded$(): Observable<boolean>

Methods

  • addChildNode(clickedNode: CaseTreeNode): Observable<boolean>
  • addRootChildNode(): Observable<boolean>
  • createAndAddChildCase(processIdentifier: string, clickedNode: CaseTreeNode, operationResult: Subject<boolean>): void
  • deleteRemovedNodes(parentNode: CaseTreeNode, newCaseRefValue: string[]): void
  • determineCaseUpdate(oldCase: Case, newCase: Case): CaseUpdateResult
  • initializeTree(showRoot: boolean): Observable<void>
  • loadTreeRoot(): void
  • Loads and populates the topmost level of the tree.

    The displayed cases are determined by this object's [rootFilter]{@link CaseTreeService#rootFilter}.

    Cases are loaded one page at a time and the tree is refreshed after each page. [finishedLoadingFirstLevel$]{@link CaseTreeService#treeRootLoaded$} will emit true once the last page loads successfully. false will be emitted if any of the requests fail.

    Returns void

  • ngOnDestroy(): void
  • performCaseRefCall(caseId: string, newCaseRefValue: string[]): Observable<string[]>
  • reloadCurrentCase(): void
  • Reloads the currently selected case node. The Case object held in the CaseTreeNode instance is not replaced, but the new Case is Object.assign-ed into it. This means that the reference to the Case instance is unchanged but references to all it's non-primitive attributes are changed.

    If a reload of the current node is initiated before the previous one completed, the new one is ignored.

    If the currently selected case changed before a response from backend was received the response is ignored.

    Note that the parent node, nor the child nodes are reloaded.

    Returns void

  • Performs an update after adding or removing a node from the tree.

    If only one node was added adds it into the tree

    If only one node was removed removes it from the tree

    Otherwise collapses the affected node and marks it's children as dirty

    Parameters

    • affectedNode: CaseTreeNode

      node that had it's children changed

    • newCaseRefValue: string[]

      new value of the caseRef field returned by backend

    Returns Observable<ResultWithAfterActions<boolean>>

    an Observable that emits an object with the [result]{@link ResultWithAfterActions#result} attribute set to true if the update completes successfully and false otherwise.

  • updatePageOfChildren(node: CaseTreeNode, pageNumber: number): Observable<void>
  • updateTreeAfterChildAdd(clickedNode: CaseTreeNode, newCaseRefValue: string[], operationResult: Subject<boolean>): void

Generated using TypeDoc