Skip to main content

abstractASharedResource <T>

Hierarchy

Index

Properties

abstractreadonlyNODE_NAME

NODE_NAME: string

readonlyNODE_TYPE

NODE_TYPE: NodeType = NodeType.SHARED_RESOURCE

readonlyproperties

properties: {}

Type declaration

  • [key string]: unknown

readonlyresourceId

resourceId: string

readonlyresponse

response: {} = {}

Type declaration

  • [key string]: unknown

Methods

addChild

  • Parameters

    • onField: string | keyof T
    • child: UnknownNode
    • toField: string

    Returns { childToParentDependency: Dependency; parentToChildDependency: Dependency }

addRelationship

diff

  • diff(): Promise<Diff[]>
  • Returns Promise<Diff[]>

diffInverse

  • diffInverse(diff: Diff, deReferenceResource: (resourceId: string) => Promise<UnknownResource>): Promise<void>
  • Parameters

    Returns Promise<void>

diffProperties

  • Parameters

    Returns Promise<Diff[]>

findParentsByProperty

  • findParentsByProperty(filters: { key: string | number; value: any }[]): AResource<T>[]
  • Parameters

    • filters: { key: string | number; value: any }[]

    Returns AResource<T>[]

getAncestors

  • Returns UnknownNode[]

getBoundaryMembers

  • Returns UnknownNode[]

getChild

  • getChild(name: string, filters?: { key: string; value: any }[]): undefined | UnknownNode
  • Parameters

    • name: string
    • filters: { key: string; value: any }[] = []

    Returns undefined | UnknownNode

getChildren

  • getChildren(name?: string): {}
  • Parameters

    • optionalname: string

    Returns {}

getContext

  • getContext(): string
  • Returns string

getDependencies

getDependency

getDependencyIndex

getParents

  • getParents(name?: string): {}
  • Parameters

    • optionalname: string

    Returns {}

getSharedResource

  • Returns undefined | ASharedResource<T>

getSiblings

  • getSiblings(name?: string): {}
  • Parameters

    • optionalname: string

    Returns {}

hasAncestor

  • Parameters

    Returns boolean

isMarkedDeleted

  • isMarkedDeleted(): boolean
  • To check if self is marked as deleted. A deleted node will be removed from the graph after the transaction.


    Returns boolean

merge

remove

  • remove(): void
  • To mark self as deleted. A deleted node will be removed from the graph after the transaction.

    • A node cannot be deleted if it has dependencies.
    @throws

    Error If node contains dependencies to other nodes.


    Returns void

removeDependency

  • removeDependency(dependencyIndex: number): void
  • Parameters

    • dependencyIndex: number

    Returns void

removeRelationship

  • Parameters

    Returns void

setContext

  • setContext(): string
  • Returns string

synth

  • Returns IResource

staticunSynth

  • Parameters

    • deserializationClass: any
    • resource: IResource
    • parentResourceIds: string[]
    • deReferenceResource: (resourceId: string) => Promise<UnknownResource>

    Returns Promise<UnknownResource>